@foundbyte/uni-libs 0.0.5 → 0.0.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/es/assets/js/webview/uni.webview.1.5.5.js +171 -0
- package/es/assets/js/webview/uni.webview.1.5.6.js +1 -0
- package/es/configs/app/app.hwtest.js +10 -14
- package/es/configs/app/app.prod.js +10 -14
- package/es/configs/app/app.type.d.ts +13 -10
- package/es/configs/app/index.js +30 -24
- package/es/constants/routes/index.d.ts +77 -74
- package/es/constants/routes/index.js +45 -78
- package/es/entry.d.ts +20 -15
- package/es/entry.js +37 -35
- package/es/enums/business-line/index.d.ts +74 -71
- package/es/enums/business-line/index.js +114 -36
- package/es/enums/environment/index.d.ts +8 -5
- package/es/enums/environment/index.js +14 -4
- package/es/enums/sdk/index.d.ts +8 -5
- package/es/enums/sdk/index.js +14 -4
- package/es/enums/sub/enjoy/index.d.ts +17 -14
- package/es/enums/sub/enjoy/index.js +18 -12
- package/es/enums/sub/foods/index.d.ts +6 -3
- package/es/enums/sub/foods/index.js +10 -4
- package/es/enums/sub/hotel/index.d.ts +5 -2
- package/es/enums/sub/hotel/index.js +11 -4
- package/es/index.d.ts +15 -5
- package/es/index.js +15 -43
- package/es/services/goods/service.js +128 -0
- package/es/services/goods/type.d.ts +25 -20
- package/es/types/one-travel-service/index.d.ts +12 -8
- package/es/utils/common/index.d.ts +7 -4
- package/es/utils/common/index.js +41 -25
- package/es/utils/pages/activity-calendar/index.d.ts +6 -4
- package/es/utils/pages/activity-calendar/index.js +10 -8
- package/es/utils/pages/food/index.d.ts +5 -2
- package/es/utils/pages/food/index.js +31 -5
- package/es/utils/pages/webview/index.d.ts +10 -7
- package/es/utils/pages/webview/index.js +9 -7
- package/es/utils/web-view/index.d.ts +23 -18
- package/es/utils/web-view/index.js +84 -47
- package/package.json +3 -6
- package/es/configs/app/app.hwtest.d.ts +0 -3
- package/es/configs/app/app.prod.d.ts +0 -3
- package/es/configs/app/index.d.ts +0 -7
- package/es/configs/index.d.ts +0 -1
- package/es/constants/index.d.ts +0 -1
- package/es/enums/index.d.ts +0 -5
- package/es/enums/storage/index.d.ts +0 -6
- package/es/enums/storage/index.js +0 -4
- package/es/enums/sub/index.d.ts +0 -3
- package/es/libs/webview/uni.webview.1.5.5.js +0 -126
- package/es/services/config/index.d.ts +0 -5
- package/es/services/config/index.js +0 -7
- package/es/services/goods/index.d.ts +0 -2
- package/es/services/goods/util.d.ts +0 -6
- package/es/services/goods/util.js +0 -76
- package/es/services/index.d.ts +0 -2
- package/es/types/index.d.ts +0 -1
- package/es/utils/index.d.ts +0 -3
- package/es/utils/pages/index.d.ts +0 -3
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
!(function (e, n) {
|
|
2
|
+
'object' == typeof exports && 'undefined' != typeof module ? (module.exports = n()) : 'function' == typeof define && define.amd ? define(n) : ((e = e || self).uni = n());
|
|
3
|
+
})(this, function () {
|
|
4
|
+
try {
|
|
5
|
+
var e = {};
|
|
6
|
+
Object.defineProperty(e, 'passive', {
|
|
7
|
+
get: function () {
|
|
8
|
+
!0;
|
|
9
|
+
},
|
|
10
|
+
}),
|
|
11
|
+
window.addEventListener('test-passive', null, e);
|
|
12
|
+
} catch (e) {}
|
|
13
|
+
var n = Object.prototype.hasOwnProperty;
|
|
14
|
+
function i(e, i) {
|
|
15
|
+
return n.call(e, i);
|
|
16
|
+
}
|
|
17
|
+
var t = [];
|
|
18
|
+
function o() {
|
|
19
|
+
return window.__dcloud_weex_postMessage || window.__dcloud_weex_;
|
|
20
|
+
}
|
|
21
|
+
function a() {
|
|
22
|
+
return window.__uniapp_x_postMessage || window.__uniapp_x_;
|
|
23
|
+
}
|
|
24
|
+
var r = function (e, n) {
|
|
25
|
+
var i = { options: { timestamp: +new Date() }, name: e, arg: n };
|
|
26
|
+
if (a()) {
|
|
27
|
+
if ('postMessage' === e) {
|
|
28
|
+
var r = { data: n };
|
|
29
|
+
return window.__uniapp_x_postMessage ? window.__uniapp_x_postMessage(r) : window.__uniapp_x_.postMessage(JSON.stringify(r));
|
|
30
|
+
}
|
|
31
|
+
var d = { type: 'WEB_INVOKE_APPSERVICE', args: { data: i, webviewIds: t } };
|
|
32
|
+
window.__uniapp_x_postMessage ? window.__uniapp_x_postMessageToService(d) : window.__uniapp_x_.postMessageToService(JSON.stringify(d));
|
|
33
|
+
} else if (o()) {
|
|
34
|
+
if ('postMessage' === e) {
|
|
35
|
+
var s = { data: [n] };
|
|
36
|
+
return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(s) : window.__dcloud_weex_.postMessage(JSON.stringify(s));
|
|
37
|
+
}
|
|
38
|
+
var w = { type: 'WEB_INVOKE_APPSERVICE', args: { data: i, webviewIds: t } };
|
|
39
|
+
window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(w) : window.__dcloud_weex_.postMessageToService(JSON.stringify(w));
|
|
40
|
+
} else {
|
|
41
|
+
console.log('window.plus:', window.plus);
|
|
42
|
+
return window.parent.postMessage({ type: 'WEB_INVOKE_APPSERVICE', data: i, pageId: '' }, '*');
|
|
43
|
+
if (0 === t.length) {
|
|
44
|
+
var u = plus.webview.currentWebview();
|
|
45
|
+
if (!u) throw new Error('plus.webview.currentWebview() is undefined');
|
|
46
|
+
var g = u.parent(),
|
|
47
|
+
v = '';
|
|
48
|
+
(v = g ? g.id : u.id), t.push(v);
|
|
49
|
+
}
|
|
50
|
+
if (plus.webview.getWebviewById('__uniapp__service')) plus.webview.postMessageToUniNView({ type: 'WEB_INVOKE_APPSERVICE', args: { data: i, webviewIds: t } }, '__uniapp__service');
|
|
51
|
+
else {
|
|
52
|
+
var c = JSON.stringify(i);
|
|
53
|
+
plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat('WEB_INVOKE_APPSERVICE', '",').concat(c, ',').concat(JSON.stringify(t), ');'));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
d = {
|
|
58
|
+
navigateTo: function () {
|
|
59
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
|
60
|
+
n = e.url;
|
|
61
|
+
r('navigateTo', { url: encodeURI(n) });
|
|
62
|
+
},
|
|
63
|
+
navigateBack: function () {
|
|
64
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
|
65
|
+
n = e.delta;
|
|
66
|
+
r('navigateBack', { delta: parseInt(n) || 1 });
|
|
67
|
+
},
|
|
68
|
+
switchTab: function () {
|
|
69
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
|
70
|
+
n = e.url;
|
|
71
|
+
r('switchTab', { url: encodeURI(n) });
|
|
72
|
+
},
|
|
73
|
+
reLaunch: function () {
|
|
74
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
|
75
|
+
n = e.url;
|
|
76
|
+
r('reLaunch', { url: encodeURI(n) });
|
|
77
|
+
},
|
|
78
|
+
redirectTo: function () {
|
|
79
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
|
80
|
+
n = e.url;
|
|
81
|
+
r('redirectTo', { url: encodeURI(n) });
|
|
82
|
+
},
|
|
83
|
+
getEnv: function (e) {
|
|
84
|
+
a() ? e({ uvue: !0 }) : o() ? e({ nvue: !0 }) : window.plus ? e({ plus: !0 }) : e({ h5: !0 });
|
|
85
|
+
},
|
|
86
|
+
postMessage: function () {
|
|
87
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
88
|
+
r('postMessage', e.data || {});
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
s = /uni-app/i.test(navigator.userAgent),
|
|
92
|
+
w = /Html5Plus/i.test(navigator.userAgent),
|
|
93
|
+
u = /complete|loaded|interactive/;
|
|
94
|
+
var g = window.my && navigator.userAgent.indexOf(['t', 'n', 'e', 'i', 'l', 'C', 'y', 'a', 'p', 'i', 'l', 'A'].reverse().join('')) > -1;
|
|
95
|
+
var v = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
|
|
96
|
+
var c = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
|
97
|
+
var p = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
|
|
98
|
+
var _ = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
|
99
|
+
var m = window.qa && /quickapp/i.test(navigator.userAgent);
|
|
100
|
+
var f = window.ks && window.ks.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
|
101
|
+
var l = window.tt && window.tt.miniProgram && /Lark|Feishu/i.test(navigator.userAgent);
|
|
102
|
+
var E = window.jd && window.jd.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
|
103
|
+
var x = window.xhs && window.xhs.miniProgram && /xhsminiapp/i.test(navigator.userAgent);
|
|
104
|
+
for (
|
|
105
|
+
var S,
|
|
106
|
+
h = function () {
|
|
107
|
+
(window.UniAppJSBridge = !0), document.dispatchEvent(new CustomEvent('UniAppJSBridgeReady', { bubbles: !0, cancelable: !0 }));
|
|
108
|
+
},
|
|
109
|
+
y = [
|
|
110
|
+
function (e) {
|
|
111
|
+
if (s || w)
|
|
112
|
+
return (
|
|
113
|
+
window.__uniapp_x_postMessage || window.__uniapp_x_ || window.__dcloud_weex_postMessage || window.__dcloud_weex_
|
|
114
|
+
? document.addEventListener('DOMContentLoaded', e)
|
|
115
|
+
: window.plus && u.test(document.readyState)
|
|
116
|
+
? setTimeout(e, 0)
|
|
117
|
+
: document.addEventListener('plusready', e),
|
|
118
|
+
d
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
function (e) {
|
|
122
|
+
if (_) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('WeixinJSBridgeReady', e), window.wx.miniProgram;
|
|
123
|
+
},
|
|
124
|
+
function (e) {
|
|
125
|
+
if (c) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QQJSBridgeReady', e), window.qq.miniProgram;
|
|
126
|
+
},
|
|
127
|
+
function (e) {
|
|
128
|
+
if (g) {
|
|
129
|
+
document.addEventListener('DOMContentLoaded', e);
|
|
130
|
+
var n = window.my;
|
|
131
|
+
return { navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv };
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
function (e) {
|
|
135
|
+
if (v) return document.addEventListener('DOMContentLoaded', e), window.swan.webView;
|
|
136
|
+
},
|
|
137
|
+
function (e) {
|
|
138
|
+
if (p) return document.addEventListener('DOMContentLoaded', e), window.tt.miniProgram;
|
|
139
|
+
},
|
|
140
|
+
function (e) {
|
|
141
|
+
if (m) {
|
|
142
|
+
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QaJSBridgeReady', e);
|
|
143
|
+
var n = window.qa;
|
|
144
|
+
return { navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv };
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
function (e) {
|
|
148
|
+
if (f) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('WeixinJSBridgeReady', e), window.ks.miniProgram;
|
|
149
|
+
},
|
|
150
|
+
function (e) {
|
|
151
|
+
if (l) return document.addEventListener('DOMContentLoaded', e), window.tt.miniProgram;
|
|
152
|
+
},
|
|
153
|
+
function (e) {
|
|
154
|
+
if (E) return window.JDJSBridgeReady && window.JDJSBridgeReady.invoke ? setTimeout(e, 0) : document.addEventListener('JDJSBridgeReady', e), window.jd.miniProgram;
|
|
155
|
+
},
|
|
156
|
+
function (e) {
|
|
157
|
+
if (x) return window.xhs.miniProgram;
|
|
158
|
+
},
|
|
159
|
+
function (e) {
|
|
160
|
+
return document.addEventListener('DOMContentLoaded', e), d;
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
M = 0;
|
|
164
|
+
M < y.length && !(S = y[M](h));
|
|
165
|
+
M++
|
|
166
|
+
);
|
|
167
|
+
S || (S = {});
|
|
168
|
+
var P = 'undefined' != typeof uni ? uni : {};
|
|
169
|
+
if (!P.navigateTo) for (var b in S) i(S, b) && (P[b] = S[b]);
|
|
170
|
+
return (P.webView = S), P;
|
|
171
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function i(e,i){return n.call(e,i)}var t=[];function o(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}function a(){return window.__uniapp_x_postMessage||window.__uniapp_x_}var r=function(e,n){var i={options:{timestamp:+new Date},name:e,arg:n};if(a()){if("postMessage"===e){var r={data:n};return window.__uniapp_x_postMessage?window.__uniapp_x_postMessage(r):window.__uniapp_x_.postMessage(JSON.stringify(r))}var d={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__uniapp_x_postMessage?window.__uniapp_x_postMessageToService(d):window.__uniapp_x_.postMessageToService(JSON.stringify(d))}else if(o()){if("postMessage"===e){var s={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(s):window.__dcloud_weex_.postMessage(JSON.stringify(s))}var w={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(w):window.__dcloud_weex_.postMessageToService(JSON.stringify(w))}else{if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:i,pageId:""},"*");if(0===t.length){var u=plus.webview.currentWebview();if(!u)throw new Error("plus.webview.currentWebview() is undefined");var g=u.parent(),v="";v=g?g.id:u.id,t.push(v)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}},"__uniapp__service");else{var c=JSON.stringify(i);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(c,",").concat(JSON.stringify(t),");"))}}},d={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;r("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("redirectTo",{url:encodeURI(n)})},getEnv:function(e){a()?e({uvue:!0}):o()?e({nvue:!0}):window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r("postMessage",e.data||{})}},s=/uni-app/i.test(navigator.userAgent),w=/Html5Plus/i.test(navigator.userAgent),u=/complete|loaded|interactive/;var g=window.my&&navigator.userAgent.indexOf(["t","n","e","i","l","C","y","a","p","i","l","A"].reverse().join(""))>-1;var v=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var _=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var m=window.qa&&/quickapp/i.test(navigator.userAgent);var f=window.ks&&window.ks.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var l=window.tt&&window.tt.miniProgram&&/Lark|Feishu/i.test(navigator.userAgent);var E=window.jd&&window.jd.miniProgram&&/jdmp/i.test(navigator.userAgent);var x=window.xhs&&window.xhs.miniProgram&&/xhsminiapp/i.test(navigator.userAgent);for(var S,h=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},y=[function(e){if(s||w)return window.__uniapp_x_postMessage||window.__uniapp_x_||window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&u.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),d},function(e){if(_)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(g){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(v)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(p)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(m){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(f)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.ks.miniProgram},function(e){if(l)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(E)return window.JDJSBridgeReady&&window.JDJSBridgeReady.invoke?setTimeout(e,0):document.addEventListener("JDJSBridgeReady",e),window.jd.miniProgram},function(e){if(x)return window.xhs.miniProgram},function(e){return document.addEventListener("DOMContentLoaded",e),d}],M=0;M<y.length&&!(S=y[M](h));M++);S||(S={});var P="undefined"!=typeof uni?uni:{};if(!P.navigateTo)for(var b in S)i(S,b)&&(P[b]=S[b]);return P.webView=S,P}));
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
o as default
|
|
14
|
-
};
|
|
1
|
+
//#region src/configs/app/app.hwtest.ts
|
|
2
|
+
const config = { domain: {
|
|
3
|
+
shopping: `https://shopping-h5.onetravelgz.cn/#/`,
|
|
4
|
+
food: `https://food-h5.onetravelgz.cn/#/`,
|
|
5
|
+
onebuygz: "https://testb2ch5-travel.gcongo.com.cn/#/"
|
|
6
|
+
} };
|
|
7
|
+
var app_hwtest_default = config;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { app_hwtest_default as default };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
o as default
|
|
14
|
-
};
|
|
1
|
+
//#region src/configs/app/app.prod.ts
|
|
2
|
+
const config = { domain: {
|
|
3
|
+
shopping: `https://shopping-h5.onetravelgz.com/#/`,
|
|
4
|
+
food: `https://home.onetravelgz.com/food/index.html#/`,
|
|
5
|
+
onebuygz: "https://travel.onebuygz.com/#/"
|
|
6
|
+
} };
|
|
7
|
+
var app_prod_default = config;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { app_prod_default as default };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
//#region src/configs/app/app.type.d.ts
|
|
2
|
+
interface IAppConfig {
|
|
3
|
+
/** 域名 */
|
|
4
|
+
domain: {
|
|
5
|
+
/** 购物(老版本) */
|
|
6
|
+
shopping: string;
|
|
7
|
+
/** 美食 */
|
|
8
|
+
food: string;
|
|
9
|
+
/** 一码贵州购物(新版) */
|
|
10
|
+
onebuygz: string;
|
|
11
|
+
};
|
|
11
12
|
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { IAppConfig };
|
package/es/configs/app/index.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { EAppEnv } from "../../enums/environment/index.js";
|
|
2
|
+
import app_hwtest_default from "./app.hwtest.js";
|
|
3
|
+
import app_prod_default from "./app.prod.js";
|
|
4
|
+
|
|
5
|
+
//#region src/configs/app/index.ts
|
|
6
|
+
/**
|
|
7
|
+
* 获取App配置信息
|
|
8
|
+
* @param appEnv
|
|
9
|
+
*/
|
|
10
|
+
function getAppConfig(appEnv) {
|
|
11
|
+
let config;
|
|
12
|
+
switch (appEnv) {
|
|
13
|
+
case EAppEnv.test:
|
|
14
|
+
config = app_hwtest_default;
|
|
15
|
+
break;
|
|
16
|
+
case EAppEnv.prod:
|
|
17
|
+
config = app_prod_default;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
domain: {
|
|
22
|
+
shopping: "",
|
|
23
|
+
food: "",
|
|
24
|
+
onebuygz: ""
|
|
25
|
+
},
|
|
26
|
+
...config
|
|
27
|
+
};
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { getAppConfig };
|
|
@@ -1,78 +1,81 @@
|
|
|
1
|
+
//#region src/constants/routes/index.d.ts
|
|
1
2
|
/** 一些默认路由跳转 */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
3
|
+
declare const routes: Readonly<{
|
|
4
|
+
/** 首页 */
|
|
5
|
+
home: "/pages/index/index";
|
|
6
|
+
/** 我的 */
|
|
7
|
+
mine: "/pages/mine/index";
|
|
8
|
+
/** 消息 */
|
|
9
|
+
message: "/pages/message/index";
|
|
10
|
+
/** 登录 */
|
|
11
|
+
signIn: "/pages/sign-in/index";
|
|
12
|
+
/** 手机号登录 */
|
|
13
|
+
signInByMobile: "/pages/sign-in/by-mobile/index";
|
|
14
|
+
/** webView */
|
|
15
|
+
webView: "/pages/web-view/index";
|
|
16
|
+
/** 设备定位权限 */
|
|
17
|
+
permission: "/pages/permission/index";
|
|
18
|
+
/** 支付成功页 */
|
|
19
|
+
paySuccess: "/pages/pay-success/index";
|
|
20
|
+
/** 微信支付页 */
|
|
21
|
+
wxpay: "/pages/wxpay/wxpay";
|
|
22
|
+
/** 授权页面 */
|
|
23
|
+
oauth2: "/pages/oauth2/index";
|
|
24
|
+
/** 音频转文字 */
|
|
25
|
+
voice: "/pages/voice/index";
|
|
26
|
+
/** 请求错误页 */
|
|
27
|
+
error: "/";
|
|
28
|
+
/** 装修专题页 */
|
|
29
|
+
renovationSpecial: "/pages/index/special";
|
|
30
|
+
/** ai助手 */
|
|
31
|
+
aiAssistant: "/pages/ai-assistant/index";
|
|
31
32
|
}>;
|
|
32
33
|
/** 路由地址前缀 */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
34
|
+
declare const routePrefix: Readonly<{
|
|
35
|
+
/** 首页/搜索 */
|
|
36
|
+
search: "/sub/home/pages/search";
|
|
37
|
+
/** 首页/装修 */
|
|
38
|
+
renovation: "/sub/home/pages/renovation";
|
|
39
|
+
/** 景区/门票 */
|
|
40
|
+
ticket: "/sub/ticket/pages";
|
|
41
|
+
/** 同程景区 */
|
|
42
|
+
scene: "/sub/scene";
|
|
43
|
+
/** 路线 */
|
|
44
|
+
road: "/sub/road/pages";
|
|
45
|
+
/** 酒店 */
|
|
46
|
+
hotel: "/sub/hotel/pages";
|
|
47
|
+
/** 美食 */
|
|
48
|
+
food: "/sub/food/pages";
|
|
49
|
+
/** 文娱 */
|
|
50
|
+
enjoy: "/sub/enjoy/pages";
|
|
51
|
+
/** 种草 */
|
|
52
|
+
show: "/sub/show/pages";
|
|
53
|
+
/** 视频 */
|
|
54
|
+
living: "/sub/living/pages";
|
|
55
|
+
/** 实名认证 */
|
|
56
|
+
realName: "/sub/real-name/pages";
|
|
57
|
+
/** 社保卡 */
|
|
58
|
+
socialSecurity: "/sub/social-security/pages";
|
|
59
|
+
/** 攻略 */
|
|
60
|
+
strategy: "/sub/strategy/pages";
|
|
61
|
+
/** 消息 */
|
|
62
|
+
message: "/sub/message/pages";
|
|
63
|
+
/** 我的 */
|
|
64
|
+
mine: "/sub/mine/pages";
|
|
65
|
+
/** 活动足迹 */
|
|
66
|
+
footprint: "/sub/footprint/pages";
|
|
67
|
+
/** 新闻 */
|
|
68
|
+
news: "/sub/message/pages";
|
|
69
|
+
/** 声入贵州 */
|
|
70
|
+
soundGuizhou: "/sub/sound-guizhou/pages";
|
|
71
|
+
/** 活动日历 */
|
|
72
|
+
activityCalendar: "/sub/activity-calendar/pages";
|
|
73
|
+
/** 项目库 */
|
|
74
|
+
projectLibrary: "/sub/project-library/pages";
|
|
75
|
+
/** 目的地 */
|
|
76
|
+
destination: "/sub/destination/pages";
|
|
77
|
+
/** 智能行程 */
|
|
78
|
+
smartRoute: "/sub/smart-route/pages";
|
|
78
79
|
}>;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { routePrefix, routes };
|
|
@@ -1,79 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** 微信支付页 */
|
|
19
|
-
wxpay: "/pages/wxpay/wxpay",
|
|
20
|
-
/** 授权页面 */
|
|
21
|
-
oauth2: "/pages/oauth2/index",
|
|
22
|
-
/** 音频转文字 */
|
|
23
|
-
voice: "/pages/voice/index",
|
|
24
|
-
/** 请求错误页 */
|
|
25
|
-
error: "/",
|
|
26
|
-
/** 装修专题页 */
|
|
27
|
-
renovationSpecial: "/pages/index/special",
|
|
28
|
-
/** ai助手 */
|
|
29
|
-
aiAssistant: "/pages/ai-assistant/index"
|
|
30
|
-
}), s = Object.freeze({
|
|
31
|
-
/** 首页/搜索 */
|
|
32
|
-
search: "/sub/home/pages/search",
|
|
33
|
-
/** 首页/装修 */
|
|
34
|
-
renovation: "/sub/home/pages/renovation",
|
|
35
|
-
/** 景区/门票 */
|
|
36
|
-
ticket: "/sub/ticket/pages",
|
|
37
|
-
/** 同程景区 */
|
|
38
|
-
scene: "/sub/scene",
|
|
39
|
-
/** 路线 */
|
|
40
|
-
road: "/sub/road/pages",
|
|
41
|
-
/** 酒店 */
|
|
42
|
-
hotel: "/sub/hotel/pages",
|
|
43
|
-
/** 美食 */
|
|
44
|
-
food: "/sub/food/pages",
|
|
45
|
-
/** 文娱 */
|
|
46
|
-
enjoy: "/sub/enjoy/pages",
|
|
47
|
-
/** 种草 */
|
|
48
|
-
show: "/sub/show/pages",
|
|
49
|
-
/** 视频 */
|
|
50
|
-
living: "/sub/living/pages",
|
|
51
|
-
/** 实名认证 */
|
|
52
|
-
realName: "/sub/real-name/pages",
|
|
53
|
-
/** 社保卡 */
|
|
54
|
-
socialSecurity: "/sub/social-security/pages",
|
|
55
|
-
/** 攻略 */
|
|
56
|
-
strategy: "/sub/strategy/pages",
|
|
57
|
-
/** 消息 */
|
|
58
|
-
message: "/sub/message/pages",
|
|
59
|
-
/** 我的 */
|
|
60
|
-
mine: "/sub/mine/pages",
|
|
61
|
-
/** 活动足迹 */
|
|
62
|
-
footprint: "/sub/footprint/pages",
|
|
63
|
-
/** 新闻 */
|
|
64
|
-
news: "/sub/message/pages",
|
|
65
|
-
/** 声入贵州 */
|
|
66
|
-
soundGuizhou: "/sub/sound-guizhou/pages",
|
|
67
|
-
/** 活动日历 */
|
|
68
|
-
activityCalendar: "/sub/activity-calendar/pages",
|
|
69
|
-
/** 项目库 */
|
|
70
|
-
projectLibrary: "/sub/project-library/pages",
|
|
71
|
-
/** 目的地 */
|
|
72
|
-
destination: "/sub/destination/pages",
|
|
73
|
-
/** 智能行程 */
|
|
74
|
-
smartRoute: "/sub/smart-route/pages"
|
|
1
|
+
//#region src/constants/routes/index.ts
|
|
2
|
+
/** 一些默认路由跳转 */
|
|
3
|
+
const routes = Object.freeze({
|
|
4
|
+
home: "/pages/index/index",
|
|
5
|
+
mine: "/pages/mine/index",
|
|
6
|
+
message: "/pages/message/index",
|
|
7
|
+
signIn: "/pages/sign-in/index",
|
|
8
|
+
signInByMobile: "/pages/sign-in/by-mobile/index",
|
|
9
|
+
webView: "/pages/web-view/index",
|
|
10
|
+
permission: "/pages/permission/index",
|
|
11
|
+
paySuccess: "/pages/pay-success/index",
|
|
12
|
+
wxpay: "/pages/wxpay/wxpay",
|
|
13
|
+
oauth2: "/pages/oauth2/index",
|
|
14
|
+
voice: "/pages/voice/index",
|
|
15
|
+
error: "/",
|
|
16
|
+
renovationSpecial: "/pages/index/special",
|
|
17
|
+
aiAssistant: "/pages/ai-assistant/index"
|
|
75
18
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
19
|
+
/** 路由地址前缀 */
|
|
20
|
+
const routePrefix = Object.freeze({
|
|
21
|
+
search: "/sub/home/pages/search",
|
|
22
|
+
renovation: "/sub/home/pages/renovation",
|
|
23
|
+
ticket: "/sub/ticket/pages",
|
|
24
|
+
scene: "/sub/scene",
|
|
25
|
+
road: "/sub/road/pages",
|
|
26
|
+
hotel: "/sub/hotel/pages",
|
|
27
|
+
food: "/sub/food/pages",
|
|
28
|
+
enjoy: "/sub/enjoy/pages",
|
|
29
|
+
show: "/sub/show/pages",
|
|
30
|
+
living: "/sub/living/pages",
|
|
31
|
+
realName: "/sub/real-name/pages",
|
|
32
|
+
socialSecurity: "/sub/social-security/pages",
|
|
33
|
+
strategy: "/sub/strategy/pages",
|
|
34
|
+
message: "/sub/message/pages",
|
|
35
|
+
mine: "/sub/mine/pages",
|
|
36
|
+
footprint: "/sub/footprint/pages",
|
|
37
|
+
news: "/sub/message/pages",
|
|
38
|
+
soundGuizhou: "/sub/sound-guizhou/pages",
|
|
39
|
+
activityCalendar: "/sub/activity-calendar/pages",
|
|
40
|
+
projectLibrary: "/sub/project-library/pages",
|
|
41
|
+
destination: "/sub/destination/pages",
|
|
42
|
+
smartRoute: "/sub/smart-route/pages"
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { routePrefix, routes };
|
package/es/entry.d.ts
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IJumpGoodsDetailItem } from
|
|
3
|
-
import { IAppConfig } from
|
|
1
|
+
import { IOneTravelSDKConfig } from "./types/one-travel-service/index.js";
|
|
2
|
+
import { IJumpGoodsDetailItem } from "./services/goods/type.js";
|
|
3
|
+
import { IAppConfig } from "./configs/app/app.type.js";
|
|
4
|
+
|
|
5
|
+
//#region src/entry.d.ts
|
|
6
|
+
|
|
4
7
|
/**
|
|
5
8
|
* 一码游SDK
|
|
6
9
|
*/
|
|
7
10
|
declare class OneTravelSDK {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
private sdkConfig;
|
|
12
|
+
private goodsService;
|
|
13
|
+
constructor(config?: Partial<IOneTravelSDKConfig>);
|
|
14
|
+
/**
|
|
15
|
+
* 获取App配置信息
|
|
16
|
+
*/
|
|
17
|
+
getAppConfig(): IAppConfig;
|
|
18
|
+
/**
|
|
19
|
+
* 跳转商品详情页
|
|
20
|
+
* @param goodsItem 商品数据
|
|
21
|
+
*/
|
|
22
|
+
jumpToGoodsDetailPage(goodsItem: IJumpGoodsDetailItem): void;
|
|
19
23
|
}
|
|
20
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
export { OneTravelSDK };
|