@conecli/cone-render 0.10.1-shop-beta.22 → 0.10.1-shop-beta.24

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 (121) 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/token.jd.ts +1 -1
  13. package/dist/components/ErrorBoundary.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  19. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  20. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/base/JdLoading/index.module.scss +0 -2
  23. package/dist/components/base/JdLoading/index.tsx +1 -1
  24. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  25. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  26. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  27. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  28. package/dist/components/base/NetworkDataError/const.ts +1 -1
  29. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.module.scss +18 -0
  32. package/dist/components/base/Price/Double/index.tsx +1 -1
  33. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  34. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  35. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  36. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  37. package/dist/components/floorItem.tsx +1 -1
  38. package/dist/components/isv/Floor/index.tsx +1 -1
  39. package/dist/components/remoteFloorItem.tsx +1 -1
  40. package/dist/config/env.ts +1 -1
  41. package/dist/interface/common.ts +1 -1
  42. package/dist/interface/component.ts +1 -1
  43. package/dist/interface/jumpEventReport.ts +1 -1
  44. package/dist/interface/service.ts +1 -1
  45. package/dist/jumpEventReport/base.ts +1 -1
  46. package/dist/jumpEventReport/const.ts +1 -1
  47. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  48. package/dist/jumpEventReport/index.ts +1 -1
  49. package/dist/jumpEventReport/index.weapp.ts +1 -1
  50. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  51. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  52. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  53. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  54. package/dist/jumpEventReport/web/report.ts +1 -1
  55. package/dist/jumpEventReport/web.base.ts +1 -1
  56. package/dist/jumpEventReport/web.jd.ts +1 -1
  57. package/dist/jumpEventReport/web.pc.ts +1 -1
  58. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  59. package/dist/language/en_US.json +179 -83
  60. package/dist/language/zh_CN.json +178 -82
  61. package/dist/language/zh_HK.json +178 -82
  62. package/dist/libs/openShopBridge.js +161 -0
  63. package/dist/libs/openShopBridge.min.js +1 -0
  64. package/dist/libs/taroAppReport.js +2 -2
  65. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  66. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  67. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  68. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  69. package/dist/open/api/index.ts +1 -1
  70. package/dist/open/api/shopMember.weapp.ts +1 -0
  71. package/dist/open/api/track.ts +1 -1
  72. package/dist/open/api/util.ts +1 -1
  73. package/dist/open/components/index.ts +1 -1
  74. package/dist/open/index.ts +1 -1
  75. package/dist/sass/app.h5.scss +6 -1
  76. package/dist/service/fetchGateway.ts +1 -1
  77. package/dist/service/fetchGateway.weapp.ts +1 -1
  78. package/dist/service/fetchJsonp.ts +1 -1
  79. package/dist/service/fetchJsonp.weapp.ts +1 -0
  80. package/dist/service/http/h5Http.ts +1 -1
  81. package/dist/service/http/http.ts +1 -1
  82. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  83. package/dist/service/requestServer.h5.ts +1 -1
  84. package/dist/service/requestServer.ts +1 -1
  85. package/dist/service/requestServer.weapp.ts +1 -1
  86. package/dist/utils/connectNativeJsBridge.ts +1 -1
  87. package/dist/utils/h5Utils.ts +1 -1
  88. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  89. package/dist/utils/harmonyCallRouter.ts +0 -0
  90. package/dist/utils/index.h5.ts +1 -1
  91. package/dist/utils/index.ts +1 -1
  92. package/dist/utils/index.weapp.ts +1 -1
  93. package/dist/utils/intersectionObserver.ts +1 -1
  94. package/dist/utils/sColor.weapp.ts +1 -0
  95. package/dist/utils/utils.ts +1 -1
  96. package/package.json +13 -15
  97. package/dist/common/index.dynamic.ts +0 -1
  98. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  99. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  100. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  101. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  102. package/dist/components/base/DynamicTest/index.tsx +0 -1
  103. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  104. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  105. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  106. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  107. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  108. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  109. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  110. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  111. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/open/api/shopMember.dynamic.ts +0 -1
  114. package/dist/open/components/index.dynamic.ts +0 -1
  115. package/dist/sass/app.dynamic.scss +0 -306
  116. package/dist/service/fetchGateway.h5.ts +0 -1
  117. package/dist/service/fetchJsonp.h5.ts +0 -1
  118. package/dist/service/http/colorSign.dynamic.ts +0 -1
  119. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  120. package/dist/utils/priceUtils.js +0 -1
  121. /package/dist/utils/{sColor.js → sColor.ts} +0 -0
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.10.1-shop-beta.22",
3
+ "version": "0.10.1-shop-beta.24",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"
7
7
  ],
