@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.dynamic.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  14. package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
  15. package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
  16. package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
  17. package/dist/components/base/DynamicTest/index.module.scss +16 -0
  18. package/dist/components/base/DynamicTest/index.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/JdLoading/index.module.scss +2 -0
  22. package/dist/components/base/JdLoading/index.tsx +1 -1
  23. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +116 -70
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
  28. package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
  29. package/dist/components/base/Price/Base/index.module.scss +6 -0
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
  32. package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
  33. package/dist/components/base/Price/Double/index.module.scss +6 -0
  34. package/dist/components/base/Price/Double/index.tsx +1 -1
  35. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  36. package/dist/config/env.ts +1 -1
  37. package/dist/interface/common.ts +1 -1
  38. package/dist/interface/component.ts +1 -1
  39. package/dist/interface/jumpEventReport.ts +1 -1
  40. package/dist/jumpEventReport/const.ts +1 -1
  41. package/dist/jumpEventReport/index.dynamic.ts +1 -0
  42. package/dist/jumpEventReport/index.h5.ts +1 -1
  43. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  44. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  45. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/language/zh_CN.json +162 -0
  49. package/dist/open/api/index.ts +1 -1
  50. package/dist/open/api/shopMember.dynamic.ts +1 -0
  51. package/dist/open/api/shopMember.ts +1 -1
  52. package/dist/open/components/index.dynamic.ts +1 -0
  53. package/dist/open/components/index.ts +1 -1
  54. package/dist/sass/app.dynamic.scss +306 -0
  55. package/dist/service/fetchGateway.h5.ts +1 -0
  56. package/dist/service/fetchGateway.ts +1 -1
  57. package/dist/service/fetchGateway.weapp.ts +1 -1
  58. package/dist/service/fetchJsonp.h5.ts +1 -0
  59. package/dist/service/fetchJsonp.ts +1 -1
  60. package/dist/service/http/colorSign.dynamic.ts +1 -0
  61. package/dist/service/http/http.ts +1 -1
  62. package/dist/service/requestServer.h5.ts +1 -1
  63. package/dist/service/requestServer.ts +1 -1
  64. package/dist/service/requestServer.weapp.ts +1 -1
  65. package/dist/utils/connectNativeJsBridge.dynamic.ts +1 -0
  66. package/dist/utils/connectNativeJsBridge.ts +1 -1
  67. package/dist/utils/h5Utils.ts +1 -1
  68. package/dist/utils/index.h5.ts +1 -1
  69. package/dist/utils/index.ts +1 -1
  70. package/dist/utils/index.weapp.ts +1 -1
  71. package/dist/utils/intersectionObserver.ts +1 -1
  72. package/dist/utils/jumpExtMapUtil.ts +1 -0
  73. package/dist/utils/log.ts +1 -0
  74. package/dist/utils/utils.ts +1 -1
  75. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  76. package/dist/wxapp/common/user_info.js +1 -1
  77. package/package.json +51 -31
  78. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -1 +1 @@
1
- import Taro from "@tarojs/taro";
2
1
  WXAPP_LOGIN,
3
2
  WXAPP_BIZ,
4
3
  WXAPP_USER_INFO,
5
4
  WXAPP_NAVIGATOR,
6
5
  WXAPP_REPORT_GDT,
7
6
  WXAPP_PARAMS_SIGN,
8
7
  WXAPP_FINGER_REPORT,
9
8
  WXAPP_REPORT_MANAGE,
10
9
  WXAPP_SUBS_GUIDER,
11
10
  BUSINESS_TYPE,
12
11
  SHOP_MENU_ID_TYPE,
13
12
  SHOP_MENU_ID_NAME,
14
13
  SECTION_HOME_TAB_NAME_TYPE,
15
14
  SECTION_HOME_TAB_TYPE,
16
15
  TaroEventType,
17
16
  WX_BUSINESS_TYPE,
18
17
  WXAPP_BIZ_KEY,
19
18
  WXAPP_BIZ_SHOP_LIGHT_KEY,
20
19
  getSystemInfos,
21
20
  getTaroStorageKeyValue,
22
21
  getWxAppCookieStr,
23
22
  objectToUrlEncode,
24
23
  abTestLabels: {},
25
24
  nonSellableSkuids: {},
26
25
  loginState: jdUserLoginState,
27
26
  cookiesStr: "",
28
27
  userInfo: userPinKey,
29
28
  pageInfo: {
30
29
  wxBusinessType: WX_BUSINESS_TYPE.SHOP,
31
30
  address: "",
32
31
  addressCommaStr: "",
33
32
  un_area: "",
34
33
  vapptype: "1",
35
34
  pageType: "home",
36
35
  dataType: BUSINESS_TYPE.ONLINE,
37
36
  floorExposureInfo: {},
38
37
  floorVideInfo: {},
39
38
  productVideInfo: {},
40
39
  tabsLoadAllDataInfo: {
41
40
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]:
42
41
  false,
43
42
  [SHOP_MENU_ID_NAME[SHOP_MENU_ID_TYPE.CLASSIFY]]: true,
44
43
  },
45
44
  updateShopInfosAllState: false,
46
45
  isVipShop: false,
47
46
  isJdShowNativeImmersivePlayer: false,
48
47
  ...shopConfig,
49
48
  pageScrollTop: 0,
50
49
  pageIdxHeightInfo: {
51
50
  list: [],
52
51
  },
53
52
  shopNavBarHeight: 0,
54
53
  },
55
54
  defaultQueryLogInfo: {
56
55
  sourceType: "JDshop",
57
56
  sourceValue: "",
58
57
  moduleId: "none",
59
58
  entrance: "none",
60
59
  },
61
60
  originQueryInfo: {},
62
61
  sysInfo: {
63
62
  windowWidth: 0,
64
63
  windowHeight: 0,
65
64
  netWorkType: "4g",
66
65
  jdBottomBarHeight: 0,
67
66
  jdNativeHeaderHeight: 0,
68
67
  },
