@conecli/cone-render 0.10.1-beta.6 → 0.10.1-beta.8

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 (65) 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/index.jd.ts +1 -1
  5. package/dist/common/index.ts +1 -1
  6. package/dist/common/index.weapp.ts +1 -1
  7. package/dist/common/jssdk.ts +1 -1
  8. package/dist/common/token/index.h5.ts +1 -1
  9. package/dist/common/token/token.jd.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  12. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  14. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  15. package/dist/components/base/Dialog/index.module.scss +11 -0
  16. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  19. package/dist/components/base/InViewRender/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  23. package/dist/components/floorItem.weapp.tsx +1 -1
  24. package/dist/interface/common.ts +1 -1
  25. package/dist/interface/jumpEventReport.ts +1 -1
  26. package/dist/interface/service.ts +1 -1
  27. package/dist/jumpEventReport/base.ts +1 -1
  28. package/dist/jumpEventReport/const.ts +1 -1
  29. package/dist/jumpEventReport/index.weapp.ts +1 -1
  30. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  31. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  32. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  33. package/dist/jumpEventReport/web/report.ts +1 -1
  34. package/dist/jumpEventReport/web.base.ts +1 -1
  35. package/dist/jumpEventReport/web.jd.ts +1 -1
  36. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  37. package/dist/libs/taroAppReport.js +2 -2
  38. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -53
  39. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  40. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  41. package/dist/open/api/environment.ts +1 -1
  42. package/dist/open/api/shopMember.ts +1 -1
  43. package/dist/open/api/util.ts +1 -1
  44. package/dist/sass/app.h5.scss +273 -224
  45. package/dist/service/fetchGateway.ts +1 -1
  46. package/dist/service/fetchGateway.weapp.ts +1 -0
  47. package/dist/service/http/colorSign.ts +1 -1
  48. package/dist/service/http/const.ts +1 -1
  49. package/dist/service/http/h5Http.ts +1 -1
  50. package/dist/service/requestServer.h5.ts +1 -1
  51. package/dist/service/requestServer.ts +1 -1
  52. package/dist/service/requestServer.weapp.ts +1 -0
  53. package/dist/utils/connectNativeJsBridge.ts +1 -1
  54. package/dist/utils/h5Utils.ts +1 -1
  55. package/dist/utils/index.h5.ts +1 -1
  56. package/dist/utils/index.ts +1 -1
  57. package/dist/utils/index.weapp.ts +1 -1
  58. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  59. package/dist/utils/jumpExtMapUtil.ts +1 -0
  60. package/dist/utils/log.ts +1 -0
  61. package/dist/utils/sColor.js +1 -0
  62. package/dist/utils/utils.ts +1 -1
  63. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  64. package/dist/wxapp/common/user_info.js +1 -1
  65. package/package.json +158 -141
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  floorVideInfo: {},
3
2
  productVideInfo: {},
4
3
  isVipShop: false,
5
4
  isJdShowNativeImmersivePlayer: false,
6
5
  pageIdxHeightInfo: {
7
6
  list: []
8
7
  },
9
8
  jdBottomBarHeight: 0,
10
9
  jdNativeHeaderHeight: 0,
11
10
  openAppData: {}
12
11
  public config: {
13
12
  [key: string]: any
14
13
  }
15
14
  public lazyContainer: CommonInterFace.lazyContainer
16
15
  public renderedIsvComponents: CommonInterFace.renderedIsvComponents
17
16
  public loadJsSdkList: Array<any>
18
17
  public loadJsSdkListCachePromise: any
19
18
  this.config = {}
20
19
  this.loadJsSdkList = []
21
20
  this.loadJsSdkListCachePromise = {}
22
21
  this.renderedIsvComponents = {}
23
22
 
24
23
  taskTimeoutPromise(callBack, timeout = 2000){
25
24
  return new Promise((resolve) => {
26
25
  setTimeout(() => {
27
26
  const getCallBackRes = typeof callBack === 'function' && callBack()
28
27
  return resolve(getCallBackRes || false)
29
28
  }, timeout)
30
29
  })
31
30
  }
32
31
  removeJdAndroidRquestEventForTouchStart(){}
33
32
  this.info.sysInfo['wifiVideoAutoPlay'] = false
34
33
  getAPPUseStraightCorner () {
35
34
  return Promise.resolve(false)
36
35
  }
