积分赠送
This commit is contained in:
@@ -35,7 +35,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
form: {userName: ""}
|
form: {userName: ""},
|
||||||
|
flag: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -50,6 +51,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
if(this.flag) return
|
||||||
let {objectType, userId, integral} = this.form
|
let {objectType, userId, integral} = this.form
|
||||||
if (!objectType) {
|
if (!objectType) {
|
||||||
return this.$u.toast("请选择对象")
|
return this.$u.toast("请选择对象")
|
||||||
@@ -60,6 +62,7 @@ export default {
|
|||||||
if (isNaN(integral) || !/^\d*[.\d]\d?$/.test(integral)) {
|
if (isNaN(integral) || !/^\d*[.\d]\d?$/.test(integral)) {
|
||||||
return this.$u.toast("请输入赠送分值,最多保留一位小数")
|
return this.$u.toast("请输入赠送分值,最多保留一位小数")
|
||||||
}
|
}
|
||||||
|
this.flag = true
|
||||||
this.$http.post("/admin/user/giveIntegral", null, {
|
this.$http.post("/admin/user/giveIntegral", null, {
|
||||||
params: {...this.form}
|
params: {...this.form}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -68,6 +71,7 @@ export default {
|
|||||||
this.$u.toast("提交成功!")
|
this.$u.toast("提交成功!")
|
||||||
uni.navigateBack({})
|
uni.navigateBack({})
|
||||||
}else {
|
}else {
|
||||||
|
this.flag = false
|
||||||
this.$u.toast(res.msg)
|
this.$u.toast(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user