@conecli/cone-render 0.10.1-shop3.16 → 0.10.1-shop3.18

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.
@@ -1 +1 @@
1
- import { domain } from '../../api';
2
1
  shop: '/pages/shop/index/index',
3
2
  detail: '/pages/gold/item/pages/detail/index',
4
3
  jxDetail: '/pages/item/detail/detail',
5
4
  searchCoupon: '/pages/search/subPackages/coupon/coupon',
6
5
  h5: '/pages/h5/index',
7
6
  jingGouHome: '/pages/index/index',
8
7
  shopFans: '/pages/shopfans/pages/index/index',
9
8
  shopLight: '/pages/shoplight/pages/index/index',
10
9
  couponSearch: '/pages/search/subPackages/coupon/coupon',
11
10
  jxCouponSearch: '/pages/search_copr/index',
12
11
  shopx: '/pages/shopx/pages/index/index',
13
12
  shopSearch: '/pages/shopx/pages/searchPanel/index',
14
13
  jdLive: '/pages/jd_live/pages/liveRoom/index',
15
14
  mshop: domain.mshop,
16
15
  pages: domain.pages,
17
16
  couponSearch: `${domain.mobileSo}/list/couponSearch.action`,
18
17
  jxCouponSearch: `${domain.jxDomain}/search/coupon.shtml`,
19
18
  pcCouponSearch: `${domain.pcSo}/Search`,
20
19
  shopSecondActivity: `${domain.sale}/m/h5/`,
21
20
  shopLight: `${domain.sale}/liteshop/index.html`,
22
21
  detail: `${domain.mobileDetail}/product/`,
23
22
  jxDetail: `${domain.wqs}/item/view.html`,
24
23
  tjDetail: `${domain.kpl}/product`,
25
24
  pcDetail: `https://item.jd.com/`,
26
25
  pcCoupon: `${domain.pcCoupon}/ilink/couponActiveFront/linkKey/front_index.action`,
27
26
  mobileHome: `${domain.mobileHome}`,
28
27
  rank: `${domain.ranking}/comLandingPage/comLandingPage`,
29
28
  wqShopMember: `${domain.wqshop}/mshop/QueryShopMemberInfo`,
30
29
  wqShopDetail: `${domain.wqshop}/mshop/GetShopIntroduce`,
31
30
  wqShopSearch: `${domain.wqshop}/mshop/SearchList`,
32
31
  myCouponList: `${domain.wqs}/my/coupon/index.shtml`,
33
32
  myRedPacketList: `${domain.wqs}/my/redpacket.shtml`,
34
33
  memberHome: `${domain.pages}/member/home`,
35
34
  memberCard: `${domain.pages}/member/card`,
36
35
  memberPoints: `${domain.pages}/member/points`,
37
36
  memberBenefit: `${domain.pages}/member/benefit`,
38
37
  memberScores: `${domain.pages}/member/scores`,
39
38
  memberScoreRule: `${domain.pages}/member/scoreRule`,
40
39
  memberProduct: `${domain.pages}/member/product`,
41
40
  shopMember: `${domain.shopMember}/shopcard`,
42
41
  shopMemberCardAgreement: `${domain.shopMember}/member/cardAgreement`,
43
42
  shopMemberCardInstruction: `${domain.shopMember}/member/cardInstruction`,
44
43
  shopMemberPointDetail: `${domain.shopMember}/member/membersPoint`,
45
44
  shopMemberBenefit: `${domain.shopMember}/shopbenefit`,
46
45
  shopMemberRule: `${domain.shopMember}/member/membersRule`,
47
46
  shopSuperMemberRule: `${domain.shopMember}/member/memberWelfareRule`,
48
47
  shopMemberEquityRule: `${domain.shopMember}/member/memberEquityRule`,
49
48
  shopMemberWelfare: `${domain.shopMember}/member/memberWelfare`,
50
49
  shopMemberCloseAccount: `${domain.shopMember}/member/memberCloseAccount`,
51
50
  shopMemberPointExchange: `${domain.shopMember}/memberpoint`,
52
51
  shopMemberBonusPurchase: `${domain.shopMember}/bonuspurchase`,
