|
@@ -35,6 +35,7 @@ export default class MonitorProjectApi extends MonitorApiBase {
|
|
|
return ajaxFollowProjectAdd({ sid: this.id }).then((res) => {
|
|
|
const result = {
|
|
|
success: false,
|
|
|
+ msg: '',
|
|
|
data: {}
|
|
|
}
|
|
|
result.success = res?.error_code === 0 && res?.data?.status
|
|
@@ -45,6 +46,8 @@ export default class MonitorProjectApi extends MonitorApiBase {
|
|
|
if (result.success) {
|
|
|
this.model.expands.used += 1
|
|
|
this.model.expands.surplus = Math.max(this.model.expands.surplus - 1, 0)
|
|
|
+ } else {
|
|
|
+ result.msg = res?.error_msg || '抱歉,操作失败'
|
|
|
}
|
|
|
return result
|
|
|
})
|
|
@@ -54,6 +57,7 @@ export default class MonitorProjectApi extends MonitorApiBase {
|
|
|
(res) => {
|
|
|
const result = {
|
|
|
success: false,
|
|
|
+ msg: '',
|
|
|
data: {}
|
|
|
}
|
|
|
result.success = res?.error_code === 0 && res?.data === 'success'
|
|
@@ -61,6 +65,8 @@ export default class MonitorProjectApi extends MonitorApiBase {
|
|
|
if (result.success) {
|
|
|
this.model.expands.surplus += 1
|
|
|
this.model.expands.used = Math.max(this.model.expands.used - 1, 0)
|
|
|
+ } else {
|
|
|
+ result.msg = res?.error_msg || '抱歉,操作失败'
|
|
|
}
|
|
|
return result
|
|
|
}
|