|
@@ -28,9 +28,27 @@ export default class MonitorEntApi extends MonitorApiBase {
|
|
|
})
|
|
|
}
|
|
|
async ajaxAdd() {
|
|
|
- return ajaxFollowEntAdd({ entId: this.id })
|
|
|
+ return ajaxFollowEntAdd({ entId: this.id }).then((res) => {
|
|
|
+ const result = {
|
|
|
+ success: false,
|
|
|
+ data: {}
|
|
|
+ }
|
|
|
+ result.success = res?.error_code === 0 && res?.data?.status === 0
|
|
|
+ result.data = res?.data
|
|
|
+ return result
|
|
|
+ })
|
|
|
}
|
|
|
async ajaxRemove() {
|
|
|
- return ajaxFollowEntCancel({ entId: this.id })
|
|
|
+ return ajaxFollowEntCancel({ entId: this.id }).then(
|
|
|
+ (res) => {
|
|
|
+ const result = {
|
|
|
+ success: false,
|
|
|
+ data: {}
|
|
|
+ }
|
|
|
+ result.success = res?.error_code === 0 && res?.data === 'success'
|
|
|
+ result.data = res?.data
|
|
|
+ return result
|
|
|
+ }
|
|
|
+ )
|
|
|
}
|
|
|
}
|