jufubao-third 1.0.16 → 1.0.17-beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-third",
3
- "version": "1.0.16",
3
+ "version": "1.0.17-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -264,13 +264,20 @@ export default {
264
264
  }).then(res => {
265
265
  this.$xdHideLoading();
266
266
 
267
- // #ifdef H5
268
267
  //需要跳转到第三方支付地址
269
268
  if(res['pay_url']) {
270
- window.location.replace(res['pay_url']);
269
+ let url = res['pay_url'];
270
+
271
+ // #ifdef H5
272
+ //判断是否为微信小程序宿主
273
+ if(navigator.userAgent.match(/miniprogram/i)
274
+ && res['pay_jump_type'] === 'wx_mini'
275
+ ) url = `/pages/jumptomp/jumptomp?callback=${Base64.encodeURI(url)}&isThird=1`;
276
+ //#endif
277
+
278
+ this.$xdUniHelper.redirectTo({url}, false, true)
271
279
  return
272
280
  }
273
- //#endif
274
281
 
275
282
  //其他支付模式
276
283
  if(successCb) successCb(res);