cyy-vue-material 7.0.13 → 7.0.14
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/package.json
CHANGED
package/src/api/index.js
CHANGED
|
@@ -18,3 +18,5 @@ export const queryNoticePageList = "/web/cms/noticeBusiness/queryNoticePageList.
|
|
|
18
18
|
export const find = "/web/es/searchengine/find.json";
|
|
19
19
|
// 查询直播状态
|
|
20
20
|
export const queryInfuencerAndChild = "/web/inf/infuencer/queryInfuencerAndChild.json";
|
|
21
|
+
// 查询营销活动商品
|
|
22
|
+
export const queryPromotionByCodeAndCheckUser = "/web/pm/promotionplat/queryPromotionByCodeAndCheckUser.json"
|
|
@@ -1,30 +1,51 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div>
|
|
4
|
-
<div
|
|
5
|
-
|
|
4
|
+
<div
|
|
5
|
+
class="classTitle"
|
|
6
|
+
:style="{ backgroundColor: props.bgColor }"
|
|
7
|
+
v-if="scrollTop > 20 || isLc"
|
|
8
|
+
>
|
|
9
|
+
<span
|
|
10
|
+
class="classTitleItem"
|
|
11
|
+
v-for="(ele, index) in classDomainList"
|
|
12
|
+
:key="ele.goodsClassId"
|
|
13
|
+
:style="{
|
|
6
14
|
height: props.navigationHeight + 'px',
|
|
7
15
|
lineHeight: props.navigationHeight + 'px',
|
|
8
16
|
fontSize: props.navigationFontSize + 'px',
|
|
9
|
-
}"
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
10
19
|
<span
|
|
11
20
|
class="classSpan"
|
|
12
21
|
@click="checkClass(index)"
|
|
13
22
|
:style="{
|
|
14
|
-
background:
|
|
15
|
-
|
|
23
|
+
background:
|
|
24
|
+
checkClassIndex === index ? props.getBgColor : props.bgColor,
|
|
25
|
+
color:
|
|
26
|
+
checkClassIndex === index
|
|
27
|
+
? props.getfontColor
|
|
28
|
+
: props.fontColor,
|
|
16
29
|
}"
|
|
17
30
|
>{{ ele.goodsChangeClassName }}</span
|
|
18
31
|
>
|
|
19
32
|
</span>
|
|
20
33
|
</div>
|
|
21
|
-
<scroll-view
|
|
34
|
+
<scroll-view
|
|
35
|
+
scroll-y="true"
|
|
36
|
+
scroll-with-animation="true"
|
|
37
|
+
@scroll="handleScroll"
|
|
38
|
+
:scroll-into-view="targetId"
|
|
39
|
+
style="height: 100vh"
|
|
40
|
+
>
|
|
22
41
|
<template v-if="props.headImg">
|
|
23
|
-
<img v-if="isLc"
|
|
24
|
-
|
|
42
|
+
<img v-if="isLc" class="headerImg" :src="props.headImg" />
|
|
43
|
+
<image
|
|
44
|
+
v-else
|
|
45
|
+
class="headerImg"
|
|
25
46
|
:src="props.headImg"
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
mode="widthFix"
|
|
48
|
+
></image>
|
|
28
49
|
</template>
|
|
29
50
|
<div class="classContent">
|
|
30
51
|
<div
|
|
@@ -37,15 +58,27 @@
|
|
|
37
58
|
v-if="!ele.classfooterImg"
|
|
38
59
|
class="classContentSpan"
|
|
39
60
|
:style="{
|
|
40
|
-
paddingTop: ele.titleMt + 'px',
|
|
61
|
+
paddingTop: ele.titleMt + 'px',
|
|
41
62
|
paddingBottom: ele.titleBt + 'px',
|
|
42
63
|
backgroundColor: ele.bgColor,
|
|
43
64
|
}"
|
|
44
65
|
>
|
|
45
66
|
<img
|
|
46
|
-
style="
|
|
67
|
+
style="
|
|
68
|
+
display: inline-block;
|
|
69
|
+
width: 15px;
|
|
70
|
+
height: 15px;
|
|
71
|
+
margin-right: 2px;
|
|
72
|
+
margin-top: 3px;
|
|
73
|
+
"
|
|
47
74
|
v-if="ele.iconFlag"
|
|
48
|
-
:src="
|
|
75
|
+
:src="
|
|
76
|
+
ele.goodsClassLogo
|
|
77
|
+
? ele.goodsClassLogo.indexOf('http') === -1
|
|
78
|
+
? domainNameUrl + ele.goodsClassLogo
|
|
79
|
+
: ele.goodsClassLogo
|
|
80
|
+
: ''
|
|
81
|
+
"
|
|
49
82
|
/>
|
|
50
83
|
<span
|
|
51
84
|
v-if="ele.goodsClassNameFlag"
|
|
@@ -57,66 +90,97 @@
|
|
|
57
90
|
{{ ele.goodsChangeClassName }}
|
|
58
91
|
</span>
|
|
59
92
|
</div>
|
|
60
|
-
<div
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
<div
|
|
94
|
+
v-else
|
|
95
|
+
class="classContentImgBox"
|
|
96
|
+
:style="{
|
|
97
|
+
paddingTop: ele.titleMt + 'px',
|
|
98
|
+
paddingBottom: ele.titleBt + 'px',
|
|
99
|
+
backgroundColor: ele.bgColor,
|
|
100
|
+
}"
|
|
101
|
+
>
|
|
102
|
+
<img
|
|
103
|
+
v-if="isLc"
|
|
104
|
+
class="classContentImg"
|
|
105
|
+
:src="ele.classfooterImg"
|
|
106
|
+
/>
|
|
107
|
+
<image
|
|
108
|
+
v-else
|
|
109
|
+
class="classContentImg"
|
|
110
|
+
:src="ele.classfooterImg"
|
|
111
|
+
mode="widthFix"
|
|
112
|
+
></image>
|
|
113
|
+
<div class="text-overlay">
|
|
114
|
+
<img
|
|
115
|
+
style="
|
|
116
|
+
display: inline-block;
|
|
117
|
+
width: 15px;
|
|
118
|
+
height: 15px;
|
|
119
|
+
margin-right: 2px;
|
|
120
|
+
margin-top: 3px;
|
|
121
|
+
"
|
|
122
|
+
v-if="ele.iconFlag"
|
|
123
|
+
:src="
|
|
124
|
+
ele.goodsClassLogo
|
|
125
|
+
? ele.goodsClassLogo.indexOf('http') === -1
|
|
126
|
+
? domainNameUrl + ele.goodsClassLogo
|
|
127
|
+
: ele.goodsClassLogo
|
|
128
|
+
: ''
|
|
129
|
+
"
|
|
130
|
+
/>
|
|
131
|
+
<span
|
|
132
|
+
v-if="ele.goodsClassNameFlag"
|
|
133
|
+
:style="{
|
|
134
|
+
color: ele.titleColor,
|
|
135
|
+
fontSize: ele.titleFontSize + 'px',
|
|
136
|
+
}"
|
|
137
|
+
>
|
|
138
|
+
{{ ele.goodsChangeClassName }}
|
|
139
|
+
</span>
|
|
140
|
+
<!-- 类型为代金券的时候显示 -->
|
|
141
|
+
<div class="coupon" v-if="ele.promotionType == '4'">
|
|
142
|
+
<div class="left">
|
|
143
|
+
<div class="card">代金券</div>
|
|
144
|
+
<div class="price">面额10元</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="right">
|
|
147
|
+
<div class="right-container">
|
|
148
|
+
<span class="discount">满100减10</span>
|
|
149
|
+
<span class="date">2025.06.03至2025.06.30</span>
|
|
101
150
|
</div>
|
|
151
|
+
<span class="get_btn">点击领取</span>
|
|
102
152
|
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
103
155
|
</div>
|
|
104
|
-
|
|
105
|
-
|
|
156
|
+
|
|
106
157
|
<!-- 商品 -->
|
|
107
158
|
<div
|
|
108
|
-
:class="[
|
|
159
|
+
:class="[
|
|
160
|
+
'cube-container',
|
|
161
|
+
`arrange-${ele.showTitle}`,
|
|
162
|
+
{ isLc: isLc },
|
|
163
|
+
]"
|
|
109
164
|
:style="{
|
|
110
165
|
backgroundColor: ele.goodsBgColor,
|
|
111
166
|
}"
|
|
112
167
|
>
|
|
113
|
-
<div
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
168
|
+
<div
|
|
169
|
+
v-for="(item, index) in ele.goodsList"
|
|
170
|
+
class="cube-item"
|
|
171
|
+
:style="{
|
|
172
|
+
marginTop: `${ele.goodsMt}px`,
|
|
173
|
+
marginBottom: `${ele.goodsBt}px`,
|
|
174
|
+
}"
|
|
175
|
+
:key="item.skuCode"
|
|
176
|
+
@click="goGoodsDetail(item)"
|
|
177
|
+
>
|
|
117
178
|
<div class="imgWrapper">
|
|
118
179
|
<div
|
|
119
|
-
v-if="
|
|
180
|
+
v-if="
|
|
181
|
+
isLc === false &&
|
|
182
|
+
(item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')
|
|
183
|
+
"
|
|
120
184
|
class="imgMarked"
|
|
121
185
|
:style="{
|
|
122
186
|
borderRadius: `${ele.borderRaduils}px`,
|
|
@@ -128,7 +192,13 @@
|
|
|
128
192
|
</div>
|
|
129
193
|
<img
|
|
130
194
|
class="goodsImg"
|
|
131
|
-
:src="
|
|
195
|
+
:src="
|
|
196
|
+
item.dataPic
|
|
197
|
+
? item.dataPic.indexOf('http') === -1
|
|
198
|
+
? domainNameUrl + item.dataPic
|
|
199
|
+
: item.dataPic
|
|
200
|
+
: ''
|
|
201
|
+
"
|
|
132
202
|
alt=""
|
|
133
203
|
:style="{
|
|
134
204
|
borderRadius: `${ele.borderRaduils}px`,
|
|
@@ -139,17 +209,35 @@
|
|
|
139
209
|
<div
|
|
140
210
|
v-if="isLc === true && ele.showTitle === 2"
|
|
141
211
|
class="specialGoodsName"
|
|
142
|
-
:style="{
|
|
212
|
+
:style="{
|
|
213
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
214
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
215
|
+
}"
|
|
143
216
|
>
|
|
144
217
|
{{ item.goodsName }}
|
|
145
218
|
</div>
|
|
146
|
-
<div
|
|
219
|
+
<div
|
|
220
|
+
v-else
|
|
221
|
+
class="goodsName"
|
|
222
|
+
:style="{
|
|
223
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
224
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
225
|
+
}"
|
|
226
|
+
>
|
|
147
227
|
{{ item.goodsName }}
|
|
148
228
|
</div>
|
|
149
|
-
<section
|
|
229
|
+
<section
|
|
230
|
+
class="footerContent"
|
|
231
|
+
:style="{
|
|
232
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
233
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
234
|
+
}"
|
|
235
|
+
>
|
|
150
236
|
<div class="goodsPrice">
|
|
151
237
|
¥{{ item.pricesetNprice }}
|
|
152
|
-
<div class="scribing" v-if="ele.underLineFlag === 1"
|
|
238
|
+
<div class="scribing" v-if="ele.underLineFlag === 1">
|
|
239
|
+
¥{{ item.pricesetMakeprice }}
|
|
240
|
+
</div>
|
|
153
241
|
</div>
|
|
154
242
|
<div class="goodsBuy">
|
|
155
243
|
<img
|
|
@@ -162,6 +250,9 @@
|
|
|
162
250
|
</div>
|
|
163
251
|
</div>
|
|
164
252
|
</div>
|
|
253
|
+
<button class="moreBtn" v-if="!isLc" @click="loadMore(ele, index)">
|
|
254
|
+
查看更多
|
|
255
|
+
</button>
|
|
165
256
|
</div>
|
|
166
257
|
</div>
|
|
167
258
|
</scroll-view>
|
|
@@ -172,9 +263,14 @@
|
|
|
172
263
|
|
|
173
264
|
<script>
|
|
174
265
|
import { isLc, getUrl, fetchGoodImpl } from "../../utils/index.js";
|
|
175
|
-
import {
|
|
266
|
+
import {
|
|
267
|
+
find,
|
|
268
|
+
querySkuFromJm,
|
|
269
|
+
queryPromotionByCodeAndCheckUser,
|
|
270
|
+
} from "../../api/index.js";
|
|
176
271
|
import { fetchPost } from "../../api/http.js";
|
|
177
272
|
import { query } from "../../api/urlQuery.js";
|
|
273
|
+
import { isEmpty, isUndefined } from "lodash-es";
|
|
178
274
|
export default {
|
|
179
275
|
name: "cyy-ArsenalPromotion",
|
|
180
276
|
// bgColor: "#08fc29", //标题背景颜色
|
|
@@ -225,11 +321,15 @@ export default {
|
|
|
225
321
|
checkClassIndex: -1,
|
|
226
322
|
targetId: "",
|
|
227
323
|
scrollTop: 0,
|
|
324
|
+
page: 1,
|
|
325
|
+
rows: 12
|
|
228
326
|
};
|
|
229
327
|
},
|
|
230
328
|
mounted() {
|
|
231
329
|
this.domainNameUrl = getUrl(this);
|
|
232
|
-
this.classDomainList = JSON.parse(
|
|
330
|
+
this.classDomainList = JSON.parse(
|
|
331
|
+
JSON.stringify(this.props.classDomainList)
|
|
332
|
+
);
|
|
233
333
|
this.initgoods();
|
|
234
334
|
},
|
|
235
335
|
computed: {},
|
|
@@ -245,58 +345,182 @@ export default {
|
|
|
245
345
|
// 遍历classDomainList
|
|
246
346
|
let tempList = that.classDomainList;
|
|
247
347
|
for (let item of tempList) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
348
|
+
const url = `${queryPromotionByCodeAndCheckUser}?promotionCode=${item.goodsClassId}`;
|
|
349
|
+
let result = await fetchPost(url)
|
|
350
|
+
console.log(result,'result')
|
|
351
|
+
// 从 URL 中获取 channelCode
|
|
352
|
+
const urlParams = new URLSearchParams(
|
|
353
|
+
window.location.hash.split("?")[1] || window.location.search
|
|
354
|
+
);
|
|
355
|
+
const channelCode = urlParams.get("channelCode") || "";
|
|
356
|
+
if (result && result.length > 0 && result[0].rangeType == 5) {
|
|
357
|
+
let skuNoList = []
|
|
358
|
+
const firstItem = result[0];
|
|
359
|
+
console.log(firstItem,'firstItem')
|
|
360
|
+
firstItem.pmPromotionRangeList.forEach(item => {
|
|
361
|
+
skuNoList.push(item.rangeCode);
|
|
362
|
+
})
|
|
363
|
+
console.log(skuNoList,'skuNoList')
|
|
364
|
+
const url = `${find}?skuNo=${skuNoList.join()}&rows=12&page=1`;
|
|
365
|
+
const res = await fetchPost(url);
|
|
366
|
+
item.goodsList = res.list
|
|
367
|
+
console.log(item,'商品')
|
|
368
|
+
|
|
369
|
+
} else if (result && result.length > 0 && result[0].rangeType == 0) {
|
|
370
|
+
// 全部商品
|
|
371
|
+
const url = `${find}?rows=12&page=1`;
|
|
372
|
+
const res = await fetchPost(url);
|
|
373
|
+
item.goodsList = res.list
|
|
374
|
+
console.log(item,'商品')
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
|
|
265
378
|
}
|
|
266
379
|
that.classDomainList = tempList;
|
|
267
380
|
},
|
|
268
381
|
async getGoodsList(that) {
|
|
382
|
+
console.log(that.classDomainList,'活动')
|
|
269
383
|
// 遍历classDomainList
|
|
270
384
|
for (let item of that.classDomainList) {
|
|
271
385
|
// 调用getNotice方法,传入classtreeCode
|
|
272
386
|
let params = {
|
|
273
|
-
|
|
274
|
-
childFlag: true,
|
|
275
|
-
bizType: "goods",
|
|
276
|
-
hjFlag: true,
|
|
277
|
-
area: that.$storage.get("addressValue") ? that.$storage.get("addressValue") : "北京朝阳区八里庄街道",
|
|
278
|
-
page: 1,
|
|
279
|
-
rows: 20,
|
|
280
|
-
searchType: "match_phrase",
|
|
281
|
-
goodsType: "00,40,41,60,61,62,32",
|
|
282
|
-
classtreeCode: item.classtreeCode
|
|
387
|
+
promotionCode: item.goodsClassId,
|
|
283
388
|
};
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
389
|
+
let result = await that.http.get(`${queryPromotionByCodeAndCheckUser}`, params);
|
|
390
|
+
// 部分商品
|
|
391
|
+
if (result && result.length > 0 && result[0].rangeType == 5) {
|
|
392
|
+
let skuNoList = []
|
|
393
|
+
const firstItem = result[0];
|
|
394
|
+
console.log(firstItem,'firstItem')
|
|
395
|
+
firstItem.pmPromotionRangeList.forEach(item => {
|
|
396
|
+
skuNoList.push(item.rangeCode);
|
|
397
|
+
})
|
|
398
|
+
console.log(skuNoList,'skuNoList')
|
|
399
|
+
let paramObj = {
|
|
400
|
+
skuNo: skuNoList.join()
|
|
401
|
+
}
|
|
402
|
+
const res = await that.getGoodsImpl()(this, paramObj, this.page);
|
|
403
|
+
that.$set(item, "goodsList", res.list);
|
|
404
|
+
that.$set(item, "skuNoList", skuNoList.join());
|
|
405
|
+
that.$set(item, "page", 1);
|
|
406
|
+
console.log(item,'商品')
|
|
407
|
+
|
|
408
|
+
} else if (result && result.length > 0 && result[0].rangeType == 0) {
|
|
409
|
+
// 全部商品
|
|
410
|
+
const res = await that.getGoodsImpl()(this, {}, this.page);
|
|
411
|
+
that.$set(item, "goodsList", res.list);
|
|
412
|
+
that.$set(item, "page", 1);
|
|
413
|
+
that.$set(item, "total", res.total);
|
|
414
|
+
console.log(item,'商品')
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
async loadMore(ele, idx) {
|
|
419
|
+
console.log(ele, idx, "加载当前活动商品");
|
|
420
|
+
if (ele.skuNoList) {
|
|
421
|
+
let paramObj = {
|
|
422
|
+
skuNo: ele.skuNoList
|
|
423
|
+
};
|
|
424
|
+
let totalNum = ele.skuNoList.split(',').length;
|
|
425
|
+
if (Math.ceil(totalNum / this.rows) > ele.page) {
|
|
426
|
+
console.log("分页加载")
|
|
427
|
+
ele.page++;
|
|
428
|
+
const res = await this.getGoodsImpl()(this, paramObj, ele.page);
|
|
429
|
+
this.$set(ele, "goodsList", [...ele.goodsList,...res.list]);
|
|
430
|
+
this.$set(ele, "page",ele.page);
|
|
431
|
+
} else {
|
|
432
|
+
if (!isLC) {
|
|
433
|
+
uni.$u.toast("没有更多了~");
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
}
|
|
437
|
+
} else {
|
|
438
|
+
console.log("全部商品")
|
|
439
|
+
if (Math.ceil(ele.total / this.rows) > ele.page) {
|
|
440
|
+
console.log("分页加载----全部商品")
|
|
441
|
+
ele.page++;
|
|
442
|
+
const res = await this.getGoodsImpl()(this, {}, ele.page);
|
|
443
|
+
this.$set(ele, "goodsList", [...ele.goodsList,...res.list]);
|
|
444
|
+
this.$set(ele, "page", ele.page);
|
|
445
|
+
} else {
|
|
446
|
+
if (!isLC) {
|
|
447
|
+
uni.$u.toast("没有更多了~");
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
},
|
|
453
|
+
getGoodsImpl() {
|
|
454
|
+
console.log(99999);
|
|
455
|
+
const uniIo = async (that, paramObj, page) => {
|
|
456
|
+
const { list, total } = await that.http.get(
|
|
457
|
+
`web/es/searchengine/find.json?rows=12&page=${page}`,
|
|
458
|
+
paramObj
|
|
459
|
+
);
|
|
460
|
+
if (paramObj.hasOwnProperty('skuNo')) {
|
|
461
|
+
const skuCodeList = paramObj.skuNo.split(",");
|
|
462
|
+
let sortedArrays = [];
|
|
463
|
+
|
|
464
|
+
skuCodeList.forEach((skuNo) => {
|
|
465
|
+
list.forEach((item) => {
|
|
466
|
+
if (item.skuNo === skuNo) {
|
|
467
|
+
sortedArrays.push(item);
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
console.log("findList", sortedArrays);
|
|
472
|
+
return { list: sortedArrays, total };
|
|
473
|
+
} else {
|
|
474
|
+
return { list, total };
|
|
292
475
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
};
|
|
479
|
+
const fetchIO = async (that, paramObj) => {
|
|
480
|
+
const { id, goods } = that.props;
|
|
481
|
+
if (isEmpty(goods)) return Promise.resolve({ list: [] });
|
|
482
|
+
|
|
483
|
+
const isEqualFlag = handleCache(that);
|
|
484
|
+
|
|
485
|
+
if (isEqualFlag) {
|
|
486
|
+
return Promise.resolve(fetchGoodsInfo(id));
|
|
487
|
+
}
|
|
488
|
+
// 从 URL 中获取 channelCode
|
|
489
|
+
const urlParams = new URLSearchParams(
|
|
490
|
+
window.location.hash.split("?")[1] || window.location.search
|
|
491
|
+
);
|
|
492
|
+
const channelCode = urlParams.get("channelCode") || "";
|
|
493
|
+
const saasToken = localStorage.getItem("saas-token");
|
|
494
|
+
return await fetch(
|
|
495
|
+
getUrl() +
|
|
496
|
+
find +
|
|
497
|
+
"?rows=12&page=1&skuNo=" +
|
|
498
|
+
paramObj.skuNo +
|
|
499
|
+
"&channelCode=" +
|
|
500
|
+
channelCode,
|
|
501
|
+
{
|
|
502
|
+
method: "GET",
|
|
503
|
+
headers: {
|
|
504
|
+
"saas-token": saasToken,
|
|
505
|
+
"user-agent":
|
|
506
|
+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
|
507
|
+
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
508
|
+
},
|
|
509
|
+
credentials: "include",
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
.then((response) => response.json())
|
|
513
|
+
.then((res = {}) => {
|
|
514
|
+
setGoodsInfo(id, goods, res);
|
|
515
|
+
console.log("Pc数据----res")
|
|
516
|
+
return res;
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
if (isLc) {
|
|
521
|
+
return fetchIO;
|
|
299
522
|
}
|
|
523
|
+
return uniIo;
|
|
300
524
|
},
|
|
301
525
|
checkClass(index) {
|
|
302
526
|
this.checkClassIndex = index;
|
|
@@ -332,8 +556,8 @@ export default {
|
|
|
332
556
|
this.$routers.push("detail", params);
|
|
333
557
|
},
|
|
334
558
|
handleScroll(e) {
|
|
335
|
-
this.scrollTop = e.detail.scrollTop
|
|
336
|
-
}
|
|
559
|
+
this.scrollTop = e.detail.scrollTop;
|
|
560
|
+
},
|
|
337
561
|
},
|
|
338
562
|
};
|
|
339
563
|
</script>
|
|
@@ -368,15 +592,15 @@ export default {
|
|
|
368
592
|
width: 100%;
|
|
369
593
|
.classContentImg {
|
|
370
594
|
width: 100%;
|
|
371
|
-
height: auto;
|
|
372
|
-
display: block;
|
|
373
|
-
|
|
374
|
-
|
|
595
|
+
height: auto;
|
|
596
|
+
display: block;
|
|
597
|
+
}
|
|
598
|
+
.text-overlay {
|
|
375
599
|
position: absolute;
|
|
376
600
|
top: 0;
|
|
377
601
|
left: 0;
|
|
378
602
|
width: 100%;
|
|
379
|
-
height: 100%;
|
|
603
|
+
height: 100%;
|
|
380
604
|
display: flex;
|
|
381
605
|
justify-content: center;
|
|
382
606
|
align-items: center;
|
|
@@ -399,7 +623,7 @@ export default {
|
|
|
399
623
|
align-items: center;
|
|
400
624
|
.card {
|
|
401
625
|
font-size: 20px;
|
|
402
|
-
color: #
|
|
626
|
+
color: #eb5555;
|
|
403
627
|
}
|
|
404
628
|
.price {
|
|
405
629
|
font-size: 12px;
|
|
@@ -416,7 +640,7 @@ export default {
|
|
|
416
640
|
flex-direction: column;
|
|
417
641
|
justify-content: space-around;
|
|
418
642
|
}
|
|
419
|
-
|
|
643
|
+
|
|
420
644
|
.date {
|
|
421
645
|
margin-top: 15px;
|
|
422
646
|
font-size: 12px;
|
|
@@ -428,14 +652,13 @@ export default {
|
|
|
428
652
|
line-height: 20px;
|
|
429
653
|
text-align: center;
|
|
430
654
|
color: #f1f1f1;
|
|
431
|
-
background-color: #
|
|
655
|
+
background-color: #eb5555;
|
|
432
656
|
border-radius: 20px;
|
|
433
657
|
}
|
|
434
658
|
}
|
|
435
659
|
}
|
|
436
|
-
|
|
660
|
+
}
|
|
437
661
|
}
|
|
438
|
-
|
|
439
662
|
}
|
|
440
663
|
}
|
|
441
664
|
.cube-container {
|
|
@@ -622,6 +845,4 @@ export default {
|
|
|
622
845
|
}
|
|
623
846
|
}
|
|
624
847
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
848
|
</style>
|