jufubao-mall 2.0.64 → 2.0.65

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-mall",
3
- "version": "2.0.64",
3
+ "version": "2.0.65",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -249,10 +249,23 @@ export default {
249
249
  }).then(res => {
250
250
  if(res.handle_status === 'Y'){
251
251
  this.$xdHideLoading();
252
- if(res.pay_url){
253
- this.$xdUniHelper.redirectTo({
254
- url: res.pay_url
255
- }, false, true)
252
+ if(res['pay_url']){
253
+ let url = res['pay_url'];
254
+ //let url = `/system/system/pay?${res['pay_url'].split('?')[1]}`;
255
+ // #ifdef H5
256
+ //判断是否为微信小程序宿主
257
+ if(navigator.userAgent.match(/miniprogram/i)
258
+ && res['pay_jump_type'] === 'wx_mini'
259
+ ){
260
+ const {host, deploy_dir} = this.brandInfo;
261
+ const success_url = `https://${host}/${deploy_dir}${this.paySuccessPath}?order_id=${res['main_order_id']}`;
262
+ if(res['pay_url'].indexOf('?') > -1) url += `&success_url=${Base64.encodeURI(success_url)}&callback_url=${encodeURIComponent(success_url)}`;
263
+ else url += `?success_url=${Base64.encodeURI(success_url)}&callback_url=${encodeURIComponent(success_url)}`;
264
+ url = `/pages/jumptomp/jumptomp?callback=${Base64.encodeURI(url)}&isThird=1`;
265
+ }
266
+ //#endif
267
+
268
+ this.$xdUniHelper.redirectTo({url}, false, true)
256
269
  }else{
257
270
  cb({
258
271
  order_id: res.main_order_id,