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 class="fill">兑换人:{{ row.createUserName }}</div>
|
||||||
<div v-text="row.createTime"/>
|
<div v-text="row.createTime"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.orderStatus==0" flex class="flexEnd">
|
<div v-if="row.orderStatus==0 || row.orderStatus==3" flex class="flexEnd">
|
||||||
<div class="btn" @click="handleCancel(row.id)">取消订单</div>
|
<div class="btn" v-if="row.orderStatus==0 || row.orderStatus==3" @click="handleCancel(row.id)">取消订单</div>
|
||||||
<div class="btn confirm" @click="handleConfirm(row.id)">确认兑换</div>
|
<div class="btn confirm" v-if="row.orderStatus==0" @click="handleConfirm(row.id)">确认兑换</div>
|
||||||
</div>
|
</div>
|
||||||
<u-gap height="1"/>
|
<u-gap height="1"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ export default {
|
|||||||
this.current++;
|
this.current++;
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
})
|
})
|
||||||
|
uni.$on('updateIntegral', () => {
|
||||||
|
this.getInfo()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 积分排行
|
// 积分排行
|
||||||
|
|||||||
@@ -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,12 +62,17 @@ 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 => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
|
uni.$emit("updateIntegral")
|
||||||
this.$u.toast("提交成功!")
|
this.$u.toast("提交成功!")
|
||||||
uni.navigateBack({})
|
uni.navigateBack({})
|
||||||
|
}else {
|
||||||
|
this.flag = false
|
||||||
|
this.$u.toast(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user