jufubao-base 1.0.289-beta2 → 1.0.290-beta1

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseFooter/Attr.js +155 -10
  3. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +43 -96
  4. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +14 -2
  5. package/src/components/JfbBaseTfkSearch/Api.js +0 -15
  6. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -10
  7. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +7 -247
  8. package/src/components/JfbBaseUserInfo/Attr.js +0 -12
  9. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -8
  10. package/src/mixins/componentsMixins.js +55 -363
  11. package/src/mixins/posterMixins.js +199 -27
  12. package/src/components/CusCouponChose/CusCouponChose.vue +0 -1027
  13. package/src/components/CusCouponItem/CusCouponItem.vue +0 -298
  14. package/src/components/CusEnter/CusEnter.vue +0 -360
  15. package/src/components/CusPoster/CusPoster.vue +0 -212
  16. package/src/components/CusPoster/CusSwiperDot.vue +0 -234
  17. package/src/components/CusProduct/CusProduct.vue +0 -372
  18. package/src/components/CusShops/CusShops.vue +0 -518
  19. package/src/components/CusSwiperDot/CusSwiperDot.vue +0 -234
  20. package/src/components/CusTab/CusTab.vue +0 -411
  21. package/src/components/CusVideo/CusVideo.vue +0 -170
  22. package/src/components/JfbBaseFooter/cusAttr/advanced.js +0 -12
  23. package/src/components/JfbBaseFooter/cusAttr/content.js +0 -447
  24. package/src/components/JfbBaseFooter/cusAttr/style.js +0 -7
  25. package/src/components/JfbBaseFooter/cusAttr/tools.js +0 -17
  26. package/src/components/JfbBaseTfkSearch/XdQueryFilter.vue +0 -354
  27. package/src/components/JfbBaseTfkSearch/XdQuerySort.vue +0 -192
  28. package/src/mixins/productCompMixins.js +0 -252
@@ -34,41 +34,7 @@
34
34
  >{{ item.label }}</view>
35
35
  </view>
36
36
  </view>
37
- <view class="menu_filter" v-if="(tabId!=='all'&&filterTab.length)||(tabId!=='all'&&showComprehensive)||(tabId!=='all'&&showSort)">
38
- <view @click="handleGetFilterItem({value:'comprehensive'})" v-if="showComprehensive" class="menu_filter_item" >
39
- <view>{{sortData.label || '综合'}}</view>
40
- <xd-font-icon size="24" icon="iconxia_down" color="#333"></xd-font-icon>
41
- </view>
42
- <view @click="handleGetFilterItem({value:'sort'})" v-if="showSort" class="menu_filter_item" >
43
- <view>{{sortData.label || '排序'}}</view>
44
- <xd-font-icon size="24" icon="iconxia_down" color="#333"></xd-font-icon>
45
- </view>
46
- <view class="menu_filter_item" @click="handleGetFilterItem(item)" v-for="(item,index) in filterTab" :key="index">
47
- <view>
48
- {{ item.label }}
49
- </view>
50
- <xd-font-icon v-if="item.icon" :size="item.size" :icon="item.icon" color="#333"></xd-font-icon>
51
- </view>
52
- </view>
53
- <view class="query_modal">
54
- <xd-query-filter
55
- v-if="showMoreFilterType.includes(curQueryTab)&&searchFilterList.length"
56
- :key="curQueryTab"
57
- :list="searchFilterList"
58
- :filter-type="curQueryTab"
59
- :collapse-num="6"
60
- :filter-selected="selectFilterParams"
61
- @onConfirm="handleQueryFilter"></xd-query-filter>
62
- <xd-query-sort
63
- v-if="(curQueryTab === 'comprehensive' || curQueryTab === 'sort')"
64
- :list="sortList"
65
- :filter-style="filterStyle"
66
- :sort="sort"
67
- @onConfirm="handleQuerySort"
68
- ></xd-query-sort>
69
- </view>
70
37
  </view>
71
-
72
38
  <view v-if="!isPreview" :style="{height: menuHeight}"></view>
73
39
  <view class="tfk-search" :style="{padding: outSpacing + 'rpx'}">
74
40
  <all-list v-if="tabId === 'all'"
@@ -84,7 +50,6 @@
84
50
  v-else
85
51
  :tab-id="tabId"
86
52
  :keyword="keyword"
87
- :refresh="refresh"
88
53
  :list-item-style="listItemStyle"
89
54
  :product-config="productConfig"
90
55
  ref="customList"
@@ -109,8 +74,6 @@
109
74
  import CustomList from "./CustomList.vue";