8
8
  "exports": {
9
- "./api": "./dist/open/api/index",
10
- "./components": "./dist/open/components/index",
11
- "./modules": "./dist/open/modules/index",
12
- "./_api": "./dist/api/index",
9
+ "./api": "./dist/open/api/index.ts",
10
+ "./components": "./dist/open/components/index.ts",
11
+ "./modules": "./dist/open/modules/index.ts",
12
+ "./_api": "./dist/api",
13
13
  "./_config/": "./dist/config/",
14
14
  "./_common/": "./dist/common/",
15
15
  "./_components/": "./dist/components/",
16
- "./_interface": "./dist/interface/index",
17
- "./_jumpEventReport": "./dist/jumpEventReport/index",
16
+ "./_interface": "./dist/interface",
17
+ "./_jumpEventReport": "./dist/jumpEventReport",
18
18
  "./_jumpEventReport/": "./dist/jumpEventReport/",
19
- "./_utils": "./dist/utils/index",
19
+ "./_utils": "./dist/utils",
20
20
  "./_utils/": "./dist/utils/",
21
21
  "./sass/": "./dist/sass/"
22
22
  },
@@ -49,7 +49,8 @@
49
49
  "compressWatch": "gulp compressWatch --gulpfile ./publish/gulpfile.js",
50
50
  "compress": "gulp compress --gulpfile ./publish/gulpfile.js",
51
51
  "build": "npm run compress",
52
- "check": "gulp check --gulpfile ./publish/gulpfile.js"
52
+ "check": "gulp check --gulpfile ./publish/gulpfile.js",
53
+ "build:openShopBridge": "node publish/build-openShopBridge.js"
53
54
  },
54
55
  "browserslist": {
55
56
  "development": [
@@ -102,11 +103,6 @@
102
103
  "@tarojs/plugin-framework-react": "4.1.2",
103
104
  "@tarojs/react": "4.1.2",
104
105
  "@tarojs/service": "4.1.2",
105
- "@jdtaro/ui": "4.0.2-beta.6",
106
- "@jdtaro/ui-themes": "4.0.2-beta.6",
107
- "@jdtaro/inject-jd-platform-styles": "4.0.2-beta.6",
108
- "@jdtaro/inject-ui-styles": "4.0.2-beta.6",
109
- "@jdtaro/dynamic-types": "^0.0.1",
110
106
  "react-dom": "^18.2.0",
111
107
  "react": "^18.2.0",
112
108
  "art-template": "^4.13.2",
@@ -155,12 +151,14 @@
155
151
  "html-webpack-plugin": "^5.5.0",
156
152
  "mini-css-extract-plugin": "^2.6.1",
157
153
  "shelljs": "^0.8.5",
154
+ "terser": "^5.44.1",
158
155
  "terser-webpack-plugin": "^5.3.6"
159
156
  },
160
157
  "resolutions": {
161
158
  "@babel/runtime": "7.24.4",
162
159
  "@tarojs/cli": "4.1.2",
163
160
  "@tarojs/helper": "4.1.2",
164
- "minimatch": "9.0.5"
161
+ "minimatch": "9.0.5",
162
+ "cacheable": "1.10.4"
165
163
  }
166
164
  }
@@ -1 +0,0 @@
1
- import Taro from '@tarojs/taro';
2
  BUSINESS_TYPE,
3
1
  SHOP_MENU_ID_TYPE,
4
2
  SHOP_MENU_ID_NAME,
5
3
  SECTION_HOME_TAB_NAME_TYPE,
6
4
  SECTION_HOME_TAB_TYPE,
7
5
  WX_BUSINESS_TYPE,
8
6
  WXAPP_BIZ_SHOP_LIGHT_KEY,
9
7
  TaroEventType,
10
8
  abTestLabels: {},
11
9
  nonSellableSkuids: {},
12
10
  loginState: false,
13
11
  cookiesStr: '',
14
12
  userInfo: '',
15
13
  isImmersive: false,
