@foundbyte/uni-libs 0.0.11 → 0.0.12
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/README.md +2 -2
- package/es/configs/app/app.hwtest.js +4 -3
- package/es/configs/app/app.prod.js +4 -3
- package/es/configs/app/app.type.d.ts +2 -0
- package/es/configs/app/index.js +2 -1
- package/es/entry.d.ts +1 -6
- package/es/entry.js +0 -7
- package/es/enums/business-line/index.d.ts +2 -0
- package/es/enums/business-line/index.js +4 -1
- package/es/enums/sub/enjoy/index.d.ts +10 -6
- package/es/enums/sub/enjoy/index.js +14 -6
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- package/es/services/goods/service.js +10 -109
- package/es/services/goods/type.d.ts +8 -22
- package/es/utils/pages/movie/index.d.ts +7 -0
- package/es/utils/pages/movie/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ const oneTravelSdk = new OneTravelSDK({
|
|
|
25
25
|
### 2.jumpToGoodsDetailPage
|
|
26
26
|
跳转商品详情页
|
|
27
27
|
```typescript
|
|
28
|
-
oneTravelSdk.
|
|
28
|
+
oneTravelSdk.jumpToProductDetailPage({
|
|
29
29
|
...
|
|
30
30
|
})
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ oneTravelSdk.jumpToGoodsDetailPage({
|
|
|
33
33
|
#### 参数
|
|
34
34
|
| 参数名 | 描述 | 类型 | 是否必填 | 默认值 |
|
|
35
35
|
|-----|-----|-----|-----|-----|
|
|
36
|
-
|
|
|
36
|
+
| item | 商品项 | IJumpProductDetailItem | 是 | - |
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
//#region src/configs/app/app.hwtest.ts
|
|
2
2
|
const config = { domain: {
|
|
3
|
-
shopping:
|
|
4
|
-
food:
|
|
5
|
-
onebuygz: "https://testb2ch5-travel.gcongo.com.cn/#/"
|
|
3
|
+
shopping: "https://shopping-h5.onetravelgz.cn/#/",
|
|
4
|
+
food: "https://food-h5.onetravelgz.cn/#/",
|
|
5
|
+
onebuygz: "https://testb2ch5-travel.gcongo.com.cn/#/",
|
|
6
|
+
movie: "https://147gn9gm.life.mczjk.cn/#/"
|
|
6
7
|
} };
|
|
7
8
|
var app_hwtest_default = config;
|
|
8
9
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
//#region src/configs/app/app.prod.ts
|
|
2
2
|
const config = { domain: {
|
|
3
|
-
shopping:
|
|
4
|
-
food:
|
|
5
|
-
onebuygz: "https://travel.onebuygz.com/#/"
|
|
3
|
+
shopping: "https://shopping-h5.onetravelgz.com/#/",
|
|
4
|
+
food: "https://home.onetravelgz.com/food/index.html#/",
|
|
5
|
+
onebuygz: "https://travel.onebuygz.com/#/",
|
|
6
|
+
movie: "https://147gn9gm.life.mczjk.cn/#/"
|
|
6
7
|
} };
|
|
7
8
|
var app_prod_default = config;
|
|
8
9
|
|
package/es/configs/app/index.js
CHANGED
package/es/entry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IOneTravelSDKConfig } from "./types/one-travel-service/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { IJumpProductDetailItem } from "./services/goods/type.js";
|
|
3
3
|
import { IAppConfig } from "./configs/app/app.type.js";
|
|
4
4
|
|
|
5
5
|
//#region src/entry.d.ts
|
|
@@ -15,11 +15,6 @@ declare class OneTravelSDK {
|
|
|
15
15
|
* 获取App配置信息
|
|
16
16
|
*/
|
|
17
17
|
getAppConfig(): IAppConfig;
|
|
18
|
-
/**
|
|
19
|
-
* 跳转商品详情页(老)
|
|
20
|
-
* @param goodsItem 商品数据
|
|
21
|
-
*/
|
|
22
|
-
jumpToGoodsDetailPage(goodsItem: IJumpGoodsDetailItem): void;
|
|
23
18
|
/**
|
|
24
19
|
* 跳转商品详情页
|
|
25
20
|
* @param item
|
package/es/entry.js
CHANGED
|
@@ -26,13 +26,6 @@ var OneTravelSDK = class {
|
|
|
26
26
|
return getAppConfig(this.sdkConfig.appEnv);
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* 跳转商品详情页(老)
|
|
30
|
-
* @param goodsItem 商品数据
|
|
31
|
-
*/
|
|
32
|
-
jumpToGoodsDetailPage(goodsItem) {
|
|
33
|
-
this.goodsService.jumpToGoodsDetailPage(goodsItem);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
29
|
* 跳转商品详情页
|
|
37
30
|
* @param item
|
|
38
31
|
*/
|
|
@@ -59,6 +59,8 @@ let EBusinessLine = /* @__PURE__ */ function(EBusinessLine$1) {
|
|
|
59
59
|
EBusinessLine$1[EBusinessLine$1["Living"] = 907] = "Living";
|
|
60
60
|
/** 实名认证 前端定义,后端无定义 */
|
|
61
61
|
EBusinessLine$1[EBusinessLine$1["RealName"] = 908] = "RealName";
|
|
62
|
+
/** 电影票 */
|
|
63
|
+
EBusinessLine$1[EBusinessLine$1["Movie"] = 1e4] = "Movie";
|
|
62
64
|
return EBusinessLine$1;
|
|
63
65
|
}({});
|
|
64
66
|
/**
|
|
@@ -92,7 +94,8 @@ const BusinessLineDict = {
|
|
|
92
94
|
[EBusinessLine.Onebuygz]: "购物",
|
|
93
95
|
[EBusinessLine.ConsumerCoupon]: "消费券",
|
|
94
96
|
[EBusinessLine.Living]: "直播",
|
|
95
|
-
[EBusinessLine.RealName]: "实名认证"
|
|
97
|
+
[EBusinessLine.RealName]: "实名认证",
|
|
98
|
+
[EBusinessLine.Movie]: "电影票"
|
|
96
99
|
};
|
|
97
100
|
/** 子业务线 */
|
|
98
101
|
let ESubBizType = /* @__PURE__ */ function(ESubBizType$1) {
|
|
@@ -7,14 +7,18 @@ declare enum EVenueTypes {
|
|
|
7
7
|
Exhibitions = "02",
|
|
8
8
|
/** 演艺活动 */
|
|
9
9
|
Activity = "03",
|
|
10
|
+
/** 电影 */
|
|
11
|
+
Movie = "04",
|
|
10
12
|
}
|
|
11
|
-
declare
|
|
13
|
+
declare enum EVenueSimpleTypes {
|
|
12
14
|
/** 博物馆 */
|
|
13
|
-
"
|
|
15
|
+
Museums = "1",
|
|
14
16
|
/** 展览馆 */
|
|
15
|
-
"
|
|
17
|
+
Exhibitions = "2",
|
|
16
18
|
/** 演艺活动 */
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
+
Activity = "3",
|
|
20
|
+
/** 电影 */
|
|
21
|
+
Movie = "4",
|
|
22
|
+
}
|
|
19
23
|
//#endregion
|
|
20
|
-
export {
|
|
24
|
+
export { EVenueSimpleTypes, EVenueTypes };
|
|
@@ -7,13 +7,21 @@ let EVenueTypes = /* @__PURE__ */ function(EVenueTypes$1) {
|
|
|
7
7
|
EVenueTypes$1["Exhibitions"] = "02";
|
|
8
8
|
/** 演艺活动 */
|
|
9
9
|
EVenueTypes$1["Activity"] = "03";
|
|
10
|
+
/** 电影 */
|
|
11
|
+
EVenueTypes$1["Movie"] = "04";
|
|
10
12
|
return EVenueTypes$1;
|
|
11
13
|
}({});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
let EVenueSimpleTypes = /* @__PURE__ */ function(EVenueSimpleTypes$1) {
|
|
15
|
+
/** 博物馆 */
|
|
16
|
+
EVenueSimpleTypes$1["Museums"] = "1";
|
|
17
|
+
/** 展览馆 */
|
|
18
|
+
EVenueSimpleTypes$1["Exhibitions"] = "2";
|
|
19
|
+
/** 演艺活动 */
|
|
20
|
+
EVenueSimpleTypes$1["Activity"] = "3";
|
|
21
|
+
/** 电影 */
|
|
22
|
+
EVenueSimpleTypes$1["Movie"] = "4";
|
|
23
|
+
return EVenueSimpleTypes$1;
|
|
24
|
+
}({});
|
|
17
25
|
|
|
18
26
|
//#endregion
|
|
19
|
-
export {
|
|
27
|
+
export { EVenueSimpleTypes, EVenueTypes };
|
package/es/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { routePrefix, routes } from "./constants/routes/index.js";
|
|
|
2
2
|
import { BusinessLineDict, EBusinessLine, ESubBizType } from "./enums/business-line/index.js";
|
|
3
3
|
import { EAppEnv } from "./enums/environment/index.js";
|
|
4
4
|
import { ECaller } from "./enums/sdk/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { EVenueSimpleTypes, EVenueTypes } from "./enums/sub/enjoy/index.js";
|
|
6
6
|
import { EFoodPackageType, EFoodsModuleType } from "./enums/sub/foods/index.js";
|
|
7
7
|
import { EHotelType } from "./enums/sub/hotel/index.js";
|
|
8
8
|
import { IOneTravelSDKConfig } from "./types/one-travel-service/index.js";
|
|
@@ -10,6 +10,7 @@ import { getQueryParameters, isEmpty, query2url } from "./utils/common/index.js"
|
|
|
10
10
|
import { ActivityCalendarDetailPageParams, getActivityCalendarDetailPage } from "./utils/pages/activity-calendar/index.js";
|
|
11
11
|
import { WebviewPageParams, getWebviewPage } from "./utils/pages/webview/index.js";
|
|
12
12
|
import { getFoodPackagePage, getFoodStorePage } from "./utils/pages/food/index.js";
|
|
13
|
+
import { getMoviePage } from "./utils/pages/movie/index.js";
|
|
13
14
|
import { EMessagesType, navigateBack, navigateTo, postMessage, redirectTo } from "./utils/web-view/index.js";
|
|
14
15
|
import { OneTravelSDK } from "./entry.js";
|
|
15
|
-
export { ActivityCalendarDetailPageParams, BusinessLineDict, EAppEnv, EBusinessLine, ECaller, EFoodPackageType, EFoodsModuleType, EHotelType, EMessagesType, ESubBizType,
|
|
16
|
+
export { ActivityCalendarDetailPageParams, BusinessLineDict, EAppEnv, EBusinessLine, ECaller, EFoodPackageType, EFoodsModuleType, EHotelType, EMessagesType, ESubBizType, EVenueSimpleTypes, EVenueTypes, IOneTravelSDKConfig, OneTravelSDK, WebviewPageParams, getActivityCalendarDetailPage, getFoodPackagePage, getFoodStorePage, getMoviePage, getQueryParameters, getWebviewPage, isEmpty, navigateBack, navigateTo, postMessage, query2url, redirectTo, routePrefix, routes };
|
package/es/index.js
CHANGED
|
@@ -2,14 +2,15 @@ import { routePrefix, routes } from "./constants/routes/index.js";
|
|
|
2
2
|
import { BusinessLineDict, EBusinessLine, ESubBizType } from "./enums/business-line/index.js";
|
|
3
3
|
import { EAppEnv } from "./enums/environment/index.js";
|
|
4
4
|
import { ECaller } from "./enums/sdk/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { EVenueSimpleTypes, EVenueTypes } from "./enums/sub/enjoy/index.js";
|
|
6
6
|
import { EFoodPackageType, EFoodsModuleType } from "./enums/sub/foods/index.js";
|
|
7
7
|
import { EHotelType } from "./enums/sub/hotel/index.js";
|
|
8
8
|
import { getQueryParameters, isEmpty, query2url } from "./utils/common/index.js";
|
|
9
9
|
import { getActivityCalendarDetailPage } from "./utils/pages/activity-calendar/index.js";
|
|
10
10
|
import { getWebviewPage } from "./utils/pages/webview/index.js";
|
|
11
11
|
import { getFoodPackagePage, getFoodStorePage } from "./utils/pages/food/index.js";
|
|
12
|
+
import { getMoviePage } from "./utils/pages/movie/index.js";
|
|
12
13
|
import { EMessagesType, navigateBack, navigateTo, postMessage, redirectTo } from "./utils/web-view/index.js";
|
|
13
14
|
import { OneTravelSDK } from "./entry.js";
|
|
14
15
|
|
|
15
|
-
export { BusinessLineDict, EAppEnv, EBusinessLine, ECaller, EFoodPackageType, EFoodsModuleType, EHotelType, EMessagesType, ESubBizType,
|
|
16
|
+
export { BusinessLineDict, EAppEnv, EBusinessLine, ECaller, EFoodPackageType, EFoodsModuleType, EHotelType, EMessagesType, ESubBizType, EVenueSimpleTypes, EVenueTypes, OneTravelSDK, getActivityCalendarDetailPage, getFoodPackagePage, getFoodStorePage, getMoviePage, getQueryParameters, getWebviewPage, isEmpty, navigateBack, navigateTo, postMessage, query2url, redirectTo, routePrefix, routes };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { routePrefix } from "../../constants/routes/index.js";
|
|
2
2
|
import { EBusinessLine, ESubBizType } from "../../enums/business-line/index.js";
|
|
3
3
|
import { ECaller } from "../../enums/sdk/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { EVenueSimpleTypes } from "../../enums/sub/enjoy/index.js";
|
|
5
5
|
import { EFoodsModuleType } from "../../enums/sub/foods/index.js";
|
|
6
6
|
import { EHotelType } from "../../enums/sub/hotel/index.js";
|
|
7
|
-
import { getActivityCalendarDetailPage } from "../../utils/pages/activity-calendar/index.js";
|
|
8
7
|
import { getWebviewPage } from "../../utils/pages/webview/index.js";
|
|
9
8
|
import { getFoodPackagePage, getFoodStorePage } from "../../utils/pages/food/index.js";
|
|
9
|
+
import { getMoviePage } from "../../utils/pages/movie/index.js";
|
|
10
10
|
import { navigateTo } from "../../utils/web-view/index.js";
|
|
11
11
|
import { getAppConfig } from "../../configs/app/index.js";
|
|
12
12
|
|
|
@@ -17,112 +17,6 @@ var GoodsService = class {
|
|
|
17
17
|
this.goodsServiceConfig = config;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* 跳转到各商品详情
|
|
21
|
-
* @param options 可选项
|
|
22
|
-
*/
|
|
23
|
-
jumpToGoodsDetail = async (options) => {
|
|
24
|
-
const configOptions = this.goodsServiceConfig.sdkConfig;
|
|
25
|
-
const appConfig = getAppConfig(configOptions.appEnv);
|
|
26
|
-
const { skuId, linkBusinessLine, type = "", item } = options || {};
|
|
27
|
-
let page = "";
|
|
28
|
-
switch (linkBusinessLine) {
|
|
29
|
-
case EBusinessLine.Scenic:
|
|
30
|
-
/** 景区/门票 */
|
|
31
|
-
page = `${routePrefix.ticket}/detail/index?scenicId=${skuId}&reservationId=${item.reservationId}&isOld=${item.isOld}`;
|
|
32
|
-
break;
|
|
33
|
-
case EBusinessLine.Hotel:
|
|
34
|
-
/** 酒店 */
|
|
35
|
-
page = `${routePrefix.hotel}/home/details/index?id=${skuId}`;
|
|
36
|
-
break;
|
|
37
|
-
case EBusinessLine.Homestay:
|
|
38
|
-
/** 民宿 */
|
|
39
|
-
if (type === EHotelType.hotel)
|
|
40
|
-
/** 酒店 (天下房仓酒店详情页)*/
|
|
41
|
-
page = `${routePrefix.hotel}/home/details/index?id=${skuId}`;
|
|
42
|
-
else if (`${item.subBizType}` === `${ESubBizType.HomestayHotel}`) page = `${routePrefix.hotel}/home/details/index?id=${skuId}`;
|
|
43
|
-
else page = `${routePrefix.hotel}/home/hot-sale-details/index?id=${skuId}`;
|
|
44
|
-
break;
|
|
45
|
-
case EBusinessLine.Route:
|
|
46
|
-
/** 路线/定制 */
|
|
47
|
-
page = `${routePrefix.road}/product-detail/index?id=${skuId}`;
|
|
48
|
-
break;
|
|
49
|
-
case EBusinessLine.Travel:
|
|
50
|
-
/** 出行 */
|
|
51
|
-
break;
|
|
52
|
-
case EBusinessLine.Foods:
|
|
53
|
-
/** 美食 */
|
|
54
|
-
if (item?.moduleType === EFoodsModuleType.store)
|
|
55
|
-
/** 收藏跳店铺 */
|
|
56
|
-
page = getWebviewPage({ url: getFoodStorePage(appConfig.domain.food, item.storeId || item.id) });
|
|
57
|
-
else
|
|
58
|
-
/** 跳转套餐 */
|
|
59
|
-
page = getWebviewPage({ url: getFoodPackagePage(appConfig.domain.food, item.storeId || item.id, skuId) });
|
|
60
|
-
break;
|
|
61
|
-
case EBusinessLine.Buy:
|
|
62
|
-
/** 购物 */
|
|
63
|
-
page = getWebviewPage({ url: appConfig.domain.shopping + `goods?itemId=${item.id || item.spuId}` });
|
|
64
|
-
break;
|
|
65
|
-
case EBusinessLine.Onebuygz:
|
|
66
|
-
/** 新购物 */
|
|
67
|
-
page = getWebviewPage({ url: appConfig.domain.onebuygz + `pages/commodity-detail/index?itemId=${item.spuId || item.id}&skuId=${item.skuId}` });
|
|
68
|
-
break;
|
|
69
|
-
case EBusinessLine.Entertainment:
|
|
70
|
-
/** 文娱 */
|
|
71
|
-
if (`${item.type}` === EVenueTypesDes[EVenueTypes.Activity] || `${item.subBizType}` === `${ESubBizType.EntertainmentPerform}`) page = `${routePrefix.enjoy}/g-activity/detail?id=` + skuId + "&mchId=" + (item.storeId || "");
|
|
72
|
-
else page = `${routePrefix.enjoy}/g-venue/detail?id=${skuId}&reservationId=${item.reservationId}`;
|
|
73
|
-
break;
|
|
74
|
-
case EBusinessLine.Strategy:
|
|
75
|
-
/** 攻略 */
|
|
76
|
-
page = `${routePrefix.strategy}/strategy-detail/index?id=` + skuId;
|
|
77
|
-
break;
|
|
78
|
-
case EBusinessLine.Recommend:
|
|
79
|
-
/** 种草 */
|
|
80
|
-
page = `${routePrefix.show}/details/index?id=${skuId}${item?.moreParameter ? item.moreParameter : ""}`;
|
|
81
|
-
break;
|
|
82
|
-
case EBusinessLine.Activity:
|
|
83
|
-
/** 活动 */
|
|
84
|
-
page = getActivityCalendarDetailPage({
|
|
85
|
-
id: skuId,
|
|
86
|
-
date: item.collectTime
|
|
87
|
-
});
|
|
88
|
-
break;
|
|
89
|
-
case EBusinessLine.SoundGuizhou:
|
|
90
|
-
/** 声入贵州 */
|
|
91
|
-
page = `${routePrefix.soundGuizhou}/detail?audioLibId=${skuId}`;
|
|
92
|
-
break;
|
|
93
|
-
case EBusinessLine.ExcitingVideo:
|
|
94
|
-
/** 精彩视频 */
|
|
95
|
-
page = `${routePrefix.living}/wonderful-video/index?vid=${skuId}`;
|
|
96
|
-
break;
|
|
97
|
-
default: break;
|
|
98
|
-
}
|
|
99
|
-
if (page) {
|
|
100
|
-
if (configOptions.caller === ECaller.web) navigateTo({ src: page });
|
|
101
|
-
else if (configOptions.caller === ECaller.host) {}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* 跳转商品详情页
|
|
106
|
-
* @param item
|
|
107
|
-
*/
|
|
108
|
-
jumpToGoodsDetailPage = (item) => {
|
|
109
|
-
let extInfo = item?.extInfoMap || item?.extInfo || {};
|
|
110
|
-
try {
|
|
111
|
-
extInfo = typeof extInfo === "string" ? JSON.parse(extInfo) : extInfo;
|
|
112
|
-
} catch {}
|
|
113
|
-
const obj = item?.extInfoMap || item?.extInfo ? {
|
|
114
|
-
...item,
|
|
115
|
-
...extInfo
|
|
116
|
-
} : item;
|
|
117
|
-
if (obj?.type === EHotelType.hotel) item.skuId = obj?.storeId;
|
|
118
|
-
this.jumpToGoodsDetail({
|
|
119
|
-
skuId: item?.skuId || item?.spuId || item?.id || "",
|
|
120
|
-
linkBusinessLine: obj.linkBusinessLine || obj.bizType || obj.businessType,
|
|
121
|
-
type: obj.type,
|
|
122
|
-
item: obj
|
|
123
|
-
}).then().catch();
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
20
|
* 跳转商品详情页面
|
|
127
21
|
* @param item 商品数据
|
|
128
22
|
*/
|
|
@@ -192,9 +86,16 @@ var GoodsService = class {
|
|
|
192
86
|
const entertainmentSubBizType = item?.entertainment?.subBizType || extInfo?.subBizType;
|
|
193
87
|
const entertainmentType = item?.entertainment?.type || extInfo?.type || item?.common?.type;
|
|
194
88
|
const entertainmentReservationId = item?.entertainment?.reservationId || extInfo?.reservationId || item?.common?.reservationId;
|
|
195
|
-
if (`${entertainmentType}` ===
|
|
89
|
+
if (`${entertainmentType}` === EVenueSimpleTypes.Activity || `${entertainmentSubBizType}` === `${ESubBizType.EntertainmentPerform}`) page = `${routePrefix.enjoy}/g-activity/detail?id=` + entertainmentId + "&mchId=" + entertainmentStoreId;
|
|
196
90
|
else page = `${routePrefix.enjoy}/g-venue/detail?id=${entertainmentId}&reservationId=${entertainmentReservationId}`;
|
|
197
91
|
break;
|
|
92
|
+
case EBusinessLine.Movie:
|
|
93
|
+
let movieId = item?.movie?.id || "";
|
|
94
|
+
try {
|
|
95
|
+
movieId = JSON.parse(extInfo?.extInfo || "{}")?.thirdMovieId || "";
|
|
96
|
+
} catch (e) {}
|
|
97
|
+
page = getMoviePage(appConfig.domain.movie, movieId);
|
|
98
|
+
break;
|
|
198
99
|
case EBusinessLine.Strategy:
|
|
199
100
|
const strategyId = item?.strategy?.id || item?.common?.spuId || item?.common?.id;
|
|
200
101
|
page = `${routePrefix.strategy}/strategy-detail/index?id=` + strategyId;
|
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
import { EBusinessLine, ESubBizType } from "../../enums/business-line/index.js";
|
|
2
2
|
import { EFoodPackageType, EFoodsModuleType } from "../../enums/sub/foods/index.js";
|
|
3
|
-
import { EHotelType } from "../../enums/sub/hotel/index.js";
|
|
4
3
|
|
|
5
4
|
//#region src/services/goods/type.d.ts
|
|
6
|
-
type IJumpGoodsDetailItem = {
|
|
7
|
-
/** 扩展参数(JSON数据) */
|
|
8
|
-
extInfoMap?: string;
|
|
9
|
-
/** 扩展参数(JSON数据) */
|
|
10
|
-
extInfo?: string;
|
|
11
|
-
/** 商品skuId */
|
|
12
|
-
skuId?: string;
|
|
13
|
-
/** 商品spuId */
|
|
14
|
-
spuId?: string;
|
|
15
|
-
/** 商品id */
|
|
16
|
-
id?: string;
|
|
17
|
-
/** 类型 (只有linkBusinessLine === EBusinessType.Homestay 才有用, 有就是酒店商品,没有就是爆款商品) */
|
|
18
|
-
type?: EHotelType;
|
|
19
|
-
/** 酒店或名宿 */
|
|
20
|
-
storeId?: string;
|
|
21
|
-
/** 业务线(不同的字段) */
|
|
22
|
-
linkBusinessLine?: EBusinessLine;
|
|
23
|
-
bizType?: EBusinessLine;
|
|
24
|
-
businessType?: EBusinessLine;
|
|
25
|
-
};
|
|
26
5
|
type IJumpProductDetailItemCommonExtInfo = {
|
|
27
6
|
reservationId?: string;
|
|
28
7
|
type?: 'hotel' | '1' | '3';
|
|
@@ -37,6 +16,9 @@ type IJumpProductDetailItemCommonExtInfo = {
|
|
|
37
16
|
/************ 美食相关字段 ************/
|
|
38
17
|
/************ 种草相关字段 ************/
|
|
39
18
|
moreParameter?: string;
|
|
19
|
+
/************ 种草相关字段 ************/
|
|
20
|
+
/************ 电影相关字段 ************/
|
|
21
|
+
extInfo: string;
|
|
40
22
|
};
|
|
41
23
|
/**
|
|
42
24
|
* 商品数据
|
|
@@ -105,6 +87,10 @@ type IJumpProductDetailItem = {
|
|
|
105
87
|
moduleType?: EFoodsModuleType;
|
|
106
88
|
storePrecedentType?: EFoodPackageType;
|
|
107
89
|
};
|
|
90
|
+
/** 电影 */
|
|
91
|
+
movie?: {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
108
94
|
/** 文娱 */
|
|
109
95
|
entertainment?: {
|
|
110
96
|
id: string;
|
|
@@ -132,4 +118,4 @@ type IJumpProductDetailItem = {
|
|
|
132
118
|
};
|
|
133
119
|
};
|
|
134
120
|
//#endregion
|
|
135
|
-
export {
|
|
121
|
+
export { IJumpProductDetailItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { query2url } from "../../common/index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/pages/movie/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* 电影票地址
|
|
6
|
+
*/
|
|
7
|
+
const getMoviePage = (domain, movie_id) => {
|
|
8
|
+
return `${domain}pages/film/home${query2url({
|
|
9
|
+
my: 1,
|
|
10
|
+
movie_id
|
|
11
|
+
}, { encode: false })}`;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getMoviePage };
|