110
75
  import AllList from "./AllList.vue";
111
76
  import { mapState } from 'vuex';
112
- import XdQueryFilter from "./XdQueryFilter"
113
- import XdQuerySort from "./XdQuerySort"
114
77
 
115
78
  class EmitParent {
116
79
  constructor(options) {
@@ -125,8 +88,6 @@
125
88
  XdFontIcon,
126
89
  AllList,
127
90
  XdSearchHistory,
128
- XdQueryFilter,
129
- XdQuerySort
130
91
  },
131
92
  mixins: [
132
93
  componentsMixins, extsMixins, JfbBaseTfkSearchMixin,listMixins
@@ -167,42 +128,15 @@
167
128
  allModuleItemContRadius: 16,
168
129
  allModuleItemContBgColor: "#FFFFFF",
169
130
  emitParent:{},
170
- is_plus_site: false,
171
- closeMask: true,
172
- filterTab: [],
173
- filterTabIcon: [
174
- { value: 'area', label: '区域',icon: 'icondizhitubiao', size: 24 },
175
- { value: 'brand', label: '品牌',icon: 'iconxia_down', size: 18 },
176
- { value: 'shop', label: '门店分类',icon: 'iconxia_down', size: 18 },
177
- { value: 'filter', label: '筛选', icon: 'iconshaixuanbiaoji_mian', size: 24 },
178
- { value: 'comprehensive', label: '综合', icon: 'iconxia_down', size: 18 },
179
- { value: 'sort', label: '排序', icon: 'iconxia_down', size: 18 },
180
- { value: 'business_line', label: '业务线', icon: 'iconxia_down', size: 18 },
181
- ],
182
- curQueryTab: "",//刷新KEY(切换标签)
183
- searchFilterList: [],
184
- searchFilterParams: {},
185
- selectFilterParams: {},
186
- filterType: '',
187
- sort: "",
188
- sortData: {},
189
- filterStyle: {},
190
- showMoreFilterType: ['filter', 'shop', 'brand', 'area', 'delivery_method', 'shop_category', 'business_line','namespace'],
191
- refresh: new Date().getTime(),
192
- showComprehensive: false,
193
- showSort:false,
194
- brands: [],
195
- namespace: '',
196
- sortList: []
131
+ is_plus_site: false
197
132
  }
198
133
  },
199
134
  computed: {
200
135
  ...mapState({
201
136
  siteInfo: state => state.siteInfo,
202
- stateCity: state => state.cityLocation.city,
203
137
  }),
204
138
  showMenuList(){
205
- return [{ label: "全部", value: "all" }, ...this.menuList]
139
+ return [{label: "全部", value: "all"}, ...this.menuList]
206
140
  },
207
141
  menuWrapBoxStyle(){
208
142
  let padding = `${this.checkValue(this.menuMargin.top, 20)}rpx`;
@@ -252,9 +186,6 @@
252
186
  let height = this.checkValue(menuMargin.top, 20) + this.checkValue(menuMargin.bottom, 20) +
253
187
  this.checkValue(menuPadding.top, 20) + this.checkValue(menuPadding.bottom, 20) +
254
188
  this.checkValue(menuItemPadding.top, 20) + this.checkValue(menuItemPadding.bottom, 20);
255
- if (this.filterTab.length > 0) {
256
- height += 90
257
- }
258
189
  return (height + 40) + 'rpx';
259
190
  },
260
191
  menuItemActiveStyle(){
@@ -298,7 +229,8 @@
298
229
  }
299
230
  },
300
231
  },
