@conecli/cone-render 0.8.28 → 0.8.30

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.
Files changed (48) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/token/index.h5.ts +1 -1
  5. package/dist/common/token/token.ts +1 -1
  6. package/dist/components/base/CommonFloorHead/index.module.scss +1 -1
  7. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  8. package/dist/components/base/CustomVideo/index.module.scss +3 -2
  9. package/dist/components/base/CustomVideo/index.tsx +1 -1
  10. package/dist/components/base/Dialog/index.module.scss +6 -2
  11. package/dist/components/base/Dialog/index.tsx +1 -1
  12. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  13. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  14. package/dist/components/base/Price/{const.ts → Base/const.ts} +0 -0
  15. package/dist/components/base/Price/Base/index.module.scss +136 -0
  16. package/dist/components/base/Price/Base/index.tsx +1 -0
  17. package/dist/components/base/Price/Double/index.module.scss +158 -0
  18. package/dist/components/base/Price/Double/index.tsx +1 -0
  19. package/dist/components/base/Price/index.tsx +1 -1
  20. package/dist/components/floorItem.weapp.tsx +1 -1
  21. package/dist/interface/component.ts +1 -1
  22. package/dist/interface/jumpEventReport.ts +1 -1
  23. package/dist/interface/service.ts +1 -1
  24. package/dist/jumpEventReport/base.ts +1 -1
  25. package/dist/jumpEventReport/const.ts +1 -1
  26. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  27. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  28. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  29. package/dist/jumpEventReport/web/report.ts +1 -1
  30. package/dist/jumpEventReport/web.base.ts +1 -1
  31. package/dist/open/api/shopMember.ts +1 -1
  32. package/dist/service/bMallConst.ts +1 -1
  33. package/dist/service/bMallConst.wxapp.ts +1 -0
  34. package/dist/service/http/colorSign.ts +1 -1
  35. package/dist/service/http/colorSign.wxapp.ts +1 -0
  36. package/dist/service/http/const.ts +1 -1
  37. package/dist/service/requestServer.ts +1 -1
  38. package/dist/utils/connectNativeJsBridge.ts +1 -1
  39. package/dist/utils/h5Utils.ts +1 -1
  40. package/dist/utils/index.h5.ts +1 -1
  41. package/dist/utils/index.ts +1 -1
  42. package/dist/utils/index.weapp.ts +1 -1
  43. package/dist/utils/jm-common.js +1 -1
  44. package/dist/utils/memberFormatUtils.js +1 -0
  45. package/dist/utils/priceUtils.js +1 -0
  46. package/dist/utils/utils.ts +1 -1
  47. package/package.json +3 -3
  48. package/dist/components/base/Price/index.module.scss +0 -136
@@ -1 +1 @@
1
- import { ServiceInterFace } from '../../interface'
2
1
  AppVerifyColorList,
3
2
  SHOP_VERIFY_CODE,
4
3
  PAGES_VERIFY_CODE,
5
4
  B2B_VERITY_CODE,
6
5
  PAGES_DOMAIN,
7
6
  B2BColorFunctionIdList,
8
7
  public fmInfo: {
9
8
  eid?: string
10
9
  fp?: string
11
10
  jsToken?: string
12
11
  sdkToken?: string
13
12
  }
14
13
  public api: ServiceInterFace.HttpApi
15
14
  public paramsSignInstance: any
16
15
  public paramsSignPagesInstance: any
17
16
  public paramsSignBmallInstance: any
18
17
  public isPageDomain: boolean
19
18
  constructor() {
20
19
  this.api = api
21
20
  this.isPageDomain = window.location.hostname === PAGES_DOMAIN
22
21
  this.paramsSignInstance = undefined
23
22
  this.paramsSignPagesInstance = undefined
24
23
  this.paramsSignBmallInstance = undefined
25
24
  this.fmInfo = {}
26
25
  this._initSign()
27
26
  }
28
27
 
29
28
  _getMobileJsToken(): Promise<{
30
29
  ok: boolean
31
30
  data?: any
32
31
  error?: any
33
32
  }> {
34
33
  return new Promise((resolve, reject) => {
35
34
  try {
36
35
  if (window?.getJsToken) {
37
36
  window.getJsToken(function (res) {
38
37
  console.log('JS token 获取结果:', res)
39
38
  resolve({
40
39
  ok: true,
41
40
  data: res,
42
41
  })
43
42
  }, 600)
44
43
  } else {
45
44
  reject({
46
45
  ok: false,
47
46
  error: '没有识别到getJsToken全局方法',
48
47
  })
49
48
  }
50
49
  } catch (e) {
51
50
  console.log('获取指纹JS token 异常', e)
52
51
  reject({
53
52
  ok: false,
54
53
  error: e,
55
54
  })
56
55
  }
57
56
  })
58
57
  }
