提交订单

main
lion 1 year ago
parent c1a65a733c
commit cc37fc346a

@ -246,7 +246,8 @@
datePicker datePicker
}, },
data() { data() {
return { return {
isLocked:false,
showinfo: false, showinfo: false,
showagree: false, showagree: false,
isAgree: false, isAgree: false,
@ -800,7 +801,11 @@
if (this.isAgree) { if (this.isAgree) {
this.form.show = 0 this.form.show = 0
if (this.type == 'edit') { if (this.type == 'edit') {
console.log("this.form", this.form) console.log("this.form", this.form)
if(this.isLocked){
return
}
this.isLocked = true
this.$u.api.saveUserOrder(this.form).then(res => { this.$u.api.saveUserOrder(this.form).then(res => {
uni.removeStorageSync('vuex_update_card') uni.removeStorageSync('vuex_update_card')
toast(res.msg, 1000, function() { toast(res.msg, 1000, function() {
@ -810,13 +815,18 @@
}) })
}).then(res => { }).catch(res => {
this.isLocked = false
console.log('res1', res) console.log('res1', res)
}) })
} else { } else {
console.log("this.form", this.form) console.log("this.form", this.form)
// return // return
if(this.isLocked){
return
}
this.isLocked = true
this.$u.api.addUserOrder(this.form).then(res => { this.$u.api.addUserOrder(this.form).then(res => {
console.log("res", res) console.log("res", res)
uni.removeStorageSync('vuex_card') uni.removeStorageSync('vuex_card')
@ -827,7 +837,8 @@
}) })
}).then(res => { }).catch(res => {
this.isLocked = false
console.log('res1', res) console.log('res1', res)
}) })

Loading…
Cancel
Save