Commit 5b9cc410 authored by youjie's avatar youjie

优化支付提示

parent bf626d2e
...@@ -552,6 +552,13 @@ ...@@ -552,6 +552,13 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-modal :border-radius="16"
@confirm="nativageToOrderHandle"
title="订单提醒"
content="订单创建成功,请您在订单列表查询."
@cancel="navigatorToHomeHandle"
v-model="successVisible" confirm-text='查看订单' cancel-text='返回首页'
confirm-color='#DEBF7B' cancel-color='#080A09' :show-cancel-button="true"></u-modal>
</view> </view>
</template> </template>
...@@ -605,7 +612,8 @@ ...@@ -605,7 +612,8 @@
pzCoupon:null, pzCoupon:null,
userInfo: {}, userInfo: {},
userVipRights:null, userVipRights:null,
vipDiscountMoney:0 vipDiscountMoney:0,
successVisible: false,
}; };
}, },
created() { created() {
...@@ -647,6 +655,23 @@ ...@@ -647,6 +655,23 @@
}, },
methods: { methods: {
navigatorToHomeHandle() {
uni.redirectTo({
url: '/pages/index/index'
})
},
nativageToOrderHandle(){
let OrderTypeStr = ''
// #ifdef MP-DI
OrderTypeStr = '1,2,3'
// #endif
// #ifdef MP-AG
OrderTypeStr = '2'
// #endif
uni.redirectTo({
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=${OrderTypeStr}`,
});
},
submitB2COrderHandler(OrderId) { submitB2COrderHandler(OrderId) {
const pts = [2,1,3] const pts = [2,1,3]
const productType = pts[this.currentPriceInfo.teamType] const productType = pts[this.currentPriceInfo.teamType]
...@@ -733,15 +758,16 @@ ...@@ -733,15 +758,16 @@
fail: function(err) { fail: function(err) {
console.log("fail:", err); console.log("fail:", err);
that.submit = false; that.submit = false;
uni.showToast({ that.successVisible = true
title: "支付失败", // uni.showToast({
icon: "none", // title: "支付失败",
}); // icon: "none",
setTimeout(() => { // });
uni.redirectTo({ // setTimeout(() => {
url: "/pages/jiuzhai/jz_SureOrder?OrderNo=" + OrderNo, // uni.redirectTo({
}); // url: "/pages/jiuzhai/jz_SureOrder?OrderNo=" + OrderNo,
}, 100); // });
// }, 100);
}, },
}); });
}, },
......
...@@ -781,6 +781,13 @@ ...@@ -781,6 +781,13 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-modal :border-radius="16"
@confirm="nativageToOrderHandle"
title="订单提醒"
content="订单创建成功,请您在订单列表查询."
@cancel="navigatorToHomeHandle"
v-model="successVisible" confirm-text='查看订单' cancel-text='返回首页'
confirm-color='#DEBF7B' cancel-color='#080A09' :show-cancel-button="true"></u-modal>
</view> </view>
</template> </template>
...@@ -853,6 +860,7 @@ ...@@ -853,6 +860,7 @@
provinceList: [], provinceList: [],
cityList: [], cityList: [],
userInfo:{}, userInfo:{},
successVisible: false,
}; };
}, },
created() { created() {
...@@ -893,6 +901,23 @@ ...@@ -893,6 +901,23 @@
this.initCountry() this.initCountry()
}, },
methods: { methods: {
navigatorToHomeHandle() {
uni.redirectTo({
url: '/pages/index/index'
})
},
nativageToOrderHandle(){
let OrderTypeStr = ''
// #ifdef MP-DI
OrderTypeStr = '15'
// #endif
// #ifdef MP-AG
OrderTypeStr = '6'
// #endif
uni.redirectTo({
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=${OrderTypeStr}`,
});
},
submitB2COrderHandler(OrderId) { submitB2COrderHandler(OrderId) {
let guestInfo = `${this.orderMsg.AdultPeopleNum} 人; `; let guestInfo = `${this.orderMsg.AdultPeopleNum} 人; `;
if (this.orderMsg.ChildPeopleNum > 0) { if (this.orderMsg.ChildPeopleNum > 0) {
...@@ -963,15 +988,16 @@ ...@@ -963,15 +988,16 @@
fail: function(err) { fail: function(err) {
console.log("fail:", err); console.log("fail:", err);
that.submit = false; that.submit = false;
uni.showToast({ that.successVisible = true
title: "支付失败", // uni.showToast({
icon: "none", // title: "支付失败",
}); // icon: "none",
setTimeout(() => { // });
uni.redirectTo({ // setTimeout(() => {
url: "/pages/visa/visa_SureOrder?OrderNo=" + OrderNo, // uni.redirectTo({
}); // url: "/pages/visa/visa_SureOrder?OrderNo=" + OrderNo,
}, 100); // });
// }, 100);
}, },
}); });
}, },
...@@ -1393,13 +1419,14 @@ ...@@ -1393,13 +1419,14 @@
this.submitB2COrderHandler(tempData.airOrderId) this.submitB2COrderHandler(tempData.airOrderId)
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
uni.showToast({ this.successVisible = true
title: '订单创建成功.', // uni.showToast({
icon: 'none' // title: '订单创建成功.',
}) // icon: 'none'
uni.redirectTo({ // })
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=6`, // uni.redirectTo({
}); // url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=6`,
// });
// #endif // #endif
} else { } else {
uni.showToast({ uni.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment