jufubao-base 1.0.159-beta7 → 1.0.159-beta9

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-base",
3
- "version": "1.0.159-beta7",
3
+ "version": "1.0.159-beta9",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -371,7 +371,7 @@ export default {
371
371
  let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
372
372
  let regSp = /(-apiuri\/v)/;
373
373
 
374
- if(appType === undefined) entry.redirect_data.appType = 'h5';
374
+ if(!appType) entry.redirect_data.appType = 'h5';
375
375
  let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
376
376
 
377
377
  //外站配置地址
@@ -389,11 +389,16 @@ export default {
389
389
  }
390
390
 
391
391
  //站内应用处理
392
- let jumpUrl = '';
393
- let jumpUrlObj = parsePath(path);
392
+ let jumpUrl = path;
394
393
  let cardPathStr = '';
395
- if(jumpUrlObj.isSameApp) jumpUrl = jumpUrlObj.url;
396
- else jumpUrl = `//${host}/${jumpUrlObj.dir}${jumpUrlObj.url}`;
394
+ const {deploy_dir} = this.projectAttr;
395
+ if(host === this.projectAttr.host && deploy_dir !== dir){
396
+ jumpUrl = `//${host}/${dir}${path}`;
397
+ //#ifdef MP-WEIXIN
398
+ jumpUrl = `https:${jumpUrl}`;
399
+ //#endif
400
+ }
401
+
397
402
 
398
403
  //#ifdef MP-WEIXIN
399
404
  //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
@@ -408,6 +413,7 @@ export default {
408
413
  //#endif
409
414
 
410
415
  jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
416
+ console.warn(`entry.path:${jumpUrl}`);
411
417
  if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
412
418
  else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
413
419
  },
@@ -660,7 +660,7 @@ export default {
660
660
  let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
661
661
  let regSp = /(-apiuri\/v)/;
662
662
 
663
- if(appType === undefined) entry.redirect_data.appType = 'h5';
663
+ if(!appType) entry.redirect_data.appType = 'h5';
664
664
  let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
665
665
 
666
666
  //外站配置地址
@@ -678,11 +678,16 @@ export default {
678
678
  }
679
679
 
680
680
  //站内应用处理
681
- let jumpUrl = '';
682
- let jumpUrlObj = parsePath(path);
681
+ let jumpUrl = path;
683
682
  let cardPathStr = '';
684
- if(jumpUrlObj.isSameApp) jumpUrl = jumpUrlObj.url;
685
- else jumpUrl = `//${host}/${jumpUrlObj.dir}${jumpUrlObj.url}`;
683
+ const {deploy_dir} = this.projectAttr;
684
+ if(host === this.projectAttr.host && deploy_dir !== dir){
685
+ jumpUrl = `//${host}/${dir}${path}`;
686
+ //#ifdef MP-WEIXIN
687
+ jumpUrl = `https:${jumpUrl}`;
688
+ //#endif
689
+ }
690
+
686
691
 
687
692
  //#ifdef MP-WEIXIN
688
693
  //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
@@ -697,6 +702,7 @@ export default {
697
702
  //#endif
698
703
 
699
704
  jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
705
+ console.warn(`entry.path:${jumpUrl}`);
700
706
  if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
701
707
  else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
702
708
  },