16
14
  pageInfo: {
17
15
  wxBusinessType: WX_BUSINESS_TYPE.SHOP,
18
16
  address: '',
19
17
  addressCommaStr: '',
20
18
  un_area: '',
21
19
  userLbsAddress: '',
22
20
  vapptype: '1',
23
21
  pageType: 'home',
24
22
  dataType: BUSINESS_TYPE.ONLINE,
25
23
  floorExposureInfo: {},
26
24
  floorVideInfo: {},
27
25
  productVideInfo: {},
28
26
  tabsLoadAllDataInfo: {
29
27
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: false,
30
28
  [SHOP_MENU_ID_NAME[SHOP_MENU_ID_TYPE.CLASSIFY]]: true,
31
29
  },
32
30
  updateShopInfosAllState: false,
33
31
  isVipShop: false,
34
32
  isJdShowNativeImmersivePlayer: false,
35
33
  ...shopConfig,
36
34
  pageScrollTop: 0,
37
35
  pageIdxHeightInfo: {
38
36
  list: [],
39
37
  },
40
38
  shopNavBarHeight: 0,
41
39
  },
42
40
  defaultQueryLogInfo: {
43
41
  sourceType: 'JDshop',
44
42
  sourceValue: '',
45
43
  moduleId: 'none',
46
44
  entrance: 'none',
47
45
  },
48
46
  originQueryInfo: {},
49
47
  sysInfo: {
50
48
  windowWidth: 0,
51
49
  windowHeight: 0,
52
50
  netWorkType: '4g',
53
51
  jdBottomBarHeight: 0,
54
52
  jdNativeHeaderHeight: 0,
55
53
  },
56
54
  queryInfo: {},
57
55
  shopInfo: {},
58
56
  openAppData: {},
59
57
  public info: CommonInterFace.BaseConfigInfo;
60
58
  public config: {
61
59
  [key: string]: any;
62
60
  };
63
61
  public lazyContainer: CommonInterFace.lazyContainer;
64
62
  public rootEleNode: HTMLElement | null;
65
63
  public checkStatusAndLoginPromise: object | null;
66
64
  public loadJsSdkList: Array<any>;
67
65
  public loadJsSdkListCachePromise: any;
68
66
  public lbsAddressCachePromise: Promise<any> | null;
69
67
  public languageJsonData: any | null;
70
68
  constructor(opt) {
71
69
  this.info = this._getConfig(opt);
72
70
  this.config = {};
73
71
  this.lazyContainer = {
74
72
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN]]: {
75
73
  appLazyContainerList: [],
76
74
  appLazyFinishContainerList: [],
77
75
  },
78
76
  [SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PROMOTION]]: {
79
77
  appLazyContainerList: [],
80
78
  appLazyFinishContainerList: [],
81
79
  },
82
80
  };
83
81
  this.loadJsSdkList = [];
84
82
  this.loadJsSdkListCachePromise = {};
85
83
  this.rootEleNode = null;
86
84
  this.lbsAddressCachePromise = null;
87
85
  this.languageJsonData = langeJsonDataForCn;
88
86
  this.getSystemInfo();
89
87
  this.checkLoginStatus();
90
88
  }
91
89
  _getConfig(opt) {
92
90
  return Object.assign({}, DefaultConfig, opt);
93
91
  }
94
92
 
95
93
  taskTimeoutPromise(callBack, timeout = 2000) {
96
94
  return new Promise((resolve) => {
97
95
  setTimeout(() => {
98
96
  const getCallBackRes = typeof callBack === 'function' && callBack();
99
97
  return resolve(getCallBackRes || false);
100
98
  }, timeout);
101
99
  });
102
100
  }
103
101
 
104
102
  updateBusinessDomainAndApi(domain, api) {
105
103
  console.log('=================>', 'updateBusinessDomainAndApi');
106
104
  }
107
105
 
108
106
  getTabBarHeight(systemInfo) {
109
107
  const { statusBarHeight, isAndroid, isIOS } = systemInfo;
110
108
  let result = 50;
111
109
  if (statusBarHeight > 20) {
112
110
  if (isIOS) {
113
111
  result = 84;
114
112
  } else if (isAndroid) {
115
113
  result = 53;
116
114
  }
117
115
  }
118
116
  return result;
119
117
  }
120
118
 
