Fix:订单取消支付问题
This commit is contained in:
@@ -324,7 +324,10 @@ export default {
|
|||||||
}
|
}
|
||||||
getGiftCardSendOrder(this.orderKey, params).then(res => {
|
getGiftCardSendOrder(this.orderKey, params).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
this.giftKey = data.giftCard.code;
|
||||||
|
this.orderId = data.result.orderId || ''
|
||||||
switch (data.status) {
|
switch (data.status) {
|
||||||
case "ORDER_EXIST":
|
case "ORDER_EXIST":
|
||||||
case "EXTEND_ORDER":
|
case "EXTEND_ORDER":
|
||||||
@@ -353,8 +356,6 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
this.isPayOk = true;
|
this.isPayOk = true;
|
||||||
this.giftKey = data.giftCard.code;
|
|
||||||
this.orderId = data.result.orderId || ''
|
|
||||||
break;
|
break;
|
||||||
case "WECHAT_H5_PAY":
|
case "WECHAT_H5_PAY":
|
||||||
// H5支付
|
// H5支付
|
||||||
@@ -365,16 +366,24 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case "WECHAT_PAY":
|
case "WECHAT_PAY":
|
||||||
// 小程序支付
|
// 小程序支付
|
||||||
weappPay(data.result.jsConfig).finally(() => {
|
weappPay(data.result.jsConfig).then((e) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
this.isPayOk = true;
|
this.isPayOk = true;
|
||||||
this.giftKey = data.giftCard.code;
|
|
||||||
this.orderId = data.result.orderId || ''
|
}).catch(err => {
|
||||||
});
|
this.makeAgain()
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付取消,请在我的礼品卡中完成支付',
|
||||||
|
icon: "none",
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}).finally(() => {
|
||||||
|
|
||||||
|
})
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "WECHAT_APP_PAY":
|
case "WECHAT_APP_PAY":
|
||||||
|
|||||||
@@ -55,6 +55,18 @@
|
|||||||
赠言:{{ item.message || '' }}
|
赠言:{{ item.message || '' }}
|
||||||
</view>
|
</view>
|
||||||
<!-- 状态 0-待领取 1-已全部领取 2-已失效 -->
|
<!-- 状态 0-待领取 1-已全部领取 2-已失效 -->
|
||||||
|
<button
|
||||||
|
v-if="item.status === -1"
|
||||||
|
class="btn"
|
||||||
|
@click="goBuy(item)"
|
||||||
|
>
|
||||||
|
待付款
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/icon/icon-gift-share.png'"
|
||||||
|
class="icon"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="item.status === 0"
|
v-if="item.status === 0"
|
||||||
open-type="share"
|
open-type="share"
|
||||||
@@ -162,23 +174,40 @@
|
|||||||
ref="giftTips"
|
ref="giftTips"
|
||||||
:richText="giftNotice"
|
:richText="giftNotice"
|
||||||
/>
|
/>
|
||||||
|
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||||
|
<passkeyborad
|
||||||
|
:money="orderInfo.payPrice"
|
||||||
|
showMoney
|
||||||
|
:show="isShowPayPwdPop"
|
||||||
|
ref='payPwdPop'
|
||||||
|
@close="pwdPopClose"
|
||||||
|
@finish="pwdPopFinish"
|
||||||
|
></passkeyborad>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
|
import {cancelOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle, delOrderHandle} from "@/libs/order";
|
||||||
|
import Payment from "@/components/Payment";
|
||||||
import {
|
import {
|
||||||
giftCardReceiveList,
|
giftCardReceiveList,
|
||||||
giftCardSendList,
|
giftCardSendList,
|
||||||
giftNotice
|
giftNotice
|
||||||
} from '@/api/giftList'
|
} from '@/api/giftList'
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
import giftTips from '@/pkg_user/views/gift/components/giftTips.vue'
|
import giftTips from '@/pkg_user/views/gift/components/giftTips.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'GiftLisPage',
|
name: 'GiftLisPage',
|
||||||
components: {
|
components: {
|
||||||
giftTips
|
giftTips,
|
||||||
|
passkeyborad,
|
||||||
|
Payment
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pay: false,
|
||||||
|
payType: ["yue", "weixin"],
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
giftNotice: '',
|
giftNotice: '',
|
||||||
cateIndex: 0,
|
cateIndex: 0,
|
||||||
@@ -193,11 +222,15 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
isLoad: false,
|
isLoad: false,
|
||||||
|
from: this.$deviceType,
|
||||||
sendList: [],
|
sendList: [],
|
||||||
receiveList: [],
|
receiveList: [],
|
||||||
giftItem: {}
|
giftItem: {},
|
||||||
|
orderInfo: {},
|
||||||
|
isShowPayPwdPop: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: mapGetters(["userInfo"]),
|
||||||
created() {
|
created() {
|
||||||
giftNotice().then(res => {
|
giftNotice().then(res => {
|
||||||
this.giftNotice = res.data
|
this.giftNotice = res.data
|
||||||
@@ -212,9 +245,44 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
pwdPopFinish(payPwd) {
|
||||||
|
this.payPassword = payPwd;
|
||||||
|
|
||||||
|
this.toYuePay(payPwd);
|
||||||
|
|
||||||
|
this.isShowPayPwdPop = false;
|
||||||
|
},
|
||||||
|
toYuePay(payPwd) {
|
||||||
|
//网络请求
|
||||||
|
yuePayOrderHandle(this.orderInfo.orderId, "yue", this.from, payPwd).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.getGiftCardSendList()
|
||||||
|
this.payPassword = "";
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pwdPopClose() {
|
||||||
|
this.isShowPayPwdPop = false;
|
||||||
|
},
|
||||||
|
wechatPay(type) {
|
||||||
|
payOrderHandle(this.orderInfo.orderId, type, this.from).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.getGiftCardSendList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goBuy(order) {
|
||||||
|
this.pay = true
|
||||||
|
this.orderInfo = order
|
||||||
|
},
|
||||||
|
toPay(type) {
|
||||||
|
//余额支付需要输入支付密码
|
||||||
|
if (type == "yue") {
|
||||||
|
this.isShowPayPwdPop = true;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.wechatPay(type);
|
||||||
|
}
|
||||||
|
},
|
||||||
shareGift(item) {
|
shareGift(item) {
|
||||||
console.log(item);
|
|
||||||
|
|
||||||
this.giftItem = item
|
this.giftItem = item
|
||||||
},
|
},
|
||||||
cateItemClickHanlde(item, index) {
|
cateItemClickHanlde(item, index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user