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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
  3. package/src/components/JfbBaseLogin/Attr.js +10 -0
  4. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +6 -1
  5. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
  6. package/src/components/JfbBaseTfkCardBind/Attr.js +80 -7
  7. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +112 -13
  8. package/src/components/JfbBaseTfkCardDetail/Attr.js +49 -1
  9. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +18 -9
  10. package/src/components/JfbBaseTfkCardLogin/Attr.js +223 -13
  11. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +118 -73
  12. package/src/components/JfbBaseTfkCardLogin/Mock.js +5 -535
  13. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +10 -6
  14. package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
  15. package/src/components/JfbBaseTfkSearch/AllList.vue +241 -135
  16. package/src/components/JfbBaseTfkSearch/Api.js +1 -1
  17. package/src/components/JfbBaseTfkSearch/Attr.js +203 -1
  18. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +127 -88
  19. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +14 -5
  20. package/src/components/JfbBaseTfkSearch/ContentShop.vue +2 -0
  21. package/src/components/JfbBaseTfkSearch/CusAttr.js +10 -0
  22. package/src/components/JfbBaseTfkSearch/CustomList.vue +130 -78
  23. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +164 -62
  24. package/src/components/JfbBaseTfkSearch/Mock.js +184 -32
  25. package/src/components/JfbBaseTfkSearch/listMixins.js +111 -75
  26. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
  27. package/src/mixins/componentsMixins.js +33 -3
  28. package/src/mixins/posterMixins.js +122 -0
  29. 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:$parentVm.outSpacing + 'rpx',
11
+ marginBottom:listItemStyle.outSpacing + 'rpx',
12
12
  padding:contMarginComp,
13
- borderRadius:$parentVm.contRradius+ 'rpx',
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="$parentVm.productConfig !== null && type_code === 'product'"
21
- :product-config="$parentVm.productConfig"
22
- :out-spacing="$parentVm.outSpacing"
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="$parentVm.outSpacing"></skeleton-shop>
26
- <skeleton-film v-if="type_code === 'film'" :out-spacing="$parentVm.outSpacing"></skeleton-film>
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.id"
35
+ :key="item.cuid"
36
36
  :style="{
37
- marginBottom:$parentVm.outSpacing + 'rpx',
38
- padding:contMarginComp,
39
- borderRadius:$parentVm.contRradius+ 'rpx',
40
- border: $parentVm.contBorder,
41
- boxShadow:$parentVm.contShadow,
42
- width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
43
- height: heightRpx,
44
- backgroundColor: $parentVm.contBgColor
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="$parentVm.outSpacing"
53
- :color="$parentVm.mainColor"
54
- :border-radius="$parentVm.imgRradius"
55
- @on-film-detail="(film_id)=>{$parentVm.handleFilmDetail(film_id, dataConfig)}"
56
- @on-buy="(film_id)=>{$parentVm.handleBuy(film_id, dataConfig)}"
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="$parentVm.outSpacing"
65
- :color="{SEAT:$parentVm.mainColor,CODE:$parentVm.subMainColor,SELL:$parentVm.successColor}"
66
- :border-radius="$parentVm.imgRradius"
67
- @on-schedule="(cinema)=>{$parentVm.handleSchedule(cinema,dataConfig)}"
68
- @on-cashier-detail="(cinema)=>{$parentVm.handleCashierDetail(cinema,dataConfig)}"
69
- @on-code-detail="(cinema)=>{$parentVm.handleCodeDetail(cinema,dataConfig)}"
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="$parentVm.outSpacing"
76
+ :out-spacing="listItemStyle.outSpacing"
76
77
  :item="item"
77
- :color="$parentVm.mainColor"
78
- :border-radius="$parentVm.imgRradius"
79
- :is-echange="'Y' || $parentVm.isShowExchange"
80
- @on-shop-jhd="(shop)=>{$parentVm.handleShopJhd(shop,dataConfig)}"
81
- @on-shop-detail="(shop)=>{$parentVm.handleShopDetail(shop,dataConfig)}"
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="$parentVm.productConfig !== null && type_code === 'product'"
85
+ v-if="productConfig !== null && type_code === 'product'"
85
86
  style="width: 100%; height: 100%"
86
- :product-config="$parentVm.productConfig"
87
- :out-spacing="$parentVm.outSpacing"
87
+ :keyword="keyword"
88
+ :product-config="productConfig"
89
+ :out-spacing="listItemStyle.outSpacing"
88
90
  :item="item"
89
- :height="outItemProduct"
90
- :color="$parentVm.mainColor"
91
- :border-radius="$parentVm.imgRradius"
91
+ :brand-color="listItemStyle.brandColor"
92
+ :color="listItemStyle.mainColor"
93
+ :border-radius="listItemStyle.imgRradius"
92
94
  :cell="type_other"
93
- @on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
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.id"
104
+ :key="item.cuid"
103
105
  :style="{
104
- marginBottom:$parentVm.outSpacing + 'rpx',
106
+ marginBottom:listItemStyle.outSpacing + 'rpx',
105
107
  padding:contMarginComp,
106
- borderRadius:$parentVm.contRradius+ 'rpx',
107
- border: $parentVm.contBorder,
108
- boxShadow:$parentVm.contShadow,
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: $parentVm.contBgColor
113
+ backgroundColor: listItemStyle.contBgColor
112
114
  }"
113
115
  >
114
116
  <content-product
115
- v-if="$parentVm.productConfig !== null"
117
+
118
+ v-if="productConfig !== null"
116
119
  style="width: 100%; height: 100%"
117
- :product-config="$parentVm.productConfig"
118
- :out-spacing="$parentVm.outSpacing"
120
+ :keyword="keyword"
121
+ :product-config="productConfig"
122
+ :out-spacing="listItemStyle.outSpacing"
119
123
  :item="item"
120
124
  :height="outItemProduct"
121
- :color="$parentVm.mainColor"
122
- :border-radius="$parentVm.imgRradius"
125
+ :color="listItemStyle.mainColor"
126
+ :brand-color="listItemStyle.brandColor"
127
+ :border-radius="listItemStyle.imgRradius"
123
128
  :cell="type_other"
124
- @on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
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
- let str = `${this.$parentVm.checkValue(this.$parentVm.contMargin.top, 20)}rpx`;
200
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20)}rpx`;
201
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.bottom, 20)}rpx`;
202
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20)}rpx`;
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.$parentVm.outSpacing))/2;
208
- num = num - this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20) - this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20);
209
- return num - this.$parentVm.contBorderWidth * 2
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
- $parentVm:null,
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 = 12
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', ($vm)=>{
309
- this.$parentVm = $vm;
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
- if(!item.id){
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.$xdHideLoading();
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>