@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,306 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//注意 JDZH-Regular 在原生底层已经转为V2.0
|
|
4
|
-
.font-jdzht {
|
|
5
|
-
font-family: 'JDZH-Regular';
|
|
6
|
-
}
|
|
7
|
-
.font-jdzht-bold {
|
|
8
|
-
font-family: 'JDZH-Bold';
|
|
9
|
-
}
|
|
10
|
-
.font-jdzht-light {
|
|
11
|
-
font-family: 'JDZH-Light';
|
|
12
|
-
}
|
|
13
|
-
.font-jdzht-v2 {
|
|
14
|
-
font-family: 'JDZH-Regular';
|
|
15
|
-
}
|
|
16
|
-
.font-jdzht-v2-bold {
|
|
17
|
-
font-family: 'JDZH-Bold';
|
|
18
|
-
}
|
|
19
|
-
.font-jdzht-v2-light {
|
|
20
|
-
font-family: 'JDZH-Light';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.border-box {
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.content-box {
|
|
29
|
-
box-sizing: content-box;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.flexible-box {
|
|
34
|
-
display: flex;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.flexible-box-important {
|
|
38
|
-
display: flex !important;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//竖向布局
|
|
42
|
-
.flexible-box-h {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.flexible-box-h-important {
|
|
48
|
-
display: flex !important;
|
|
49
|
-
flex-direction: column !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
//垂直居中布局
|
|
53
|
-
.flexible-vertical-center-box {
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//水平居中布局
|
|
59
|
-
.flexible-horizontal-center-box {
|
|
60
|
-
display: flex;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//水平垂直居中布局
|
|
65
|
-
.flexible-center-box {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
justify-content: center;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.adaptive-box-flex {
|
|
73
|
-
flex: 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.left {
|
|
77
|
-
float: left;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.right {
|
|
81
|
-
float: right;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.vertical-align-t {
|
|
85
|
-
vertical-align: top;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.vertical-align-m {
|
|
89
|
-
vertical-align: middle;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.vertical-align-b {
|
|
93
|
-
vertical-align: bottom;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.margin-lr-auto {
|
|
97
|
-
margin: 0 auto;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.pos-relative {
|
|
101
|
-
position: relative;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.pos-absolute {
|
|
105
|
-
position: absolute;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.pos-fixed {
|
|
109
|
-
position: fixed;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.align-left {
|
|
113
|
-
text-align: left;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.align-center {
|
|
117
|
-
text-align: center;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.align-right {
|
|
121
|
-
text-align: right;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.display-none {
|
|
125
|
-
display: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.display-none-important {
|
|
129
|
-
display: none !important;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.display-block {
|
|
133
|
-
display: block;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.display-block-important {
|
|
137
|
-
display: block !important;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.display-inline-block {
|
|
141
|
-
display: inline-block;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.display-inline-block-important {
|
|
145
|
-
display: inline-block !important;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.display-inline {
|
|
149
|
-
display: inline;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.display-inline-important {
|
|
153
|
-
display: inline !important;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.font-bold {
|
|
157
|
-
font-weight: bold;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.pointer {
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.over-hidden {
|
|
165
|
-
overflow: hidden;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.over-auto {
|
|
169
|
-
overflow: auto;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.over-auto-hidden-x {
|
|
173
|
-
overflow: auto;
|
|
174
|
-
overflow-x: hidden;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.over-auto-hidden-y {
|
|
178
|
-
overflow: auto;
|
|
179
|
-
overflow-y: hidden;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.over-x-auto {
|
|
183
|
-
overflow-x: auto;
|
|
184
|
-
overflow-y: hidden;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.over-y-auto {
|
|
188
|
-
overflow-y: auto;
|
|
189
|
-
overflow-x: hidden;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.font-size-0 {
|
|
193
|
-
font-size: 0;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
.text-ellipsis {
|
|
198
|
-
overflow: hidden;
|
|
199
|
-
white-space: nowrap;
|
|
200
|
-
text-overflow: ellipsis;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.text-ellipsis-2 {
|
|
204
|
-
display: -webkit-box;
|
|
205
|
-
overflow: hidden;
|
|
206
|
-
word-break: break-all;
|
|
207
|
-
text-overflow: ellipsis;
|
|
208
|
-
-webkit-line-clamp: 2;
|
|
209
|
-
|
|
210
|
-
-webkit-box-orient: vertical;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.text-ellipsis-3 {
|
|
214
|
-
display: -webkit-box;
|
|
215
|
-
overflow: hidden;
|
|
216
|
-
word-break: break-all;
|
|
217
|
-
text-overflow: ellipsis;
|
|
218
|
-
-webkit-line-clamp: 3;
|
|
219
|
-
|
|
220
|
-
-webkit-box-orient: vertical;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.text-ellipsis-no-omit {
|
|
224
|
-
overflow: hidden;
|
|
225
|
-
white-space: nowrap;
|
|
226
|
-
text-overflow: clip;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.text-ellipsis-1-no-omit {
|
|
230
|
-
display: -webkit-box;
|
|
231
|
-
overflow: hidden;
|
|
232
|
-
word-break: break-all;
|
|
233
|
-
text-overflow: ellipsis;
|
|
234
|
-
-webkit-line-clamp: 1;
|
|
235
|
-
|
|
236
|
-
// -webkit-box-orient: inherit;
|
|
237
|
-
-webkit-box-orient: vertical;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.text-ellipsis-2-no-omit {
|
|
241
|
-
display: -webkit-box;
|
|
242
|
-
overflow: hidden;
|
|
243
|
-
word-break: break-all;
|
|
244
|
-
text-overflow: ellipsis;
|
|
245
|
-
-webkit-line-clamp: 2;
|
|
246
|
-
|
|
247
|
-
-webkit-box-orient: inherit;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.text-ellipsis-3-no-omit {
|
|
251
|
-
display: -webkit-box;
|
|
252
|
-
overflow: hidden;
|
|
253
|
-
word-break: break-all;
|
|
254
|
-
text-overflow: ellipsis;
|
|
255
|
-
-webkit-line-clamp: 3;
|
|
256
|
-
|
|
257
|
-
-webkit-box-orient: inherit;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
.d-half-1px-line, .d-half-1px-border {
|
|
263
|
-
position: relative;
|
|
264
|
-
&:after {
|
|
265
|
-
content: '';
|
|
266
|
-
position: absolute;
|
|
267
|
-
width: 200%;
|
|
268
|
-
height: 200%;
|
|
269
|
-
top: 0;
|
|
270
|
-
left: 0;
|
|
271
|
-
transform-origin: 0 0;
|
|
272
|
-
border: 1PX solid #fa2c19;
|
|
273
|
-
//transform: perspective(1PX) translate3d(0, 0, 0) scale(0.5, 0.5);
|
|
274
|
-
transform: scale(0.5, 0.5);
|
|
275
|
-
border-radius: 1PX;
|
|
276
|
-
box-sizing: border-box;
|
|
277
|
-
pointer-events: none;
|
|
278
|
-
//-webkit-backface-visibility: hidden;
|
|
279
|
-
//-webkit-transform-style: preserve-3d;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
.visibility-hide {
|
|
283
|
-
visibility: hidden !important;
|
|
284
|
-
}
|
|
285
|
-
.visibility-show {
|
|
286
|
-
visibility: visible !important;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.d-half-1px-line::after {
|
|
290
|
-
border-width: 0;
|
|
291
|
-
border-radius: 0;
|
|
292
|
-
border-bottom-width: 1PX;
|
|
293
|
-
}
|
|
294
|
-
.d-button-no-border {
|
|
295
|
-
&::after {
|
|
296
|
-
border: none;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.d-imag-rendering-crisp-edges {
|
|
301
|
-
image-rendering: -moz-crisp-edges;
|
|
302
|
-
image-rendering: -o-crisp-edges;
|
|
303
|
-
image-rendering: -webkit-optimize-contrast;
|
|
304
|
-
image-rendering: crisp-edges;
|
|
305
|
-
-ms-interpolation-mode: nearest-neighbor;
|
|
306
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro';
|
|
2
|
UUID,
|
|
3
1
|
isJdApp,
|
|
4
2
|
jdAppVersionStr,
|
|
5
3
|
isIosDevice,
|
|
6
4
|
isPc,
|
|
7
5
|
isJdAndIosDevice,
|
|
8
6
|
isJdAndAndroidDevice,
|
|
9
7
|
isJdAndHarmonyDevice,
|
|
10
8
|
isNewHarmonyShop,
|
|
11
9
|
passSmartCouponInfoFunctionIdList,
|
|
12
10
|
needFixClientValueToHarmonyFunctionIdList,
|
|
13
11
|
clientVersion: isJdApp && jdAppVersionStr !== '' ? jdAppVersionStr : '11.0.0',
|
|
14
12
|
client: isJdApp ? (isIosDevice ? 'apple' : 'android') : isPc ? 'pc' : 'wh5',
|
|
15
13
|
screen: `${Math.ceil(window.screen?.width * devicePixelRatio)}*${Math.ceil(
|
|
16
14
|
window.screen?.height * devicePixelRatio,
|
|
17
15
|
)}`,
|
|
18
16
|
area: '1_72_2799_0',
|
|
19
17
|
uuid: UUID,
|
|
20
18
|
const { area, realTimeArea } = areaInfo || {};
|
|
21
19
|
area && area !== '' && (clientParams.area = area);
|
|
22
20
|
realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
|
|
23
21
|
console.warn(
|
|
24
22
|
'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
|
|
25
23
|
areaInfo,
|
|
26
24
|
'更新后的接口底层信息',
|
|
27
25
|
clientParams,
|
|
28
26
|
);
|
|
29
27
|
if (isH5 && (isJdAndIosDevice || isJdAndAndroidDevice)) {
|
|
30
28
|
const smartCouponInfo = await getSmartCouponInfo();
|
|
31
29
|
if (smartCouponInfo) {
|
|
32
30
|
requestParams.smartCouponInfo = smartCouponInfo;
|
|
33
31
|
}
|
|
34
32
|
} else {
|
|
35
33
|
console.warn('🚗 ~~ handleSmartCouponInfo ~~ 不支持的环境!');
|
|
36
34
|
}
|
|
37
35
|
functionId: string,
|
|
38
36
|
body = {},
|
|
39
37
|
options = {},
|
|
40
38
|
requestOptions = {},
|
|
41
39
|
const useBodyParams = { ...body };
|
|
42
40
|
if (passSmartCouponInfoFunctionIdList.includes(functionId)) {
|
|
43
41
|
await handleSmartCouponInfo(useBodyParams);
|
|
44
42
|
}
|
|
45
43
|
const params = Object.assign(
|
|
46
44
|
{},
|
|
47
45
|
{
|
|
48
46
|
t: Date.now(),
|
|
49
47
|
functionId,
|
|
50
48
|
appid: 'shop_m_jd_com',
|
|
51
49
|
body: JSON.stringify(useBodyParams),
|
|
52
50
|
},
|
|
53
51
|
clientParams,
|
|
54
52
|
options,
|
|
55
53
|
{
|
|
56
54
|
area: clientParams.area,
|
|
57
55
|
client: !isJdApp && options?.client ? options?.client : clientParams.client,
|
|
58
56
|
clientVersion:
|
|
59
57
|
!isJdApp && options?.clientVersion ? options?.clientVersion : clientParams.clientVersion,
|
|
60
58
|
},
|
|
61
59
|
);
|
|
62
60
|
if (
|
|
63
61
|
isJdAndHarmonyDevice &&
|
|
64
62
|
(needFixClientValueToHarmonyFunctionIdList.includes(functionId) || isNewHarmonyShop)
|
|
65
63
|
) {
|
|
66
64
|
params.client = 'harmony';
|
|
67
65
|
} else {
|
|
68
66
|
}
|
|
69
67
|
console.warn(
|
|
70
68
|
'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
|
|
71
69
|
'底层默认的clientParams',
|
|
72
70
|
clientParams,
|
|
73
71
|
'下发的options',
|
|
74
72
|
options,
|
|
75
73
|
'最后params',
|
|
76
74
|
params,
|
|
77
75
|
);
|
|
78
76
|
return http.post(api.apiFunc, params, requestOptions);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const defaultOptions = {
|
|
2
|
timeout: 5000,
|
|
3
1
|
jsonpCallback: 'callback',
|
|
4
2
|
return `jsonp_${Date.now()}_${Math.ceil(Math.random() * 100000)}`
|
|
5
3
|
try {
|
|
6
4
|
delete window[functionName]
|
|
7
5
|
} catch (e) {
|
|
8
6
|
window[functionName] = undefined
|
|
9
7
|
}
|
|
10
8
|
const script = document.getElementById(scriptId)
|
|
11
9
|
document.getElementsByTagName('head')[0].removeChild(script)
|
|
12
10
|
const timeout =
|
|
13
11
|
|
|
14
12
|
options.timeout != null ? options.timeout : defaultOptions.timeout
|
|
15
13
|
const jsonpCallback =
|
|
16
14
|
|
|
17
15
|
options.jsonpCallback != null
|
|
18
16
|
? options.jsonpCallback
|
|
19
17
|
: defaultOptions.jsonpCallback
|
|
20
18
|
let timeoutId: string | number | NodeJS.Timeout | undefined
|
|
21
19
|
return new Promise((resolve, reject) => {
|
|
22
20
|
const callbackFunction = generateCallbackFunction()
|
|
23
21
|
window[callbackFunction] = function (response: any) {
|
|
24
22
|
resolve({
|
|
25
23
|
ok: true,
|
|
26
24
|
json: function () {
|
|
27
25
|
return Promise.resolve(response)
|
|
28
26
|
},
|
|
29
27
|
})
|
|
30
28
|
if (timeoutId) clearTimeout(timeoutId)
|
|
31
29
|
removeScript(jsonpCallback + '_' + callbackFunction)
|
|
32
30
|
clearFunction(callbackFunction)
|
|
33
31
|
}
|
|
34
32
|
url += url.indexOf('?') === -1 ? '?' : '&'
|
|
35
33
|
const jsonpScript = document.createElement('script')
|
|
36
34
|
jsonpScript.setAttribute(
|
|
37
35
|
'src',
|
|
38
36
|
url + jsonpCallback + '=' + callbackFunction,
|
|
39
37
|
)
|
|
40
38
|
jsonpScript.id = jsonpCallback + '_' + callbackFunction
|
|
41
39
|
document.getElementsByTagName('head')[0].appendChild(jsonpScript)
|
|
42
40
|
timeoutId = setTimeout(() => {
|
|
43
41
|
reject(new Error(`JSONP request to ${url} timed out`))
|
|
44
42
|
clearFunction(callbackFunction)
|
|
45
43
|
removeScript(jsonpCallback + '_' + callbackFunction)
|
|
46
44
|
}, timeout)
|
|
47
45
|
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import global from '../../common'
|
|
2
|
public fmInfo: {
|
|
3
1
|
eid?: string
|
|
4
2
|
fp?: string
|
|
5
3
|
jsToken?: string
|
|
6
4
|
sdkToken?: string
|
|
7
5
|
}
|
|
8
6
|
constructor() {
|
|
9
7
|
this.fmInfo = {}
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
async getFmInfo() {
|
|
13
11
|
return this.fmInfo;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
paramsSign(data) {
|
|
17
15
|
return Promise.resolve(data)
|
|
18
16
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro';
|
|
2
|
NATIVE_PAGE_READ: 'pageReady',
|
|
3
1
|
NATIVE_ADD_CART: 'addCart',
|
|
4
2
|
type = Message_Type.NATIVE_PAGE_READ,
|
|
5
3
|
sendData: null | object = null,
|
|
6
4
|
callBackName = "init",
|
|
7
5
|
console.log(
|
|
8
6
|
'初始化nativePageRegisterMessage 动态化暂未实现',
|
|
9
7
|
type,
|
|
10
8
|
sendData,
|
|
11
9
|
callBackName,
|
|
12
10
|
);
|
|
13
11
|
return false;
|
|
14
12
|
Taro.eventCenter.trigger(TaroEventType.PAGE_INIT_EXPOSURE, options);
|
package/dist/utils/priceUtils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const reg = /([\d|\.]+)/;
|
|
2
|
const newPrice = (price + '').match(reg);
|
|
3
1
|
if (Array.isArray(newPrice) && newPrice.length > 0) {
|
|
4
2
|
return newPrice[0];
|
|
5
3
|
}
|
|
6
4
|
return '0';
|
|
7
5
|
const tmpPrice = parseFloat(price);
|
|
8
6
|
return tmpPrice.toFixed(2);
|
|
9
7
|
const tmpPrice = formatPrice(price);
|
|
10
8
|
const priceArray = tmpPrice.split('.');
|
|
11
9
|
let decPart;
|
|
12
10
|
if (tmpPrice.length > 1) {
|
|
13
11
|
decPart = priceArray[1];
|
|
14
12
|
} else {
|
|
15
13
|
decPart = '00';
|
|
16
14
|
}
|
|
17
15
|
return {
|
|
18
16
|
intPart: priceArray[0],
|
|
19
17
|
decPart
|
|
20
18
|
}
|
|
File without changes
|