37
36
  checkStatusAndLogin(options = {}) {
38
37
 
39
38
  checkJdStatusAndLogin(options){
40
39
  return this.checkStatusAndLogin(options)
41
40
  }
42
41
 
43
42
  doLoginForJdPin(options = {}) {
44
43
  return this.doLogin(options)
45
44
  }
46
45
 
47
46
  getLoginCookie(updateKey = 'wxapp') {
48
47
  return new Promise((resolve) => {
49
48
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
50
49
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
51
50
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
52
51
  resolve({
53
52
  wqCookie: this.config.wqCookie,
54
53
  wqCookieStr: this.config.wqCookieStr,
55
54
  })
56
55
  }else {
57
56
  if (isPublishToWxapp) {
58
57
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
59
58
  if (getWxappCookieObj) {
60
59
  const getCookieObj = getWxappCookieObj['_data']
61
60
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
62
61
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
63
62
  this.info.loginState = true
64
63
  this.info.userInfo.wqCookie = wqCookieStr
65
64
  this.info.userInfo.wqVisitkey = visitkey
66
65
  console.log('获取用户完整cookie信息', getCookieObj)
67
66
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
68
67
  console.log('获取微信用户地址信息', getUserAddress)
69
68
  if (getUserAddress) {
70
69
  this.info.pageInfo.address = getUserAddress?.areaId
71
70
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
72
71
  .address
73
72
  ? this.info.pageInfo.address.replace(/_/g, ',')
74
73
  : ''
75
74
  this.info.pageInfo.un_area = this.info.pageInfo.address
76
75
  Taro.eventCenter.trigger(
77
76
  TaroEventType.USER_AREA_UPDATE,
78
77
  this.info.pageInfo.address,
79
78
  )
80
79
  }
81
80
  if(this.miniAppLogInstance){
82
81
  this.miniAppLogInstance.set({
83
82
  account: pin,
84
83
  unionid: wq_unionid,
85
84
  openid: wxapp_openid,
86
85
  })
87
86
  }
88
87
  this.config.wqCookie = wqCookie
89
88
  this.config.wqCookieStr = wqCookieStr
90
89
  this.config.getWqCookieKey = updateKey
91
90
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
92
91
  resolve({
93
92
  wqCookie,
94
93
  wqCookieStr,
95
94
  })
96
95
  }else {
97
96
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
98
97
  resolve({
99
98
  wqCookie: false,
100
99
  wqCookieStr: false,
101
100
  })
102
101
  }
103
102
  }else {
104
103
  resolve({
105
104
  wqCookie: false,
106
105
  wqCookieStr: false,
107
106
  })
108
107
  }
109
108
  }
110
109
  })
111
110
  }
112
111
  return this.getLoginCookie()
113
112
 
114
113
  getAddressCachePromise = () => {
115
114
  return Promise.reject("该方法只在APP内适用")
116
115
  }
117
116
 
118
117
  getDynamicConfig(key: string){
119
118
  console.warn('调用默认的 getDynamicConfig(),注意,此方法还未实现!')
120
119
  return null
121
120
  }
122
121
  renderNextTickLoadSdk(){
123
122
  console.warn("暂未实现 index.ts")
124
123
  }
125
124
  loadOtherSdk(){
126
125
  console.warn("暂未实现 index.ts")
127
126
  }
128
127
  loadItemSdkPromise(jsInfo = {}) {
129
128
  console.warn('暂未实现 index.ts')
130
129
  }
130
+ import Taro from '@tarojs/taro';
131
131
  WXAPP_LOGIN,
132
132
  WXAPP_BIZ,
133
133
  WXAPP_USER_INFO,
134
134
  WXAPP_NAVIGATOR,
135
135
  WXAPP_REPORT_GDT,
136
136
  WXAPP_PARAMS_SIGN,
137
137
  BUSINESS_TYPE,
138
138
  SHOP_MENU_ID_TYPE,
139
139
  SHOP_MENU_ID_NAME,
140
140
  SECTION_HOME_TAB_NAME_TYPE,
141
141
  SECTION_HOME_TAB_TYPE,
142
142
  WXAPP_BIZ_KEY,
143
143
  WX_BUSINESS_TYPE,
144
144
  TaroEventType,
145
145
  abTestLabels: {},