69
68
  queryInfo: {},
70
69
  shopInfo: {},
71
70
  openAppData: {},
72
71
  public info: CommonInterFace.BaseConfigInfo;
73
72
  public config: {
74
73
  [key: string]: any;
75
74
  };
76
75
  public lazyContainer: CommonInterFace.lazyContainer;
77
76
  public rootEleNode: HTMLElement | null;
78
77
  public miniApplogUtil: CommonInterFace.MiniApplogUtil;
79
78
  public miniAppLogInstance: CommonInterFace.MiniAppLog | null;
80
79
  public checkStatusAndLoginPromise: object | null;
81
80
  public wxAppLoginInstance: CommonInterFace.WxAppLogin;
82
81
  public wxAppBizInstance: CommonInterFace.WxAppUserInfo;
83
82
  public wxAppUserInfoInstance: CommonInterFace.WxAppUserInfo;
84
83
  public wxAppReportManageInstance: CommonInterFace.wxAppReportManage;
85
84
  public wxAppReportGDTInstance: CommonInterFace.WxAppReportGDT;
86
85
  public wxAppNavigatorInstance: CommonInterFace.WxAppNavigator;
87
86
  public wxAppParamsSignInstance: CommonInterFace.wxAppParamsSign;
88
87
  public wxAppFingerReportInstance: CommonInterFace.wxAppParamsSign;
89
88
  public wxAppSubsGuider: CommonInterFace.wxAppParamsSign;
90
89
  public loadJsSdkList: Array<any>
91
90
  public loadJsSdkListCachePromise: any
92
91
  constructor(opt) {
93
92
  this.info = this._getConfig(opt);
94
93
  this.config = {};
95
94
  this.lazyContainer = {
96
95
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: {
97
96
  appLazyContainerList: [],
98
97
  appLazyFinishContainerList: [],
99
98
  },
100
99
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PROMOTION]]: {
101
100
  appLazyContainerList: [],
102
101
  appLazyFinishContainerList: [],
103
102
  },
104
103
  };
105
104
  this.loadJsSdkList = []
106
105
  this.loadJsSdkListCachePromise = {}
107
106
  this.rootEleNode = null;
108
107
  this.miniApplogUtil = MiniAppLogUtil;
109
108
  this.miniAppLogInstance = null;
110
109
  this.checkStatusAndLoginPromise = null;
111
110
  this.wxAppLoginInstance = WXAPP_LOGIN;
112
111
  this.wxAppBizInstance = WXAPP_BIZ;
113
112
  this.wxAppUserInfoInstance = WXAPP_USER_INFO;
114
113
  this.wxAppReportManageInstance = WXAPP_REPORT_MANAGE;
115
114
  this.wxAppReportGDTInstance = WXAPP_REPORT_GDT;
116
115
  this.wxAppNavigatorInstance = WXAPP_NAVIGATOR;
117
116
  this.wxAppParamsSignInstance = WXAPP_PARAMS_SIGN;
118
117
  this.wxAppFingerReportInstance = WXAPP_FINGER_REPORT
119
118
  ? new WXAPP_FINGER_REPORT()
120
119
  : {};
121
120
  this.wxAppSubsGuider = WXAPP_SUBS_GUIDER;
122
121
  }
123
122
  _getConfig(opt) {
124
123
  return Object.assign({}, DefaultConfig, opt);
125
124
  }
126
125
 
127
126
  taskTimeoutPromise(callBack, timeout = 2000) {
128
127
  return new Promise((resolve) => {
129
128
  setTimeout(() => {
130
129
  const getCallBackRes = typeof callBack === "function" && callBack();
131
130
  return resolve(getCallBackRes || false);
132
131
  }, timeout);
133
132
  });
134
133
  }
135
134
 
136
135
  updateBusinessDomainAndApi(domain, api) {
137
136
  console.log("=================>", "updateBusinessDomainAndApi");
138
137
  }
139
138
 
140
139
  getFullScreenHeight(systemInfo) {
141
140
  const { screenHeight, statusBarHeight, isAndroid } = systemInfo;
142
141
  let result = screenHeight;
143
142
  if (statusBarHeight > 20 && isAndroid) {
144
143
  result = screenHeight + statusBarHeight;
145
144
  }
146
145
  return result;
147
146
  }
148
147
 
149
148
  getTabBarHeight(systemInfo) {
150
149
  const { statusBarHeight, isAndroid, isIOS } = systemInfo;
151
150
  let result = 50;
152
151
  if (statusBarHeight > 20) {
153
152
  if (isIOS) {
154
153
  result = 84;
155
154
  } else if (isAndroid) {
156
155
  result = 53;
157
156
  }
158
157
  }
159
158
  return result;
160
159
  }
161
160
 
162
161
  getSystemInfo() {
163
162
  const info: UtilsInterFace.taroGetSystemInfoSyncRes =
164
163
  getSystemInfos() || {};
165
164
  const actualNavBarHeight =
166
165
  (info?.navBarHeight || 0) + (info?.navBarExtendHeight || 0);
167
166
  const headerHeight = actualNavBarHeight + (info?.statusBarHeight || 0);
168
167
  const fullScreenHeight = this.getFullScreenHeight(info);
169
168
  const tabBarHeight = this.getTabBarHeight(info);
170
169
  const safeContentHeight = fullScreenHeight - headerHeight;
171
170
  this.info.sysInfo = {
172
171
  ...this.info.sysInfo,
173
172
  ...info,
174
173
  actualNavBarHeight,
175
174
  headerHeight,
176
175
  fullScreenHeight,
177
176
  tabBarHeight,
178
177
  safeContentHeight,
179
178
  };
180
179
  if (this.info.sysInfo["hostVersionName"]) {
181
180
  this.info.sysInfo["hostAppVersion"] = Number(
182
181
  this.info.sysInfo["hostVersionName"].replace(/\./g, "")
183
182
  );
184
183
  }
185
184
  this.info.sysInfo["wifiVideoAutoPlay"] = false;
186
185
  this.getNetWorkType();
187
186
  console.log("获取系统信息", this.info.sysInfo);
188
187
  }
