修复优惠券使用后del store存储与修复地址删除错误问题
This commit is contained in:
1 parent
27c4b69cb8
commit
a4a895b548
3 files changed
+16
-4
No files matched your search
@@ -88,11 +88,11 @@ const edit = (id) => {
|
||||
})
|
||||
}
|
||||
const handleSwipeClick = async(id) => {
|
||||
let [error, res] = await uni.showModal({
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要删除?'
|
||||
});
|
||||
if (res && res.confirm) {
|
||||
content: '确定要删除?',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
let data = await addressDelete({
|
||||
id: id
|
||||
});
|
||||
@@ -106,8 +106,15 @@ const handleSwipeClick = async(id) => {
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
// if (res && res.confirm) {
|
||||
|
||||
// }
|
||||
}
|
||||
const chooseAddress = async(address) => {
|
||||
if (!is_choose.value) {
|
||||
return;
|
||||
|
||||
@@ -554,6 +554,8 @@ const pay = async() => {
|
||||
return;
|
||||
}
|
||||
|
||||
main.DEL_COUPON()
|
||||
|
||||
|
||||
if (payType.value == 'weixin') {
|
||||
// 微信支付
|
||||
|
||||
@@ -30,6 +30,9 @@ export const useMainStore = defineStore('main', {
|
||||
//isLogin: state => Object.keys(state.member).length > 0 //是否登录
|
||||
},
|
||||
actions: {
|
||||
DEL_COUPON() {
|
||||
this.mycoupon = {}
|
||||
},
|
||||
SET_COUPON(coupon) {
|
||||
this.mycoupon = coupon
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user