53
52
  shopMemberGood: `${domain.shopMember}/member/membersGood`,
54
53
  shopMemberCouponList: `${domain.shopMember}/couponList/index.html`,
55
54
  shopMemberOpenCard: `${domain.shopMember}/openCard/index.html`,
56
55
  shopMemberPayDescription: `${domain.shopMember}/brandSubscribeExplain/index.html`,
57
56
  beanDetail: `${domain.bean}/beanDetail/index.action`,
58
57
  totalPromotion: `${domain.mobileSo}/list/itemSearch.action`,
59
58
  mLive: `${domain.lives}/#`,
60
59
  shopHome: `${domain.pages}/shop/home`,
61
60
  shopIntroduce: `${domain.pages}/shop/introduce`,
62
61
  shopSearch: `${domain.pages}/shop/search`,
63
62
  shopLottery: `${domain.pages}/shop/lottery`,
64
63
  shopCoupon: `${domain.pages}/shop/coupon`,
65
64
  shopWares: `${domain.pages}/shop/wares`,
66
65
  shopFastShopping: `${domain.pages}/shop/fastShopping`,
67
66
  shopSpeciSeckill: `${domain.pages}/shop/specialSeckill`,
68
67
  shopVideos: `${domain.pages}/shop/videos`,
69
68
  shopMoreGoods: `${domain.pages}/shop/moreGoods`,
70
69
  shopUseShareOrderUgcContent: `${domain.capturehomeshare}/aha/ugcShare.html`,
71
70
  dongDongChat: `${domain.jdcs}/chat/index.action`,
72
71
  samCenter: `${domain.pages}/shop/samCenter`,
73
72
  samCard: `${domain.pages}/shop/samCard`,
74
73
  shopH5MemberCardAPP: `${domain.pages}/member/shopcard`,
75
74
  shopH5MemberCardM: `${domain.pages}/member/m/shopcard`,
76
75
  sageAuthorHome: `${domain.ecoDomain}/content/dr_home/index.html`,
77
76
  sageShopInteract: `${domain.pages}/app/interact`,
77
+ import { domain } from '../../api';
78
78
  shop: '/pages/shop/index/index',
79
79
  detail: '/pages/gold/item/pages/detail/index',
80
80
  jxDetail: '/pages/item/detail/detail',
81
81
  searchCoupon: '/pages/search/subPackages/coupon/coupon',
82
82
  h5: '/pages/h5/index',
83
83
  jingGouHome: '/pages/index/index',
84
84
  shopFans: '/pages/shopfans/pages/index/index',
85
85
  shopLight: '/pages/shoplight/pages/index/index',
86
86
  couponSearch: '/pages/search/subPackages/coupon/coupon',
87
87
  jxCouponSearch: '/pages/search_copr/index',
88
88
  shopx: '/pages/shopx/pages/index/index',
89
89
  shopSearch: '/pages/shopx/pages/searchPanel/index',
90
90
  jdLive: '/pages/jd_live/pages/liveRoom/index',
91
91
  mshop: domain.mshop,
92
92
  pages: domain.pages,
93
93
  couponSearch: `${domain.mobileSo}/list/couponSearch.action`,
94
94
  jxCouponSearch: `${domain.jxDomain}/search/coupon.shtml`,
95
95
  pcCouponSearch: `${domain.pcSo}/Search`,
96
96
  shopSecondActivity: `${domain.sale}/m/h5/`,
97
97
  shopLight: `${domain.sale}/liteshop/index.html`,
98
98
  detail: `${domain.mobileDetail}/product/`,
99
99
  jxDetail: `${domain.wqs}/item/view.html`,
100
100
  tjDetail: `${domain.kpl}/product`,
101
101
  pcDetail: `https://item.jd.com/`,
102
102
  pcCoupon: `${domain.pcCoupon}/ilink/couponActiveFront/linkKey/front_index.action`,
103
103
  mobileHome: `${domain.mobileHome}`,
104
104
  rank: `${domain.ranking}/comLandingPage/comLandingPage`,
105
105
  wqShopMember: `${domain.wqshop}/mshop/QueryShopMemberInfo`,
106
106
  wqShopDetail: `${domain.wqshop}/mshop/GetShopIntroduce`,