189
188
  async updateMPaasConfig() {}
190
189
 
191
190
  getNetWorkType() {
192
191
  Taro.getNetworkType().then((getRes) => {
193
192
  getRes &&
194
193
  getRes.networkType &&
195
194
  (this.info.sysInfo["netWorkType"] = getRes.networkType);
196
195
  });
197
196
  }
198
197
  getAPPUseStraightCorner () {
199
198
  return Promise.resolve(false)
200
199
  }
201
200
 
202
201
  checkStatusAndLogin(options = {}) {
203
202
  this.checkStatusAndLoginPromise = new Promise((resolve, reject) => {
204
203
  console.log(
205
204
  "微信小程序登录状态及获取cookie状态的promise,之前登录状态",
206
205
  this.info.loginState
207
206
  );
208
207
  this.toLogin(options)
209
208
  .then((res) => {
210
209
  console.log("微信小程序登录状态结果,成功", res);
211
210
  this.info.loginState = true;
212
211
  resolve(res);
213
212
  })
214
213
  .catch((err) => {
215
214
  console.log("微信小程序登录异常状态结果", err);
216
215
  this.doLogin(options)
217
216
  .then((res2) => {
218
217
  console.log("微信小程序wxDoLogin强制登陆成功:", res2);
219
218
  this.info.loginState = true;
220
219
  resolve(res2);
221
220
  })
222
221
  .catch((err2) => {
223
222
  console.log("微信小程序wxDoLogin强制登陆失败:", err2);
224
223
  this.checkStatusAndLoginPromise = null;
225
224
  reject(err2);
226
225
  });
227
226
  });
228
227
  });
229
228
  return this.checkStatusAndLoginPromise;
230
229
  }
231
230
 
232
231
  checkJdStatusAndLogin(
233
232
  options = {
234
233
  loginColor: {
235
234
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
236
235
  dpin: 0,
237
236
  },
238
237
  }
239
238
  ) {
240
239
  return this.checkStatusAndLogin(options);
241
240
  }
242
241
 
243
242
  toLogin(options = {}): Promise<any> {
244
243
  return this.wxAppLoginInstance
245
244
  .getLoginPromise({
246
245
  mode: "common",
247
246
  loginColor: {
248
247
  biz: WXAPP_BIZ_KEY,
249
248
  dpin: 1,
250
249
  },
251
250
  ...options,
252
251
  })
253
252
  .then((res) => {
254
253
  console.log("微信app登录返回信息,微信侧返回code为0表示成功", res);
255
254
  setTimeout(() => {
256
255
  console.log(
257
256
  "微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie"
258
257
  );
259
258
  this.getLoginCookie(`${Date.now()}`);
260
259
  }, 500);
261
260
  })
262
261
  .catch((err) => {
263
262
  console.log("微信app登录异常返回信息,也获取cookie", err);
264
263
  this.getLoginCookie(`${Date.now()}`);
265
264
  });
266
265
  }
267
266
 
268
267
  doLogin(options = {}) {
269
268
  const getParams = {
270
269
  loginColor: {
271
270
  biz: WXAPP_BIZ_KEY,
272
271
  dpin: 1,
273
272
  },
274
273
  ...options,
275
274
  };
276
275
  if (isPublishToWxapp) {
277
276
  getParams[
278
277
  "returnUrl"
279
278
  ] = `/pages/shopx/pages/index/index?${objectToUrlEncode({
280
279
  ...this.info.originQueryInfo,
281
280
  loadShopxType: "redirect",
282
281
  })}`;
283
282
  }
284
283
  return this.wxAppLoginInstance.doLogin(getParams).then((res) => {
285
284
  console.log("微信小程序强制登录返回信息,微信侧返回code为0表示成功", res);
286
285
  setTimeout(() => {
287
286
  console.log(
288
287
  "微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie"
289
288
  );
290
289
  this.getLoginCookie(`${Date.now()}`);
291
290
  }, 500);
292
291
  return res;
293
292
  });
294
293
  }
295
294
 
296
295
  doLoginForJdPin(options = {}) {
297
296
  return this.doLogin({
298
297
  loginColor: {
299
298
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
300
299
  dpin: 0,
301
300
  },
302
301
  ...options,
303
302
  });
304
303
  }
305
304
 
