@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.
- package/dist/api/index.ts +1 -1
- package/dist/common/accessibility.h5.ts +1 -0
- package/dist/common/accessibility.ts +0 -0
- package/dist/common/const.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/jdplayerSdk.weapp.tsx +1 -0
- package/dist/common/jssdk.weapp.ts +1 -0
- package/dist/common/pageType.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/JdLoading/index.module.scss +0 -2
- package/dist/components/base/JdLoading/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +18 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
- package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
- package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
- package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -1
- package/dist/config/env.ts +1 -1
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/interface/jumpEventReport.ts +1 -1
- package/dist/interface/service.ts +1 -1
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web/report.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/jumpEventReport/web.pc.ts +1 -1
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/language/en_US.json +179 -83
- package/dist/language/zh_CN.json +178 -82
- package/dist/language/zh_HK.json +178 -82
- package/dist/libs/openShopBridge.js +161 -0
- package/dist/libs/openShopBridge.min.js +1 -0
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/shopMember.weapp.ts +1 -0
- package/dist/open/api/track.ts +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/dist/open/index.ts +1 -1
- package/dist/sass/app.h5.scss +6 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -1
- package/dist/service/fetchJsonp.ts +1 -1
- package/dist/service/fetchJsonp.weapp.ts +1 -0
- package/dist/service/http/h5Http.ts +1 -1
- package/dist/service/http/http.ts +1 -1
- package/dist/service/http/httpInterceptors.weapp.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -1
- package/dist/service/requestServer.ts +1 -1
- package/dist/service/requestServer.weapp.ts +1 -1
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/harmonyCallRouter.h5.ts +1 -0
- package/dist/utils/harmonyCallRouter.ts +0 -0
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/intersectionObserver.ts +1 -1
- package/dist/utils/sColor.weapp.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +13 -15
- package/dist/common/index.dynamic.ts +0 -1
- package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
- package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
- package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
- package/dist/components/base/DynamicTest/index.module.scss +0 -16
- package/dist/components/base/DynamicTest/index.tsx +0 -1
- package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
- package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
- package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
- package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
- package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
- package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
- package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
- package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
- package/dist/jumpEventReport/index.dynamic.ts +0 -1
- package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
- package/dist/open/api/shopMember.dynamic.ts +0 -1
- package/dist/open/components/index.dynamic.ts +0 -1
- package/dist/sass/app.dynamic.scss +0 -306
- package/dist/service/fetchGateway.h5.ts +0 -1
- package/dist/service/fetchJsonp.h5.ts +0 -1
- package/dist/service/http/colorSign.dynamic.ts +0 -1
- package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
- package/dist/utils/priceUtils.js +0 -1
- /package/dist/utils/{sColor.js → sColor.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro';
|
|
2
1
|
isDynamic,
|
|
3
2
|
isLanguageForEn,
|
|
4
3
|
isJdApp,
|
|
5
4
|
showSuccessToast,
|
|
6
5
|
showFailToast,
|
|
7
6
|
isPc,
|
|
8
7
|
draInterfaceCustomReport,
|
|
9
8
|
isAndroidDevice,
|
|
10
9
|
draBusinessCustomReport,
|
|
11
10
|
cookiesStr: '',
|
|
12
11
|
requestHeaderContentType: {
|
|
13
12
|
jsonHeader: {
|
|
14
13
|
'content-type': 'application/json;charset=utf-8',
|
|
15
14
|
},
|
|
16
15
|
formDataHeader: {
|
|
17
16
|
'content-type': 'application/x-www-form-urlencoded',
|
|
18
17
|
},
|
|
19
18
|
},
|
|
20
19
|
requestBaseParam: {
|
|
21
20
|
data: null,
|
|
22
21
|
header: {
|
|
23
22
|
'content-type': 'application/json;charset=utf-8',
|
|
24
23
|
},
|
|
25
24
|
},
|
|
26
25
|
timeOut: 7000,
|
|
27
26
|
apiClientParams: {
|
|
28
27
|
appid: 'wx_mini_app',
|
|
29
28
|
clientVersion: '11.0.0',
|
|
30
29
|
client: 'wh5',
|
|
31
30
|
area: '1_72_2799_0',
|
|
32
31
|
uuid: '-1',
|
|
33
32
|
loginType: '11',
|
|
34
33
|
},
|
|
35
34
|
public addressFetchInfo: {
|
|
36
35
|
reqState: boolean;
|
|
37
36
|
promiseInstance: null | Promise<any>;
|
|
38
37
|
};
|
|
39
38
|
public getPromotionConfig: {
|
|
40
39
|
projectId: null | string | number;
|
|
41
40
|
pageId: null | string | number;
|
|
42
41
|
};
|
|
43
42
|
public resInfo: ServiceInterFace.HttpRequestInfo;
|
|
44
43
|
public api: ServiceInterFace.HttpApi;
|
|
45
44
|
public isPageDomain: boolean;
|
|
46
45
|
public verifyColorList: string[];
|
|
47
46
|
constructor(opt) {
|
|
48
47
|
this._init();
|
|
49
48
|
this.addressFetchInfo = {
|
|
50
49
|
reqState: false,
|
|
51
50
|
promiseInstance: null,
|
|
52
51
|
};
|
|
53
52
|
this.getPromotionConfig = {
|
|
54
53
|
projectId: null,
|
|
55
54
|
pageId: null,
|
|
56
55
|
};
|
|
57
56
|
this._userAreaUpdateListen();
|
|
58
57
|
this.resInfo = this._getResConfig(opt);
|
|
59
58
|
this.api = api;
|
|
60
59
|
this.isPageDomain = false;
|
|
61
60
|
this.verifyColorList = [];
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
_init(): void {
|
|
65
64
|
!isDynamic &&
|
|
66
65
|
httpInterceptors.forEach((item) => {
|
|
67
66
|
Taro.addInterceptor((chain) => item(chain));
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
69
|
_getResConfig(opt = {}): ServiceInterFace.HttpRequestInfo {
|
|
71
70
|
return Object.assign({}, DefaultConfig, opt);
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
_userAreaUpdateListen() {
|
|
75
74
|
Taro.eventCenter.on(TaroEventType.USER_AREA_UPDATE, (areaInfo) => {
|
|
76
75
|
this.updateApiClientParamsResInfo(areaInfo);
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
78
|
updateApiClientParamsResInfo(opt = {}) {
|
|
80
79
|
const { area, realTimeArea, ...others } = opt;
|
|
81
80
|
this.resInfo.apiClientParams = {
|
|
82
81
|
...this.resInfo.apiClientParams,
|
|
83
82
|
...others,
|
|
84
83
|
};
|
|
85
84
|
area && area !== '' && (this.resInfo.apiClientParams.area = area);
|
|
86
85
|
realTimeArea &&
|
|
87
86
|
realTimeArea !== '' &&
|
|
88
87
|
(this.resInfo.apiClientParams.realTimeArea = realTimeArea);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
gatewayReq(functionId: string, bodyParams = {}, clientParams = {}): Promise<any> {
|
|
92
91
|
if (functionId === 'receiveShopCoupon') {
|
|
93
92
|
clientParams = Object.assign(
|
|
94
93
|
{},
|
|
95
94
|
{
|
|
96
95
|
loginType: '1',
|
|
97
96
|
loginWQBiz: WXAPP_BIZ_KEY,
|
|
98
97
|
},
|
|
99
98
|
clientParams,
|
|
100
99
|
);
|
|
101
100
|
}
|
|
102
101
|
const apiClientParams = Object.assign({}, this.resInfo.apiClientParams, clientParams);
|
|
103
102
|
const getReqData = {
|
|
104
103
|
functionId: functionId,
|
|
105
104
|
body: JSON.stringify(bodyParams),
|
|
106
105
|
t: Date.now(),
|
|
107
106
|
...apiClientParams,
|
|
108
107
|
};
|
|
109
108
|
return http
|
|
110
109
|
.request({
|
|
111
110
|
url: this.api.apiFunc,
|
|
112
111
|
data: getReqData,
|
|
113
112
|
isColorVerify: false,
|
|
114
113
|
})
|
|
115
114
|
.then((res: ServiceInterFace.RequestPromiseRes) => {
|
|
116
115
|
const { statusCode, data, status, msg } = res;
|
|
117
116
|
let changeRes: ServiceInterFace.RequestResponseFormatRes = {
|
|
118
117
|
ok: true,
|
|
119
118
|
};
|
|
120
119
|
if ((statusCode === 200 || status === '0') && data) {
|
|
121
120
|
changeRes = this.dealResponseFormatRes(data, getReqData);
|
|
122
121
|
return changeRes;
|
|
123
122
|
} else {
|
|
124
123
|
draInterfaceCustomReport({
|
|
125
124
|
...getReqData,
|
|
126
125
|
...res,
|
|
127
126
|
source: 'remote',
|
|
128
127
|
});
|
|
129
128
|
changeRes = {
|
|
130
129
|
...data,
|
|
131
130
|
statusCode,
|
|
132
131
|
status,
|
|
133
132
|
msg,
|
|
134
133
|
ok: false,
|
|
135
134
|
};
|
|
136
135
|
return changeRes;
|
|
137
136
|
}
|
|
138
137
|
})
|
|
139
138
|
.catch((res) => {
|
|
140
139
|
const propertyNames = Object.getOwnPropertyNames(res);
|
|
141
140
|
const resObject = {};
|
|
142
141
|
propertyNames.forEach((propertyName) => {
|
|
143
142
|
resObject[propertyName] = res[propertyName];
|
|
144
143
|
});
|
|
145
144
|
draInterfaceCustomReport({
|
|
146
145
|
...getReqData,
|
|
147
146
|
...resObject,
|
|
148
147
|
source: 'remote',
|
|
149
148
|
});
|
|
150
149
|
return {
|
|
151
150
|
...resObject,
|
|
152
151
|
ok: false,
|
|
153
152
|
} as ServiceInterFace.RequestResponseFormatRes;
|
|
154
153
|
});
|
|
155
154
|
}
|
|
156
155
|
|
|
157
156
|
dealResponseFormatRes(data, reqData) {
|
|
158
157
|
let changeRes: ServiceInterFace.RequestResponseFormatRes = {
|
|
159
158
|
ok: true,
|
|
160
159
|
};
|
|
161
160
|
const resCode = Object.prototype.hasOwnProperty.call(data, 'code') ? Number(data.code) : -1;
|
|
162
161
|
const subCode = Object.prototype.hasOwnProperty.call(data, 'subCode')
|
|
163
162
|
? Number(data.subCode)
|
|
164
163
|
: -1;
|
|
165
164
|
if (
|
|
166
165
|
data.success === true ||
|
|
167
166
|
data.isSuccess ||
|
|
168
167
|
resCode === 0 ||
|
|
169
168
|
resCode === 200 ||
|
|
170
169
|
subCode === 0
|
|
171
170
|
) {
|
|
172
171
|
changeRes = {
|
|
173
172
|
result: Object.prototype.hasOwnProperty.call(data, 'result')
|
|
174
173
|
? data.result
|
|
175
174
|
: Object.prototype.hasOwnProperty.call(data, 'data')
|
|
176
175
|
? data.data
|
|
177
176
|
: data,
|
|
178
177
|
code: data.code ?? 200,
|
|
179
178
|
ok: true,
|
|
180
179
|
source: data,
|
|
181
180
|
};
|
|
182
181
|
return changeRes;
|
|
183
182
|
} else {
|
|
184
183
|
changeRes = {
|
|
185
184
|
...data,
|
|
186
185
|
ok: false,
|
|
187
186
|
};
|
|
188
187
|
if (reqData && resCode !== 3) {
|
|
189
188
|
draInterfaceCustomReport({
|
|
190
189
|
...reqData,
|
|
191
190
|
...data,
|
|
192
191
|
source: 'remote',
|
|
193
192
|
});
|
|
194
193
|
}
|
|
195
194
|
return changeRes;
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
197
|
|
|
199
198
|
async receiveCoupon(param = {}, clientParams) {
|
|
200
199
|
console.warn('receiveCoupon 方法在微信京购小程序环境未经验证,请不要使用!');
|
|
201
200
|
return await this.gatewayReq(
|
|
202
201
|
'receiveShopCoupon',
|
|
203
202
|
{
|
|
204
203
|
operation: '3',
|
|
205
204
|
...param,
|
|
206
205
|
},
|
|
207
206
|
{ ...clientParams },
|
|
208
207
|
);
|
|
209
208
|
}
|
|
210
209
|
|
|
211
210
|
getCustomerCenterDispatch(params = {}) {
|
|
212
211
|
return this.gatewayReq('customerCenterDispatch', params, {
|
|
213
212
|
clientVersion: '9.2.0',
|
|
214
213
|
client: 'H5',
|
|
215
214
|
uuid: 88888,
|
|
216
215
|
appid: 'shopmember_m_jd_com',
|
|
217
216
|
});
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
batchAddCart(...args) {
|
|
221
220
|
let skuIds, num, showToast, giftCard;
|
|
222
221
|
if (['number', 'string'].includes(typeof args[0])) {
|
|
223
222
|
[skuIds, num = 1, showToast = true, giftCard = false] = args;
|
|
224
223
|
} else if (typeof args[0] === 'object' && args[0] !== null) {
|
|
225
224
|
const params = args[0];
|
|
226
225
|
skuIds = params.skuIds;
|
|
227
226
|
num = params.num || 1;
|
|
228
227
|
showToast = params.showToast !== undefined ? params.showToast : true;
|
|
229
228
|
giftCard = params.giftCard !== undefined ? params.giftCard : false;
|
|
230
229
|
} else {
|
|
231
230
|
console.error('batchAddCart() Invalid arguments!', args);
|
|
232
231
|
const msg = isLanguageForEn ? 'Please retry later' : '加入购物车失败,请稍后重试!';
|
|
233
232
|
showFailToast({
|
|
234
233
|
title: msg,
|
|
235
234
|
});
|
|
236
235
|
return Promise.resolve({
|
|
237
236
|
ok: false,
|
|
238
237
|
msg,
|
|
239
238
|
});
|
|
240
239
|
}
|
|
241
240
|
const successMsg = giftCard
|
|
242
241
|
? global?.languageJsonData?.successAddShopList || '加入购物清单成功'
|
|
243
242
|
: global?.languageJsonData?.successAddCart || '加入购物车成功';
|
|
244
243
|
const failMsg = giftCard
|
|
245
244
|
? global?.languageJsonData?.failAddShopList || '加入购物清单失败,请稍后重试'
|
|
246
245
|
: global?.languageJsonData?.failAddCart || '加入购物车失败,请稍后重试';
|
|
247
246
|
if (skuIds) {
|
|
248
247
|
return this._addShopGoodCart(`${skuIds}`, `${num}`, { giftCard })
|
|
249
248
|
.then((res: ServiceInterFace.SkuToCartDataRes) => {
|
|
250
249
|
if (res?.ok) {
|
|
251
250
|
if (showToast && !res?.isOpenApp)
|
|
252
251
|
showSuccessToast({
|
|
253
252
|
title: successMsg,
|
|
254
253
|
});
|
|
255
254
|
} else {
|
|
256
255
|
showToast &&
|
|
257
256
|
showFailToast({
|
|
258
257
|
title: res?.errMsg || failMsg,
|
|
259
258
|
});
|
|
260
259
|
}
|
|
261
260
|
return Promise.resolve(res);
|
|
262
261
|
})
|
|
263
262
|
.catch((e) => {
|
|
264
263
|
console.log('调用加购方法异常=======>', e);
|
|
265
264
|
return Promise.resolve({
|
|
266
265
|
ok: false,
|
|
267
266
|
msg: failMsg,
|
|
268
267
|
});
|
|
269
268
|
});
|
|
270
269
|
} else {
|
|
271
270
|
return Promise.resolve({
|
|
272
271
|
ok: false,
|
|
273
272
|
msg: failMsg,
|
|
274
273
|
});
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
276
|
|
|
278
277
|
async giftCardAddCart(skuList, num) {
|
|
279
278
|
const loginType = isPc ? { loginType: 3 } : {};
|
|
280
279
|
return this.gatewayReq(
|
|
281
280
|
'giftCardAddCart',
|
|
282
281
|
{
|
|
283
282
|
skuList,
|
|
284
283
|
num: Number(num),
|
|
285
284
|
},
|
|
286
285
|
{ ...loginType },
|
|
287
286
|
);
|
|
288
287
|
}
|
|
289
288
|
|
|
290
289
|
_addShopGoodCart(skuIdsStr, addCardNum = '1', { giftCard }) {
|
|
291
290
|
return new Promise((resolve) => {
|
|
292
291
|
const productIdsArr = skuIdsStr ? `${skuIdsStr}`.split(',') : [];
|
|
293
292
|
if (productIdsArr.length > 0) {
|
|
294
293
|
if (giftCard) {
|
|
295
294
|
this.giftCardAddCart(productIdsArr, addCardNum)
|
|
296
295
|
.then((res) => {
|
|
297
296
|
if (res?.code === '0' && res?.result?.value) {
|
|
298
297
|
resolve({
|
|
299
298
|
ok: true,
|
|
300
299
|
});
|
|
301
300
|
} else {
|
|
302
301
|
resolve({
|
|
303
302
|
ok: false,
|
|
304
303
|
msg: '加购失败,请稍后重试',
|
|
305
304
|
});
|
|
306
305
|
}
|
|
307
306
|
})
|
|
308
307
|
.catch((e) => {
|
|
309
308
|
console.error('礼品卡加车失败: ', e);
|
|
310
309
|
resolve({
|
|
311
310
|
ok: false,
|
|
312
311
|
msg: '加购失败,请稍后重试',
|
|
313
312
|
});
|
|
314
313
|
});
|
|
315
314
|
} else if (isJdApp && isDynamic) {
|
|
316
315
|
const productsAddCartList = productIdsArr.map((skuItem) => {
|
|
317
316
|
const extFlag = {};
|
|
318
317
|
return isAndroidDevice
|
|
319
318
|
? {
|
|
320
319
|
sku: skuItem,
|
|
321
320
|
num: addCardNum,
|
|
322
321
|
extFlag,
|
|
323
322
|
}
|
|
324
323
|
: {
|
|
325
324
|
productCode: skuItem,
|
|
326
325
|
buyCount: addCardNum,
|
|
327
326
|
extFlag,
|
|
328
327
|
};
|
|
329
328
|
});
|
|
330
329
|
const addCartRouterParams = {
|
|
331
330
|
url: isAndroidDevice ? `router://JDCartModule/addCartUniformWithUrl?wareList=${JSON.stringify(productsAddCartList)}&businessName=storeModel` : 'router://JDCartModule/batchAddService',
|
|
332
331
|
params: isAndroidDevice ? {
|
|
333
332
|
wareList: productsAddCartList,
|
|
334
333
|
} : {
|
|
335
334
|
sourceType: 'h5',
|
|
336
335
|
sourceValue: '店铺批量加购',
|
|
337
336
|
businessName: 'storeModel',
|
|
338
337
|
isNewMode: '1',
|
|
339
338
|
NotPassWebview: '1',
|
|
340
339
|
products: productsAddCartList,
|
|
341
340
|
}
|
|
342
341
|
}
|
|
343
342
|
Taro.JDRouter.callRouter({
|
|
344
343
|
...addCartRouterParams,
|
|
345
344
|
success: (res) => {
|
|
346
345
|
console.log('taro 动态化店铺批量加购成功结果', res);
|
|
347
346
|
const { errno, errMsg, data } = res || {};
|
|
348
347
|
const isOk = isAndroidDevice ? errno === 0 : errno === 0 && data?.code === 0
|
|
349
348
|
if (isOk) {
|
|
350
349
|
Taro.eventCenter.trigger(TaroEventType.UPDATE_CART,data?.response || data || res)
|
|
351
350
|
resolve({
|
|
352
351
|
ok: true,
|
|
353
352
|
msg: '已加入购物车!',
|
|
354
353
|
});
|
|
355
354
|
} else {
|
|
356
355
|
resolve({
|
|
357
356
|
ok: false,
|
|
358
357
|
msg: '批量加车失败,请稍后重试',
|
|
359
358
|
errMsg: data?.message || errMsg || "",
|
|
360
359
|
});
|
|
361
360
|
const reportData = {
|
|
362
361
|
type: 'batchAddCart',
|
|
363
362
|
subType: 'addCartFailByTaroDynamicCallIosNative',
|
|
364
363
|
errMsg: 'taro 动态化 调用原生加车失败',
|
|
365
364
|
platform: global.info?.sysInfo?.platform,
|
|
366
365
|
originData: typeof res === 'object' ? JSON.stringify(res) : res,
|
|
367
366
|
};
|
|
368
367
|
draBusinessCustomReport(reportData);
|
|
369
368
|
}
|
|
370
369
|
},
|
|
371
370
|
fail: (res) => {
|
|
372
371
|
const data = {
|
|
373
372
|
type: 'batchAddCart',
|
|
374
373
|
subType: 'addCartFailByTaroDynamicCallIosNative',
|
|
375
374
|
errMsg: 'taro 动态化 调用原生加车失败',
|
|
376
375
|
platform: global.info?.sysInfo?.platform,
|
|
377
376
|
originData: typeof res === 'object' ? JSON.stringify(res) : res,
|
|
378
377
|
};
|
|
379
378
|
draBusinessCustomReport(data);
|
|
380
379
|
},
|
|
381
380
|
});
|
|
382
381
|
}
|
|
383
382
|
} else {
|
|
384
383
|
resolve({
|
|
385
384
|
ok: false,
|
|
386
385
|
msg: '加购sku不能为空',
|
|
387
386
|
});
|
|
388
387
|
}
|
|
389
388
|
});
|
|
390
389
|
}
|
|
391
390
|
|
|
392
391
|
productAddToCart() {
|
|
393
392
|
return Promise.resolve({
|
|
394
393
|
ok: false,
|
|
395
394
|
msg: 'productAddToCart暂不支持小程序',
|
|
396
395
|
});
|
|
397
396
|
}
|
|
397
|
+
import Taro from '@tarojs/taro';
|
|
398
398
|
APPID,
|
|
399
399
|
JshopxColorFunctionIdList,
|
|
400
400
|
PagesColorFunctionIdList,
|
|
401
401
|
PAGES_DOMAIN,
|
|
402
402
|
B2BColorFunctionIdList,
|
|
403
403
|
MobileVerifyColorList,
|
|
404
404
|
AppVerifyColorList,
|
|
405
405
|
JshopxVerifyColorList,
|
|
406
406
|
BMallVerifyColorList,
|
|
407
407
|
shopMemberColorFunctionIdList,
|
|
408
408
|
isLanguageForEn,
|
|
409
409
|
isJdApp,
|
|
410
410
|
isIosDevice,
|
|
411
411
|
isAndroidDevice,
|
|
412
412
|
showSuccessToast,
|
|
413
413
|
showFailToast,
|
|
414
414
|
isH5,
|
|
415
415
|
isWxMinAndWxapp,
|
|
416
416
|
isMin,
|
|
417
417
|
isPc,
|
|
418
418
|
cookiesStr: '',
|
|
419
419
|
requestHeaderContentType: {
|
|
420
420
|
jsonHeader: {
|
|
421
421
|
'content-type': 'application/json;charset=utf-8',
|
|
422
422
|
},
|
|
423
423
|
formDataHeader: {
|
|
424
424
|
'content-type': 'application/x-www-form-urlencoded',
|
|
425
425
|
},
|
|
426
426
|
},
|
|
427
427
|
requestBaseParam: {
|
|
428
428
|
data: null,
|
|
429
429
|
header: {
|
|
430
430
|
'content-type': 'application/json;charset=utf-8',
|
|
431
431
|
},
|
|
432
432
|
},
|
|
433
433
|
timeOut: 7000,
|
|
434
434
|
apiClientParams: {
|
|
435
435
|
appid: 'wx_mini_app',
|
|
436
436
|
clientVersion: '11.0.0',
|
|
437
437
|
client: 'wh5',
|
|
438
438
|
area: '1_72_2799_0',
|
|
439
439
|
screen: `${Math.ceil(
|
|
440
440
|
getSystemInfo?.screenWidth * devicePixelRatio,
|
|
441
441
|
)}*${Math.ceil(getSystemInfo?.screenHeight * devicePixelRatio)}`,
|
|
442
442
|
uuid: UUID,
|
|
443
443
|
loginType: '11',
|
|
444
444
|
},
|
|
445
445
|
public addressFetchInfo: {
|
|
446
446
|
reqState: boolean
|
|
447
447
|
promiseInstance: null | Promise<any>
|
|
448
448
|
}
|
|
449
449
|
public getPromotionConfig: {
|
|
450
450
|
projectId: null | string | number
|
|
451
451
|
pageId: null | string | number
|
|
452
452
|
}
|
|
453
453
|
public resInfo: ServiceInterFace.HttpRequestInfo
|
|
454
454
|
public api: ServiceInterFace.HttpApi
|
|
455
455
|
public isPageDomain: boolean
|
|
456
456
|
public verifyColorList: string[]
|
|
457
457
|
constructor(opt) {
|
|
458
458
|
this._init()
|
|
459
459
|
this.addressFetchInfo = {
|
|
460
460
|
reqState: false,
|
|
461
461
|
promiseInstance: null,
|
|
462
462
|
}
|
|
463
463
|
this.getPromotionConfig = {
|
|
464
464
|
projectId: null,
|
|
465
465
|
pageId: null,
|
|
466
466
|
}
|
|
467
467
|
this._userAreaUpdateListen()
|
|
468
468
|
this.resInfo = this._getResConfig(opt)
|
|
469
469
|
this.api = api
|
|
470
470
|
this.isPageDomain = isH5
|
|
471
471
|
? window?.location?.hostname === PAGES_DOMAIN
|
|
472
472
|
: false
|
|
473
473
|
this.verifyColorList = [
|
|
474
474
|
...MobileVerifyColorList,
|
|
475
475
|
...AppVerifyColorList,
|
|
476
476
|
...JshopxVerifyColorList,
|
|
477
477
|
...BMallVerifyColorList,
|
|
478
478
|
]
|
|
479
479
|
}
|
|
480
480
|
_init(): void {
|
|
481
481
|
httpInterceptors.forEach((item) => {
|
|
482
482
|
Taro.addInterceptor((chain) => item(chain))
|
|
483
483
|
})
|
|
484
484
|
}
|
|
485
485
|
_getResConfig(opt = {}): ServiceInterFace.HttpRequestInfo {
|
|
486
486
|
return Object.assign({}, DefaultConfig, opt)
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
_userAreaUpdateListen() {
|
|
490
490
|
Taro.eventCenter.on(TaroEventType.USER_AREA_UPDATE, (areaInfo) => {
|
|
491
491
|
this.updateApiClientParamsResInfo(areaInfo);
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
updateApiClientParamsResInfo(opt = {}) {
|
|
495
495
|
const { area, realTimeArea, ...others } = opt;
|
|
496
496
|
this.resInfo.apiClientParams = {
|
|
497
497
|
...this.resInfo.apiClientParams,
|
|
498
498
|
...others,
|
|
499
499
|
};
|
|
500
500
|
area && area !== '' && (this.resInfo.apiClientParams.area = area);
|
|
501
501
|
realTimeArea &&
|
|
502
502
|
realTimeArea !== '' &&
|
|
503
503
|
(this.resInfo.apiClientParams.realTimeArea = realTimeArea);
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
checkFunctionIdToReturnAppId(functionId) {
|
|
507
507
|
if (JshopxColorFunctionIdList.includes(functionId)) {
|
|
508
508
|
return APPID.JSHOPX_COLOR_APPID
|
|
509
509
|
} else if (
|
|
510
510
|
this.isPageDomain &&
|
|
511
511
|
PagesColorFunctionIdList.includes(functionId)
|
|
512
512
|
) {
|
|
513
513
|
return APPID.PAGES_COLOR_APPID
|
|
514
514
|
} else if (shopMemberColorFunctionIdList.includes(functionId)) {
|
|
515
515
|
return APPID.SHOP_MEMBER_COLOR_APPID
|
|
516
516
|
} else if (B2BColorFunctionIdList.includes(functionId)) {
|
|
517
517
|
return APPID.B2B_COLOR_APPID
|
|
518
518
|
} else if (isPc) {
|
|
519
519
|
return APPID.MALL_COLOR_APPID
|
|
520
520
|
} else {
|
|
521
521
|
return APPID.SHOP_COLOR_APPID
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
gatewayReq(functionId: string, bodyParams = {}, clientParams = {}): Promise<any> {
|
|
526
526
|
if (functionId === 'receiveShopCoupon') {
|
|
527
527
|
clientParams = Object.assign(
|
|
528
528
|
{},
|
|
529
529
|
{
|
|
530
530
|
loginType: '1',
|
|
531
531
|
loginWQBiz: WXAPP_BIZ_KEY,
|
|
532
532
|
},
|
|
533
533
|
clientParams,
|
|
534
534
|
)
|
|
535
535
|
}
|
|
536
536
|
const apiClientParams = Object.assign(
|
|
537
537
|
{},
|
|
538
538
|
this.resInfo.apiClientParams,
|
|
539
539
|
clientParams,
|
|
540
540
|
)
|
|
541
541
|
const isColorVerify = this.verifyColorList.includes(functionId);
|
|
542
542
|
const getReqData = {
|
|
543
543
|
functionId: functionId,
|
|
544
544
|
body: JSON.stringify(bodyParams),
|
|
545
545
|
t: Date.now(),
|
|
546
546
|
...apiClientParams,
|
|
547
547
|
}
|
|
548
548
|
const requestParams = {
|
|
549
549
|
functionId: getReqData?.functionId,
|
|
550
550
|
body: getReqData?.body,
|
|
551
551
|
appid: getReqData?.appid,
|
|
552
552
|
client: getReqData?.client,
|
|
553
553
|
clientVersion: getReqData?.clientVersion,
|
|
554
554
|
area: getReqData?.area,
|
|
555
555
|
requestTimeStamp: getReqData?.t,
|
|
556
556
|
}
|
|
557
557
|
return http
|
|
558
558
|
.request({
|
|
559
559
|
url: this.api.apiFunc,
|
|
560
560
|
data: getReqData,
|
|
561
561
|
isColorVerify,
|
|
562
562
|
})
|
|
563
563
|
.then((res: ServiceInterFace.RequestPromiseRes) => {
|
|
564
564
|
const { statusCode, data, status, msg } = res
|
|
565
565
|
let changeRes: ServiceInterFace.RequestResponseFormatRes = {
|
|
566
566
|
ok: true,
|
|
567
567
|
}
|
|
568
568
|
if ((statusCode === 200 || status === '0') && data) {
|
|
569
569
|
changeRes = this.dealResponseFormatRes(data, getReqData)
|
|
570
570
|
return changeRes
|
|
571
571
|
} else {
|
|
572
572
|
changeRes = {
|
|
573
573
|
...data,
|
|
574
574
|
statusCode,
|
|
575
575
|
status,
|
|
576
576
|
msg,
|
|
577
577
|
ok: false,
|
|
578
578
|
}
|
|
579
579
|
return changeRes
|
|
580
580
|
}
|
|
581
581
|
})
|
|
582
582
|
.catch((res) => {
|
|
583
583
|
const propertyNames = Object.getOwnPropertyNames(res)
|
|
584
584
|
const resObject = {}
|
|
585
585
|
propertyNames.forEach((propertyName) => {
|
|
586
586
|
resObject[propertyName] = res[propertyName]
|
|
587
587
|
})
|
|
588
588
|
return {
|
|
589
589
|
...resObject,
|
|
590
590
|
ok: false,
|
|
591
591
|
} as ServiceInterFace.RequestResponseFormatRes
|
|
592
592
|
})
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
dealResponseFormatRes(data, reqData) {
|
|
596
596
|
let changeRes: ServiceInterFace.RequestResponseFormatRes = {
|
|
597
597
|
ok: true,
|
|
598
598
|
}
|
|
599
599
|
const resCode = Object.prototype.hasOwnProperty.call(data, 'code')
|
|
600
600
|
? Number(data.code)
|
|
601
601
|
: -1
|
|
602
602
|
const subCode = Object.prototype.hasOwnProperty.call(data, 'subCode')
|
|
603
603
|
? Number(data.subCode)
|
|
604
604
|
: -1
|
|
605
605
|
if (
|
|
606
606
|
data.success === true ||
|
|
607
607
|
data.isSuccess ||
|
|
608
608
|
resCode === 0 ||
|
|
609
609
|
resCode === 200 ||
|
|
610
610
|
subCode === 0
|
|
611
611
|
) {
|
|
612
612
|
changeRes = {
|
|
613
613
|
result: Object.prototype.hasOwnProperty.call(data, 'result')
|
|
614
614
|
? data.result
|
|
615
615
|
: Object.prototype.hasOwnProperty.call(data, 'data')
|
|
616
616
|
? data.data
|
|
617
617
|
: data,
|
|
618
618
|
code: data.code ?? 200,
|
|
619
619
|
ok: true,
|
|
620
620
|
source: data,
|
|
621
621
|
}
|
|
622
622
|
return changeRes
|
|
623
623
|
} else {
|
|
624
624
|
changeRes = {
|
|
625
625
|
...data,
|
|
626
626
|
ok: false,
|
|
627
627
|
}
|
|
628
628
|
if (reqData && resCode !== 3) {
|
|
629
629
|
const getReportMsgData = reqData['hybridId']
|
|
630
630
|
? {
|
|
631
631
|
subMsg: '预加载接口请求数据异常',
|
|
632
632
|
hybridId: reqData?.hybridId,
|
|
633
633
|
requestId: reqData?.requestId,
|
|
634
634
|
param: reqData?.param,
|
|
635
635
|
source: 'remote',
|
|
636
636
|
}
|
|
637
637
|
: {
|
|
638
638
|
subMsg: '接口请求返回数据异常',
|
|
639
639
|
functionId: reqData?.functionId,
|
|
640
640
|
code: resCode,
|
|
641
641
|
source: 'remote',
|
|
642
642
|
requestParams: {
|
|
643
643
|
functionId: reqData?.functionId,
|
|
644
644
|
body: reqData?.body,
|
|
645
645
|
appid: reqData?.appid,
|
|
646
646
|
client: reqData?.client,
|
|
647
647
|
clientVersion: reqData?.clientVersion,
|
|
648
648
|
area: reqData?.area,
|
|
649
649
|
requestTimeStamp: reqData?.t,
|
|
650
650
|
},
|
|
651
651
|
resData: data,
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
}
|
|
655
655
|
return changeRes
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
async receiveCoupon(param = {}, clientParams) {
|
|
660
660
|
console.warn('receiveCoupon 方法在微信京购小程序环境未经验证,请不要使用!');
|
|
661
661
|
return await this.gatewayReq(
|
|
662
662
|
'receiveShopCoupon',
|
|
663
663
|
{
|
|
664
664
|
operation: '3',
|
|
665
665
|
...param,
|
|
666
666
|
},
|
|
667
667
|
{ ...clientParams },
|
|
668
668
|
);
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
getCustomerCenterDispatch(params = {}) {
|
|
672
672
|
return this.gatewayReq('customerCenterDispatch', params, {
|
|
673
673
|
clientVersion: '9.2.0',
|
|
674
674
|
client: 'H5',
|
|
675
675
|
uuid: 88888,
|
|
676
676
|
appid: 'shopmember_m_jd_com',
|
|
677
677
|
})
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
batchAddCart(...args) {
|
|
681
681
|
let skuIds, num, showToast, giftCard;
|
|
682
682
|
if (['number', 'string'].includes(typeof args[0])) {
|
|
683
683
|
[skuIds, num = 1, showToast = true, giftCard = false] = args;
|
|
684
684
|
} else if (typeof args[0] === 'object' && args[0] !== null) {
|
|
685
685
|
const params = args[0];
|
|
686
686
|
skuIds = params.skuIds;
|
|
687
687
|
num = params.num || 1;
|
|
688
688
|
showToast = params.showToast !== undefined ? params.showToast : true;
|
|
689
689
|
giftCard = params.giftCard !== undefined ? params.giftCard : false;
|
|
690
690
|
} else {
|
|
691
691
|
console.error('batchAddCart() Invalid arguments!', args);
|
|
692
692
|
const msg = isLanguageForEn ? 'Please retry later' : '加入购物车失败,请稍后重试!';
|
|
693
693
|
showFailToast({
|
|
694
694
|
title: msg,
|
|
695
695
|
});
|
|
696
696
|
return Promise.resolve({
|
|
697
697
|
ok: false,
|
|
698
698
|
msg,
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
701
|
const addToWhereText = giftCard ? '购物清单' : '购物车';
|
|
702
702
|
const successMsg = isLanguageForEn ? 'Success' : `加入${addToWhereText}成功`;
|
|
703
703
|
const failMsg = isLanguageForEn
|
|
704
704
|
? 'Please retry later'
|
|
705
705
|
: `加入${addToWhereText}失败,请稍后重试!`;
|
|
706
706
|
if (skuIds) {
|
|
707
707
|
return this._addShopGoodCart(`${skuIds}`, `${num}`, { giftCard })
|
|
708
708
|
.then((res: ServiceInterFace.SkuToCartDataRes) => {
|
|
709
709
|
if (res?.ok) {
|
|
710
710
|
if (showToast && !res?.isOpenApp)
|
|
711
711
|
showSuccessToast({
|
|
712
712
|
title: successMsg,
|
|
713
713
|
});
|
|
714
714
|
} else {
|
|
715
715
|
showToast &&
|
|
716
716
|
showFailToast({
|
|
717
717
|
title: res?.errMsg || failMsg,
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
return Promise.resolve(res)
|
|
721
721
|
})
|
|
722
722
|
.catch((e) => {
|
|
723
723
|
console.log('调用加购方法异常=======>', e)
|
|
724
724
|
return Promise.resolve({
|
|
725
725
|
ok: false,
|
|
726
726
|
msg: failMsg,
|
|
727
727
|
});
|
|
728
728
|
});
|
|
729
729
|
} else {
|
|
730
730
|
return Promise.resolve({
|
|
731
731
|
ok: false,
|
|
732
732
|
msg: failMsg,
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
|
|
737
737
|
async giftCardAddCart(skuList, num) {
|
|
738
738
|
const loginType = isPc ? { loginType: 3 } : {};
|
|
739
739
|
return this.gatewayReq(
|
|
740
740
|
'giftCardAddCart',
|
|
741
741
|
{
|
|
742
742
|
skuList,
|
|
743
743
|
num: Number(num),
|
|
744
744
|
},
|
|
745
745
|
{ ...loginType },
|
|
746
746
|
);
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
_addShopGoodCart(skuIdsStr, addCardNum = '1', { giftCard }) {
|
|
750
750
|
return new Promise((resolve) => {
|
|
751
751
|
const productIdsArr = skuIdsStr ? `${skuIdsStr}`.split(',') : []
|
|
752
752
|
if (productIdsArr.length > 0) {
|
|
753
753
|
if (giftCard) {
|
|
754
754
|
this.giftCardAddCart(productIdsArr, addCardNum)
|
|
755
755
|
.then((res) => {
|
|
756
756
|
if (res?.code === '0' && res?.result?.value) {
|
|
757
757
|
resolve({
|
|
758
758
|
ok: true,
|
|
759
759
|
});
|
|
760
760
|
} else {
|
|
761
761
|
resolve({
|
|
762
762
|
ok: false,
|
|
763
763
|
msg: '加购失败,请稍后重试',
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
766
|
})
|
|
767
767
|
.catch((e) => {
|
|
768
768
|
console.error('礼品卡加车失败: ', e);
|
|
769
769
|
resolve({
|
|
770
770
|
ok: false,
|
|
771
771
|
msg: '加购失败,请稍后重试',
|
|
772
772
|
});
|
|
773
773
|
});
|
|
774
774
|
} else if (isJdApp) {
|
|
775
775
|
console.log('==========>', 'app原生批量加车!,小程序端暂不涉及');
|
|
776
776
|
} else if (isMin) {
|
|
777
777
|
console.log('==========>', '京购批量加车!')
|
|
778
778
|
const productsAddCartList = productIdsArr.map((skuItem) => {
|
|
779
779
|
return {
|
|
780
780
|
skuId: skuItem,
|
|
781
781
|
buyNum: addCardNum,
|
|
782
782
|
}
|
|
783
783
|
})
|
|
784
784
|
global.wxAppBizInstance
|
|
785
785
|
.addCart({ commArr: productsAddCartList })
|
|
786
786
|
.then((res) => {
|
|
787
787
|
console.log('dealCartSuccess: ', res)
|
|
788
788
|
resolve({
|
|
789
789
|
ok: true,
|
|
790
790
|
msg: '已加入购物车!',
|
|
791
791
|
data: res,
|
|
792
792
|
})
|
|
793
793
|
})
|
|
794
794
|
.catch((e) => {
|
|
795
795
|
console.log('京购小程序批量加车失败dealCartFail: ', e)
|
|
796
796
|
resolve({
|
|
797
797
|
ok: false,
|
|
798
798
|
msg: '加购失败,请稍后重试',
|
|
799
799
|
})
|
|
800
800
|
})
|
|
801
801
|
} else {
|
|
802
802
|
console.log('==========>', 'M站批量加车!')
|
|
803
803
|
return this.productAddToCart(skuIdsStr, addCardNum).then((res) =>
|
|
804
804
|
resolve(res),
|
|
805
805
|
)
|
|
806
806
|
}
|
|
807
807
|
} else {
|
|
808
808
|
resolve({
|
|
809
809
|
ok: false,
|
|
810
810
|
msg: '加购sku不能为空',
|
|
811
811
|
})
|
|
812
812
|
}
|
|
813
813
|
})
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
productAddToCart() {
|
|
817
817
|
return Promise.resolve({
|
|
818
818
|
ok: false,
|
|
819
819
|
msg: 'productAddToCart暂不支持小程序',
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
822
|
bMallGetUserInfo(){
|
|
823
823
|
return Promise.resolve({
|
|
824
824
|
ok: false,
|
|
825
825
|
msg: 'productAddToCart暂不支持小程序',
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
828
|
bMallGetSkuNumApi(){
|
|
829
829
|
return Promise.resolve({
|
|
830
830
|
ok: false,
|
|
831
831
|
msg: 'productAddToCart暂不支持小程序',
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
bMallCartHandle(){
|
|
835
835
|
return Promise.resolve({
|
|
836
836
|
ok: false,
|
|
837
837
|
msg: 'productAddToCart暂不支持小程序',
|
|
838
838
|
});
|
|
839
839
|
}
|