146
146
  nonSellableSkuids: {},
147
147
  loginState: jdUserLoginState,
148
148
  cookiesStr: '',
149
149
  userInfo: userPinKey,
150
150
  isImmersive: false,
151
151
  pageInfo: {
152
152
  wxBusinessType: WX_BUSINESS_TYPE.SHOP,
153
153
  address: '',
154
154
  addressCommaStr: '',
155
155
  un_area: '',
156
156
  userLbsAddress: '',
157
157
  vapptype: '1',
158
158
  pageType: 'home',
159
159
  dataType: BUSINESS_TYPE.ONLINE,
160
160
  floorExposureInfo: {},
161
161
  floorVideInfo: {},
162
162
  productVideInfo: {},
163
163
  tabsLoadAllDataInfo: {
164
164
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: false,
165
165
  [SHOP_MENU_ID_NAME[SHOP_MENU_ID_TYPE.CLASSIFY]]: true,
166
166
  },
167
167
  updateShopInfosAllState: false,
168
168
  isVipShop: false,
169
169
  isJdShowNativeImmersivePlayer: false,
170
170
  ...shopConfig,
171
171
  pageScrollTop: 0,
172
172
  pageIdxHeightInfo: {
173
173
  list: [],
174
174
  },
175
175
  shopNavBarHeight: 0,
176
176
  },
177
177
  defaultQueryLogInfo: {
178
178
  sourceType: 'JDshop',
179
179
  sourceValue: '',
180
180
  moduleId: 'none',
181
181
  entrance: 'none',
182
182
  },
183
183
  sysInfo: {
184
184
  windowWidth: 0,
185
185
  windowHeight: 0,
186
186
  netWorkType: '4g',
187
187
  jdBottomBarHeight: 0,
188
188
  jdNativeHeaderHeight: 0,
189
189
  },
190
190
  queryInfo: {},
191
191
  shopInfo: {},
192
192
  openAppData: {},
193
193
  public info: CommonInterFace.BaseConfigInfo;
194
194
  public config: {
195
195
  [key: string]: any;
196
196
  };
197
197
  public lazyContainer: CommonInterFace.lazyContainer;
198
198
  public renderedIsvComponents: CommonInterFace.renderedIsvComponents;
199
199
  public rootEleNode: HTMLElement | null;
200
200
  public miniApplogUtil: CommonInterFace.MiniApplogUtil;
201
201
  public miniAppLogInstance: CommonInterFace.MiniAppLog | null;
202
202
  public checkStatusAndLoginPromise: object | null;
203
203
  public wxAppLoginInstance: CommonInterFace.WxAppLogin;
204
204
  public wxAppBizInstance: CommonInterFace.WxAppUserInfo;
205
205
  public wxAppUserInfoInstance: CommonInterFace.WxAppUserInfo;
206
206
  public wxAppReportGDTInstance: CommonInterFace.WxAppReportGDT;
207
207
  public wxAppNavigatorInstance: CommonInterFace.WxAppNavigator;
208
208
  public wxAppParamsSignInstance: CommonInterFace.wxAppParamsSign;
209
209
  public loadJsSdkList: Array<any>;
210
210
  public loadJsSdkListCachePromise: any;
211
211
  constructor(opt) {
212
212
  this.info = this._getConfig(opt);
213
213
  this.config = {};
214
214
  this.lazyContainer = {
215
215
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: {
216
216
  appLazyContainerList: [],
217
217
  appLazyFinishContainerList: [],
218
218
  },
219
219
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PROMOTION]]: {
220
220
  appLazyContainerList: [],
221
221
  appLazyFinishContainerList: [],
222
222
  },
223
223
  };
224
224
  this.loadJsSdkList = [];
225
225
  this.loadJsSdkListCachePromise = {};
226
226
  this.renderedIsvComponents = {};
227
227
  this.rootEleNode = null;
228
228
  this.miniApplogUtil = MiniAppLogUtil;
229
229
  this.miniAppLogInstance = null;
230
230
  this.checkStatusAndLoginPromise = null;
231
231
  this.wxAppLoginInstance = WXAPP_LOGIN;
232
232
  this.wxAppBizInstance = WXAPP_BIZ;
233
233
  this.wxAppUserInfoInstance = WXAPP_USER_INFO;
