Commit 16ff8ee6 authored by 张娇(东信)'s avatar 张娇(东信)

Merge remote-tracking branch 'origin/master'

parents 9d639f9c 977314a1
...@@ -385,6 +385,10 @@ const payNow = async (data) => { ...@@ -385,6 +385,10 @@ const payNow = async (data) => {
params.value.id = orderInfo.value.key; params.value.id = orderInfo.value.key;
params.value.tradeType = data.selectType; params.value.tradeType = data.selectType;
params.value.basketIds = basketIds.value; params.value.basketIds = basketIds.value;
xma.showLoading({
title: '正在支付',
mask: true,
});
if (types.value === 'qg') { if (types.value === 'qg') {
const qgParams = { const qgParams = {
id: orderInfo.value.key, id: orderInfo.value.key,
...@@ -394,6 +398,7 @@ const payNow = async (data) => { ...@@ -394,6 +398,7 @@ const payNow = async (data) => {
}; };
groupBuyCreate(qgParams).then((res) => { groupBuyCreate(qgParams).then((res) => {
if (res.code === 0) { if (res.code === 0) {
xma.hideLoading();
openUrl(res.data.result); openUrl(res.data.result);
xma.removeStorageSync('address'); xma.removeStorageSync('address');
} else { } else {
...@@ -403,6 +408,7 @@ const payNow = async (data) => { ...@@ -403,6 +408,7 @@ const payNow = async (data) => {
} else { } else {
znsgyOrderCreate(params.value).then((res) => { znsgyOrderCreate(params.value).then((res) => {
if (res.code === 0) { if (res.code === 0) {
xma.hideLoading();
openUrl(res.data.result); openUrl(res.data.result);
xma.removeStorageSync('address'); xma.removeStorageSync('address');
} else { } else {
......
...@@ -285,10 +285,15 @@ const submitOrder = debounce(() => { ...@@ -285,10 +285,15 @@ const submitOrder = debounce(() => {
payWayCode: 5, payWayCode: 5,
tradeType: selectType.value, tradeType: selectType.value,
}; };
xma.showLoading({
title:'正在支付',
mask:true,
})
groupBuyCreate(params).then((res) => { groupBuyCreate(params).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const { paymentUrl, outTradeNo } = res.data.result; const { paymentUrl, outTradeNo } = res.data.result;
outTradeNos.value = outTradeNo; outTradeNos.value = outTradeNo;
xma.hideLoading()
window.location.href = paymentUrl; window.location.href = paymentUrl;
// 设置一个延时器 // 设置一个延时器
const start = Date.now(); const start = Date.now();
......
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