59
58
 
60
59
  async getFmInfo() {
61
60
  try {
62
61
  const { ok, data } = await this._getMobileJsToken()
63
62
  this.fmInfo = ok && data ? data : this.fmInfo
64
63
  return this.fmInfo
65
64
  } catch (e) {
66
65
  console.log('获取指纹信息异常', e)
67
66
  return this.fmInfo
68
67
  }
69
68
  }
70
69
 
71
70
  _initSign() {
72
71
  this.paramsSignInstance = window.PSign
73
72
  ? window.PSign
74
73
  : window.ParamsSign
75
74
  ? this._initParamsSignInstance(SHOP_VERIFY_CODE)
76
75
  : null
77
76
  this.paramsSignPagesInstance = window.ParamsSign
78
77
  ? this._initParamsSignInstance(PAGES_VERIFY_CODE)
79
78
  : null
80
79
  this.paramsSignBmallInstance = window.ParamsSign
81
80
  ? this._initParamsSignInstance(B2B_VERITY_CODE)
82
81
  : null
83
82
  }
84
83
 
85
84
  _initParamsSignInstance(appId) {
86
85
  return new window.ParamsSign({
87
86
  appId: appId,
88
87
  debug: false,
89
88
  preRequest: false,
90
89
  onSign: ({ code }) => {
91
90
  console.log('签名可用率监控', code)
92
91
  },
93
92
  onRequestTokenRemotely: ({ code, message }) => {
94
93
  console.log('算法接口可用率监控', code, message)
95
94
  },
96
95
  onRequestToken: ({ code, message }) => {
97
96
  console.log('token的可用率监控', code, message)
98
97
  },
99
98
  })
100
99
  }
101
100
 
102
101
  paramsSign(data) {
103
102
  try {
104
103
  console.log('获取加签参数', data, this.paramsSignInstance)
105
104
  if (!data || typeof data !== 'object' || !this.paramsSignInstance) {
106
105
  return Promise.resolve(data)
107
106
  } else {
108
107
  const param: any = {
109
108
  appid: data.appid,
110
109
  client: data.client,
111
110
  clientVersion: data.clientVersion,
112
111
  functionId: data.functionId,
113
112
  t: data.t,
114
113
  sign: data?.sign,
115
114
  jsonp: data?.jsonp,
116
115
  }
117
116
  data && data.body && (param.body = sha256(data.body).toString())
118
117
  console.log(
119
118
  '获取加签前的参数处理',
120
119
  param,
121
120
  '获取下发data',
122
121
  data,
123
122
  '获取加签实例',
124
123
  this.paramsSignInstance,
125
124
  this.paramsSignPagesInstance,
126
125
  )
127
126
  return this.isPageDomain &&
128
127
  this.paramsSignPagesInstance &&
129
128
  AppVerifyColorList.includes(param.functionId)
130
129
  ? this.paramsSignPagesInstance.sign(param)
131
130
  : this.paramsSignBmallInstance &&
132
131
  B2BColorFunctionIdList.includes(param.functionId)
133
132
  ? this.paramsSignBmallInstance.sign(param)
134
133
  : this.paramsSignInstance.sign(param)
135
134
  }
136
135
  } catch (e) {
137
136
  console.log('获取加签参数结果异常', e)
138
137
  return Promise.resolve(data)
139
138
  }
140
139
  }
140
+ import { ServiceInterFace } from '../../interface'
141
141
  AppVerifyColorList,
142
142
  SHOP_VERIFY_CODE,
143
143
  PAGES_VERIFY_CODE,
144
144
  B2B_VERITY_CODE,
145
145
  PAGES_DOMAIN,
146
146
  B2BColorFunctionIdList,
147
147
  public fmInfo: {
148
148
  eid?: string
149
149
  fp?: string
150
150
  jsToken?: string
151
151
  sdkToken?: string
152
152
  }
153
153
  public api: ServiceInterFace.HttpApi
154
154
  public paramsSignInstance: any
155
155
  public paramsSignPagesInstance: any