234
234
  this.wxAppReportGDTInstance = WXAPP_REPORT_GDT;
235
235
  this.wxAppNavigatorInstance = WXAPP_NAVIGATOR;
236
236
  this.wxAppParamsSignInstance = WXAPP_PARAMS_SIGN;
237
237
  }
238
238
  _getConfig(opt) {
239
239
  return Object.assign({}, DefaultConfig, opt);
240
240
  }
241
241
 
242
242
  taskTimeoutPromise(callBack, timeout = 2000) {
243
243
  return new Promise((resolve) => {
244
244
  setTimeout(() => {
245
245
  const getCallBackRes = typeof callBack === 'function' && callBack();
246
246
  return resolve(getCallBackRes || false);
247
247
  }, timeout);
248
248
  });
249
249
  }
250
250
  removeJdAndroidRquestEventForTouchStart() {}
251
251
 
252
252
  updateBusinessDomainAndApi(domain, api) {
253
253
  }
254
254
 
255
255
  getFullScreenHeight(systemInfo) {
256
256
  const { screenHeight, statusBarHeight, isAndroid } = systemInfo;
257
257
  let result = screenHeight;
258
258
  if (statusBarHeight > 20 && isAndroid) {
259
259
  result = screenHeight + statusBarHeight;
260
260
  }
261
261
  return result;
262
262
  }
263
263
 
264
264
  getTabBarHeight(systemInfo) {
265
265
  const { statusBarHeight, isAndroid, isIOS } = systemInfo;
266
266
  let result = 50;
267
267
  if (statusBarHeight > 20) {
268
268
  if (isIOS) {
269
269
  result = 84;
270
270
  } else if (isAndroid) {
271
271
  result = 53;
272
272
  }
273
273
  }
274
274
  return result;
275
275
  }
276
276
 
277
277
  getSystemInfo() {
278
278
  const info: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfos() || {};
279
279
  const actualNavBarHeight = (info?.navBarHeight || 0) + (info?.navBarExtendHeight || 0);
280
280
  const headerHeight = actualNavBarHeight + (info?.statusBarHeight || 0);
281
281
  const fullScreenHeight = this.getFullScreenHeight(info);
282
282
  const tabBarHeight = this.getTabBarHeight(info);
283
283
  const safeContentHeight = fullScreenHeight - headerHeight;
284
284
  this.info.sysInfo = {
285
285
  ...this.info.sysInfo,
286
286
  ...info,
287
287
  actualNavBarHeight,
288
288
  headerHeight,
289
289
  fullScreenHeight,
290
290
  tabBarHeight,
291
291
  safeContentHeight,
292
292
  };
293
293
  if (this.info.sysInfo['hostVersionName']) {
294
294
  this.info.sysInfo['hostAppVersion'] = Number(
295
295
  this.info.sysInfo['hostVersionName'].replace(/\./g, ''),
296
296
  );
297
297
  }
298
298
  this.info.sysInfo['wifiVideoAutoPlay'] = false;
299
299
  this.getNetWorkType();
300
300
  }
301
301
  async updateMPaasConfig() {}
302
302
 
303
303
  getNetWorkType() {
304
304
  Taro.getNetworkType().then((getRes) => {
305
305
  getRes && getRes.networkType && (this.info.sysInfo['netWorkType'] = getRes.networkType);
306
306
  });
307
307
  }
308
308
  getAPPUseStraightCorner() {
309
309
  return Promise.resolve(false);
310
310
  }
311
311
  checkStatusAndLogin(options = {}) {
312
312
  this.checkStatusAndLoginPromise = new Promise((resolve, reject) => {
313
313
  console.log('微信小程序登录状态及获取cookie状态的promise,之前登录状态', this.info.loginState);
314
314
  this.toLogin(options)
315
315
  .then((res) => {
316
316
  console.log('微信小程序登录状态结果,成功', res);
317
317
  this.info.loginState = true;
318
318
  resolve(res);
319
319
  })
320
320
  .catch((err) => {
321
321
  console.log('微信小程序登录异常状态结果', err);
322
322
  this.doLogin(options)
323
323
  .then((res2) => {
324
324
  console.log('微信小程序wxDoLogin强制登陆成功:', res2);
325
325
  this.info.loginState = true;
326
326
  resolve(res2);
327
327
  })
328
328
  .catch((err2) => {
329
329
  console.log('微信小程序wxDoLogin强制登陆失败:', err2);
330
330
  this.checkStatusAndLoginPromise = null;
331
331
  reject(err2);
332
332
  });
333
333
  });
334
334
  });
335
335
  return this.checkStatusAndLoginPromise;
336
336
  }