306
305
  getLoginCookie(updateKey = "wxapp") {
307
306
  return new Promise((resolve) => {
308
307
  console.log("开始获取更新wxapp中的cookie信息", updateKey);
309
308
  if (
310
309
  this.config.wqCookie &&
311
310
  this.config.wqCookieStr &&
312
311
  this.config.getWqCookieKey === updateKey
313
312
  ) {
314
313
  console.log("已有存储wxapp中的cookie信息,直接返回", this.config);
315
314
  resolve({
316
315
  wqCookie: this.config.wqCookie,
317
316
  wqCookieStr: this.config.wqCookieStr,
318
317
  });
319
318
  } else {
320
319
  if (isPublishToWxapp) {
321
320
  const getWxappCookieObj = getTaroStorageKeyValue("cookies") || null;
322
321
  if (getWxappCookieObj) {
323
322
  const getCookieObj = getWxappCookieObj["_data"];
324
323
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj);
325
324
  const {
326
325
  pin = "",
327
326
  visitkey = "-1",
328
327
  wq_unionid = "",
329
328
  wxapp_openid = "",
330
329
  } = wqCookie;
331
330
  this.info.loginState = true;
332
331
  this.info.userInfo.wqCookie = wqCookieStr;
333
332
  this.info.userInfo.wqVisitkey = visitkey;
334
333
  console.log("获取用户完整cookie信息", getCookieObj);
335
334
  const getUserAddress = this.wxAppUserInfoInstance.getAddress();
336
335
  console.log("获取微信用户地址信息", getUserAddress);
337
336
  if (getUserAddress) {
338
337
  this.info.pageInfo.address = getUserAddress?.areaId;
339
338
  this.info.pageInfo.addressCommaStr = this.info.pageInfo.address
340
339
  ? this.info.pageInfo.address.replace(/_/g, ",")
341
340
  : "";
342
341
  this.info.pageInfo.un_area = this.info.pageInfo.address;
343
342
  Taro.eventCenter.trigger(
344
343
  TaroEventType.USER_AREA_UPDATE,
345
344
  this.info.pageInfo.address
346
345
  );
347
346
  }
348
347
  if (this.miniAppLogInstance) {
349
348
  this.miniAppLogInstance.set({
350
349
  account: pin,
351
350
  unionid: wq_unionid,
352
351
  openid: wxapp_openid,
353
352
  });
354
353
  }
355
354
  this.config.wqCookie = wqCookie;
356
355
  this.config.wqCookieStr = wqCookieStr;
357
356
  this.config.getWqCookieKey = updateKey;
358
357
  console.log("解析wxapp中的cookie信息成功,返回后存储", this.config);
359
358
  resolve({
360
359
  wqCookie,
361
360
  wqCookieStr,
362
361
  });
363
362
  } else {
364
363
  console.log(
365
364
  "解析wxapp中的cookie信息异常,返回异常结果",
366
365
  this.config
367
366
  );
368
367
  resolve({
369
368
  wqCookie: false,
370
369
  wqCookieStr: false,
371
370
  });
372
371
  }
373
372
  } else {
374
373
  resolve({
375
374
  wqCookie: false,
376
375
  wqCookieStr: false,
377
376
  });
378
377
  }
379
378
  }
380
379
  });
381
380
  }
382
381
 
383
382
 
384
383
  checkLoginStatus() {
385
384
  return this.getLoginCookie();
386
385
  }
387
386
 
388
387
  getAddressCachePromise = () => {
389
388
  return Promise.reject("该方法只在APP内适用");
390
389
  };
391
390
 
392
391
  updatePageAndLogInfo(updateQuery = {}) {
393
392
  const createUpdateQueryInfo: {
394
393
  query: {
395
394
  shopId?: string | number;
396
395
  venderId?: string | number;
397
396
  };
398
397
  updateShopInfoState: boolean;
399
398
  } = Object.assign(
400
399
  {},
401
400
  {
402
401
  query: {},
403
402
  updateShopInfoState: false,
404
403
  },
405
404
  updateQuery
406
405
  );
407
406
  console.log(
408
407
  "获取当前下发的店铺查询参数",
409
408
  updateQuery,
410
409
  "获取之前保存的shopInfo店铺查询参数",
411
410
  this.info?.shopInfo
412
411
  );
413
412
  const { query, updateShopInfoState } = createUpdateQueryInfo;
414
413
  const { shopId, venderId } = query;
415
414
  if (updateShopInfoState) {
416
415
  this.info.queryInfo = {
417
416
  ...this.info.queryInfo,
418
417
  ...query,
419
418
  };
420
419
  if (shopId && venderId) {
421
420
  this.info.shopInfo = {
422
421
  shopId: `${shopId}`,
423
422
  venderId: `${venderId}`,
424
423
  };
425
424
  }
426
425
  } else {
427
426
  this.info.queryInfo = {
428
427
  ...query,
429
428
  };
430
429
  this.info.originQueryInfo = {
431
430
  ...query,
432
431
  };
433
432
  if (
434
433
  this.info.shopInfo?.shopId &&
435
434
  this.info.shopInfo?.venderId &&
436
435
  (this.info.shopInfo.shopId == shopId ||
437
436
  this.info.shopInfo.venderId == venderId)
438
437
  ) {
439
438
  this.info.queryInfo.shopId = this.info.shopInfo.shopId;
440
439
  this.info.queryInfo.venderId = this.info.shopInfo.venderId;
441
440
  console.log(
442
441
  "当前存储的店铺shopId和venderId与下发的店铺信息shopId或者venderId为同一个,补充shopId或者venderId查询参数",
443
442
  this.info.queryInfo
444
443
  );
445
444
  }
446
445
  }
447
446
  this.info.queryInfo["shopId"] &&
448
447
  (this.info.queryInfo["shopId"] = `${this.info.queryInfo["shopId"]}`);
449
448
  this.info.queryInfo["venderId"] &&
450
449
  (this.info.queryInfo["venderId"] = `${this.info.queryInfo["venderId"]}`);
451
450
  console.log(
452
451
  "weapp===获取店铺下发查询参数\n",
453
452
  query,
454
453
  "\n获取店铺最后查询参数\n",
455
454
  this.info.queryInfo,
456
455
  "\n是否为更新店铺状态\n",
457
456
  updateShopInfoState
458
457
  );
459
458
  }
460
459
 
461
460
  getDynamicConfig(key: string) {
462
461
  console.warn(
463
462
  "调用微信小程序的 getDynamicConfig(),注意,此方法还未实现!"
464
463
  );
465
464
  return null;
466
465
  }
467
466
  renderNextTickLoadSdk(){
468
467
  console.warn("暂未实现 index.weapp.ts")
469
468
  }
470
469
  loadOtherSdk(){
471
470
  console.warn('暂未实现 index.weapp.ts')
472
471
  }
473
472
  loadItemSdkPromise() {
474
473
  console.warn('暂未实现 index.weapp.ts')
475
474
  }
475
+ import Taro from '@tarojs/taro';
476
476
  WXAPP_LOGIN,
477
477
  WXAPP_BIZ,
478
478
  WXAPP_USER_INFO,
479
479
  WXAPP_NAVIGATOR,
480
480
  WXAPP_REPORT_GDT,
481
481
  WXAPP_PARAMS_SIGN,
482
482
  WXAPP_FINGER_REPORT,
483
483
  WXAPP_REPORT_MANAGE,
484
484
  WXAPP_SUBS_GUIDER,
485
485
  WXAPP_ADDRESS_V2_API,
486
486
  BUSINESS_TYPE,