156
156
  public paramsSignBmallInstance: any
157
157
  public isPageDomain: boolean
158
158
  constructor() {
159
159
  this.api = api
160
160
  this.isPageDomain = location?.hostname === PAGES_DOMAIN
161
161
  this.paramsSignInstance = undefined
162
162
  this.paramsSignPagesInstance = undefined
163
163
  this.paramsSignBmallInstance = undefined
164
164
  this.fmInfo = {}
165
165
  this._initSign()
166
166
  }
167
167
 
168
168
  _getMobileJsToken(): Promise<{
169
169
  ok: boolean
170
170
  data?: any
171
171
  error?: any
172
172
  }> {
173
173
  return new Promise((resolve, reject) => {
174
174
  try {
175
175
  if (window?.getJsToken) {
176
176
  window.getJsToken(function (res) {
177
177
  console.log('JS token 获取结果:', res)
178
178
  resolve({
179
179
  ok: true,
180
180
  data: res,
181
181
  })
182
182
  }, 600)
183
183
  } else {
184
184
  reject({
185
185
  ok: false,
186
186
  error: '没有识别到getJsToken全局方法',
187
187
  })
188
188
  }
189
189
  } catch (e) {
190
190
  console.log('获取指纹JS token 异常', e)
191
191
  reject({
192
192
  ok: false,
193
193
  error: e,
194
194
  })
195
195
  }
196
196
  })
197
197
  }
198
198
 
199
199
  async getFmInfo() {
200
200
  try {
201
201
  const { ok, data } = await this._getMobileJsToken()
202
202
  this.fmInfo = ok && data ? data : this.fmInfo
203
203
  return this.fmInfo
204
204
  } catch (e) {
205
205
  console.log('获取指纹信息异常', e)
206
206
  return this.fmInfo
207
207
  }
208
208
  }
209
209
 
210
210
  _initSign() {
211
211
  this.paramsSignInstance = window.PSign
212
212
  ? window.PSign
213
213
  : window.ParamsSign
214
214
  ? this._initParamsSignInstance(SHOP_VERIFY_CODE)
215
215
  : null
216
216
  this.paramsSignPagesInstance = window.ParamsSign
217
217
  ? this._initParamsSignInstance(PAGES_VERIFY_CODE)
218
218
  : null
219
219
  this.paramsSignBmallInstance = window.ParamsSign
220
220
  ? this._initParamsSignInstance(B2B_VERITY_CODE)
221
221
  : null
222
222
  }
223
223
 
224
224
  _initParamsSignInstance(appId) {
225
225
  return new window.ParamsSign({
226
226
  appId: appId,
227
227
  debug: false,
228
228
  preRequest: false,
229
229
  onSign: ({ code }) => {
230
230
  console.log('签名可用率监控', code)
231
231
  },
232
232
  onRequestTokenRemotely: ({ code, message }) => {
233
233
  console.log('算法接口可用率监控', code, message)
234
234
  },
235
235
  onRequestToken: ({ code, message }) => {
236
236
  console.log('token的可用率监控', code, message)
237
237
  },
238
238
  })
239
239
  }
240
240
 
241
241
  paramsSign(data) {
242
242
  try {
243
243
  console.log('获取加签参数', data, this.paramsSignInstance)
244
244
  if (!data || typeof data !== 'object' || !this.paramsSignInstance) {
245
245
  return Promise.resolve(data)
246
246
  } else {
247
247
  const param: any = {
248
248
  appid: data.appid,
249
249
  client: data.client,
250
250
  clientVersion: data.clientVersion,
251
251
  functionId: data.functionId,
252
252
  t: data.t,
253
253
  sign: data?.sign,
254
254
  jsonp: data?.jsonp,
255
255
  }
256
256
  data && data.body && (param.body = sha256(data.body).toString())
257
257
  console.log(
258
258
  '获取加签前的参数处理',
259
259
  param,
260
260
  '获取下发data',
261
261
  data,
262
262
  '获取加签实例',
263
263
  this.paramsSignInstance,
264
264
  this.paramsSignPagesInstance,
265
265
  )
266
266
  return this.isPageDomain &&
267
267
  this.paramsSignPagesInstance &&
268
268
  AppVerifyColorList.includes(param.functionId)
269
269
  ? this.paramsSignPagesInstance.sign(param)
270
270
  : this.paramsSignBmallInstance &&
271
271
  B2BColorFunctionIdList.includes(param.functionId)
272
272
  ? this.paramsSignBmallInstance.sign(param)
273
273
  : this.paramsSignInstance.sign(param)
274
274
  }
275
275
  } catch (e) {
276
276
  console.log('获取加签参数结果异常', e)
277
277
  return Promise.resolve(data)
278
278
  }
279
279
  }