121
119
  getSystemInfo() {
122
120
  const info: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfos() || {};
123
121
  const actualNavBarHeight = (info?.navBarHeight || 0) + (info?.navBarExtendHeight || 0);
124
122
  const headerHeight = actualNavBarHeight + (info?.statusBarHeight || 0);
125
123
  const fullScreenHeight = info?.screenHeight;
126
124
  const tabBarHeight = this.getTabBarHeight(info);
127
125
  const safeContentHeight = info?.safeArea?.height;
128
126
  this.info.sysInfo = {
129
127
  ...this.info.sysInfo,
130
128
  ...info,
131
129
  actualNavBarHeight,
132
130
  headerHeight,
133
131
  fullScreenHeight,
134
132
  tabBarHeight,
135
133
  safeContentHeight,
136
134
  };
137
135
  if (this.info.sysInfo['hostVersionName']) {
138
136
  this.info.sysInfo['hostAppVersion'] = Number(
139
137
  this.info.sysInfo['hostVersionName'].replace(/\./g, ''),
140
138
  );
141
139
  }
142
140
  this.getAddressCachePromise();
143
141
  this.getLbsAddressCachePromise();
144
142
  this.info.sysInfo['wifiVideoAutoPlay'] = false;
145
143
  this.getNetWorkType();
146
144
  console.log('获取系统信息', this.info.sysInfo);
147
145
  }
148
146
  async updateMPaasConfig() {}
149
147
 
150
148
  getNetWorkType() {
151
149
  Taro.getNetworkType().then((getRes) => {
152
150
  getRes && getRes.networkType && (this.info.sysInfo['netWorkType'] = getRes.networkType);
153
151
  });
154
152
  }
155
153
  getAPPUseStraightCorner() {
156
154
  return Promise.resolve(false);
157
155
  }
158
156
 
159
157
  checkStatusAndLogin(options = {}) {
160
158
  this.checkStatusAndLoginPromise = new Promise(async (resolve, reject) => {
161
159
  try {
162
160
  const getLoginState = await this.checkLoginStatus(options);
163
161
  if (getLoginState) {
164
162
  const { pin } = await this.getLoginCookie(options);
165
163
  this.info.userInfo = {
166
164
  pin,
167
165
  encodePin: encodeURIComponent(pin),
168
166
  ptkey: '',
169
167
  };
170
168
  resolve(true);
171
169
  } else {
172
170
  reject(false);
173
171
  }
174
172
  } catch (e) {
175
173
  reject(false);
176
174
  }
177
175
  });
178
176
  return this.checkStatusAndLoginPromise;
179
177
  }
180
178
 
181
179
  checkJdStatusAndLogin(
182
180
  options = {
183
181
  loginColor: {
184
182
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
185
183
  dpin: 0,
186
184
  },
187
185
  },
188
186
  ) {
189
187
  return this.checkStatusAndLogin(options);
190
188
  }
191
189
 
192
190
  toLogin(options = {}): Promise<any> {
193
191
  return Taro.JDLogin.login(options)
194
192
  }
195
193
 
196
194
  doLogin(options) {
197
195
  return this.toLogin(options);
198
196
  }
199
197
 
200
198
  doLoginForJdPin(options = {}) {
201
199
  return this.doLogin({
202
200
  loginColor: {
203
201
  biz: WXAPP_BIZ_SHOP_LIGHT_KEY,
204
202
  dpin: 0,
205
203
  },
206
204
  ...options,
207
205
  });
208
206
  }
209
207
 
210
208
  getLoginCookie(options = {}) {
211
209
  return new Promise((resolve) => {
212
210
  Taro.JDLogin.getUserPin(options).then(res => {
213
211
  resolve({
214
212
  pin: res?.data || ""
215
213
  })
216
214
  })
217
215
  })
218
216
  }
219
217
 
220
218
 
221
219
  checkLoginStatus(options = {}) {
222
220
  return new Promise((resolve) => {
223
221
  Taro.JDLogin.isLogin(options).then(res => {
224
222
  const getIsLoginState = res?.data || false
225
223
  getIsLoginState && (this.info.loginState = getIsLoginState)
226
224
  resolve(getIsLoginState)
227
225
  })
228
226
  })
229
227
  }
230
228
 
