jufubao-mall 2.0.16-beta52 → 2.0.16-beta53

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.16-beta52",
3
+ "version": "2.0.16-beta53",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -93,11 +93,12 @@
93
93
  </view>
94
94
  <view v-show="showQueryModal" class="query_modal">
95
95
  <xd-query-filter
96
- v-if="['filter','shop_category','brand','area'].includes(curQueryTab)"
96
+ v-if="['filter','shop_category','business_line','brand','area'].includes(curQueryTab)"
97
97
  :key="curQueryTab"
98
98
  :list="searchFilterList"
99
99
  :filter-type="curQueryTab"
100
100
  :collapse-num="6"
101
+ :padding="bodyPadding"
101
102
  :filter-selected="searchFilterParams"
102
103
  @onConfirm="handleQueryFilter"></xd-query-filter>
103
104
  </view>
@@ -288,6 +289,8 @@
288
289
  queryFilterHight:0,
289
290
  menuGreater:'N',
290
291
  queryGreater:'N',
292
+ isMore:'N',
293
+ loading: false, //是否正在加载
291
294
  }
292
295
  },
293
296
  filters:{
@@ -359,7 +362,7 @@
359
362
  let tabs = [];
360
363
  if(this.filterMode.includes('area')) tabs.push({value: 'area', label: '区域', icon: 'icondizhitubiao',size: 24});
361
364
  if(this.filterMode.includes('brand')) tabs.push({value: 'brand', label: '品牌', icon: 'iconxia_down',size: 18});
362
- if(this.filterMode.includes('namespace')) tabs.push({value: 'namespace', label: '业务线', icon: 'iconxia_down',size: 18});
365
+ if(this.filterMode.includes('business_line')) tabs.push({value: 'business_line', label: '业务线', icon: 'iconxia_down',size: 18});
363
366
  if(this.filterMode.includes('shop_category')) tabs.push({value: 'shop_category', label: '门店分类', icon: 'iconxia_down',size: 18});
364
367
  console.log(this.filterMode,this.filterMode==['filter'],this.filterMode.includes('filter'),['filter'].includes('filter'),'ffffffff')
365
368
  if(this.filterMode.includes('filter')){
@@ -389,6 +392,7 @@
389
392
  handler(n,o){
390
393
  if(n&&n!==o){
391
394
  if(n==='Y'){
395
+ console.log(this.menuWrapTop/this.$rpxNum+this.bodyPadding.top,this.menuWrapTop/this.$rpxNum,this.bodyPadding.top,'aaaaaa')
392
396
  this.menuWrapStyle = {
393
397
  top: this.menuWrapTop/this.$rpxNum+this.bodyPadding.top+'rpx',
394
398
  position: 'absolute',
@@ -431,6 +435,16 @@
431
435
  }
432
436
  }
433
437
  }
438
+ },
439
+ isMore:{
440
+ handler(n,o){
441
+ if(n&&n!==o){
442
+ if(n==='Y'&&o==='N'){
443
+ this.menuWrapTop = this.scrollTop;
444
+ console.log(this.menuWrapTop,'this.menuWrapTop')
445
+ }
446
+ }
447
+ }
434
448
  }
435
449
  },
436
450
  created() {
@@ -449,11 +463,16 @@
449
463
  console.log(this.layoutInfo,'this.layoutInfo')
450
464
  this.scrollTop = scrollTop;
451
465
  this.$nextTick(() => {
452
- // console.log(scrollTop / this.$rpxNum,this.num-this.menuWrapNum,'aaaaaaa')
453
- if(Math.floor(scrollTop / this.$rpxNum)===Math.floor(this.num-this.menuWrapNum)){
466
+ // console.log(Math.floor(scrollTop / this.$rpxNum),Math.floor(this.num-this.menuWrapNum),this.num,this.menuWrapNum,'asaaaaaaa')
467
+ if(Math.floor(scrollTop / this.$rpxNum)==Math.floor(this.num-this.menuWrapNum)){
454
468
  // debugger
455
- console.log(scrollTop,'bbbbbb')
456
- this.menuWrapTop = scrollTop
469
+ // console.log(scrollTop,'bbbbbb')
470
+ // this.menuWrapTop = scrollTop
471
+ }
472
+ if(Math.floor(scrollTop / this.$rpxNum)>Math.floor(this.num-this.menuWrapNum)){
473
+ this.isMore = 'Y';
474
+ }else{
475
+ this.isMore = 'N';
457
476
  }
458
477
  if(scrollTop / this.$rpxNum>Math.floor(this.num-this.menuWrapNum)+this.bodyPadding.top){
459
478
  this.menuGreater = 'Y';
@@ -654,6 +673,7 @@
654
673
  this.initAttr = true;
655
674
  },
656
675
  switchQueryModal(curQueryTab){
676
+ console.log(curQueryTab,'curQueryTab')
657
677
  if(this.curQueryTab === curQueryTab) {
658
678
  this.showQueryModal = !this.showQueryModal;
659
679
  }
@@ -735,27 +755,34 @@
735
755
  }
736
756
  if(this.area_code) data.area_code = this.area_code;
737
757
  this.$xdShowLoading({});
758
+ this.loading = true;
738
759
  jfbRootExec("resourceGetShopList", {
739
760
  vm: this,
740
761
  data: this.$xdUniHelper.deleteParamEmptyKey(data)
741
762
  }).then(res => {
742
763
  this.$xdHideLoading();
764
+ this.loading = false;
743
765
  let list = res.list.map(item => {
744
766
  item.shop_icon = getServiceUrl(item.shop_icon, 'size2');
745
767
  return item;
746
768
  });
747
769
  console.log(list,'list')
748
770
  // debugger
749
- if(this.page_token == 1) this.shopList = list;
750
- else this.shopList = this.shopList.concat(list);
771
+ if(this.page_token == '1'){
772
+ this.shopList = res.list || [];
773
+ }else{
774
+ this.shopList = this.shopList.concat(res.list);
775
+ }
751
776
  this.next_page_token = res.next_page_token;
752
777
  this.hasNext = res.next_page_token !== "";
753
- if(this.page_token == 1){
754
- uni.pageScrollTo({
755
- scrollTop: 0,
756
- duration: 0
757
- })
758
- }
778
+ // if(this.page_token == 1){
779
+ // uni.pageScrollTo({
780
+ // scrollTop: 0,
781
+ // duration: 0
782
+ // })
783
+ // }
784
+ }).catch(err=>{
785
+ this.loading = false;
759
786
  })
760
787
  },
761
788
  getParams(){
@@ -779,7 +806,7 @@
779
806
  getSFP('keyword',this.keyword);
780
807
  getSFP('brand_type',this.shopType);
781
808
  getSFP('consume_mode',this.serverType);
782
- getSFP('shop_category_ids',this.searchFilterParams['shop_category']);
809
+ getSFP('category_ids',this.searchFilterParams['shop_category']);
783
810
  getSFP('brand_ids',this.searchFilterParams['brand']);
784
811
  getSFP('area_codes',this.searchFilterParams['area']);
785
812
  getSFP('namespaces',this.searchFilterParams['business_line']);
@@ -961,11 +988,10 @@
961
988
  this.watchScroll(options.e.scrollTop)
962
989
  },
963
990
  onJfbReachBottom(options) {
964
- if(this.hasNext){
965
- this.page_token = this.next_page_token;
991
+ if(this.loading) return;
992
+ if(this.hasNextPage){
966
993
  this.getList();
967
994
  }
968
- // console.log('event.onJfbReachBottom', options)
969
995
  },
970
996
  onJfbShow(options) {
971
997
  console.log('event.onJfbShow', options)
@@ -1139,6 +1165,7 @@
1139
1165
  },
1140
1166
  //==evnet===
1141
1167
  handleQueryFilter({items, ids, labels}){
1168
+ this.page_token = '1';
1142
1169
  console.log(items, ids, labels,'handleQueryFilter')
1143
1170
  Object.keys(items).map(key=>{
1144
1171
  this.$set(this.searchFilterParams,key,ids[key])
@@ -1169,7 +1196,7 @@
1169
1196
  border-bottom: 1px solid #EEEEEE;
1170
1197
  width: 100%;
1171
1198
  left: 0;
1172
- z-index: 999;
1199
+ z-index: 99;
1173
1200
  position: fixed;
1174
1201
  width: 100%;
1175
1202
 
@@ -248,6 +248,25 @@ module.exports = {
248
248
  third_platform_code: ""
249
249
  }
250
250
  ]
251
+ },
252
+ {
253
+ "title": "业务线",
254
+ "value": "business_line",
255
+ "multiple": true,
256
+ "options": [
257
+ {
258
+ "label": "电影(勿改)",
259
+ "value": "movie"
260
+ },
261
+ {
262
+ "label": "蛋糕(勿改)",
263
+ "value": "cake"
264
+ },
265
+ {
266
+ "label": "旅游(勿改)",
267
+ "value": "travel"
268
+ }
269
+ ]
251
270
  }
252
271
  ],
253
272
  request_id: "f1733f02aa8c9672"
@@ -75,6 +75,12 @@ export default {
75
75
  return {}
76
76
  }
77
77
  },
78
+ padding:{
79
+ type: Object,
80
+ default(){
81
+ return {}
82
+ }
83
+ },
78
84
  },
79
85
  computed:{
80
86
  itemStyleComp(){
@@ -82,7 +88,7 @@ export default {
82
88
 
83
89
  let outWidth = uni.getSystemInfoSync().safeArea.width;
84
90
  let columnSpacingWidth = columnSpacing * (column-1) * this.$rpxNum;
85
- let marginRL = 96 * this.$rpxNum; //左右默认48rpx
91
+ let marginRL = 96 * this.$rpxNum +this.padding.left+this.padding.right; //左右默认48rpx
86
92
  let paddingRL = 16 * this.$rpxNum
87
93
 
88
94
  return {
@@ -145,6 +151,7 @@ export default {
145
151
  },
146
152
  },
147
153
  created(){
154
+ console.log(this.padding, this.list,'sssssaaaaa')
148
155
  this.initData();
149
156
  },
150
157
  methods: {
@@ -203,6 +210,7 @@ export default {
203
210
  });
204
211
 
205
212
  this.filterTabs = filterTabs
213
+ console.log(this.filterTabs, 'filterTabs')
206
214
  },
207
215
  isActive(tab, value){
208
216
  if(!this.selectedIds[tab.value]) return false
@@ -285,7 +293,7 @@ export default {
285
293
  <style lang="less" scoped>
286
294
  .filter_wrap{
287
295
  overflow: auto;
288
- max-height: 50vh;
296
+ max-height: 30vh!important;
289
297
 
290
298
  .filter_item{
291
299
  &:last-child {
@@ -30,8 +30,8 @@ export default (data, gValue, gColor, oldData) => {
30
30
  let defQuickEntry = [
31
31
  {check:true,value:'jhd',input:data.jhdName||'',placeholder:'聚好兑名称,默认“聚好兑”'},
32
32
  {check:true,value:'scan',input:data.scanName||'', placeholder:'扫一扫名称,默认“扫一扫”'},
33
- {check:true,value:'takeGoods',input:data.takeGoodsName||'', placeholder:'展快捷码名称,默认“展快捷码”'},
34
- {check:true,value:'buyTicket',input:data.buyTicketName||'', placeholder:'去购票名称,默认“去购票”'},
33
+ {check:true,value:'qp',input:data.takeGoodsName||'', placeholder:'展快捷码名称,默认“展快捷码”'},
34
+ {check:false,value:'seat',input:data.buyTicketName||'', placeholder:'去购票名称,默认“去购票”'},
35
35
  // {check: false,value:'code',input:data.code||'',placeholder:'电子码名称,默认“电子码”'},
36
36
  // {check: false,value:'hdSelf',input:data.hdSelf||'',placeholder:'到店取名称,默认“去点餐”'},
37
37
  ];
@@ -208,7 +208,7 @@ export default (data, gValue, gColor, oldData) => {
208
208
  list:[
209
209
  {"label": "区域", "value": 'area'},
210
210
  {"label": "品牌", "value": 'brand'},
211
- {"label": "业务线", "value": 'namespace'},
211
+ {"label": "业务线", "value": 'business_line'},
212
212
  {"label": "门店分类", "value": 'shop_category'},
213
213
  {"label": "筛选", "value": 'filter'},
214
214
  ],
@@ -317,7 +317,7 @@ export default (data, gValue, gColor, oldData) => {
317
317
  label: '快捷入口',
318
318
  ele: 'xd-cus-switch',
319
319
  valueKey: 'showQuickEntry',
320
- value: dataVal({data, key:'showQuickEntry', dValue:"Y", gValue}),
320
+ value: dataVal({data, key:'showQuickEntry', dValue:"N", gValue}),
321
321
  className: 'input100',
322
322
  groupKey:'content',
323
323
  labelInline:true,