337
337
 
338
338
  checkJdStatusAndLogin(options) {
339
339
  return this.checkStatusAndLogin(options);
340
340
  }
341
341
 
342
342
  toLogin(options = {}): Promise<any> {
343
343
  return this.wxAppLoginInstance
344
344
  .getLoginPromise({
345
345
  mode: 'silent',
346
346
  loginColor: {
347
347
  biz: WXAPP_BIZ_KEY,
348
348
  dpin: 0,
349
349
  },
350
350
  ...options,
351
351
  })
352
352
  .then((res) => {
353
353
  console.log('微信app登录返回信息,微信侧返回code为0表示成功', res);
354
354
  this.getLoginCookie();
355
355
  })
356
356
  .catch((err) => {
357
357
  console.log('微信app登录异常返回信息', err);
358
358
  });
359
359
  }
360
360
 
361
361
  doLogin(options = {}) {
362
362
  return this.wxAppLoginInstance
363
363
  .doLogin({
364
364
  loginColor: {
365
365
  biz: WXAPP_BIZ_KEY,
366
366
  dpin: 0,
367
367
  },
368
368
  ...options,
369
369
  })
370
370
  .then((res) => {
371
371
  this.getLoginCookie();
372
372
  console.log('微信小程序强制登录返回信息,微信侧返回code为0表示成功', res);
373
373
  return res;
374
374
  });
375
375
  }
376
376
 
377
377
  doLoginForJdPin(options = {}) {
378
378
  return this.doLogin(options);
379
379
  }
380
380
 
381
381
  getLoginCookie(updateKey = 'wxapp') {
382
382
  return new Promise((resolve) => {
383
383
  console.log('开始获取更新wxapp中的cookie信息', updateKey);
384
384
  if (
385
385
  this.config.wqCookie &&
386
386
  this.config.wqCookieStr &&
387
387
  this.config.getWqCookieKey === updateKey
388
388
  ) {
389
389
  console.log('已有存储wxapp中的cookie信息,直接返回', this.config);
390
390
  resolve({
391
391
  wqCookie: this.config.wqCookie,
392
392
  wqCookieStr: this.config.wqCookieStr,
393
393
  });
394
394
  } else {
395
395
  if (isPublishToWxapp) {
396
396
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null;
397
397
  if (getWxappCookieObj) {
398
398
  const getCookieObj = getWxappCookieObj['_data'];
399
399
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj);
400
400
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie;
401
401
  this.info.loginState = true;
402
402
  this.info.userInfo.wqCookie = wqCookieStr;
403
403
  this.info.userInfo.wqVisitkey = visitkey;
404
404
  console.log('获取用户完整cookie信息', getCookieObj);
405
405
  const getUserAddress = this.wxAppUserInfoInstance.getAddress();
406
406
  console.log('获取微信用户地址信息', getUserAddress);
407
407
  if (getUserAddress) {
408
408
  this.info.pageInfo.address = getUserAddress?.areaId;
409
409
  this.info.pageInfo.addressCommaStr = this.info.pageInfo.address
410
410
  ? this.info.pageInfo.address.replace(/_/g, ',')
411
411
  : '';
412
412
  this.info.pageInfo.un_area = this.info.pageInfo.address;
413
413
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
414
414
  area: this.info.pageInfo.address,
415
415
  });
416
416
  }
417
417
  if (this.miniAppLogInstance) {
418
418
  this.miniAppLogInstance.set({
419
419
  account: pin,
420
420
  unionid: wq_unionid,
421
421
  openid: wxapp_openid,
422
422
  });
423
423
  }
424
424
  this.config.wqCookie = wqCookie;
425
425
  this.config.wqCookieStr = wqCookieStr;
426
426
  this.config.getWqCookieKey = updateKey;
427
427
  console.log('解析wxapp中的cookie信息成功,返回后存储', this.config);
428
428
  resolve({
429
429
  wqCookie,
430
430
  wqCookieStr,
431
431
  });
432
432
  } else {
433
433
  console.log('解析wxapp中的cookie信息异常,返回异常结果', this.config);
434
434
  resolve({
435
435
  wqCookie: false,
436
436
  wqCookieStr: false,
437
437
  });
438
438
  }
439
439
  } else {
440
440
  resolve({
441
441
  wqCookie: false,
442
442
  wqCookieStr: false,
443
443
  });
444
444
  }
445
445
  }