@@ -0,0 +1 @@
1
+ import global from '../../common'
2
  WXAPP_VERIFY_CODE,
1
3
  WxappVerifyColorList
2
4
  public fmInfo: {
3
5
  eid?: string
4
6
  fp?: string
5
7
  jsToken?: string
6
8
  sdkToken?: string
7
9
  }
8
10
  constructor() {
9
11
  this.fmInfo = {}
10
12
  }
11
13
 
12
14
  async getFmInfo() {
13
15
  if (!this.fmInfo["eid"]) {
14
16
  try {
15
17
  const getFmRes = await global.wxAppFingerReportInstance.getFm();
16
18
  console.log("获取指纹信息", getFmRes);
17
19
  this.fmInfo = getFmRes;
18
20
  return this.fmInfo;
19
21
  } catch (e) {
20
22
  console.log("获取指纹信息异常", e);
21
23
  return this.fmInfo;
22
24
  }
23
25
  } else {
24
26
  return this.fmInfo;
25
27
  }
26
28
  }
27
29
 
28
30
  paramsSign(data) {
29
31
  return global?.wxAppParamsSignInstance
30
32
  ? global.wxAppParamsSignInstance?.paramsSign({
31
33
  color: WxappVerifyColorList.includes(data?.functionId),
32
34
  verifyCode: WXAPP_VERIFY_CODE,
33
35
  data,
34
36
  })
35
37
  : Promise.resolve(data)
36
38
  }