487
487
  SHOP_MENU_ID_TYPE,
488
488
  SHOP_MENU_ID_NAME,
489
489
  SECTION_HOME_TAB_NAME_TYPE,
490
490
  SECTION_HOME_TAB_TYPE,
491
491
  TaroEventType,
492
492
  WX_BUSINESS_TYPE,
493
493
  WXAPP_BIZ_KEY,
494
494
  WXAPP_BIZ_SHOP_LIGHT_KEY,
495
495
  getSystemInfos,
496
496
  getTaroStorageKeyValue,
497
497
  getWxAppCookieStr,
498
498
  objectToUrlEncode,
499
499
  languageNowType,
500
500
  abTestLabels: {},
501
501
  nonSellableSkuids: {},
502
502
  loginState: jdUserLoginState,
503
503
  cookiesStr: '',
504
504
  userInfo: userPinKey,
505
505
  isImmersive: false,
506
506
  pageInfo: {
507
507
  wxBusinessType: WX_BUSINESS_TYPE.SHOP,
508
508
  address: '',
509
509
  addressCommaStr: '',
510
510
  un_area: '',
511
511
  userLbsAddress: '',
512
512
  vapptype: '1',
513
513
  pageType: 'home',
514
514
  dataType: BUSINESS_TYPE.ONLINE,
515
515
  floorExposureInfo: {},
516
516
  floorVideInfo: {},
517
517
  productVideInfo: {},
518
518
  tabsLoadAllDataInfo: {
519
519
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: false,
520
520
  [SHOP_MENU_ID_NAME[SHOP_MENU_ID_TYPE.CLASSIFY]]: true,
521
521
  },
522
522
  updateShopInfosAllState: false,
523
523
  isVipShop: false,
524
524
  isJdShowNativeImmersivePlayer: false,
525
525
  ...shopConfig,
526
526
  pageScrollTop: 0,
527
527
  pageIdxHeightInfo: {
528
528
  list: [],
529
529
  },
530
530
  shopNavBarHeight: 0,
531
531
  },
532
532
  defaultQueryLogInfo: {
533
533
  sourceType: 'JDshop',
534
534
  sourceValue: '',
535
535
  moduleId: 'none',
536
536
  entrance: 'none',
537
537
  },
538
538
  originQueryInfo: {},
539
539
  sysInfo: {
540
540
  windowWidth: 0,
541
541
  windowHeight: 0,
542
542
  netWorkType: '4g',
543
543
  jdBottomBarHeight: 0,
544
544
  jdNativeHeaderHeight: 0,
545
545
  },
546
546
  queryInfo: {},
547
547
  shopInfo: {},
548
548
  openAppData: {},
549
549
  public info: CommonInterFace.BaseConfigInfo;
550
550
  public config: {
551
551
  [key: string]: any;
552
552
  };
553
553
  public lazyContainer: CommonInterFace.lazyContainer;
554
554
  public rootEleNode: HTMLElement | null;
555
555
  public miniApplogUtil: CommonInterFace.MiniApplogUtil;
556
556
  public miniAppLogInstance: CommonInterFace.MiniAppLog | null;
557
557
  public checkStatusAndLoginPromise: object | null;
558
558
  public wxAppLoginInstance: CommonInterFace.WxAppLogin;
559
559
  public wxAppBizInstance: CommonInterFace.WxAppUserInfo;
560
560
  public wxAppUserInfoInstance: CommonInterFace.WxAppUserInfo;
561
561
  public wxAppReportManageInstance: CommonInterFace.wxAppReportManage;
562
562
  public wxAppReportGDTInstance: CommonInterFace.WxAppReportGDT;
563
563
  public wxAppNavigatorInstance: CommonInterFace.WxAppNavigator;
564
564
  public wxAppParamsSignInstance: CommonInterFace.wxAppParamsSign;
565
565
  public wxAppFingerReportInstance: CommonInterFace.wxAppParamsSign;
566
566
  public wxAppSubsGuider: CommonInterFace.wxAppParamsSign;
567
567
  public wxAppAddressV2apiInstance: CommonInterFace.wxAppAddressV2api;
568
568
  public loadJsSdkList: Array<any>;
569
569
  public loadJsSdkListCachePromise: any;
570
570
  public lbsAddressCachePromise: Promise<any> | null;
571
571
  public languageJsonData: any | null;
572
572
  constructor(opt) {
573
573
  this.info = this._getConfig(opt);
574
574
  this.config = {};
575
575
  this.lazyContainer = {
576
576
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: {
577
577
  appLazyContainerList: [],
578
578
  appLazyFinishContainerList: [],
579
579
  },
580
580
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PROMOTION]]: {
581
581
  appLazyContainerList: [],
582
582
  appLazyFinishContainerList: [],
583
583
  },
584
584
  };
585
585
  this.loadJsSdkList = [];
586
586
  this.loadJsSdkListCachePromise = {};
587
587
  this.rootEleNode = null;
588
588
  this.miniApplogUtil = MiniAppLogUtil;
589
589
  this.miniAppLogInstance = null;
590
590
  this.checkStatusAndLoginPromise = null;
591
591
  this.wxAppLoginInstance = WXAPP_LOGIN;
592
592
  this.wxAppBizInstance = WXAPP_BIZ;
593
593
  this.wxAppUserInfoInstance = WXAPP_USER_INFO;
594
594
  this.wxAppReportManageInstance = WXAPP_REPORT_MANAGE;
595
595
  this.wxAppReportGDTInstance = WXAPP_REPORT_GDT;
596
596
  this.wxAppNavigatorInstance = WXAPP_NAVIGATOR;
597
597
  this.wxAppParamsSignInstance = WXAPP_PARAMS_SIGN;
598
598
  this.wxAppFingerReportInstance = WXAPP_FINGER_REPORT ? new WXAPP_FINGER_REPORT() : {};
599
599
  this.wxAppSubsGuider = WXAPP_SUBS_GUIDER;
