Commit 62689239daeeed6538ea8577fcf1a73bdf484b8a

Authored by tianwu
1 parent 69f84b7e

增加调试信息

apps/web-payment/src/views/payment/index.vue
@@ -269,21 +269,26 @@ const queryPayment = async () => { @@ -269,21 +269,26 @@ const queryPayment = async () => {
269 } 269 }
270 // 跳转云商户支付 270 // 跳转云商户支付
271 if (currentPayType.value.channelId === REDIRECT_CHANNEL_ID) { 271 if (currentPayType.value.channelId === REDIRECT_CHANNEL_ID) {
272 - const params = {  
273 - tradeId: orderInfoData.value.tradeId,  
274 - amount: orderInfoData.value.amount,  
275 - pipelineId: currentPayType.value.pipelineId,  
276 - goods: orderInfoData.value.goods,  
277 - payType: currentPayType.value.channelName,  
278 - redirect: true,  
279 - payee: orderInfoData.value.mchName,  
280 - };  
281 - const queryString = qs.stringify(params);  
282 - if (typeof wx !== 'undefined' && wx.miniProgram) {  
283 - wx.miniProgram.redirectTo({  
284 - url: `/packageA/pages/wxPay/index?${queryString}`,  
285 - });  
286 - loading.value = false; 272 + try {
  273 + const params = {
  274 + tradeId: orderInfoData.value.tradeId,
  275 + amount: orderInfoData.value.amount,
  276 + pipelineId: currentPayType.value.pipelineId,
  277 + goods: orderInfoData.value.goods,
  278 + payType: currentPayType.value.channelName,
  279 + redirect: true,
  280 + payee: orderInfoData.value.mchName,
  281 + };
  282 + const queryString = qs.stringify(params);
  283 + console.log(wx);
  284 + if (typeof wx !== 'undefined' && wx.miniProgram) {
  285 + wx.miniProgram.redirectTo({
  286 + url: `/packageA/pages/wxPay/index?${queryString}`,
  287 + });
  288 + loading.value = false;
  289 + }
  290 + } catch (error) {
  291 + console.log(error);
287 } 292 }
288 return false; 293 return false;
289 } 294 }