@@ -1 +1 @@
1
- export const HttpStatus = {
2
1
  SUCCESS: 200,
3
2
  CREATED: 201,
4
3
  ACCEPTED: 202,
5
4
  CLIENT_ERROR: 400,
6
5
  AUTHENTICATE: 401,
7
6
  FORBIDDEN: 403,
8
7
  NOT_FOUND: 404,
9
8
  SERVER_ERROR: 500,
10
9
  BAD_GATEWAY: 502,
11
10
  SERVICE_UNAVAILABLE: 503,
12
11
  GATEWAY_TIMEOUT: 504,
13
12
  [HttpStatus.NOT_FOUND]: '请求资源不存在',
14
13
  [HttpStatus.BAD_GATEWAY]: '服务端异常,请稍后重试',
15
14
  [HttpStatus.FORBIDDEN]: '没有权限访问',
16
15
  [HttpStatus.AUTHENTICATE]: '需要鉴权',
17
16
  [HttpStatus.SUCCESS]: '成功',
18
17
  'whx_getShopHomeFloorInfo',
19
18
  'whx_searchWare',
20
19
  'shopGuessYouLike',
21
20
  'whx_getMShopCategory',
22
21
  'whx_newWareList',
23
22
  'getShopHomePromotionWebPage',
24
23
  'whx_getShopCampaignPage',
25
24
  'whx_getPromotionWares',
26
25
  'whx_buyerShowPage',
27
26
  'whx_getShopGwredPage',
28
27
  'whx_getShopSpeciSecKillPage',
29
28
  'whx_getSignInfo',
30
29
  'whx_getSignPrize',
31
30
  'getShopHomeFloorInfo',
32
31
  'shopGuessYouLike',
33
32
  'getShopHomePromotionWebPage',
34
33
  'getVipDetail',
35
34
  'getShopCategory',
36
35
  'getShopNavigationCategory',
37
36
  'getPagePreview',
38
37
  'bmall_cart',
39
38
  'bmall_getOmittedProduct',
40
39
  'bmall_cartAdd',
41
40
  'bmall_cartChange',
42
41
  'bmall_cartRemove',
43
42
  'getShopHomeFloorInfo',
44
43
  'getShopCategory',
45
44
  'getShopNavigationCategory',
46
45
  'receiveShopCoupon',
47
46
  'getShopHomePromotionWebPage',
48
47
  'shopGuessYouLike',
49
48
  'addRemind',
50
49
  'cancelRemind',
51
50
  'getVipDetail',
52
51
  'shopDetail',
53
52
  'address_queryAddress',
54
53
  'shopMemberSprintJoinActivity',
55
54
  'shopMemberSprintReceivePrize',
56
55
  'customerCenterDispatch'
57
56
  'bmall_cart',
58
57
  'bmall_getOmittedProduct',
59
58
  'bmall_cartAdd',
60
59
  'bmall_cartChange',
61
60
  'bmall_cartRemove',
62
61
  SHOP_COLOR_APPID: 'shop_m_jd_com',
63
62
  JSHOPX_COLOR_APPID: 'jshopx_jd_com',
64
63
  PAGES_COLOR_APPID: 'pages_jd_com',
65
64
  B2B_COLOR_APPID: 'b2b',
66
65
  SHOP_MEMBER_COLOR_APPID: 'shopmember_m_jd_com'
66
+ export const HttpStatus = {
67
67
  SUCCESS: 200,
68
68
  CREATED: 201,
69
69
  ACCEPTED: 202,
70
70
  CLIENT_ERROR: 400,
71
71
  AUTHENTICATE: 401,
72
72
  FORBIDDEN: 403,
73
73
  NOT_FOUND: 404,
74
74
  SERVER_ERROR: 500,
75
75
  BAD_GATEWAY: 502,
76
76
  SERVICE_UNAVAILABLE: 503,
77
77
  GATEWAY_TIMEOUT: 504,
78
78
  [HttpStatus.NOT_FOUND]: '请求资源不存在',
79
79
  [HttpStatus.BAD_GATEWAY]: '服务端异常,请稍后重试',
80
80
  [HttpStatus.FORBIDDEN]: '没有权限访问',
81
81
  [HttpStatus.AUTHENTICATE]: '需要鉴权',
82
82
  [HttpStatus.SUCCESS]: '成功',
83
83
  'whx_getShopHomeFloorInfo',
84
84
  'whx_searchWare',
85
85
  'shopGuessYouLike',
86
86
  'whx_getMShopCategory',
87
87
  'whx_newWareList',
88
88
  'getShopHomePromotionWebPage',
89
89
  'whx_getShopCampaignPage',
90
90
  'whx_getPromotionWares',
91
91
  'whx_buyerShowPage',
92
92
  'whx_getShopGwredPage',
93
93
  'whx_getShopSpeciSecKillPage',
94
94
  'whx_getSignInfo',
95
95
  'whx_getSignPrize',
96
96
  'getShopHomeFloorInfo',
97
97
  'shopGuessYouLike',
98
98
  'getShopHomePromotionWebPage',
99
99
  'getVipDetail',
100
100
  'getShopCategory',
101
101
  'getShopNavigationCategory',
102
102
  'getPagePreview',
103
103
  'bmall_cart',
104
104
  'bmall_getOmittedProduct',
105
105
  'bmall_cartAdd',
106
106
  'bmall_cartChange',
107
107
  'bmall_cartRemove',
108
108
  "whx_getShopHomeFloorInfo",
109
109
  "whx_searchWare",
110
110
  "shopGuessYouLike",
111
111
  "whx_getMShopCategory",
112
112
  "whx_newWareList",
113
113
  "getShopHomePromotionWebPage",
114
114
  "whx_getShopCampaignPage",
115
115
  "whx_getPromotionWares",
116
116
  "whx_buyerShowPage"
117
117
  'getShopHomeFloorInfo',
118
118
  'getShopCategory',
119
119
  'getShopNavigationCategory',
120
120
  'receiveShopCoupon',
121
121
  'getShopHomePromotionWebPage',
122
122
  'shopGuessYouLike',
123
123
  'addRemind',
124
124
  'cancelRemind',
125
125
  'getVipDetail',
126
126
  'shopDetail',
127
127
  'address_queryAddress',
128
128
  'shopMemberSprintJoinActivity',
129
129
  'shopMemberSprintReceivePrize',
130
130
  'customerCenterDispatch'
131
131
  'bmall_cart',
132
132
  'bmall_getOmittedProduct',
133
133
  'bmall_cartAdd',
134
134
  'bmall_cartChange',
135
135
  'bmall_cartRemove',
136
136
  SHOP_COLOR_APPID: 'shop_m_jd_com',
137
137
  JSHOPX_COLOR_APPID: 'jshopx_jd_com',
138
138
  PAGES_COLOR_APPID: 'pages_jd_com',
139
139
  B2B_COLOR_APPID: 'b2b',
140
140
  SHOP_MEMBER_COLOR_APPID: 'shopmember_m_jd_com'