600
600
  this.wxAppAddressV2apiInstance = WXAPP_ADDRESS_V2_API;
601
601
  this.lbsAddressCachePromise = null;
602
602
  this.languageJsonData = langeJsonDataForCn;
603
603
  }
604
604
  _getConfig(opt) {
605
605
  return Object.assign({}, DefaultConfig, opt);
606
606
  }
607
607
 
608
608
  taskTimeoutPromise(callBack, timeout = 2000) {
609
609
  return new Promise((resolve) => {
610
610
  setTimeout(() => {
611
611
  const getCallBackRes = typeof callBack === 'function' && callBack();
612
612
  return resolve(getCallBackRes || false);
613
613
  }, timeout);
614
614
  });
615
615
  }
616
616
 
617
617
  updateBusinessDomainAndApi(domain, api) {
618
618
  console.log('=================>', 'updateBusinessDomainAndApi');
619
619
  }
620
620
 
621
621
  getFullScreenHeight(systemInfo) {
622
622
  const { screenHeight, statusBarHeight, isAndroid } = systemInfo;
623
623
  let result = screenHeight;
624
624
  if (statusBarHeight > 20 && isAndroid) {
625
625
  result = screenHeight + statusBarHeight;
626
626
  }
627
627
  return result;
628
628
  }
629
629
 
630
630
  getTabBarHeight(systemInfo) {
631
631
  const { statusBarHeight, isAndroid, isIOS } = systemInfo;
632
632
  let result = 50;
633
633
  if (statusBarHeight > 20) {
634
634
  if (isIOS) {
635
635
  result = 84;
636
636
  } else if (isAndroid) {
637
637
  result = 53;
638
638
  }
639
639
  }
640
640
  return result;
641
641
  }
642
642
 
643
643
  getSystemInfo() {
644
644
  const info: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfos() || {};
645
645
  const actualNavBarHeight = (info?.navBarHeight || 0) + (info?.navBarExtendHeight || 0);
646
646
  const headerHeight = actualNavBarHeight + (info?.statusBarHeight || 0);
647
647
  const fullScreenHeight = this.getFullScreenHeight(info);
648
648
  const tabBarHeight = this.getTabBarHeight(info);
649
649
  const safeContentHeight = fullScreenHeight - headerHeight;
650
650
  this.info.sysInfo = {
651
651
  ...this.info.sysInfo,
652
652
  ...info,
653
653
  actualNavBarHeight,
654
654
  headerHeight,
655
655
  fullScreenHeight,
656
656
  tabBarHeight,
657
657
  safeContentHeight,
658
658
  languageType: languageNowType,
659
659
  };
660
660
  if (this.info.sysInfo['hostVersionName']) {
661
661
  this.info.sysInfo['hostAppVersion'] = Number(
662
662
  this.info.sysInfo['hostVersionName'].replace(/\./g, ''),
663
663
  );
664
664
  }
665
665
  if (isPublishToWxapp) {
666
666
  this.getAddressCachePromise();
667
667
  this.getLbsAddressCachePromise();
668
668
  }
669
669
  this.info.sysInfo['wifiVideoAutoPlay'] = false;
670
670
  this.getNetWorkType();
671
671
  console.log('获取系统信息', this.info.sysInfo);
672
672
  }
673
673
  async updateMPaasConfig() {}
674
674
 
675
675
  getNetWorkType() {
676
676
  Taro.getNetworkType().then((getRes) => {
677
677
  getRes && getRes.networkType && (this.info.sysInfo['netWorkType'] = getRes.networkType);
678
678
  });
679
679
  }
680
680
  getAPPUseStraightCorner() {
681
681
  return Promise.resolve(false);
682
682
  }
683
683
 
684
684
  checkStatusAndLogin(options = {}) {
685
685
  this.checkStatusAndLoginPromise = new Promise((resolve, reject) => {
686
686
  console.log('微信小程序登录状态及获取cookie状态的promise,之前登录状态', this.info.loginState);
687
687
  this.toLogin(options)
688
688
  .then((res) => {
689
689
  console.log('微信小程序登录状态结果,成功', res);
690
690
  this.info.loginState = true;
691
691
  resolve(res);
692
692
  })
693
693
  .catch((err) => {
694
694
  console.log('微信小程序登录异常状态结果', err);
695
695
  this.doLogin(options)
696
696
  .then((res2) => {
697
697
  console.log('微信小程序wxDoLogin强制登陆成功:', res2);
698
698
  this.info.loginState = true;
699
699
  resolve(res2);
700
700
  })
701
701
  .catch((err2) => {
702
702
  console.log('微信小程序wxDoLogin强制登陆失败:', err2);
703
703
  this.checkStatusAndLoginPromise = null;
704
704
  reject(err2);
705
705
  });
706
706
  });
707
707
  });
708
708
  return this.checkStatusAndLoginPromise;
709
709
  }
710
710
 
711
711
  checkJdStatusAndLogin(
712
712
  options = {
713
713
  loginColor: {
714
714
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
715
715
  dpin: 0,
716
716
  },
717
717
  },
718
718
  ) {
719
719
  return this.checkStatusAndLogin(options);
720
720
  }
721
721
 
722
722
  toLogin(options = {}): Promise<any> {
723
723
  return this.wxAppLoginInstance
724
724
  .getLoginPromise({
725
725
  mode: 'common',
726
726
  loginColor: {
727
727
  biz: WXAPP_BIZ_KEY,
728
728
  dpin: 1,
729
729
  },
730
730
  ...options,
731
731
  })
732
732
  .then((res) => {
733
733
  console.log('微信app登录返回信息,微信侧返回code为0表示成功', res);
734
734
  setTimeout(() => {
735
735
  console.log(
736
736
  '微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie',
737
737
  );
738
738
  this.getLoginCookie(`${Date.now()}`);
739
739
  }, 500);
740
740
  })
741
741
  .catch((err) => {
742
742
  console.log('微信app登录异常返回信息,也获取cookie', err);
743
743
  this.getLoginCookie(`${Date.now()}`);
744
744
  });
745
745
  }
