@foundbyte/uni-libs 0.0.3 → 0.0.5
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/configs/app/app.hwtest.d.ts +3 -0
- package/es/configs/app/app.hwtest.js +14 -11
- package/es/configs/app/app.prod.d.ts +3 -0
- package/es/configs/app/app.prod.js +14 -11
- package/es/configs/app/app.type.d.ts +10 -15
- package/es/configs/app/index.d.ts +7 -0
- package/es/configs/app/index.js +24 -31
- package/es/configs/index.d.ts +1 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/routes/index.d.ts +74 -79
- package/es/constants/routes/index.js +78 -46
- package/es/entry.d.ts +14 -19
- package/es/entry.js +35 -38
- package/es/enums/business-line/index.d.ts +71 -76
- package/es/enums/business-line/index.js +36 -115
- package/es/enums/environment/index.d.ts +5 -10
- package/es/enums/environment/index.js +4 -15
- package/es/enums/index.d.ts +5 -0
- package/es/enums/sdk/index.d.ts +5 -10
- package/es/enums/sdk/index.js +4 -15
- package/es/enums/storage/index.d.ts +2 -7
- package/es/enums/storage/index.js +4 -12
- package/es/enums/sub/enjoy/index.d.ts +14 -19
- package/es/enums/sub/enjoy/index.js +12 -19
- package/es/enums/sub/foods/index.d.ts +3 -8
- package/es/enums/sub/foods/index.js +4 -11
- package/es/enums/sub/hotel/index.d.ts +2 -7
- package/es/enums/sub/hotel/index.js +4 -12
- package/es/enums/sub/index.d.ts +3 -0
- package/es/index.d.ts +5 -16
- package/es/index.js +43 -16
- package/es/libs/webview/uni.webview.1.5.5.js +126 -194
- package/es/services/config/index.d.ts +5 -0
- package/es/services/config/index.js +6 -12
- package/es/services/goods/index.d.ts +2 -0
- package/es/services/goods/type.d.ts +20 -27
- package/es/services/goods/util.d.ts +6 -0
- package/es/services/goods/util.js +74 -122
- package/es/services/index.d.ts +2 -0
- package/es/types/index.d.ts +1 -0
- package/es/types/one-travel-service/index.d.ts +7 -14
- package/es/utils/common/index.d.ts +4 -9
- package/es/utils/common/index.js +25 -42
- package/es/utils/index.d.ts +3 -0
- package/es/utils/pages/activity-calendar/index.d.ts +4 -7
- package/es/utils/pages/activity-calendar/index.js +8 -11
- package/es/utils/pages/food/index.d.ts +2 -7
- package/es/utils/pages/food/index.js +5 -32
- package/es/utils/pages/index.d.ts +3 -0
- package/es/utils/pages/webview/index.d.ts +7 -11
- package/es/utils/pages/webview/index.js +7 -10
- package/es/utils/web-view/index.d.ts +18 -23
- package/es/utils/web-view/index.js +47 -87
- package/package.json +1 -1
- package/es/_virtual/rolldown_runtime.js +0 -27
- package/es/configs/app/app.hwtest.js.map +0 -1
- package/es/configs/app/app.prod.js.map +0 -1
- package/es/configs/app/app.type.d.ts.map +0 -1
- package/es/configs/app/index.js.map +0 -1
- package/es/constants/routes/index.d.ts.map +0 -1
- package/es/constants/routes/index.js.map +0 -1
- package/es/entry.d.ts.map +0 -1
- package/es/entry.js.map +0 -1
- package/es/enums/business-line/index.d.ts.map +0 -1
- package/es/enums/business-line/index.js.map +0 -1
- package/es/enums/environment/index.d.ts.map +0 -1
- package/es/enums/environment/index.js.map +0 -1
- package/es/enums/sdk/index.d.ts.map +0 -1
- package/es/enums/sdk/index.js.map +0 -1
- package/es/enums/storage/index.d.ts.map +0 -1
- package/es/enums/storage/index.js.map +0 -1
- package/es/enums/sub/enjoy/index.d.ts.map +0 -1
- package/es/enums/sub/enjoy/index.js.map +0 -1
- package/es/enums/sub/foods/index.d.ts.map +0 -1
- package/es/enums/sub/foods/index.js.map +0 -1
- package/es/enums/sub/hotel/index.d.ts.map +0 -1
- package/es/enums/sub/hotel/index.js.map +0 -1
- package/es/libs/webview/uni.webview.1.5.5.js.map +0 -1
- package/es/services/config/index.js.map +0 -1
- package/es/services/goods/type.d.ts.map +0 -1
- package/es/services/goods/util.js.map +0 -1
- package/es/types/one-travel-service/index.d.ts.map +0 -1
- package/es/utils/common/index.d.ts.map +0 -1
- package/es/utils/common/index.js.map +0 -1
- package/es/utils/pages/activity-calendar/index.d.ts.map +0 -1
- package/es/utils/pages/activity-calendar/index.js.map +0 -1
- package/es/utils/pages/food/index.d.ts.map +0 -1
- package/es/utils/pages/food/index.js.map +0 -1
- package/es/utils/pages/webview/index.d.ts.map +0 -1
- package/es/utils/pages/webview/index.js.map +0 -1
- package/es/utils/web-view/index.d.ts.map +0 -1
- package/es/utils/web-view/index.js.map +0 -1
|
@@ -1,124 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
break;
|
|
74
|
-
case EBusinessLine.Recommend:
|
|
75
|
-
/** 种草 */
|
|
76
|
-
page = `${routePrefix.show}/details/index?id=${skuId}${item?.moreParameter ? item.moreParameter : ""}`;
|
|
77
|
-
break;
|
|
78
|
-
case EBusinessLine.Activity:
|
|
79
|
-
/** 活动 */
|
|
80
|
-
page = getActivityCalendarDetailPage({
|
|
81
|
-
id: skuId,
|
|
82
|
-
date: item.collectTime
|
|
83
|
-
});
|
|
84
|
-
break;
|
|
85
|
-
case EBusinessLine.SoundGuizhou:
|
|
86
|
-
/** 声入贵州 */
|
|
87
|
-
page = `${routePrefix.soundGuizhou}/detail?audioLibId=${skuId}`;
|
|
88
|
-
break;
|
|
89
|
-
case EBusinessLine.ExcitingVideo:
|
|
90
|
-
/** 精彩视频 */
|
|
91
|
-
page = `${routePrefix.living}/wonderful-video/index?vid=${skuId}`;
|
|
92
|
-
break;
|
|
93
|
-
default: break;
|
|
94
|
-
}
|
|
95
|
-
if (page) {
|
|
96
|
-
if (configOptions.caller === ECaller.web) navigateTo({ src: page });
|
|
97
|
-
else if (configOptions.caller === ECaller.host) {}
|
|
98
|
-
}
|
|
1
|
+
import { getSDKConfig as $ } from "../config/index.js";
|
|
2
|
+
import { EHotelType as c } from "../../enums/sub/hotel/index.js";
|
|
3
|
+
import { getAppConfig as y } from "../../configs/app/index.js";
|
|
4
|
+
import { EBusinessLine as i, ESubBizType as l } from "../../enums/business-line/index.js";
|
|
5
|
+
import { getActivityCalendarDetailPage as g } from "../../utils/pages/activity-calendar/index.js";
|
|
6
|
+
import { EVenueTypesDes as I, EVenueTypes as k } from "../../enums/sub/enjoy/index.js";
|
|
7
|
+
import { getWebviewPage as n } from "../../utils/pages/webview/index.js";
|
|
8
|
+
import { EFoodsModuleType as b } from "../../enums/sub/foods/index.js";
|
|
9
|
+
import { getFoodStorePage as h, getFoodPackagePage as x } from "../../utils/pages/food/index.js";
|
|
10
|
+
import { ECaller as p } from "../../enums/sdk/index.js";
|
|
11
|
+
import { navigateTo as v } from "../../utils/web-view/index.js";
|
|
12
|
+
import { routePrefix as r } from "../../constants/routes/index.js";
|
|
13
|
+
const T = async (e) => {
|
|
14
|
+
const t = $(), s = y(t.appEnv), { skuId: d, linkBusinessLine: u, type: f = "", item: o } = e || {};
|
|
15
|
+
let a = "";
|
|
16
|
+
switch (u) {
|
|
17
|
+
case i.Scenic:
|
|
18
|
+
a = `${r.ticket}/detail/index?scenicId=${d}&reservationId=${o.reservationId}&isOld=${o.isOld}`;
|
|
19
|
+
break;
|
|
20
|
+
case i.Hotel:
|
|
21
|
+
a = `${r.hotel}/home/details/index?id=${d}`;
|
|
22
|
+
break;
|
|
23
|
+
case i.Homestay:
|
|
24
|
+
f === c.hotel ? a = `${r.hotel}/home/details/index?id=${d}` : `${o.subBizType}` == `${l.HomestayHotel}` ? a = `${r.hotel}/home/details/index?id=${d}` : a = `${r.hotel}/home/hot-sale-details/index?id=${d}`;
|
|
25
|
+
break;
|
|
26
|
+
case i.Route:
|
|
27
|
+
a = `${r.road}/product-detail/index?id=${d}`;
|
|
28
|
+
break;
|
|
29
|
+
case i.Travel:
|
|
30
|
+
break;
|
|
31
|
+
case i.Foods:
|
|
32
|
+
(o == null ? void 0 : o.moduleType) === b.store ? a = n({ url: h(s.domain.food, o.storeId || o.id) }) : a = n({ url: x(s.domain.food, o.storeId || o.id, d) });
|
|
33
|
+
break;
|
|
34
|
+
case i.Buy:
|
|
35
|
+
a = n({ url: s.domain.shopping + `goods?itemId=${o.id || o.spuId}` });
|
|
36
|
+
break;
|
|
37
|
+
case i.Onebuygz:
|
|
38
|
+
a = n({ url: s.domain.onebuygz + `pages/commodity-detail/index?itemId=${o.spuId || o.id}&skuId=${o.skuId}` });
|
|
39
|
+
break;
|
|
40
|
+
case i.Entertainment:
|
|
41
|
+
`${o.type}` === I[k.Activity] || `${o.subBizType}` == `${l.EntertainmentPerform}` ? a = `${r.enjoy}/g-activity/detail?id=` + d + "&mchId=" + (o.storeId || "") : a = `${r.enjoy}/g-venue/detail?id=${d}&reservationId=${o.reservationId}`;
|
|
42
|
+
break;
|
|
43
|
+
case i.Strategy:
|
|
44
|
+
a = `${r.strategy}/strategy-detail/index?id=` + d;
|
|
45
|
+
break;
|
|
46
|
+
case i.Recommend:
|
|
47
|
+
a = `${r.show}/details/index?id=${d}${o != null && o.moreParameter ? o.moreParameter : ""}`;
|
|
48
|
+
break;
|
|
49
|
+
case i.Activity:
|
|
50
|
+
a = g({ id: d, date: o.collectTime });
|
|
51
|
+
break;
|
|
52
|
+
case i.SoundGuizhou:
|
|
53
|
+
a = `${r.soundGuizhou}/detail?audioLibId=${d}`;
|
|
54
|
+
break;
|
|
55
|
+
case i.ExcitingVideo:
|
|
56
|
+
a = `${r.living}/wonderful-video/index?vid=${d}`;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
a && (t.caller === p.web ? v({ src: a }) : (t.caller, p.host));
|
|
60
|
+
}, A = (e) => {
|
|
61
|
+
let t = (e == null ? void 0 : e.extInfoMap) || (e == null ? void 0 : e.extInfo) || {};
|
|
62
|
+
try {
|
|
63
|
+
t = typeof t == "string" ? JSON.parse(t) : t;
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
const s = e != null && e.extInfoMap || e != null && e.extInfo ? { ...e, ...t } : e;
|
|
67
|
+
(s == null ? void 0 : s.type) === c.hotel && (e.skuId = s == null ? void 0 : s.storeId), T({
|
|
68
|
+
skuId: (e == null ? void 0 : e.skuId) || (e == null ? void 0 : e.spuId) || (e == null ? void 0 : e.id) || "",
|
|
69
|
+
linkBusinessLine: s.linkBusinessLine || s.bizType || s.businessType,
|
|
70
|
+
type: s.type,
|
|
71
|
+
item: s
|
|
72
|
+
}).then().catch();
|
|
99
73
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
* @param item
|
|
103
|
-
*/
|
|
104
|
-
const jumpToGoodsDetailPage = (item) => {
|
|
105
|
-
let extInfo = item?.extInfoMap || item?.extInfo || {};
|
|
106
|
-
try {
|
|
107
|
-
extInfo = typeof extInfo === "string" ? JSON.parse(extInfo) : extInfo;
|
|
108
|
-
} catch {}
|
|
109
|
-
const obj = item?.extInfoMap || item?.extInfo ? {
|
|
110
|
-
...item,
|
|
111
|
-
...extInfo
|
|
112
|
-
} : item;
|
|
113
|
-
if (obj?.type === EHotelType.hotel) item.skuId = obj?.storeId;
|
|
114
|
-
jumpToGoodsDetail({
|
|
115
|
-
skuId: item?.skuId || item?.spuId || item?.id || "",
|
|
116
|
-
linkBusinessLine: obj.linkBusinessLine || obj.bizType || obj.businessType,
|
|
117
|
-
type: obj.type,
|
|
118
|
-
item: obj
|
|
119
|
-
}).then().catch();
|
|
74
|
+
export {
|
|
75
|
+
A as jumpToGoodsDetailPage
|
|
120
76
|
};
|
|
121
|
-
|
|
122
|
-
//#endregion
|
|
123
|
-
export { jumpToGoodsDetailPage };
|
|
124
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './one-travel-service';
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import { EAppEnv } from
|
|
2
|
-
import { ECaller } from
|
|
3
|
-
|
|
4
|
-
//#region src/types/one-travel-service/index.d.ts
|
|
5
|
-
|
|
1
|
+
import { EAppEnv } from '../../enums';
|
|
2
|
+
import { ECaller } from '../../enums/sdk';
|
|
6
3
|
/**
|
|
7
4
|
* 一码游SDK可选项
|
|
8
5
|
*/
|
|
9
|
-
type IOneTravelSDKOptions = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
export type IOneTravelSDKOptions = {
|
|
7
|
+
/** 环境变量, 默认生产环境 */
|
|
8
|
+
appEnv: EAppEnv;
|
|
9
|
+
/** 调用者 */
|
|
10
|
+
caller: ECaller;
|
|
14
11
|
};
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
16
|
-
//#endregion
|
|
17
|
-
export { IOneTravelSDKOptions };
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
//#region src/utils/common/index.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* 是否是空值
|
|
4
3
|
* @param value
|
|
5
4
|
*/
|
|
6
|
-
declare function isEmpty(value: any): boolean;
|
|
5
|
+
export declare function isEmpty(value: any): boolean;
|
|
7
6
|
/**
|
|
8
7
|
* 查询参数转url
|
|
9
8
|
* @param {Object} query 查询参数
|
|
10
9
|
* @param {Object} options 可选参数
|
|
11
10
|
*/
|
|
12
|
-
declare function query2url(query: Record<string, any>, options?: {
|
|
13
|
-
|
|
11
|
+
export declare function query2url(query: Record<string, any>, options?: {
|
|
12
|
+
encode?: boolean;
|
|
14
13
|
}): string;
|
|
15
14
|
/**
|
|
16
15
|
* 解析URL查询参数
|
|
17
16
|
* @param {String} url
|
|
18
17
|
*/
|
|
19
|
-
declare function getQueryParameters<T = any>(url: string): T;
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
21
|
-
//#endregion
|
|
22
|
-
export { getQueryParameters, isEmpty, query2url };
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
18
|
+
export declare function getQueryParameters<T = any>(url: string): T;
|
package/es/utils/common/index.js
CHANGED
|
@@ -1,45 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* 是否是空值
|
|
4
|
-
* @param value
|
|
5
|
-
*/
|
|
6
|
-
function isEmpty(value) {
|
|
7
|
-
return value === "" || value === void 0 || value === null;
|
|
1
|
+
function u(t) {
|
|
2
|
+
return t === "" || t === void 0 || t === null;
|
|
8
3
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* @param {Object} options 可选参数
|
|
13
|
-
*/
|
|
14
|
-
function query2url(query, options) {
|
|
15
|
-
const { encode = true } = options || {};
|
|
16
|
-
const url = Object.entries(query || {}).filter(([key, val]) => val !== void 0 && val !== null).map(([key, val]) => {
|
|
17
|
-
return encode ? `${encodeURIComponent(key)}=${encodeURIComponent(val)}` : `${key}=${val}`;
|
|
18
|
-
}).join("&");
|
|
19
|
-
return url ? `?${url}` : "";
|
|
4
|
+
function l(t, r) {
|
|
5
|
+
const { encode: c = !0 } = r || {}, o = Object.entries(t || {}).filter(([n, e]) => e != null).map(([n, e]) => c ? `${encodeURIComponent(n)}=${encodeURIComponent(e)}` : `${n}=${e}`).join("&");
|
|
6
|
+
return o ? `?${o}` : "";
|
|
20
7
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} catch (error) {}
|
|
37
|
-
params[key] = value;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return params;
|
|
8
|
+
function d(t) {
|
|
9
|
+
const r = {}, c = t.split("?")[1];
|
|
10
|
+
if (c) {
|
|
11
|
+
const o = c.split("&");
|
|
12
|
+
for (let n = 0; n < o.length; n++) {
|
|
13
|
+
const e = o[n].split("="), s = decodeURIComponent(e[0]);
|
|
14
|
+
let i = decodeURIComponent(e[1] || "");
|
|
15
|
+
try {
|
|
16
|
+
i = JSON.parse(i);
|
|
17
|
+
} catch {
|
|
18
|
+
}
|
|
19
|
+
r[s] = i;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return r;
|
|
41
23
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
export {
|
|
25
|
+
d as getQueryParameters,
|
|
26
|
+
u as isEmpty,
|
|
27
|
+
l as query2url
|
|
28
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
date?: string;
|
|
1
|
+
export type ActivityCalendarDetailPageParams = {
|
|
2
|
+
id: number | string;
|
|
3
|
+
date?: string;
|
|
5
4
|
};
|
|
6
5
|
declare function getActivityCalendarDetailPage(params: ActivityCalendarDetailPageParams): string;
|
|
7
|
-
|
|
8
|
-
export { ActivityCalendarDetailPageParams, getActivityCalendarDetailPage };
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
6
|
+
export { getActivityCalendarDetailPage };
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function getActivityCalendarDetailPage(params) {
|
|
7
|
-
return `${rootPage}/detail/index${query2url(params, { encode: false })}`;
|
|
1
|
+
import { query2url as t } from "../../common/index.js";
|
|
2
|
+
import { routePrefix as r } from "../../../constants/routes/index.js";
|
|
3
|
+
const i = r.activityCalendar;
|
|
4
|
+
function n(e) {
|
|
5
|
+
return `${i}/detail/index${t(e, { encode: !1 })}`;
|
|
8
6
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
7
|
+
export {
|
|
8
|
+
n as getActivityCalendarDetailPage
|
|
9
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/pages/food/index.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* 店铺
|
|
4
3
|
* @param domain 域名
|
|
@@ -6,7 +5,7 @@
|
|
|
6
5
|
* @param isDiamondLevel
|
|
7
6
|
* @returns
|
|
8
7
|
*/
|
|
9
|
-
declare const getFoodStorePage: (domain: string, storeId: string, isDiamondLevel?: boolean) => string;
|
|
8
|
+
export declare const getFoodStorePage: (domain: string, storeId: string, isDiamondLevel?: boolean) => string;
|
|
10
9
|
/**
|
|
11
10
|
* 套餐
|
|
12
11
|
* @param domain
|
|
@@ -14,8 +13,4 @@ declare const getFoodStorePage: (domain: string, storeId: string, isDiamondLevel
|
|
|
14
13
|
* @param packageId
|
|
15
14
|
* @returns
|
|
16
15
|
*/
|
|
17
|
-
declare const getFoodPackagePage: (domain: string, storeId: string, packageId: string) => string;
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
19
|
-
//#endregion
|
|
20
|
-
export { getFoodPackagePage, getFoodStorePage };
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
16
|
+
export declare const getFoodPackagePage: (domain: string, storeId: string, packageId: string) => string;
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
import { query2url } from "../../common/index.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @param domain 域名
|
|
7
|
-
* @param storeId
|
|
8
|
-
* @param isDiamondLevel
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
const getFoodStorePage = (domain, storeId, isDiamondLevel) => {
|
|
12
|
-
return `${domain}store/arrive/index${query2url({
|
|
13
|
-
storeId,
|
|
14
|
-
isDiamondLevel
|
|
15
|
-
}, { encode: false })}`;
|
|
1
|
+
import { query2url as t } from "../../common/index.js";
|
|
2
|
+
const n = (e, r, o) => `${e}store/arrive/index${t({ storeId: r, isDiamondLevel: o }, { encode: !1 })}`, d = (e, r, o) => `${e}store/arrive/package-detail/index${t({ storeId: r, packageId: o }, { encode: !1 })}`;
|
|
3
|
+
export {
|
|
4
|
+
d as getFoodPackagePage,
|
|
5
|
+
n as getFoodStorePage
|
|
16
6
|
};
|
|
17
|
-
/**
|
|
18
|
-
* 套餐
|
|
19
|
-
* @param domain
|
|
20
|
-
* @param storeId
|
|
21
|
-
* @param packageId
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
const getFoodPackagePage = (domain, storeId, packageId) => {
|
|
25
|
-
return `${domain}store/arrive/package-detail/index${query2url({
|
|
26
|
-
storeId,
|
|
27
|
-
packageId
|
|
28
|
-
}, { encode: false })}`;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { getFoodPackagePage, getFoodStorePage };
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { EBusinessLine } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
businessLine?: EBusinessLine;
|
|
8
|
-
scene?: any;
|
|
1
|
+
import { EBusinessLine } from '../../../enums';
|
|
2
|
+
export type WebviewPageParams = {
|
|
3
|
+
url: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
businessLine?: EBusinessLine;
|
|
6
|
+
scene?: any;
|
|
9
7
|
};
|
|
10
8
|
declare function getWebviewPage(params: WebviewPageParams): string;
|
|
11
|
-
|
|
12
|
-
export { WebviewPageParams, getWebviewPage };
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
export { getWebviewPage };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function getWebviewPage(params) {
|
|
6
|
-
return `${routes.webView}${query2url(params)}`;
|
|
1
|
+
import { query2url as r } from "../../common/index.js";
|
|
2
|
+
import { routes as o } from "../../../constants/routes/index.js";
|
|
3
|
+
function u(e) {
|
|
4
|
+
return `${o.webView}${r(e)}`;
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
6
|
+
export {
|
|
7
|
+
u as getWebviewPage
|
|
8
|
+
};
|
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
pay = "pay",
|
|
1
|
+
export declare enum EMessagesType {
|
|
2
|
+
pay = "pay"
|
|
4
3
|
}
|
|
5
4
|
/**
|
|
6
5
|
* 当前环境
|
|
7
6
|
* @returns
|
|
8
7
|
*/
|
|
9
|
-
declare const getWebViewEnv: () => {};
|
|
8
|
+
export declare const getWebViewEnv: () => {};
|
|
10
9
|
/**
|
|
11
10
|
* 原生路由跳转
|
|
12
11
|
* @param parameters
|
|
13
12
|
*/
|
|
14
|
-
declare const navigateTo: (parameters: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
export declare const navigateTo: (parameters: {
|
|
14
|
+
/** 跳转路径 */
|
|
15
|
+
src: string;
|
|
16
|
+
/** 路径参数(会拼接到url上面) */
|
|
17
|
+
params?: Record<string, any>;
|
|
19
18
|
}) => void;
|
|
20
19
|
/**
|
|
21
20
|
* 原生路由重定向
|
|
22
21
|
* @param parameters
|
|
23
22
|
*/
|
|
24
|
-
declare const redirectTo: (parameters: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
export declare const redirectTo: (parameters: {
|
|
24
|
+
/** 跳转路径 */
|
|
25
|
+
src: string;
|
|
26
|
+
/** 路径参数(会拼接到url上面) */
|
|
27
|
+
params?: Record<string, any>;
|
|
29
28
|
}) => void;
|
|
30
29
|
/**
|
|
31
30
|
* 原生路由返回
|
|
32
31
|
* @param parameters
|
|
33
32
|
*/
|
|
34
|
-
declare const navigateBack: (parameters?: {
|
|
35
|
-
|
|
33
|
+
export declare const navigateBack: (parameters?: {
|
|
34
|
+
delta?: number;
|
|
36
35
|
}) => void;
|
|
37
36
|
/**
|
|
38
37
|
* 发送消息
|
|
39
38
|
* @param data
|
|
40
39
|
*/
|
|
41
|
-
declare const postMessage: (data: {
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
export declare const postMessage: (data: {
|
|
41
|
+
type?: EMessagesType;
|
|
42
|
+
params: Record<string, any>;
|
|
44
43
|
}) => void;
|
|
45
|
-
//# sourceMappingURL=index.d.ts.map
|
|
46
|
-
//#endregion
|
|
47
|
-
export { EMessagesType, getWebViewEnv, navigateBack, navigateTo, postMessage, redirectTo };
|
|
48
|
-
//# sourceMappingURL=index.d.ts.map
|