231
229
  getAddressCachePromise() {
232
230
  return new Promise((resolve) => {
233
231
  if (this?.info?.sysInfo?.lat && this?.info?.sysInfo?.lng && this?.info?.sysInfo?.area) {
234
232
  resolve({
235
233
  lat: this.info.sysInfo.lat,
236
234
  lng: this.info.sysInfo.lng,
237
235
  area: this?.info?.sysInfo?.area,
238
236
  });
239
237
  } else {
240
238
  Taro.JDAddress.getCacheAddress({
241
239
  businessId: '219f70bbbf7e4ede7968bedaa1beafb4',
242
240
  sceneId: 'basicShoppingProcess',
243
241
  })
244
242
  .then((res) => {
245
243
  const { errno, data } = res;
246
244
  console.log('taro动态化获取松果getCacheAddress经纬度及四级地址原始数返回结果', errno, data, res);
247
245
  if (errno === 0 && data) {
248
246
  const { latitude, longitude, provinceId, cityId, countyId, townId } =
249
247
  data || {};
250
248
  let area = '';
251
249
  this.info.sysInfo['lat'] = `${latitude || ''}`;
252
250
  this.info.sysInfo['lng'] = `${longitude || ''}`;
253
251
  const getProvinceIdNum = provinceId ? Number(provinceId) : 0;
254
252
  if (getProvinceIdNum && getProvinceIdNum > 0) {
255
253
  area = `${provinceId}_${cityId || 0}_${countyId || 0}_${townId || 0}`;
256
254
  this.info.pageInfo['address'] = area;
257
255
  this.info.pageInfo['addressCommaStr'] = area.replace(/_/g, ',');
258
256
  this.info.sysInfo['area'] = area;
259
257
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
260
258
  area: this.info.pageInfo.address,
261
259
  });
262
260
  }
263
261
  resolve({
264
262
  lat: this.info.sysInfo['lat'],
265
263
  lng: this.info.sysInfo['lng'],
266
264
  area: area,
267
265
  });
268
266
  } else {
269
267
  if (typeof res === 'object') {
270
268
  draBusinessCustomReport({
271
269
  type: 'taro_JDAddress_getCacheAddress_info_err',
272
270
  errMsg: '松果app内通过Taro动态化获取获取用户地址及经纬度信息异常',
273
271
  originReqDataStr: JSON.stringify(res),
274
272
  });
275
273
  }
276
274
  resolve({ lat: '', lng: '', area: '' });
277
275
  }
278
276
  })
279
277
  .catch((error) => {
280
278
  console.error('Taro.JDAddress.getCacheAddress error:', error);
281
279
  draBusinessCustomReport({
282
280
  type: 'taro_JDAddress_getCacheAddress_info_err',
283
281
  errMsg: '松果app内通过Taro动态化获取获取用户地址及经纬度信息catch异常',
284
282
  });
285
283
  resolve({ lat: '', lng: '', area: '' });
286
284
  });
287
285
  }
288
286
  });
289
287
  }
290
288
 