746
746
 
747
747
  doLogin(options = {}) {
748
748
  const getParams = {
749
749
  loginColor: {
750
750
  biz: WXAPP_BIZ_KEY,
751
751
  dpin: 1,
752
752
  },
753
753
  ...options,
754
754
  };
755
755
  if (isPublishToWxapp) {
756
756
  getParams['returnUrl'] = `/pages/shopx/pages/index/index?${objectToUrlEncode({
757
757
  ...this.info.originQueryInfo,
758
758
  loadShopxType: 'redirect',
759
759
  })}`;
760
760
  }
761
761
  return this.wxAppLoginInstance.doLogin(getParams).then((res) => {
762
762
  console.log('微信小程序强制登录返回信息,微信侧返回code为0表示成功', res);
763
763
  setTimeout(() => {
764
764
  console.log('微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie');
765
765
  this.getLoginCookie(`${Date.now()}`);
766
766
  }, 500);
767
767
  return res;
768
768
  });
769
769
  }
770
770
 
771
771
  doLoginForJdPin(options = {}) {
772
772
  return this.doLogin({
773
773
  loginColor: {
774
774
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
775
775
  dpin: 0,
776
776
  },
777
777
  ...options,
778
778
  });
779
779
  }
780
780
 
781
781
  getLoginCookie(updateKey = 'wxapp') {
782
782
  return new Promise(async (resolve) => {
783
783
  console.log('开始获取更新wxapp中的cookie信息', updateKey);
784
784
  if (
785
785
  this.config.wqCookie &&
786
786
  this.config.wqCookieStr &&
787
787
  this.config.getWqCookieKey === updateKey
788
788
  ) {
789
789
  console.log('已有存储wxapp中的cookie信息,直接返回', this.config);
790
790
  resolve({
791
791
  wqCookie: this.config.wqCookie,
792
792
  wqCookieStr: this.config.wqCookieStr,
793
793
  });
794
794
  } else {
795
795
  if (isPublishToWxapp) {
796
796
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null;
797
797
  if (getWxappCookieObj) {
798
798
  const getCookieObj = getWxappCookieObj['_data'];
799
799
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj);
800
800
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie;
801
801
  this.info.loginState = true;
802
802
  this.info.userInfo.wqCookie = wqCookieStr;
803
803
  this.info.userInfo.wqVisitkey = visitkey;
804
804
  console.log('获取用户完整cookie信息', getCookieObj);
805
805
  if (this.miniAppLogInstance) {
806
806
  this.miniAppLogInstance.set({
807
807
  account: pin,
808
808
  unionid: wq_unionid,
809
809
  openid: wxapp_openid,
810
810
  });
811
811
  }
812
812
  this.config.wqCookie = wqCookie;
813
813
  this.config.wqCookieStr = wqCookieStr;
814
814
  this.config.getWqCookieKey = updateKey;
815
815
  console.log('解析wxapp中的cookie信息成功,返回后存储', this.config);
816
816
  resolve({
817
817
  wqCookie,
818
818
  wqCookieStr,
819
819
  });
820
820
  } else {
821
821
  console.log('解析wxapp中的cookie信息异常,返回异常结果', this.config);
822
822
  resolve({
823
823
  wqCookie: false,
824
824
  wqCookieStr: false,
825
825
  });
826
826
  }
827
827
  } else {
828
828
  resolve({
829
829
  wqCookie: false,
830
830
  wqCookieStr: false,
831
831
  });
832
832
  }
833
833
  }
834
834
  });
835
835
  }
836
836
 
837
837
 
838
838
  checkLoginStatus() {
839
839
  return this.getLoginCookie();
840
840
  }
841
841
 
842
842
  getAddressCachePromise = () => {
843
843
  return new Promise((resolve) => {
844
844
  if (this.info.sysInfo?.area) {
845
845
  resolve({
846
846
  lat: this.info.sysInfo?.lat,
847
847
  lng: this.info.sysInfo?.lng,
848
848
  area: this.info.sysInfo?.area,
849
849
  });
850
850
  } else {
851
851
  const getUserAddress = this.wxAppUserInfoInstance.getAddress();
852
852
  console.info('京购原生获取用户基地址信息', getUserAddress);
853
853
  if (getUserAddress) {
854
854
  const { areaId = '', latitude, longitude } = getUserAddress;
855
855
  this.info.sysInfo['lat'] = `${latitude || ''}`;
856
856
  this.info.sysInfo['lng'] = `${longitude || ''}`;
857
857
  if (areaId && areaId !== '') {
858
858
  this.info.pageInfo.address = areaId;
859
859
  this.info.pageInfo.addressCommaStr = areaId.replace(/_/g, ',');
860
860
  this.info.pageInfo.un_area = areaId;
861
861
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
862
862
  area: areaId,
863
863
  });
864
864
  this.info.sysInfo['area'] = areaId;
865
865
  }
866
866
  resolve({
867
867
  lat: this.info.sysInfo['lat'],
868
868
  lng: this.info.sysInfo['lng'],
869
869
  area: areaId,
870
870
  });
871
871
  } else {
872
872
  resolve({ lat: '', lng: '', area: '' });
873
873
  }
874
874
  }
875
875
  });
876
876
  };
877
877
 