107
107
  wqShopSearch: `${domain.wqshop}/mshop/SearchList`,
108
108
  myCouponList: `${domain.wqs}/my/coupon/index.shtml`,
109
109
  myRedPacketList: `${domain.wqs}/my/redpacket.shtml`,
110
110
  memberHome: `${domain.pages}/member/home`,
111
111
  memberCard: `${domain.pages}/member/card`,
112
112
  memberPoints: `${domain.pages}/member/points`,
113
113
  memberBenefit: `${domain.pages}/member/benefit`,
114
114
  memberScores: `${domain.pages}/member/scores`,
115
115
  memberScoreRule: `${domain.pages}/member/scoreRule`,
116
116
  memberProduct: `${domain.pages}/member/product`,
117
117
  shopMember: `${domain.shopMember}/shopcard`,
118
118
  shopMemberCardAgreement: `${domain.shopMember}/member/cardAgreement`,
119
119
  shopMemberCardInstruction: `${domain.shopMember}/member/cardInstruction`,
120
120
  shopMemberPointDetail: `${domain.shopMember}/member/membersPoint`,
121
121
  shopMemberBenefit: `${domain.shopMember}/shopbenefit`,
122
122
  shopMemberRule: `${domain.shopMember}/member/membersRule`,
123
123
  shopSuperMemberRule: `${domain.shopMember}/member/memberWelfareRule`,
124
124
  shopMemberEquityRule: `${domain.shopMember}/member/memberEquityRule`,
125
125
  shopMemberWelfare: `${domain.shopMember}/member/memberWelfare`,
126
126
  shopMemberCloseAccount: `${domain.shopMember}/member/memberCloseAccount`,
127
127
  shopMemberPointExchange: `${domain.shopMember}/memberpoint`,
128
128
  shopMemberBonusPurchase: `${domain.shopMember}/bonuspurchase`,
129
129
  shopMemberGood: `${domain.shopMember}/member/membersGood`,
130
130
  shopMemberCouponList: `${domain.shopMember}/couponList/index.html`,
131
131
  shopMemberOpenCard: `${domain.shopMember}/openCard/index.html`,
132
132
  shopMemberPayDescription: `${domain.shopMember}/brandSubscribeExplain/index.html`,
133
133
  beanDetail: `${domain.bean}/beanDetail/index.action`,
134
134
  totalPromotion: `${domain.mobileSo}/list/itemSearch.action`,
135
135
  mLive: `${domain.lives}/#`,
136
136
  shopHome: `${domain.pages}/shop/home`,
137
137
  shopIntroduce: `${domain.pages}/shop/introduce`,
138
138
  shopSearch: `${domain.pages}/shop/search`,
139
139
  shopLottery: `${domain.pages}/shop/lottery`,
140
140
  shopCoupon: `${domain.pages}/shop/coupon`,
141
141
  shopWares: `${domain.pages}/shop/wares`,
142
142
  shopFastShopping: `${domain.pages}/shop/fastShopping`,
143
143
  shopSpeciSeckill: `${domain.pages}/shop/specialSeckill`,
144
144
  shopVideos: `${domain.pages}/shop/videos`,
145
145
  shopMoreGoods: `${domain.pages}/shop/moreGoods`,
146
146
  shopUseShareOrderUgcContent: `${domain.capturehomeshare}/aha/ugcShare.html`,
147
147
  dongDongChat: `${domain.jdcs}/chat/index.action`,
148
148
  samCenter: `${domain.pages}/shop/samCenter`,
149
149
  samCard: `${domain.pages}/shop/samCard`,
150
150
  shopH5MemberCardAPP: `${domain.pages}/member/shopcard`,
151
151
  shopH5MemberCardM: `${domain.pages}/member/m/shopcard`,
152
152
  sageAuthorHome: `${domain.ecoDomain}/content/dr_home/index.html`,
153
153
  sageShopInteract: `${domain.pages}/app/interact`,
154
154
  shopCouponPop: `${domain.pages}/app/couponPop`,