291
289
  getLbsAddressCachePromise(): Promise<{
292
290
  ok: boolean;
293
291
  msg?: string;
294
292
  realTimeArea: string;
295
293
  data?: any;
296
294
  }> {
297
295
  if (!this.lbsAddressCachePromise) {
298
296
  this.lbsAddressCachePromise = new Promise((resolve) => {
299
297
  Taro.JDLocation.getCacheLocation({
300
298
  businessId: '219f70bbbf7e4ede7968bedaa1beafb4',
301
299
  sceneId: 'basicShoppingProcess',
302
300
  })
303
301
  .then((res) => {
304
302
  const { errno, data } = res;
305
303
  console.log('taro动态化获取松果appGetJdLbsCacheAddressRes,返回结果', errno, data, res);
306
304
  if (errno === 0 && data) {
307
305
  const { lat, lng, provinceId, cityId, districtId, townId } =
308
306
  data || {};
309
307
  let realTimeArea = '';
310
308
  this.info.sysInfo['srclat'] = `${lat || ''}`;
311
309
  this.info.sysInfo['srclng'] = `${lng || ''}`;
312
310
  const getProvinceIdNum = provinceId ? Number(provinceId) : 0;
313
311
  if (getProvinceIdNum && getProvinceIdNum > 0) {
314
312
  realTimeArea = `${getProvinceIdNum}_${cityId || 0}_${districtId || 0}_${townId || 0}`;
315
313
  this.info.pageInfo['userLbsAddress'] = realTimeArea;
316
314
  this.info.sysInfo['realTimeArea'] = realTimeArea;
317
315
  Taro.eventCenter.trigger(TaroEventType.USER_AREA_UPDATE, {
318
316
  realTimeArea: this.info.pageInfo.userLbsAddress,
319
317
  });
320
318
  } else {
321
319
  this.lbsAddressCachePromise = null;
322
320
  }
323
321
  const getValidRealTimeArea = realTimeArea !== '';
324
322
  resolve({
325
323
  lat: this.info.sysInfo['srclat'],
326
324
  lng: this.info.sysInfo['srclng'],
327
325
  realTimeArea: realTimeArea,
328
326
  ok: getValidRealTimeArea,
329
327
  msg: getValidRealTimeArea
330
328
  ? '成功'
331
329
  : '根据Taro.JDLocation.getCacheLocation底层获取lbs地址信息异常,详情见data',
332
330
  data: getValidRealTimeArea ? null : res,
333
331
  });
334
332
  } else {
335
333
  if (typeof res === 'object') {
336
334
  draBusinessCustomReport({
337
335
  type: 'taro_JDLocation_getCacheLocation_info_err',
338
336
  errMsg: '根据Taro.JDLocation.getCacheLocation底层获取lbs地址信息异常异常',
339
337
  originReqDataStr: JSON.stringify(res),
340
338
  });
341
339
  }
342
340
  this.lbsAddressCachePromise = null;
343
341
  resolve({ realTimeArea: '', ok: false });
344
342
  }
345
343
  })
346
344
  .catch((error) => {
347
345
  console.error('Taro.JDLocation.getCacheLocation error:', error);
348
346
  draBusinessCustomReport({
349
347
  type: 'taro_JDLocation_getCacheLocation_info_err',
350
348
  errMsg: '根据Taro.JDLocation.getCacheLocation底层获取lbs地址信息catch异常',
351
349
  });
352
350
  this.lbsAddressCachePromise = null;
353
351
  resolve({ realTimeArea: '', ok: false });
354
352
  });
355
353
  });
356
354
  }
357
355
  return this.lbsAddressCachePromise;
358
356
  }
359
357
 
360
358
  updatePageAndLogInfo(updateQuery = {}) {
361
359
  const createUpdateQueryInfo: {
362
360
  query: {
363
361
  shopId?: string | number;
364
362
  venderId?: string | number;
365
363
  };
366
364
  updateShopInfoState: boolean;
367
365
  } = Object.assign(
368
366
  {},
369
367
  {
370
368
  query: {},
371
369
  updateShopInfoState: false,
372
370
  },
373
371
  updateQuery,
374
372
  );
375
373
  console.log(
376
374
  '获取当前下发的店铺查询参数',
377
375
  updateQuery,
378
376
  '获取之前保存的shopInfo店铺查询参数',
379
377
  this.info?.shopInfo,
380
378
  );
381
379
  const { query, updateShopInfoState } = createUpdateQueryInfo;
382
380
  const { shopId, venderId } = query;
383
381
  if (updateShopInfoState) {
384
382
  this.info.queryInfo = {
385
383
  ...this.info.queryInfo,
386
384
  ...query,
387
385
  };
388
386
  if (shopId && venderId) {
389
387
  this.info.shopInfo = {
390
388
  shopId: `${shopId}`,
391
389
  venderId: `${venderId}`,
392
390
  };
393
391
  }
394
392
  } else {
395
393
  this.info.queryInfo = {
396
394
  ...query,
397
395
  };
398
396
  this.info.originQueryInfo = {
399
397
  ...query,
400
398
  };
401
399
  if (
402
400
  this.info.shopInfo?.shopId &&
403
401
  this.info.shopInfo?.venderId &&
404
402
  (this.info.shopInfo.shopId == shopId || this.info.shopInfo.venderId == venderId)
405
403
  ) {
406
404
  this.info.queryInfo.shopId = this.info.shopInfo.shopId;
407
405
  this.info.queryInfo.venderId = this.info.shopInfo.venderId;
408
406
  console.log(
409
407
  '当前存储的店铺shopId和venderId与下发的店铺信息shopId或者venderId为同一个,补充shopId或者venderId查询参数',
410
408
  this.info.queryInfo,
411
409
  );
412
410
  }
413
411
  }
414
412
  this.info.queryInfo['shopId'] &&
415
413
  (this.info.queryInfo['shopId'] = `${this.info.queryInfo['shopId']}`);
416
414
  this.info.queryInfo['venderId'] &&
417
415
  (this.info.queryInfo['venderId'] = `${this.info.queryInfo['venderId']}`);
418
416
  console.log(
419
417
  'dynamic===获取店铺下发查询参数\n',
420
418
  query,
421
419
  '\n获取店铺最后查询参数\n',
422
420
  this.info.queryInfo,
423
421
  '\n是否为更新店铺状态\n',
424
422
  updateShopInfoState,
425
423
  );
426
424
  }
