Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -31,9 +31,9 @@
|
||||
<div class="fill">兑换人:{{ row.createUserName }}</div>
|
||||
<div v-text="row.createTime"/>
|
||||
</div>
|
||||
<div v-if="row.orderStatus==0" flex class="flexEnd">
|
||||
<div class="btn" @click="handleCancel(row.id)">取消订单</div>
|
||||
<div class="btn confirm" @click="handleConfirm(row.id)">确认兑换</div>
|
||||
<div v-if="row.orderStatus==0 || row.orderStatus==3" flex class="flexEnd">
|
||||
<div class="btn" v-if="row.orderStatus==0 || row.orderStatus==3" @click="handleCancel(row.id)">取消订单</div>
|
||||
<div class="btn confirm" v-if="row.orderStatus==0" @click="handleConfirm(row.id)">确认兑换</div>
|
||||
</div>
|
||||
<u-gap height="1"/>
|
||||
</div>
|
||||
|
||||
@@ -53,6 +53,9 @@ export default {
|
||||
this.current++;
|
||||
this.getInfo()
|
||||
})
|
||||
uni.$on('updateIntegral', () => {
|
||||
this.getInfo()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 积分排行
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user