jufubao-base 1.0.169-beta9 → 1.0.170
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 +1 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
- package/src/components/JfbBaseLogin/Attr.js +10 -0
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +6 -1
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
- package/src/components/JfbBaseTfkCardBind/Attr.js +80 -7
- package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +112 -13
- package/src/components/JfbBaseTfkCardDetail/Attr.js +49 -1
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +18 -9
- package/src/components/JfbBaseTfkCardLogin/Attr.js +223 -13
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +118 -73
- package/src/components/JfbBaseTfkCardLogin/Mock.js +5 -535
- package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +10 -6
- package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
- package/src/components/JfbBaseTfkSearch/AllList.vue +241 -135
- package/src/components/JfbBaseTfkSearch/Api.js +1 -1
- package/src/components/JfbBaseTfkSearch/Attr.js +203 -1
- package/src/components/JfbBaseTfkSearch/ContentFilm.vue +127 -88
- package/src/components/JfbBaseTfkSearch/ContentProduct.vue +14 -5
- package/src/components/JfbBaseTfkSearch/ContentShop.vue +2 -0
- package/src/components/JfbBaseTfkSearch/CusAttr.js +10 -0
- package/src/components/JfbBaseTfkSearch/CustomList.vue +130 -78
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +164 -62
- package/src/components/JfbBaseTfkSearch/Mock.js +184 -32
- package/src/components/JfbBaseTfkSearch/listMixins.js +111 -75
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
- package/src/mixins/componentsMixins.js +33 -3
- package/src/mixins/posterMixins.js +122 -0
- package/src/components/JfbBaseTfkSearch/search.js +0 -293
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="custom-list">
|
|
2
|
+
<view class="custom-list" v-if="parentStatus">
|
|
3
3
|
<view v-if="dataList === null">
|
|
4
4
|
<view :class="{productBoxCell2: type_other === 2 }">
|
|
5
5
|
<view
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
:class="{productItemCell2: type_other === 2 }"
|
|
9
9
|
:key="item"
|
|
10
10
|
:style="{
|
|
11
|
-
marginBottom
|
|
11
|
+
marginBottom:listItemStyle.outSpacing + 'rpx',
|
|
12
12
|
padding:contMarginComp,
|
|
13
|
-
borderRadius
|
|
13
|
+
borderRadius:listItemStyle.contRradius+ 'rpx',
|
|
14
14
|
boxShadow:'0 0 10rpx rgba(0,0,0,0.1)',
|
|
15
15
|
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
16
16
|
}"
|
|
17
17
|
>
|
|
18
18
|
<skeleton-product
|
|
19
19
|
:cell="type_other"
|
|
20
|
-
v-if="
|
|
21
|
-
:product-config="
|
|
22
|
-
:out-spacing="
|
|
20
|
+
v-if="productConfig !== null && type_code === 'product'"
|
|
21
|
+
:product-config="productConfig"
|
|
22
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
23
23
|
:height="outItemProduct"
|
|
24
24
|
></skeleton-product>
|
|
25
|
-
<skeleton-shop v-if="type_code === 'shop'" :out-spacing="
|
|
26
|
-
<skeleton-film v-if="type_code === 'film'" :out-spacing="
|
|
25
|
+
<skeleton-shop v-if="type_code === 'shop'" :out-spacing="listItemStyle.outSpacing"></skeleton-shop>
|
|
26
|
+
<skeleton-film v-if="type_code === 'film'" :out-spacing="listItemStyle.outSpacing"></skeleton-film>
|
|
27
27
|
<skeleton-cinema v-if="type_code === 'cinema'"></skeleton-cinema>
|
|
28
28
|
</view>
|
|
29
29
|
</view>
|
|
@@ -32,28 +32,29 @@
|
|
|
32
32
|
<template v-if="type_other !== 2">
|
|
33
33
|
<view
|
|
34
34
|
v-for="item in dataList"
|
|
35
|
-
:key="item.
|
|
35
|
+
:key="item.cuid"
|
|
36
36
|
:style="{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
marginBottom:listItemStyle.outSpacing + 'rpx',
|
|
38
|
+
padding:contMarginComp,
|
|
39
|
+
borderRadius:listItemStyle.contRradius+ 'rpx',
|
|
40
|
+
border: listItemStyle.contBorder,
|
|
41
|
+
boxShadow:listItemStyle.contShadow,
|
|
42
|
+
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
43
|
+
height: heightRpx,
|
|
44
|
+
backgroundColor: listItemStyle.contBgColor
|
|
45
|
+
}"
|
|
46
|
+
>
|
|
46
47
|
<content-film
|
|
47
48
|
type="hot"
|
|
48
49
|
v-if="type_code === 'film'"
|
|
49
50
|
style="width: 100%; height: 100%"
|
|
50
51
|
:keyword="keyword"
|
|
51
52
|
:item="item"
|
|
52
|
-
:out-spacing="
|
|
53
|
-
:color="
|
|
54
|
-
:border-radius="
|
|
55
|
-
@on-film-detail="
|
|
56
|
-
@on-buy="
|
|
53
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
54
|
+
:color="listItemStyle.mainColor"
|
|
55
|
+
:border-radius="listItemStyle.imgRradius"
|
|
56
|
+
@on-film-detail="handleFilmDetail"
|
|
57
|
+
@on-buy="handleBuy"
|
|
57
58
|
></content-film>
|
|
58
59
|
<content-cinema
|
|
59
60
|
v-if="type_code === 'cinema'"
|
|
@@ -61,36 +62,37 @@
|
|
|
61
62
|
type="list"
|
|
62
63
|
:keyword="keyword"
|
|
63
64
|
:item="item"
|
|
64
|
-
:out-spacing="
|
|
65
|
-
:color="{SEAT
|
|
66
|
-
:border-radius="
|
|
67
|
-
@on-schedule="
|
|
68
|
-
@on-cashier-detail="
|
|
69
|
-
@on-code-detail="
|
|
65
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
66
|
+
:color="{SEAT:listItemStyle.mainColor,CODE:listItemStyle.subMainColor,SELL:listItemStyle.successColor}"
|
|
67
|
+
:border-radius="listItemStyle.imgRradius"
|
|
68
|
+
@on-schedule="handleSchedule"
|
|
69
|
+
@on-cashier-detail="handleCashierDetail"
|
|
70
|
+
@on-code-detail="handleCodeDetail"
|
|
70
71
|
></content-cinema>
|
|
71
72
|
<content-shop
|
|
72
73
|
v-if="type_code === 'shop'"
|
|
73
74
|
style="width: 100%; height: 100%"
|
|
74
75
|
:keyword="keyword"
|
|
75
|
-
:out-spacing="
|
|
76
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
76
77
|
:item="item"
|
|
77
|
-
:color="
|
|
78
|
-
:border-radius="
|
|
79
|
-
:is-echange="'Y' ||
|
|
80
|
-
@on-shop-jhd="
|
|
81
|
-
@on-shop-detail="
|
|
78
|
+
:color="listItemStyle.mainColor"
|
|
79
|
+
:border-radius="listItemStyle.imgRradius"
|
|
80
|
+
:is-echange="'Y' || listItemStyle.isShowExchange"
|
|
81
|
+
@on-shop-jhd="handleShopJhd"
|
|
82
|
+
@on-shop-detail="handleShopDetail"
|
|
82
83
|
></content-shop>
|
|
83
84
|
<content-product
|
|
84
|
-
v-if="
|
|
85
|
+
v-if="productConfig !== null && type_code === 'product'"
|
|
85
86
|
style="width: 100%; height: 100%"
|
|
86
|
-
:
|
|
87
|
-
:
|
|
87
|
+
:keyword="keyword"
|
|
88
|
+
:product-config="productConfig"
|
|
89
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
88
90
|
:item="item"
|
|
89
|
-
:
|
|
90
|
-
:color="
|
|
91
|
-
:border-radius="
|
|
91
|
+
:brand-color="listItemStyle.brandColor"
|
|
92
|
+
:color="listItemStyle.mainColor"
|
|
93
|
+
:border-radius="listItemStyle.imgRradius"
|
|
92
94
|
:cell="type_other"
|
|
93
|
-
@on-product-detail="
|
|
95
|
+
@on-product-detail="handleProductDetail"
|
|
94
96
|
></content-product>
|
|
95
97
|
</view>
|
|
96
98
|
</template>
|
|
@@ -99,34 +101,36 @@
|
|
|
99
101
|
<view
|
|
100
102
|
v-if="productTowList[listKey] !== null"
|
|
101
103
|
v-for="item in productTowList[listKey]"
|
|
102
|
-
:key="item.
|
|
104
|
+
:key="item.cuid"
|
|
103
105
|
:style="{
|
|
104
|
-
marginBottom
|
|
106
|
+
marginBottom:listItemStyle.outSpacing + 'rpx',
|
|
105
107
|
padding:contMarginComp,
|
|
106
|
-
borderRadius
|
|
107
|
-
border:
|
|
108
|
-
boxShadow
|
|
108
|
+
borderRadius:listItemStyle.contRradius+ 'rpx',
|
|
109
|
+
border: listItemStyle.contBorder,
|
|
110
|
+
boxShadow:listItemStyle.contShadow,
|
|
109
111
|
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
110
112
|
height: heightRpx,
|
|
111
|
-
backgroundColor:
|
|
113
|
+
backgroundColor: listItemStyle.contBgColor
|
|
112
114
|
}"
|
|
113
115
|
>
|
|
114
116
|
<content-product
|
|
115
|
-
|
|
117
|
+
|
|
118
|
+
v-if="productConfig !== null"
|
|
116
119
|
style="width: 100%; height: 100%"
|
|
117
|
-
:
|
|
118
|
-
:
|
|
120
|
+
:keyword="keyword"
|
|
121
|
+
:product-config="productConfig"
|
|
122
|
+
:out-spacing="listItemStyle.outSpacing"
|
|
119
123
|
:item="item"
|
|
120
124
|
:height="outItemProduct"
|
|
121
|
-
:color="
|
|
122
|
-
:
|
|
125
|
+
:color="listItemStyle.mainColor"
|
|
126
|
+
:brand-color="listItemStyle.brandColor"
|
|
127
|
+
:border-radius="listItemStyle.imgRradius"
|
|
123
128
|
:cell="type_other"
|
|
124
|
-
@on-product-detail="
|
|
129
|
+
@on-product-detail="handleProductDetail"
|
|
125
130
|
></content-product>
|
|
126
131
|
</view>
|
|
127
132
|
</view>
|
|
128
133
|
</view>
|
|
129
|
-
|
|
130
134
|
</view>
|
|
131
135
|
</view>
|
|
132
136
|
</template>
|
|
@@ -159,6 +163,14 @@ export default {
|
|
|
159
163
|
type:String,
|
|
160
164
|
default:'',
|
|
161
165
|
},
|
|
166
|
+
listItemStyle:{
|
|
167
|
+
type:Object|null,
|
|
168
|
+
default:null,
|
|
169
|
+
},
|
|
170
|
+
productConfig:{
|
|
171
|
+
type:Object|null,
|
|
172
|
+
default:null,
|
|
173
|
+
},
|
|
162
174
|
tabId:{
|
|
163
175
|
type:String,
|
|
164
176
|
required:true
|
|
@@ -196,17 +208,19 @@ export default {
|
|
|
196
208
|
return params
|
|
197
209
|
},
|
|
198
210
|
contMarginComp(){
|
|
199
|
-
|
|
200
|
-
str = `${
|
|
201
|
-
str = `${str} ${this
|
|
202
|
-
str = `${str} ${this
|
|
211
|
+
if(this.getParent === null) return 0
|
|
212
|
+
let str = `${this.getParent().checkValue(this.listItemStyle.contMargin.top, 20)}rpx`;
|
|
213
|
+
str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.right, 20)}rpx`;
|
|
214
|
+
str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.bottom, 20)}rpx`;
|
|
215
|
+
str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.left, 20)}rpx`;
|
|
203
216
|
return str
|
|
204
217
|
},
|
|
205
218
|
outItemProduct(){
|
|
219
|
+
if(this.getParent === null) return 0
|
|
206
220
|
//获取每列元素最大宽度
|
|
207
|
-
let num = (750 - 3 * Number(this
|
|
208
|
-
num = num - this
|
|
209
|
-
return num - this
|
|
221
|
+
let num = (750 - 3 * Number(this.listItemStyle.outSpacing))/2;
|
|
222
|
+
num = num - this.getParent().checkValue(this.listItemStyle.contMargin.right, 20) - this.getParent().checkValue(this.listItemStyle.contMargin.left, 20);
|
|
223
|
+
return num - this.listItemStyle.contBorderWidth * 2
|
|
210
224
|
},
|
|
211
225
|
heightRpx(){
|
|
212
226
|
let h = 'auto'
|
|
@@ -218,7 +232,8 @@ export default {
|
|
|
218
232
|
},
|
|
219
233
|
data(){
|
|
220
234
|
return {
|
|
221
|
-
|
|
235
|
+
/**@type Function|null**/
|
|
236
|
+
getParent:null,
|
|
222
237
|
parentStatus: false,
|
|
223
238
|
skeletonCount: 6,
|
|
224
239
|
hasNoData: false,
|
|
@@ -257,7 +272,9 @@ export default {
|
|
|
257
272
|
this.onCusReloadList();
|
|
258
273
|
},500)
|
|
259
274
|
},
|
|
275
|
+
|
|
260
276
|
tabId(){
|
|
277
|
+
this.handleClear();
|
|
261
278
|
this.parseTab()
|
|
262
279
|
this.onCusReloadList();
|
|
263
280
|
},
|
|
@@ -280,17 +297,17 @@ export default {
|
|
|
280
297
|
parseTab(){
|
|
281
298
|
let tabs = this.tabId.split('@');
|
|
282
299
|
this.type_code = tabs[1];
|
|
283
|
-
this.search_range = tabs[0]
|
|
284
|
-
this.is_open_city = tabs[2];
|
|
285
300
|
if(this.type_code === 'product'){
|
|
286
301
|
this.type_other = Number(tabs[3]);
|
|
287
|
-
if(this.type_other === 2) this.skeletonCount =
|
|
302
|
+
if(this.type_other === 2) this.skeletonCount = 6
|
|
288
303
|
else this.skeletonCount = 6
|
|
289
304
|
}
|
|
290
305
|
else {
|
|
291
306
|
this.skeletonCount = 6;
|
|
292
307
|
this.type_other = null
|
|
293
308
|
}
|
|
309
|
+
this.search_range = tabs[0]
|
|
310
|
+
this.is_open_city = tabs[2];
|
|
294
311
|
},
|
|
295
312
|
|
|
296
313
|
handleClear(){
|
|
@@ -305,14 +322,14 @@ export default {
|
|
|
305
322
|
},
|
|
306
323
|
|
|
307
324
|
getParentMV(){
|
|
308
|
-
this.$emit('on-parent-vm', (
|
|
309
|
-
this
|
|
325
|
+
this.$emit('on-parent-vm', (getParent)=>{
|
|
326
|
+
this.getParent = getParent;
|
|
310
327
|
this.parentStatus = true;
|
|
311
328
|
})
|
|
312
329
|
},
|
|
313
330
|
|
|
314
331
|
onCusReachBottom(){
|
|
315
|
-
if(!this.page_token) return false;
|
|
332
|
+
if(this.dataList === null || !this.page_token) return false;
|
|
316
333
|
this.getList();
|
|
317
334
|
},
|
|
318
335
|
|
|
@@ -322,8 +339,9 @@ export default {
|
|
|
322
339
|
this.getList();
|
|
323
340
|
},
|
|
324
341
|
|
|
325
|
-
|
|
326
342
|
getList(){
|
|
343
|
+
let time = new Date().getTime();
|
|
344
|
+
|
|
327
345
|
//无关键字不搜索
|
|
328
346
|
if(this.keyword === '') {
|
|
329
347
|
return;
|
|
@@ -332,12 +350,12 @@ export default {
|
|
|
332
350
|
this.$emit('on-list', {
|
|
333
351
|
params:this.getParams,
|
|
334
352
|
cb:(res)=>{
|
|
335
|
-
|
|
353
|
+
console.log(new Date().getTime()-time);
|
|
336
354
|
//无数据处理
|
|
337
355
|
if(res === null){
|
|
338
356
|
this.hasNoData = true;
|
|
339
357
|
this.dataList = [];
|
|
340
|
-
this.page_token = ''
|
|
358
|
+
this.page_token = '1'
|
|
341
359
|
this.$xdHideLoading();
|
|
342
360
|
return
|
|
343
361
|
}
|
|
@@ -347,10 +365,7 @@ export default {
|
|
|
347
365
|
|
|
348
366
|
//整理为统一ID
|
|
349
367
|
res.items = res.items.map((item,index)=>{
|
|
350
|
-
|
|
351
|
-
item.id = item.product_id || item.resource_shop_id || item.cinema_id
|
|
352
|
-
}
|
|
353
|
-
//item.list_title = `${index} - ${ item.list_title}`
|
|
368
|
+
item.cuid = `${this.$xdUniHelper.randomChar(5)}_${item.product_id || item.resource_shop_id || item.cinema_id || item.film_id}`
|
|
354
369
|
return item;
|
|
355
370
|
})
|
|
356
371
|
|
|
@@ -370,10 +385,47 @@ export default {
|
|
|
370
385
|
this.dataList = (this.dataList||[]).concat(res.items);
|
|
371
386
|
this.page_token = res.next_page_token
|
|
372
387
|
this.hasNoData = false;
|
|
373
|
-
this.$
|
|
388
|
+
this.$nextTick(()=>{
|
|
389
|
+
setTimeout(()=>{
|
|
390
|
+
this.$xdHideLoading();
|
|
391
|
+
},300)
|
|
392
|
+
})
|
|
374
393
|
}
|
|
375
394
|
})
|
|
376
|
-
}
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
//影片
|
|
398
|
+
handleFilmDetail(film){
|
|
399
|
+
this.getParent().handleFilmDetail(film, this.dataConfig)
|
|
400
|
+
},
|
|
401
|
+
handleBuy(film){
|
|
402
|
+
this.getParent().handleBuy(film, this.dataConfig)
|
|
403
|
+
},
|
|
404
|
+
|
|
405
|
+
//影院
|
|
406
|
+
handleSchedule(cinema){
|
|
407
|
+
this.getParent().handleSchedule(cinema, this.dataConfig)
|
|
408
|
+
},
|
|
409
|
+
handleCashierDetail(cinema){
|
|
410
|
+
this.getParent().handleCashierDetail(cinema, this.dataConfig)
|
|
411
|
+
},
|
|
412
|
+
handleCodeDetail(cinema){
|
|
413
|
+
this.getParent().handleCodeDetail(cinema, this.dataConfig)
|
|
414
|
+
},
|
|
415
|
+
|
|
416
|
+
//门店
|
|
417
|
+
handleShopJhd(shop){
|
|
418
|
+
this.getParent().handleShopJhd(shop, this.dataConfig)
|
|
419
|
+
},
|
|
420
|
+
handleShopDetail(shop){
|
|
421
|
+
this.getParent().handleShopDetail(shop, this.dataConfig)
|
|
422
|
+
},
|
|
423
|
+
|
|
424
|
+
//商品
|
|
425
|
+
handleProductDetail(product){
|
|
426
|
+
this.getParent().handleProductDetail(product, this.dataConfig)
|
|
427
|
+
},
|
|
428
|
+
|
|
377
429
|
}
|
|
378
430
|
}
|
|
379
431
|
</script>
|