427
425
 
428
426
  getDynamicConfig(key: string) {
429
427
  console.warn('调用微信小程序的 getDynamicConfig(),注意,此方法还未实现!');
430
428
  return null;
431
429
  }
432
430
  renderNextTickLoadSdk() {
433
431
  console.warn('暂未实现 index.weapp.ts');
434
432
  }
435
433
  loadOtherSdk() {
436
434
  console.warn('暂未实现 index.weapp.ts');
437
435
  }
438
436
  loadItemSdkPromise() {
439
437
  console.warn('暂未实现 index.weapp.ts');
440
438
  }
@@ -1,126 +0,0 @@
1
-
2
- .d-dialog-layout {
3
- position: fixed;
4
- top: 0;
5
- right: 0;
6
- left: 0;
7
- bottom: 0;
8
- background: rgba(0, 0, 0, 0.5);
9
- z-index: 222;
10
- .d-dialog-wrap {
11
- position: relative;
12
- width: 100%;
13
- height: 100%;
14
- opacity: 0.01;
15
- transform: scale(0);
16
- animation: zoomIn 250ms ease-in-out;
17
- animation-fill-mode: forwards;
18
- box-sizing: border-box;
19
- &.d-dialog-jdapp-wrap{
20
- padding-bottom: 80px;
21
- }
22
- }
23
- .d-dialog-content {
24
- padding-top: 30px;
25
- width: 80%;
26
- background-color: #fff;
27
- border-radius: 18px;
28
- overflow: hidden;
29
- }
30
- .d-dialog-header {
31
- padding: 12px 30px;
32
- margin: 0;
33
- line-height: 44px;
34
- font-size: 32px;
35
- color: #333;
36
- text-align: center;
37
- }
38
- .d-dialog-body {
39
- padding: 30px;
40
- font-size: 32px;
41
- color: #333;
42
- overflow: auto;
43
- text-align: center;
44
- }
45
- .d-dialog-footer {
46
- position: relative;
47
- display: flex;
48
- flex-direction: row;
49
- border-top: 1px solid #dadada;
50
- &.d-dialog-footer-btn-line{
51
- &:after {
52
- content: '';
53
- position: absolute;
54
- display: flex;
55
- top: 0;
56
- left: 50%;
57
- width: 1px;
58
- height: 100%;
59
- background-color: #dadada;
60
- z-index: 2;
61
- }
62
- }
63
- .d-dialog-btn {
64
- position: relative;
65
- margin: 0;
66
- display: block;
67
- height: 88px;
68
- line-height: 88px;
69
- font-size: 30px;
70
- text-align: center;
71
- color: #e93b3d;
72
- overflow: hidden;
73
- text-overflow: ellipsis;
74
- white-space: nowrap;
75
- box-sizing: border-box;
76
- background-color: #fff;
77
- border-radius: 0;
78
- }
79
- .d-dialog-cancel-btn {
80
- color: #000;
81
- }
82
- }
83
- }
84
- @-webkit-keyframes zoomIn {
85
- from {
86
- opacity: 0;
87
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
88
- transform: scale3d(0.3, 0.3, 0.3);
89
- }
90
- 80% {
91
- opacity: 0.95;
92
- -webkit-transform: scale3d(1.05, 1.05, 1.05);
93
- transform: scale3d(1.05, 1.05, 1.05);
94
- }
95
-
96
- 100% {
97
- opacity: 1;
98
- transform: scale3d(1, 1, 1);
99
- }
100
- }
101
- @keyframes zoomIn {
102
- from {
103
- opacity: 0;
104
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
105
- transform: scale3d(0.3, 0.3, 0.3);
106
- }
107
- 80% {
108
- opacity: 0.95;
109
- transform: scale3d(1.05, 1.05, 1.05);
110
- }
111
- 100% {
112
- opacity: 1;
113
- transform: scale3d(1, 1, 1);
114
- }
115
- }
116
- :global{
117
- .d-shop-pad{
118
- :local{
119
-
120
- .d-dialog-content{
121
- max-width: 520PX;
122
- }
123
- }
124
- }
125
-
126
- }