diff --git a/src/apps/AppCreditPoints/AppIntegralOrder.vue b/src/apps/AppCreditPoints/AppIntegralOrder.vue
index 8d5dcc85..eafdaa98 100644
--- a/src/apps/AppCreditPoints/AppIntegralOrder.vue
+++ b/src/apps/AppCreditPoints/AppIntegralOrder.vue
@@ -31,9 +31,9 @@
兑换人:{{ row.createUserName }}
-
diff --git a/src/apps/AppCreditPoints/components/sysUserIntegral.vue b/src/apps/AppCreditPoints/components/sysUserIntegral.vue
index 8a2a8eb7..7df2030c 100644
--- a/src/apps/AppCreditPoints/components/sysUserIntegral.vue
+++ b/src/apps/AppCreditPoints/components/sysUserIntegral.vue
@@ -53,6 +53,9 @@ export default {
this.current++;
this.getInfo()
})
+ uni.$on('updateIntegral', () => {
+ this.getInfo()
+ })
},
methods: {
// 积分排行
diff --git a/src/apps/AppCreditPoints/giveIntegral.vue b/src/apps/AppCreditPoints/giveIntegral.vue
index 7e27aef5..0817cf38 100644
--- a/src/apps/AppCreditPoints/giveIntegral.vue
+++ b/src/apps/AppCreditPoints/giveIntegral.vue
@@ -35,7 +35,8 @@ export default {
data() {
return {
info: {},
- form: {userName: ""}
+ form: {userName: ""},
+ flag: false
}
},
methods: {
@@ -50,6 +51,7 @@ export default {
})
},
submit() {
+ if(this.flag) return
let {objectType, userId, integral} = this.form
if (!objectType) {
return this.$u.toast("请选择对象")
@@ -60,12 +62,17 @@ export default {
if (isNaN(integral) || !/^\d*[.\d]\d?$/.test(integral)) {
return this.$u.toast("请输入赠送分值,最多保留一位小数")
}
+ this.flag = true
this.$http.post("/admin/user/giveIntegral", null, {
params: {...this.form}
}).then(res => {
if (res?.code == 0) {
+ uni.$emit("updateIntegral")
this.$u.toast("提交成功!")
uni.navigateBack({})
+ }else {
+ this.flag = false
+ this.$u.toast(res.msg)
}
})
},