878
878
  getLbsAddressCachePromise(): Promise<{
879
879
  ok: boolean;
880
880
  msg?: string;
881
881
  realTimeArea: string;
882
882
  data?: any;
883
883
  }> {
884
884
  if (!this.lbsAddressCachePromise) {
885
885
  this.lbsAddressCachePromise = new Promise((resolve) => {
886
886
  const getWxappLbsAddressInfo = this.wxAppUserInfoInstance.getLbsAddress();
887
887
  console.info('京购原生获取用户基于lbs的缓存地址信息', getWxappLbsAddressInfo);
888
888
  if (getWxappLbsAddressInfo && getWxappLbsAddressInfo?.areaId !== '') {
889
889
  this.info.pageInfo.userLbsAddress = getWxappLbsAddressInfo?.areaId;
890
890
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
891
891
  realTimeArea: this.info.pageInfo.userLbsAddress,
892
892
  });
893
893
  resolve({
894
894
  ok: true,
895
895
  realTimeArea: getWxappLbsAddressInfo?.areaId || '',
896
896
  });
897
897
  } else {
898
898
  this.wxAppAddressV2apiInstance
899
899
  .fetchLbsAddr({
900
900
  token: 'W23b9sUlcnhCPZxQ2daYMkDqrTL0TeDw9tbDm5lVMVA=',
901
901
  from: 'wxapp_shop_real_area',
902
902
  })
903
903
  .then((res) => {
904
904
  console.info('微信京购里面获取静默实时lbs地址信息结果', res);
905
905
  const { provinceId, cityId, countyId, townId } = res;
906
906
  let realTimeArea = '';
907
907
  if (provinceId) {
908
908
  realTimeArea = `${provinceId}_${cityId || 0}_${countyId || 0}_${townId || 0}`;
909
909
  this.info.pageInfo.userLbsAddress = realTimeArea;
910
910
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
911
911
  realTimeArea: realTimeArea,
912
912
  });
913
913
  } else {
914
914
  this.lbsAddressCachePromise = null;
915
915
  }
916
916
  const getValidRealTimeArea = realTimeArea !== '';
917
917
  resolve({
918
918
  ok: getValidRealTimeArea,
919
919
  msg: getValidRealTimeArea
920
920
  ? '成功'
921
921
  : '根据微信底层接口获取静默实时lbs地址信息异常,详情见data',
922
922
  data: getValidRealTimeArea ? null : res,
923
923
  realTimeArea: realTimeArea,
924
924
  });
925
925
  })
926
926
  .catch((err) => {
927
927
  console.warn('微信京购里面获取静默实时lbs地址信息异常', err);
928
928
  this.lbsAddressCachePromise = null;
929
929
  resolve({
930
930
  ok: false,
931
931
  msg: '微信京购里面获取静默实时lbs地址信息异常',
932
932
  realTimeArea: '',
933
933
  });
934
934
  });
935
935
  }
936
936
  });
937
937
  }
938
938
  return this.lbsAddressCachePromise;
939
939
  }
940
940
 
941
941
  updatePageAndLogInfo(updateQuery = {}) {
942
942
  const createUpdateQueryInfo: {
943
943
  query: {
944
944
  shopId?: string | number;
945
945
  venderId?: string | number;
946
946
  };
947
947
  updateShopInfoState: boolean;
948
948
  } = Object.assign(
949
949
  {},
950
950
  {
951
951
  query: {},
952
952
  updateShopInfoState: false,
953
953
  },
954
954
  updateQuery,
955
955
  );
956
956
  console.log(
957
957
  '获取当前下发的店铺查询参数',
958
958
  updateQuery,
959
959
  '获取之前保存的shopInfo店铺查询参数',
960
960
  this.info?.shopInfo,
961
961
  );
962
962
  const { query, updateShopInfoState } = createUpdateQueryInfo;
963
963
  const { shopId, venderId } = query;
964
964
  if (updateShopInfoState) {
965
965
  this.info.queryInfo = {
966
966
  ...this.info.queryInfo,
967
967
  ...query,
968
968
  };
969
969
  if (shopId && venderId) {
970
970
  this.info.shopInfo = {
971
971
  shopId: `${shopId}`,
972
972
  venderId: `${venderId}`,
973
973
  };
974
974
  }
975
975
  } else {
976
976
  this.info.queryInfo = {
977
977
  ...query,
978
978
  };
979
979
  this.info.originQueryInfo = {
980
980
  ...query,
981
981
  };
982
982
  if (
983
983
  this.info.shopInfo?.shopId &&
984
984
  this.info.shopInfo?.venderId &&
985
985
  (this.info.shopInfo.shopId == shopId || this.info.shopInfo.venderId == venderId)
986
986
  ) {
987
987
  this.info.queryInfo.shopId = this.info.shopInfo.shopId;
988
988
  this.info.queryInfo.venderId = this.info.shopInfo.venderId;
989
989
  console.log(
990
990
  '当前存储的店铺shopId和venderId与下发的店铺信息shopId或者venderId为同一个,补充shopId或者venderId查询参数',
991
991
  this.info.queryInfo,
992
992
  );
993
993
  }
994
994
  }
995
995
  this.info.queryInfo['shopId'] &&
996
996
  (this.info.queryInfo['shopId'] = `${this.info.queryInfo['shopId']}`);
997
997
  this.info.queryInfo['venderId'] &&
998
998
  (this.info.queryInfo['venderId'] = `${this.info.queryInfo['venderId']}`);
999
999
  console.log(
1000
1000
  'weapp===获取店铺下发查询参数\n',
1001
1001
  query,
1002
1002
  '\n获取店铺最后查询参数\n',
1003
1003
  this.info.queryInfo,
1004
1004
  '\n是否为更新店铺状态\n',
1005
1005
  updateShopInfoState,
1006
1006
  );
1007
1007
  }
1008
1008
 
1009
1009
  getDynamicConfig(key: string) {
1010
1010
  console.warn('调用微信小程序的 getDynamicConfig(),注意,此方法还未实现!');
1011
1011
  return null;
1012
1012
  }
1013
1013
  renderNextTickLoadSdk() {
1014
1014
  console.warn('暂未实现 index.weapp.ts');
1015
1015
  }
1016
1016
  loadOtherSdk() {
1017
1017
  console.warn('暂未实现 index.weapp.ts');
1018
1018
  }
1019
1019
  loadItemSdkPromise() {
1020
1020
  console.warn('暂未实现 index.weapp.ts');
1021
1021
  }
1022
1022
  createLanguageProimse() {
1023
1023
  return Promise.reject({
1024
1024
  msg: '暂未实现',
1025
1025
  });
1026
1026
  }