fstarter 2.11.6 → 2.11.7
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
|
@@ -570,55 +570,10 @@ const nativeUtils = {
|
|
|
570
570
|
// 跳转页面
|
|
571
571
|
openPage(jumpUrl, visible = false, title = '', safeArea = true) {
|
|
572
572
|
return new Promise((resolve, reject) => {
|
|
573
|
-
// 兼容测试、生产、环境
|
|
574
|
-
let result = jumpUrl
|
|
575
|
-
let url = ''
|
|
576
|
-
const replaceRules = [
|
|
577
|
-
{ // 测试环境-e行
|
|
578
|
-
pattern: "https://teststatic.ihasl.com/pages/eas/#/",
|
|
579
|
-
replacement: "https://teststatic.ihasl.com/pages/uat2/eas/#/"
|
|
580
|
-
},
|
|
581
|
-
{ // 生产环境-e行
|
|
582
|
-
pattern: "https://www.ihasl.com/pages/eas/#/",
|
|
583
|
-
replacement: "https://www.ihasl.com/pages/master2/eas/#/"
|
|
584
|
-
},
|
|
585
|
-
{ // 测试环境-app-hasl
|
|
586
|
-
pattern: "https://teststatic.ihasl.com/pages/salessupport/app/#/",
|
|
587
|
-
replacement: "https://teststatic.ihasl.com/pages/uat2/salessupport/app/#/"
|
|
588
|
-
},
|
|
589
|
-
{ // 生产环境-app-hasl
|
|
590
|
-
pattern: "https://www.ihasl.com/pages/salessupport/app/#/",
|
|
591
|
-
replacement: "https://www.ihasl.com/pages/master2/salessupport/app/#/"
|
|
592
|
-
},
|
|
593
|
-
{ //测试环境 app2-hasl
|
|
594
|
-
pattern: "https://teststatic.ihasl.com/pages/app2-hasl/#/",
|
|
595
|
-
replacement: "https://teststatic.ihasl.com/pages/uat2/app2-hasl/#/"
|
|
596
|
-
},
|
|
597
|
-
{ //生产环境 app2-hasl
|
|
598
|
-
pattern: "https://www.ihasl.com/pages/app2-hasl/#/",
|
|
599
|
-
replacement: "https://www.ihasl.com/pages/master2/app2-hasl/#/"
|
|
600
|
-
},
|
|
601
|
-
{ // 测试环境 招募recruit
|
|
602
|
-
pattern: "https://teststatic.ihasl.com/pages/salessupport/recruit/#/",
|
|
603
|
-
replacement: "https://teststatic.ihasl.com/pages/uat2/salessupport/recruit/#/"
|
|
604
|
-
},
|
|
605
|
-
{ // 生产环境 招募recruit
|
|
606
|
-
pattern: "https://www.ihasl.com/pages/salessupport/recruit/#/",
|
|
607
|
-
replacement: "https://www.ihasl.com/pages/master2/salessupport/recruit/#/"
|
|
608
|
-
}
|
|
609
|
-
]
|
|
610
|
-
|
|
611
|
-
// 遍历所有规则,找到匹配的进行替换
|
|
612
|
-
for (let rule of replaceRules) {
|
|
613
|
-
if (result.includes(rule.pattern)) {
|
|
614
|
-
url = result.replace(rule.pattern, rule.replacement);
|
|
615
|
-
break; // 找到匹配后跳出循环
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
573
|
native.navigator.openPage({
|
|
619
574
|
name: 'h5',
|
|
620
575
|
params: {
|
|
621
|
-
url:
|
|
576
|
+
url: jumpUrl,
|
|
622
577
|
navigationBarVisible: visible, // false:不显示 true:显示
|
|
623
578
|
title: title,
|
|
624
579
|
safeArea: safeArea, // true处理安全区 false不处理 默认false不处理
|