446
446
  });
447
447
  }
448
448
 
449
449
 
450
450
  checkLoginStatus() {
451
451
  return this.getLoginCookie();
452
452
  }
453
453
 
454
454
  getAddressCachePromise() {
455
455
  return Promise.reject('该方法只在APP内适用');
456
456
  }
457
457
 
458
458
  getLbsAddressCachePromise() {
459
459
  return Promise.resolve({
460
460
  status: '-1005',
461
461
  msg: '暂未实现,获取失败',
462
462
  });
463
463
  }
464
464
 
465
465
  getDynamicConfig(key: string) {
466
466
  console.warn('调用默认的 getDynamicConfig(),注意,此方法还未实现!');
467
467
  return null;
468
468
  }
469
469
 
470
470
  updatePageAndLogInfo(updateQuery = {}) {
471
471
  const createUpdateQueryInfo: {
472
472
  query: {
473
473
  shopId?: string | number;
474
474
  venderId?: string | number;
475
475
  };
476
476
  updateShopInfoState: boolean;
477
477
  } = Object.assign(
478
478
  {},
479
479
  {
480
480
  query: {},
481
481
  updateShopInfoState: false,
482
482
  },
483
483
  updateQuery,
484
484
  );
485
485
  console.log(
486
486
  '获取当前下发的店铺查询参数',
487
487
  updateQuery,
488
488
  '获取之前保存的shopInfo店铺查询参数',
489
489
  this.info?.shopInfo,
490
490
  );
491
491
  const { query, updateShopInfoState } = createUpdateQueryInfo;
492
492
  const { shopId, venderId } = query;
493
493
  if (updateShopInfoState) {
494
494
  this.info.queryInfo = {
495
495
  ...this.info.queryInfo,
496
496
  ...query,
497
497
  };
498
498
  if (shopId && venderId) {
499
499
  this.info.shopInfo = {
500
500
  shopId: `${shopId}`,
501
501
  venderId: `${venderId}`,
502
502
  };
503
503
  }
504
504
  } else {
505
505
  this.info.queryInfo = {
506
506
  ...query,
507
507
  };
508
508
  if (
509
509
  this.info.shopInfo?.shopId &&
510
510
  this.info.shopInfo?.venderId &&
511
511
  (this.info.shopInfo.shopId == shopId || this.info.shopInfo.venderId == venderId)
512
512
  ) {
513
513
  this.info.queryInfo.shopId = this.info.shopInfo.shopId;
514
514
  this.info.queryInfo.venderId = this.info.shopInfo.venderId;
515
515
  console.log(
516
516
  '当前存储的店铺shopId和venderId与下发的店铺信息shopId或者venderId为同一个,补充shopId或者venderId查询参数',
517
517
  this.info.queryInfo,
518
518
  );
519
519
  }
520
520
  }
521
521
  this.info.queryInfo['shopId'] &&
522
522
  (this.info.queryInfo['shopId'] = `${this.info.queryInfo['shopId']}`);
523
523
  this.info.queryInfo['venderId'] &&
524
524
  (this.info.queryInfo['venderId'] = `${this.info.queryInfo['venderId']}`);
525
525
  console.log(
526
526
  '默认==获取店铺下发查询参数\n',
527
527
  query,
528
528
  '\n获取店铺最后查询参数\n',
529
529
  this.info.queryInfo,
530
530
  '\n是否为更新店铺状态\n',
531
531
  updateShopInfoState,
532
532
  );
533
533
  }
534
534
 
535
535
  checkJingGouWxappEnv() {
536
536
  return false;
537
537
  }
538
538
  renderNextTickLoadSdk() {
539
539
  console.warn('暂未实现 index.ts');
540
540
  }
541
541
  loadOtherSdk() {
542
542
  console.warn('暂未实现 index.ts');
543
543
  }
544
544
  loadItemSdkPromise(jsInfo = {}) {
545
545
  console.warn('暂未实现 index.ts');
546
546
  }