Commit 46136ab1 by chenwq

fix(积分管理): 修复更新客户积分接口返回处理逻辑

修改updateCustomerIntegral接口添加returnAll参数以返回完整响应
调整add.vue中响应处理逻辑,仅当code为0时视为成功
1 parent 964a4b9b
......@@ -206,7 +206,8 @@ const updateCustomerIntegral = params => {
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......
......@@ -477,14 +477,15 @@ export default {
if (id) params.id = id
const res = await this.$apis.points.updateCustomerIntegral(params)
console.log(res)
if (res) {
if (res.code == 0) {
this.$message({
message: id ? '编辑成功' : '创建成功',
type: 'success'
})
setTimeout(() => this.$router.go(-1), 1e3)
}
this.loading = false
} else {
this.loading = false
}
} catch (error) {
this.loading = false
this.$message.error(error || '操作失败')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!