@@ -1 +1 @@
1
- export enum LogPnameInfo {
2
1
  HOME = 'home',
3
2
  MEMBER = 'member',
4
3
  CLASSIFY = 'classify',
5
4
  PROMOTION = 'promotion',
6
5
  WX_SHOP_HOME = 'wx_shop_home',
7
6
  APP_SHOP_DETAIL = 'app_Shop_ShopDetail',
8
7
  MOBILE_SEARCH = 'MShop_SearchResult',
9
8
  SALE_VIEW = 'Shop_NewActivity',
10
9
  STOW_SHOP_VIEW = 'Shop_FollowShopMain',
11
10
  APP_SHOP_NEW_PRODUCT = 'Shop_ProductNew',
12
11
  APP_SHOP_NEW_PRODUCT_VIDEO = 'Shop_ProductNewVideo',
13
12
  APP_SHOP_NEW_PRODUCT_PREFERRED_GOODS = 'shop_preferredGoods',
14
13
  APP_SHOP_BUYER_SHOW = 'Shop_ShopBuyerShow',
15
14
  APP_SHOP_CARD = 'Shop_ShopCard',
16
15
  APP_SHOP_MEMBER = 'Shop_ShopMember',
17
16
  APP_SHOP_PAY_MEMBER = 'Shop_PayShopMember',
18
17
  SHOP_MEMBER_EXCHANGE_NEW = 'Shop_ShopMemberExchangedNew',
19
18
  SHOP_MEMBER_RECEIVED = 'Shop_ShopMemberReceived',
20
19
  SHOP_MEMBER_SCORES = 'Shop_ShopMemberScores',
21
20
  SHOP_MEMBER_SCORE_RULE = 'Shop_ShopMemberScoreRule',
22
21
  SHOP_MEMBER_PRODUCT = 'Shop_ShopMemberProduct',
23
22
  APP_SAGE = 'Shop_Person',
24
23
  APP_SAGE_POP = 'Shop_PersionPop',
25
24
  MOBILE = 'Shop_ShopMain',
26
25
  APP = 'TerminatorNew_All',
27
26
  APP_SAGE = 'Shop_Person',
28
27
  APP_SAGE_POP = 'Shop_PersionPop',
29
28
  WX_JDGW_SHOP = 'W_jdgwxcx_shop',
30
29
  APP_SHOP_DETAIL = 'Shop_ShopDetail',
31
30
  MOBILE_SEARCH = 'MShop_SearchResult',
32
31
  STOW_SHOP_VIEW = 'Shop_FollowShopMain',
33
32
  APP_SHOP_CARD = 'Shop_ShopCard',
34
33
  APP_SHOP_MEMBER = 'Shop_ShopMember',
35
34
  APP_SHOP_PAY_MEMBER = 'Shop_PayShopMember',
36
35
  SHOP_MEMBER_EXCHANGE_NEW = 'Shop_ShopMemberExchangedNew',
37
36
  SHOP_MEMBER_RECEIVED = 'Shop_ShopMemberReceived',
38
37
  APP_SHOP_NEW_PRODUCT = 'Shop_ProductNew',
39
38
  APP_SHOP_NEW_PRODUCT_VIDEO = 'Shop_ProductNewVideo',
40
39
  APP_SHOP_NEW_PRODUCT_PREFERRED_GOODS = 'shop_preferredGoods',
41
40
  APP_SHOP_BUYER_SHOW = 'Shop_ShopBuyerShow',
42
41
  SALE_VIEW = 'Shop_NewActivity',
43
42
  SHOP_MEMBER_SCORES = 'Shop_ShopMemberScores',
44
43
  SHOP_MEMBER_SCORE_RULE = 'Shop_ShopMemberScoreRule',
45
44
  SHOP_MEMBER_PRODUCT = 'Shop_ShopMemberProduct',
46
45
  ACTIVITY_INIT: 'activityInit',
47
46
  SHOP_HEADER: 'shopHeader',
48
47
  SHOP_FOOTER: 'shopFooter',
49
48
  SHOP_HOME: 'jshopMain',
50
49
  SHOP_FOLLOW_BTN: 'shopFollowBtn',
51
50
  SHOP_UNFOLLOW_BTN: 'shopUnFollowBtn',
52
51
  NETWORK_ERR: 'networkerr',
53
52
  RANK_LIST_MORE: 'Jx_Terminator_ShopRankListMore',
54
53
  RANK_LIST_TAG: 'Jx_Terminator_ShopRankListTag',
55
54
  RANK_LIST: 'Jx_Terminator_ShopRankList',
56
55
  EXPO_RANK_LIST: 'Jx_Terminator_Expo_shopRankList',
57
56
  [LogEventIds.SHOP_HOME]: 'Jx_Terminator_1620613767283|1',
58
57
  [LogEventIds.SHOP_FOLLOW_BTN]: 'Jx_Terminator_1620613767283|2',
59
58
  [LogEventIds.SHOP_UNFOLLOW_BTN]: 'Jx_Terminator_1620613767283|3',
60
59
  [LogEventIds.NETWORK_ERR]: 'Jx_Terminator_1620613767283|4',
61
60
  [LogEventIds.RANK_LIST_MORE]: 'Jx_Terminator_ShopRankListMore',
62
61
  [LogEventIds.RANK_LIST_TAG]: 'Jx_Terminator_ShopRankListTag',
63
62
  [LogEventIds.RANK_LIST]: 'Jx_Terminator_ShopRankList',
64
63
  [LogEventIds.EXPO_RANK_LIST]: 'Jx_Terminator_Expo_shopRankList',
64
+ export enum LogPnameInfo {
65
65
  HOME = 'home',
66
66
  MEMBER = 'member',
67
67
  CLASSIFY = 'classify',
68
68
  PROMOTION = 'promotion',
69
69
  WX_SHOP_HOME = 'wx_shop_home',
70
70
  APP_SHOP_DETAIL = 'app_Shop_ShopDetail',
71
71
  MOBILE_SEARCH = 'MShop_SearchResult',
72
72
  SALE_VIEW = 'Shop_NewActivity',
73
73
  STOW_SHOP_VIEW = 'Shop_FollowShopMain',
74
74
  APP_SHOP_NEW_PRODUCT = 'Shop_ProductNew',
75
75
  APP_SHOP_NEW_PRODUCT_VIDEO = 'Shop_ProductNewVideo',
76
76
  APP_SHOP_NEW_PRODUCT_PREFERRED_GOODS = 'shop_preferredGoods',
77
77
  APP_SHOP_BUYER_SHOW = 'Shop_ShopBuyerShow',
78
78
  APP_SHOP_CARD = 'Shop_ShopCard',
79
79
  APP_SHOP_MEMBER = 'Shop_ShopMember',
80
80
  APP_SHOP_PAY_MEMBER = 'Shop_PayShopMember',
81
81
  SHOP_MEMBER_EXCHANGE_NEW = 'Shop_ShopMemberExchangedNew',
82
82
  SHOP_MEMBER_RECEIVED = 'Shop_ShopMemberReceived',
83
83
  SHOP_MEMBER_SCORES = 'Shop_ShopMemberScores',
84
84
  SHOP_MEMBER_SCORE_RULE = 'Shop_ShopMemberScoreRule',
85
85
  SHOP_MEMBER_PRODUCT = 'Shop_ShopMemberProduct',
86
86
  APP_SAGE = 'Shop_Person',
87
87
  APP_SAGE_POP = 'Shop_PersionPop',
88
88
  APP_USER_SHOP_SALE_POP = 'Shop_SystemUserShopSalePop',
89
89
  MOBILE = 'Shop_ShopMain',
90
90
  APP = 'TerminatorNew_All',
91
91
  APP_SAGE = 'Shop_Person',
92
92
  APP_SAGE_POP = 'Shop_PersionPop',
93
93
  WX_JDGW_SHOP = 'W_jdgwxcx_shop',
94
94
  APP_SHOP_DETAIL = 'Shop_ShopDetail',
95
95
  MOBILE_SEARCH = 'MShop_SearchResult',
96
96
  STOW_SHOP_VIEW = 'Shop_FollowShopMain',
97
97
  APP_SHOP_CARD = 'Shop_ShopCard',
98
98
  APP_SHOP_MEMBER = 'Shop_ShopMember',
99
99
  APP_SHOP_PAY_MEMBER = 'Shop_PayShopMember',
100
100
  SHOP_MEMBER_EXCHANGE_NEW = 'Shop_ShopMemberExchangedNew',
101
101
  SHOP_MEMBER_RECEIVED = 'Shop_ShopMemberReceived',
102
102
  APP_SHOP_NEW_PRODUCT = 'Shop_ProductNew',
103
103
  APP_SHOP_NEW_PRODUCT_VIDEO = 'Shop_ProductNewVideo',
104
104
  APP_SHOP_NEW_PRODUCT_PREFERRED_GOODS = 'shop_preferredGoods',
105
105
  APP_SHOP_BUYER_SHOW = 'Shop_ShopBuyerShow',
106
106
  SALE_VIEW = 'Shop_NewActivity',
107
107
  SHOP_MEMBER_SCORES = 'Shop_ShopMemberScores',
108
108
  SHOP_MEMBER_SCORE_RULE = 'Shop_ShopMemberScoreRule',
109
109
  SHOP_MEMBER_PRODUCT = 'Shop_ShopMemberProduct',
110
110
  APP_USER_SHOP_SALE_POP = 'Shop_SystemUserShopSalePop',
111
111
  ACTIVITY_INIT: 'activityInit',
112
112
  SHOP_HEADER: 'shopHeader',
113
113
  SHOP_FOOTER: 'shopFooter',
114
114
  SHOP_HOME: 'jshopMain',
115
115
  SHOP_FOLLOW_BTN: 'shopFollowBtn',
116
116
  SHOP_UNFOLLOW_BTN: 'shopUnFollowBtn',
117
117
  NETWORK_ERR: 'networkerr',
118
118
  RANK_LIST_MORE: 'Jx_Terminator_ShopRankListMore',
119
119
  RANK_LIST_TAG: 'Jx_Terminator_ShopRankListTag',
120
120
  RANK_LIST: 'Jx_Terminator_ShopRankList',
121
121
  EXPO_RANK_LIST: 'Jx_Terminator_Expo_shopRankList',
122
122
  [LogEventIds.SHOP_HOME]: 'Jx_Terminator_1620613767283|1',
123
123
  [LogEventIds.SHOP_FOLLOW_BTN]: 'Jx_Terminator_1620613767283|2',
124
124
  [LogEventIds.SHOP_UNFOLLOW_BTN]: 'Jx_Terminator_1620613767283|3',
125
125
  [LogEventIds.NETWORK_ERR]: 'Jx_Terminator_1620613767283|4',
126
126
  [LogEventIds.RANK_LIST_MORE]: 'Jx_Terminator_ShopRankListMore',
127
127
  [LogEventIds.RANK_LIST_TAG]: 'Jx_Terminator_ShopRankListTag',
128
128
  [LogEventIds.RANK_LIST]: 'Jx_Terminator_ShopRankList',
129
129
  [LogEventIds.EXPO_RANK_LIST]: 'Jx_Terminator_Expo_shopRankList',
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  UUID,
3
2
  isJdApp,
4
3
  jdAppVersionStr,
5
4
  isIosDevice,
6
5
  isPc,
7
6
  isJdAndIosDevice,
8
7
  isJdAndAndroidDevice,
9
8
  isJdAndHarmonyDevice,
10
9
  passSmartCouponInfoFunctionIdList,
11
10
  needFixClientValueToHarmonyFunctionIdList,
12
11
  clientVersion: isJdApp && jdAppVersionStr !== '' ? jdAppVersionStr : '11.0.0',
13
12
  client: isJdApp ? (isIosDevice ? 'apple' : 'android') : isPc ? 'pc' : 'wh5',
14
13
  screen: `${Math.ceil(window.screen?.width * devicePixelRatio)}*${Math.ceil(
15
14
  window.screen?.height * devicePixelRatio,
16
15
  )}`,
17
16
  area: '1_72_2799_0',
18
17
  uuid: UUID,
19
18
  if (area && area !== '') {
20
19
  clientParams.area = area;
21
20
  }
22
21
  console.warn(
23
22
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
24
23
  area,
25
24
  '更新后的接口底层信息',
26
25
  clientParams,
27
26
  );
28
27
  if (isH5 && (isJdAndIosDevice || isJdAndAndroidDevice)) {
29
28
  const smartCouponInfo = await getSmartCouponInfo();
30
29
  if (smartCouponInfo) {
31
30
  requestParams.smartCouponInfo = smartCouponInfo;
32
31
  }
33
32
  } else {
34
33
  console.warn('🚗 ~~ handleSmartCouponInfo ~~ 不支持的环境!');
35
34
  }
36
35
  functionId: string,
37
36
  body = {},
38
37
  options = {},
39
38
  requestOptions = {},
40
39
  const useBodyParams = { ...body };
41
40
  if (passSmartCouponInfoFunctionIdList.includes(functionId)) {
42
41
  await handleSmartCouponInfo(useBodyParams);
43
42
  }
44
43
  const params = Object.assign(
45
44
  {},
46
45
  {
47
46
  t: Date.now(),
48
47
  functionId,
49
48
  appid: 'shop_m_jd_com',
50
49
  body: JSON.stringify(useBodyParams),
51
50
  },
52
51
  clientParams,
53
52
  options,
54
53
  {
55
54
  area: clientParams.area,
56
55
  client: !isJdApp && options?.client ? options?.client : clientParams.client,
57
56
  clientVersion:
58
57
  !isJdApp && options?.clientVersion ? options?.clientVersion : clientParams.clientVersion,
59
58
  },
60
59
  );
61
60
  if (isJdAndHarmonyDevice && needFixClientValueToHarmonyFunctionIdList.includes(functionId)) {
62
61
  params.client = 'harmony';
63
62
  } else {
64
63
  }
65
64
  console.warn(
66
65
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
67
66
  '底层默认的clientParams',
68
67
  clientParams,
69
68
  '下发的options',
70
69
  options,
71
70
  '最后params',
72
71
  params,
73
72
  );
74
73
  return http.post(api.apiFunc, params, requestOptions);
74
+ import Taro from '@tarojs/taro';
75
75
  UUID,
76
76
  isJdApp,
77
77
  jdAppVersionStr,
78
78
  isIosDevice,
79
79
  isPc,
80
80
  isJdAndIosDevice,
81
81
  isJdAndAndroidDevice,
82
82
  isJdAndHarmonyDevice,
83
83
  passSmartCouponInfoFunctionIdList,
84
84
  needFixClientValueToHarmonyFunctionIdList,
85
85
  clientVersion: isJdApp && jdAppVersionStr !== '' ? jdAppVersionStr : '11.0.0',
86
86
  client: isJdApp ? (isIosDevice ? 'apple' : 'android') : isPc ? 'pc' : 'wh5',
87
87
  screen: `${Math.ceil(window.screen?.width * devicePixelRatio)}*${Math.ceil(
88
88
  window.screen?.height * devicePixelRatio,
89
89
  )}`,
90
90
  area: '1_72_2799_0',
91
91
  uuid: UUID,
92
92
  const { area, realTimeArea } = areaInfo || {};
93
93
  area && area !== '' && (clientParams.area = area);
94
94
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
95
95
  console.warn(
96
96
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
97
97
  areaInfo,
98
98
  '更新后的接口底层信息',
99
99
  clientParams,
100
100
  );
101
101
  if (isH5 && (isJdAndIosDevice || isJdAndAndroidDevice)) {
102
102
  const smartCouponInfo = await getSmartCouponInfo();
103
103
  if (smartCouponInfo) {
104
104
  requestParams.smartCouponInfo = smartCouponInfo;
105
105
  }
106
106
  } else {
107
107
  console.warn('🚗 ~~ handleSmartCouponInfo ~~ 不支持的环境!');
108
108
  }
109
109
  functionId: string,
110
110
  body = {},
111
111
  options = {},
112
112
  requestOptions = {},
113
113
  const useBodyParams = { ...body };
114
114
  if (passSmartCouponInfoFunctionIdList.includes(functionId)) {
115
115
  await handleSmartCouponInfo(useBodyParams);
116
116
  }
117
117
  const params = Object.assign(
118
118
  {},
119
119
  {
120
120
  t: Date.now(),
121
121
  functionId,
122
122
  appid: 'shop_m_jd_com',
123
123
  body: JSON.stringify(useBodyParams),
124
124
  },
125
125
  clientParams,
126
126
  options,
127
127
  {
128
128
  area: clientParams.area,
129
129
  client: !isJdApp && options?.client ? options?.client : clientParams.client,
130
130
  clientVersion:
131
131
  !isJdApp && options?.clientVersion ? options?.clientVersion : clientParams.clientVersion,
132
132
  },
133
133
  );
134
134
  if (isJdAndHarmonyDevice && needFixClientValueToHarmonyFunctionIdList.includes(functionId)) {
135
135
  params.client = 'harmony';
136
136
  } else {
137
137
  }
138
138
  console.warn(
139
139
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
140
140
  '底层默认的clientParams',
141
141
  clientParams,
142
142
  '下发的options',
143
143
  options,
144
144
  '最后params',
145
145
  params,
146
146
  );
147
147
  return http.post(api.apiFunc, params, requestOptions);
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  clientVersion: '11.0.0',
3
2
  client: 'wh5',
4
3
  screen: `${Math.ceil(getSystemInfo?.screenWidth * devicePixelRatio)}*${Math.ceil(
5
4
  getSystemInfo?.screenHeight * devicePixelRatio,
6
5
  )}`,
7
6
  area: '1_72_2799_0',
8
7
  uuid: UUID,
9
8
  if (area && area !== '') {
10
9
  clientParams.area = area;
11
10
  }
12
11
  console.warn(
13
12
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
14
13
  area,
15
14
  '更新后的接口底层信息',
16
15
  clientParams,
17
16
  );
18
17
  functionId: string,
19
18
  body = {},
20
19
  options = {},
21
20
  requestOptions = {},
22
21
  const params = Object.assign(
23
22
  {},
24
23
  {
25
24
  t: Date.now(),
26
25
  functionId,
27
26
  appid: 'shop_m_jd_com',
28
27
  body: JSON.stringify(body),
29
28
  },
30
29
  clientParams,
31
30
  options,
32
31
  {
33
32
  area: clientParams.area,
34
33
  client: options?.client || clientParams.client,
35
34
  clientVersion: options?.clientVersion || clientParams.clientVersion,
36
35
  },
37
36
  );
38
37
  console.warn(
39
38
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
40
39
  '底层默认的clientParams',
41
40
  clientParams,
42
41
  '下发的options',
43
42
  options,
44
43
  '最后params',
45
44
  params,
46
45
  );
47
46
  return http.post(api.apiFunc, params, requestOptions);
47
+ import Taro from '@tarojs/taro';
48
48
  clientVersion: '11.0.0',
49
49
  client: 'wh5',
50
50
  screen: `${Math.ceil(getSystemInfo?.screenWidth * devicePixelRatio)}*${Math.ceil(
51
51
  getSystemInfo?.screenHeight * devicePixelRatio,
52
52
  )}`,
53
53
  area: '1_72_2799_0',
54
54
  uuid: UUID,
55
55
  const { area, realTimeArea } = areaInfo || {};
56
56
  area && area !== '' && (clientParams.area = area);
57
57
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
58
58
  console.warn(
59
59
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
60
60
  areaInfo,
61
61
  '更新后的接口底层信息',
62
62
  clientParams,
63
63
  );
64
64
  functionId: string,
65
65
  body = {},
66
66
  options = {},
67
67
  requestOptions = {},
68
68
  const params = Object.assign(
69
69
  {},
70
70
  {
71
71
  t: Date.now(),
72
72
  functionId,
73
73
  appid: 'shop_m_jd_com',
74
74
  body: JSON.stringify(body),
75
75
  },
76
76
  clientParams,
77
77
  options,
78
78
  {
79
79
  area: clientParams.area,
80
80
  client: options?.client || clientParams.client,
81
81
  clientVersion: options?.clientVersion || clientParams.clientVersion,
82
82
  },
83
83
  );
84
84
  console.warn(
85
85
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
86
86
  '底层默认的clientParams',
87
87
  clientParams,
88
88
  '下发的options',
89
89
  options,
90
90
  '最后params',
91
91
  params,
92
92
  );
93
93
  return http.post(api.apiFunc, params, requestOptions);