@conecli/cone-render 0.8.20-shop.229 → 0.8.20-shop.230

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 global from '../common';
2
1
  BUSINESS_TYPE,
3
2
  SHOP_MENU_ID_TYPE,
4
3
  SHOP_MENU_ID_NAME,
5
4
  SECTION_HOME_TAB_TYPE,
6
5
  SECTION_HOME_TAB_NAME_TYPE,
7
6
  routerInfo: {
8
7
  params: {},
9
8
  },
10
9
  nativeEvent: null,
11
10
  jumpConfig: {
12
11
  venderId: null,
13
12
  shopId: null,
14
13
  sourceValue: '',
15
14
  sourceType: 'M-H5',
16
15
  activityType: 'shopx',
17
16
  moduleId: 'none',
18
17
  entrance: 'none',
19
18
  },
20
19
  logPageParamStr: '',
21
20
  public logPageId: string;
22
21
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig;
23
22
  getConfig(opt) {
24
23
  return Object.assign(this, {}, defaultConfig, opt);
25
24
  }
26
25
  updateInfo(routerInfo, logPname = LogPnameInfo.HOME, pageId = LogPageIdInfo.APP) {
27
26
  this.routerInfo = routerInfo;
28
27
  this.logPname = logPname;
29
28
  this.jumpConfig = Object.assign(
30
29
  {},
31
30
  this.jumpConfig,
32
31
  filterUrlQueryData(routerInfo?.params || {}),
33
32
  );
34
33
  this.logPageId = pageId;
35
34
  }
36
35
 
37
36
  jdJumpToProduct(skuIds, logEventInfo) {
38
37
  skuIds = skuIds.toString().trim();
39
38
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
40
39
  let url = `${this.jumpWebUrl.pcDetail}${getSkuId}.html`;
41
40
  this.jdNavigateToNative(url, logEventInfo);
42
41
  }
43
42
 
44
43
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
45
44
  const getSkuId = skuInfo?.skuId;
46
45
  this.jdJumpToProduct(getSkuId, logEventInfo);
47
46
  }
48
47
 
49
48
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
50
49
  const currentShopInfo = {
51
50
  shopId: global.info.queryInfo.shopId,
52
51
  venderId: global.info.queryInfo.venderId,
53
52
  };
54
53
  const restParams =
55
54
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
56
55
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
57
56
  ? {}
58
57
  : currentShopInfo;
59
58
  const getInfo = Object.assign({}, restParams, shopInfo);
60
59
  let url = `${this.jumpWebUrl.pages}/index-${getInfo.shopId}.html`;
61
60
  this.jdNavigateToNative(url, {
62
61
  ...getInfo,
63
62
  });
64
63
  }
65
64
 
66
65
  getPcSearchUrl = (cateId) => {
67
66
  const flag = document.querySelector('#JSHOP_CHANNEL_FLAG')?.value;
68
67
  const appId =
69
68
  document.querySelector('#J_AppId')?.value ||
70
69
  document.querySelector('#pageInstance_appId')?.value;
71
70
  return flag === 'yao'
72
71
  ? this.jumpWebUrl.pages + '/view_shop_search-' + appId + '.html'
73
72
  : this.jumpWebUrl.pages + '/view_search-' + appId + '-' + cateId + '-99-1-20-1.html';
74
73
  };
75
74
 
76
75
  jdJumpToShopSearch(shopInfo) {
77
76
  const getInfo = Object.assign(
78
77
  {},
79
78
  {
80
79
  shopId: global.info.queryInfo.shopId,
81
80
  venderId: global.info.queryInfo.venderId,
82
81
  },
83
82
  shopInfo,
84
83
  );
85
84
  const { categoryId } = getInfo;
86
85
  const url = `${this.getPcSearchUrl(categoryId)}`;
87
86
  this.jdJumpToWeb(url, getInfo);
88
87
  }
89
88
 
90
89
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
91
90
  console.log('web.base.ts - jdJumpToTabAllProduct');
92
91
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
93
92
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
94
93
  const url = `${this.jumpWebUrl.pages}/index-${shopId}.html`;
95
94
  this.jdJumpToWeb(url, logEventInfo);
96
95
  }
97
96
 
98
97
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
99
98
  const url = `${this.jumpWebUrl.couponSearch}?couponbatch=${couponId}&sceneval=2`;
100
99
  this.jdJumpToWeb(url, logEventInfo);
101
100
  }
101
+ import global from '../common';
102
102
  BUSINESS_TYPE,
103
103
  SHOP_MENU_ID_TYPE,
104
104
  SHOP_MENU_ID_NAME,
105
105
  SECTION_HOME_TAB_TYPE,
106
106
  SECTION_HOME_TAB_NAME_TYPE,
107
107
  routerInfo: {
108
108
  params: {},
109
109
  },
110
110
  nativeEvent: null,
111
111
  jumpConfig: {
112
112
  venderId: null,
113
113
  shopId: null,
114
114
  sourceValue: '',
115
115
  sourceType: 'M-H5',
116
116
  activityType: 'shopx',
117
117
  moduleId: 'none',
118
118
  entrance: 'none',
119
119
  },
