Commit 46136ab1 by chenwq

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

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