@conecli/cone-render 0.10.1-shop-beta.23 → 0.10.1-shop-beta.26

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