120
120
  logPageParamStr: '',
121
121
  public logPageId: string;
122
122
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig;
123
123
  getConfig(opt) {
124
124
  return Object.assign(this, {}, defaultConfig, opt);
125
125
  }
126
126
  updateInfo(routerInfo, logPname = LogPnameInfo.HOME, pageId = LogPageIdInfo.APP) {
127
127
  this.routerInfo = routerInfo;
128
128
  this.logPname = logPname;
129
129
  this.jumpConfig = Object.assign(
130
130
  {},
131
131
  this.jumpConfig,
132
132
  filterUrlQueryData(routerInfo?.params || {}),
133
133
  );
134
134
  this.logPageId = pageId;
135
135
  }
136
136
 
137
137
  jdJumpToProduct(skuIds, logEventInfo) {
138
138
  skuIds = skuIds.toString().trim();
139
139
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
140
140
  let url = `${this.jumpWebUrl.pcDetail}${getSkuId}.html`;
141
141
  this.jdNavigateToNative(url, logEventInfo);
142
142
  }
143
143
 
144
144
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
145
145
  const getSkuId = skuInfo?.skuId;
146
146
  this.jdJumpToProduct(getSkuId, logEventInfo);
147
147
  }
148
148
 
149
149
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
150
150
  const currentShopInfo = {
151
151
  shopId: global.info.queryInfo.shopId,
152
152
  venderId: global.info.queryInfo.venderId,
153
153
  };
154
154
  const restParams =
155
155
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
156
156
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
157
157
  ? {}
158
158
  : currentShopInfo;
159
159
  const getInfo = Object.assign({}, restParams, shopInfo);
160
160
  let url = `${this.jumpWebUrl.pages}/index-${getInfo.shopId}.html`;
161
161
  this.jdNavigateToNative(url, {
162
162
  ...getInfo,
163
163
  });
164
164
  }
165
165
 
166
166
  getPcSearchUrl = (searchInfo: { categoryId: string; keyWord: string }) => {
167
167
  const { categoryId, keyWord } = searchInfo;
168
168
  const flag = document.querySelector('#JSHOP_CHANNEL_FLAG')?.value;
169
169
  const appId =
170
170
  document.querySelector('#J_AppId')?.value ||
171
171
  document.querySelector('#pageInstance_appId')?.value;
172
172
  const searchUrl = categoryId
173
173
  ? this.jumpWebUrl.pages + '/view_search-' + appId + '-' + categoryId + '-99-1-20-1.html'
174
174
  : `${this.jumpWebUrl.pages}/view_search-${appId}.html?keyword=${keyWord}`;
175
175
  return flag === 'yao'
176
176
  ? this.jumpWebUrl.pages + '/view_shop_search-' + appId + '.html'
177
177
  : searchUrl;
178
178
  };
179
179
 
180
180
  jdJumpToShopSearch(shopInfo) {
181
181
  const getInfo = Object.assign(
182
182
  {},
183
183
  {
184
184
  shopId: global.info.queryInfo.shopId,
185
185
  venderId: global.info.queryInfo.venderId,
186
186
  },
187
187
  shopInfo,
188
188
  );
189
189
  const { categoryId = '', keyWord = '' } = getInfo;
190
190
  const url = `${this.getPcSearchUrl({ categoryId, keyWord })}`;
191
191
  this.jdJumpToWeb(url, getInfo);
192
192
  }
193
193
 
194
194
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
195
195
  console.log('web.base.ts - jdJumpToTabAllProduct');
196
196
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
197
197
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
198
198
  const url = `${this.jumpWebUrl.pages}/index-${shopId}.html`;
199
199
  this.jdJumpToWeb(url, logEventInfo);
200
200
  }
201
201
 
202
202
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
203
203
  const url = `${this.jumpWebUrl.couponSearch}?couponbatch=${couponId}&sceneval=2`;
204
204
  this.jdJumpToWeb(url, logEventInfo);
205
205
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.20-shop.229",
3
+ "version": "0.8.20-shop.230",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"
@@ -132,7 +132,7 @@
132
132
  "mini-css-extract-plugin": "^2.6.1",
133
133
  "minimatch": "3.1.2",
134
134
  "prettier": "^3.3.3",
135
- "sass": "^1.53.0",
135
+ "sass": "1.53.0",
136
136
  "shelljs": "^0.8.5",
137
137
  "stylelint": "^14.4.0",
138
138
  "terser-webpack-plugin": "^5.3.6",
@@ -146,6 +146,8 @@
146
146
  "@tarojs/service": "3.5.4",
147
147
  "@tarojs/shared": "3.5.4",
148
148
  "minimatch": "3.1.2",
149
- "less": "3.13.1"
149
+ "less": "3.13.1",
150
+ "node-releases": "2.0.19",
151
+ "sass": "1.53.0"
150
152
  }
151
153
  }