301
- created() {
232
+ created() {
233
+
302
234
  this.emitParent = new EmitParent({
303
235
  getParent: ()=>{
304
236
  return this;
@@ -316,8 +248,8 @@
316
248
  * @param cb {Function}
317
249
  */
318
250
  handleList({params, cb}){
319
- let data = { ...params, sort: this.sort, ...this.searchFilterParams };
320
- if(this.tabId === 'all'){
251
+ let data = {...params};
252
+ if(this.tabId === 'all'){
321
253
  data['search_range'] = this.searchScope.map(item => item.value.split("@")[0]).join(',');
322
254
  }
323
255
  if(this.productConfig.isShowDiscount==='Y'){
@@ -381,170 +313,19 @@
381
313
  this.allModuleItemContPadding = getContainerPropsValue(container, 'content.allModuleItemContPadding', {});
382
314
  this.allModuleItemContRadius = getContainerPropsValue(container, 'content.allModuleItemContRadius', 16);
383
315
  this.allModuleItemContBgColor = getContainerPropsValue(container, 'content.allModuleItemContBgColor', '#FFFFFF');
316
+
384
317
  if(this.$configProject['isPreview']){
385
318
  this.menuList = this.searchScope;
386
319
  this.isPreview = true;
387
320
  }
388
- this.filterStyle = {
389
- filterPadding: this.getMarginAndPadding({},20),
390
- filterRowSpacing:20,
391
- filterListColor:'#f9f9f9',
392
- filterFontStyle: this.getFontAndBgcStyle({},{
393
- fontSize: '26px',
394
- color: '#333',
395
- fontWeight: 'normal',
396
- bgColor: 'rgba(0,0,0,0)'
397
- }),
398
- filterActFontStyle: this.getFontAndBgcStyle({},{
399
- fontSize: '26px',
400
- color: this.mainColor,
401
- fontWeight: 'normal',
402
- bgColor: 'rgba(0,0,0,0)'
403
- },'act')
404
- };
405
321
  },
406
322
  handleSwitchMenu(item){
407
323
  this.tabId = item.value;
408
- this.namespace = item.namespace;
409
- this.filterType = item.type
410
- this.curQueryTab = '';
411
- this.searchFilterParams = {};
412
- this.sortData = {};
413
- this.sort = '';
414
- if (item.filter_item && item.filter_item.tab_filter) {
415
- // 综合和排序的显示状态,当选中综合或排序时,下拉菜单取本地数据
416
- this.showComprehensive = item.filter_item.tab_filter.find(item => item.value === 'comprehensive')
417
- this.showSort = item.filter_item.tab_filter.find(item => item.value === 'sort')
418
- let filter_item = item.filter_item.tab_filter.filter(item => {
419
- return (item.value !== 'comprehensive'&&item.value !== 'sort')
420
- })
421
- this.filterTab = filter_item.map(item => {
422
- let temp = this.filterTabIcon.find(Sitem => item.value === Sitem.value);
423
- return {
424
- ...item,
425
- icon: temp ? temp.icon : '',
426
- size: temp ? temp.size : ''
427
- }
428
- })
429
- } else {
430
- this.filterTab = []
431
- }
432
324
  uni.pageScrollTo({
433
325
  scrollTop: 0,
434
326
  duration: 0
435
327
  });
436
328
  },
437
- handleGetFilterItem(item) {
438
- //设置城市
439
- let city_code = ''
440
- if(this.stateCity && this.stateCity.city_code) {
441
- city_code = this.stateCity.city_code;
442
- }
443
- let data = {
444
- type: this.filterType,
445
- namespace: this.namespace,
446
- filter_item: item.value,
447
- city_code
448
- }
449
- if(item.value === this.curQueryTab){
450
- this.curQueryTab = '';
451
- return
452
- }
453
- else {
454
- this.curQueryTab = item.value;
455
- }
456
- if (this.curQueryTab === 'sort') {
457
- this.sortList = [{
458
- label: "排序",
459
- key: "default",
460
- value: "default"
461
- }]
462
- } else if (this.curQueryTab === 'comprehensive') {
463
- this.sortList = [
464
- {
465
- label: "综合",
466
- key: "default",
467
- value: "default"
468
- },
469
- {
470
- label: "销量",
471
- key: "sale_num",
472
- children: [
473
- {label: "由高到低", value: 'sale_num_desc'},
474
- {label: "由低到高", value: 'sale_num_asc'}
475
- ]
476
- },
477
- {
478
- label: "价格",
479
- key: "price",
480
- children: [
481
- {label: "由高到低", value: 'price_desc'},
482
- {label: "由低到高", value: 'price_asc'}
483
- ]
484
- }
485
- ]
486
- }
487
- const sortMap = {
488
- 'sales_volume': 'sale_num_desc',
489
- 'price': 'price_desc',
490
- default: 'default'
491
- };
492
-
493
- if (sortMap[item.value]) {
494
- this.sort = sortMap[item.value];
495
- this.refresh = new Date().getTime();
496
- return;
497
- }
498
-
499
- jfbRootExec("getTfkSearchFilterItems", {
500
- vm: this,
501
- data: data
502
- }).then(res => {
503
- this.searchFilterList = res.items || [];
504
- }).catch(err => {
505
- this.$xdLog.catch(err);
506
- })
507
- },
508
- handleQueryFilter({ items, ids, labels }) {
509
- const maps = {
510
- 'brand': 'brands',
511
- 'area': 'area_codes',
512
- 'delivery_method': 'delivery_methods',
513
- 'shop_category': 'category_ids',
514
- 'business_line': 'business_lines'
515
- };
516
- Object.keys(items).map(key => {
517
- let keys = Object.keys(maps);
518
- if (keys.indexOf(key) > -1) {
519
- this.searchFilterParams[maps[key]] = ids[key]
520
- }
521
- // if (key === 'brand') {
522
- // this.searchFilterParams.brands = ids[key]
523
- // }
524
- // if (key === 'area') {
525
- // this.searchFilterParams.area_codes = ids[key]
526
- // }
527
- // if (key === 'delivery_method') {
528
- // this.searchFilterParams.delivery_methods = ids[key]
529
- // }
530
- // if (key === 'shop_category') {
531
- // this.searchFilterParams.category_ids = ids[key]
532
- // }
533
- // if (key === 'business_line') {
534
- // this.searchFilterParams.business_lines = ids[key]
535
- // }
536
- this.selectFilterParams[key] = ids[key]
537
- })
538
- this.curQueryTab = '';
539
- this.refresh = new Date().getTime();
540
- },
541
- handleQuerySort(sortData){
542
- if(this.sort === sortData.value) return false;
543
- this.sortData = sortData;
544
- this.sort = sortData.value;
545
- this.curQueryTab = '';
546
- this.refresh = new Date().getTime();
547
- },
548
329
  handleToSearch(item){
549
330
  this.keyword = item;
550
331
  jfbRootFnExec(this, 'onCustomEvent')("baseTfkSearch@keyword", item);
@@ -599,27 +380,6 @@
599
380
  }
600
381
  }
601
382
  }
602
- .menu_filter {
603
- background:#fff;
604
- display: flex;
605
- justify-content: space-around;
606
- align-items: center;
607
- padding: 26rpx 0;
608
- border-top: 1px solid #f8f8f8;
609
- &_item {
610
- color: #333;
611
- font-size: 28rpx;
612
- display: flex;
613
- align-items: center;
614
- justify-content: center;
615
- & > view:first-child{
616
- margin-right: 14rpx;
617
- }
618
- }
619
- }
620
- .query_modal {
621
- background-color: #fff;
622
- }
623
383
  }
624
384
  }
625
385
  </style>
@@ -696,18 +696,6 @@ export default {
696
696
  },
697
697
  inline: false,
698
698
  },
699
- data['is_plus_site'] === 'Y' && {
700
- label: '已省金额路径:',
701
- ele: 'xd-select-pages-path',
702
- valueKey: 'savePath',
703
- groupKey: 'advanced',
704
- placeholder: '请选择已省金额路径',
705
- value: data['savePath'] || null,
706
- setting: {
707
- router: XdBus.getParentApi('getPagesTree'),
708
- },
709
- inline: false,
710
- },
711
699
  {
712
700
  label: '',
713
701
  ele: 'slot',
@@ -25,7 +25,7 @@
25
25
  <view v-else>普通用户</view>
26
26
  </view>
27
27
  <view>
28
- <view @click="handleToSave" v-if="is_vip==='Y'">
28
+ <view v-if="is_vip==='Y'">
29
29
  <text style="color:#D19E6B;">已省</text><text style="color: #FEE9CC;">¥{{ $xdUniHelper.divisionFloatNumber(save_amount, 100) }}</text>
30
30
  </view>
31
31
  <!-- <view v-else>
@@ -316,7 +316,6 @@
316
316
  plusPageBgImg: "",
317
317
  normalBgImg: "",
318
318
  normalPageBgImg: "",
319
- savePath: ''
320
319
  }
321
320
  },
322
321
  watch: {
@@ -463,7 +462,7 @@
463
462
  this.profilePath = getContainerPropsValue(container, 'content.profilePath', { value: "" }).value;
464
463
  this.plusNickStyle = getContainerPropsValue(container, 'content.plusNickStyle', {});
465
464
  this.normalNickStyle = getContainerPropsValue(container, 'content.normalNickStyle', {});
466
- this.savePath = getContainerPropsValue(container, 'content.savePath', { value: "" }).value;
465
+
467
466
  if(this.is_plus_site === 'Y'){
468
467
  let bg = this.is_vip === 'Y' ? this.plusPageBgImg : this.normalPageBgImg;
469
468
  if(this.$configProject['isPreview']){
@@ -505,11 +504,6 @@
505
504
  url: this.codePath
506
505
  })
507
506
  },
508
- handleToSave() {
509
- this.$xdUniHelper.navigateTo({
510
- url: this.savePath
511
- })
512
- },
513
507
  onJfbShow(options) {
514
508
  this.onJfbLoad(options);
515
509
  },