jufubao-mall 2.0.44-beta2 → 2.0.45

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.44-beta2",
3
+ "version": "2.0.45",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -814,8 +814,12 @@ export default {
814
814
  }),
815
815
  },
816
816
  }).then((res) => {
817
+ const hasValue = (v) => v !== undefined && v !== null && `${v}` !== "";
818
+ let url = this.orderConfirmPath + `?order_id=${res.cart_order_id}`;
819
+ if (hasValue(this.gift_scene)) url += `&scene=${encodeURIComponent(this.gift_scene)}`;
820
+ if (hasValue(gift_id)) url += `&gift_partner=${encodeURIComponent(gift_id)}`;
817
821
  this.$xdUniHelper.navigateTo({
818
- url: this.orderConfirmPath + `?order_id=${res.cart_order_id}&scene=${this.gift_scene}&gift_partner=${gift_id}`,
822
+ url,
819
823
  });
820
824
  });
821
825
  },
@@ -26,7 +26,7 @@ module.exports = [
26
26
  disabled: true
27
27
  },
28
28
  {
29
- mapFnName: "getNewSearchFilterList",
29
+ mapFnName: "getMallNewSearchFilterList",
30
30
  title: "获取搜索过滤条件",
31
31
  path: "/mall/v1/msearch/search-filter",
32
32
  isRule: true,
@@ -24,6 +24,15 @@
24
24
  v-if="showQuery === 'Y' && searchFilterList.length > 0"
25
25
  :style="[queryWrapStyle]"
26
26
  >
27
+ <view v-if="topNavStatus !== 'N'" class="top_category">
28
+ <view class="top_item"
29
+ v-for="(item, i) in topShowItemsComp"
30
+ :key="item.value"
31
+ :class="{active: topIndex === i}"
32
+ :style="[topCategoryItemStyleComp]"
33
+ @click="handleTopItemClick(item, i)"
34
+ >{{item.label}}</view>
35
+ </view>
27
36
  <view class="query_wrap_tabs">
28
37
  <view class="query_wrap_tabs_title" v-if="filterItemsComp.length === 1">店铺列表</view>
29
38
  <view
@@ -127,6 +136,7 @@
127
136
  resource_shop_id:'',//整理后门店ID
128
137
  options: {}, //页面参数变量
129
138
  keyword: "", //搜索关键字
139
+ consumeModeOfPanelAndUrl: [], //面板跟URL服务类型的交集
130
140
 
131
141
  //content
132
142
  xnamespace: "",//业务线
@@ -139,6 +149,18 @@
139
149
  cusEntry:{}, //入口状态
140
150
  initAttr: false, //状态完成
141
151
 
152
+ //顶部导航
153
+ topIndex: 0, //顶部导航当前索引
154
+ topNavStatus:'',//顶部导航状态
155
+ topAllService:'Y',//顶部服务状态
156
+ topCashierText:'',//线下核销
157
+ topCodeText:'',//电子码
158
+ topSeatText:'',//在线选座
159
+ topTravelText:'',//旅游门店
160
+ topFoodText:'',//在线点单
161
+ topSelfText:'',//自提
162
+ topStodText: "",//门店配送
163
+
142
164
  //style
143
165
  bodyPadding:{},
144
166
  contentBgColor:'rgba(0,0,0,0)',
@@ -185,8 +207,8 @@
185
207
  }, 500)
186
208
  }
187
209
  },
188
- showQuery(val){
189
- if(val === 'Y') this.getSearchFilterList();
210
+ async showQuery(val){
211
+ if(val === 'Y') this.searchFilterList = await this.getSearchFilterList();
190
212
  },
191
213
  },
192
214
  filters:{
@@ -221,7 +243,8 @@
221
243
  },
222
244
 
223
245
  cateFixedHeight(){
224
- return 80
246
+ if(this.topNavStatus === 'N') return 80;
247
+ return 160
225
248
  },
226
249
 
227
250
  queryWrapStyle(){
@@ -232,7 +255,8 @@
232
255
  backgroundColor: this.filterBgcColor|| '#fff',
233
256
  color: this.filterColor|| '#333',
234
257
  top,
235
- borderTop: this.filterStyle.filterTopBorder|| '2rpx solid #f8f8f8'
258
+ borderTop: this.filterStyle.filterTopBorder|| '2rpx solid #f8f8f8',
259
+ height: this.cateFixedHeight + 'rpx'
236
260
  }
237
261
  },
238
262
 
@@ -253,9 +277,46 @@
253
277
  let tabs = [];
254
278
  if(this.filterMode.includes('area')) tabs.push({value: 'area', label: '区域', icon: 'icondizhitubiao',size: 24});
255
279
  if(this.filterMode.includes('brand')) tabs.push({value: 'brand', label: '品牌', icon: 'iconxia_down',size: 18});
256
- if(this.filterMode.includes('shop_category')) tabs.push({value: 'shop_category', label: '门店分类', icon: 'iconxia_down',size: 18});
280
+ if(this.filterMode.includes('shop_category') && this.topNavStatus !== 'C') tabs.push({value: 'shop_category', label: '分类', icon: 'iconxia_down',size: 18});
257
281
  if(this.filterMode.includes('filter')) tabs.push({value: 'filter', label: '筛选', icon: 'iconshaixuanbiaoji_mian',size: 24});
258
282
  return tabs
283
+ },
284
+ topCategoryItemStyleComp(){
285
+ let w = 750 / this.topShowItemsComp.length;
286
+ let minW = 180;
287
+ return {
288
+ // width: w < minW ? minW + 'rpx' : w + 'rpx',
289
+ width: minW + 'rpx',
290
+ }
291
+ },
292
+ //顶部导航展示项目
293
+ topShowItemsComp(){
294
+ if(this.topNavStatus === 'N') return [];
295
+ if(this.topNavStatus === 'S'){
296
+ //显示-服务类型
297
+ let filterConsumeMode = [];
298
+ if(this.$configProject.isPreview){
299
+ filterConsumeMode = this.serverType;
300
+ }else{
301
+ //面板配置的服务类型 ∩ 链接参数的服务类型 ∩ 根据筛选接口返回的实际支持服务类型(consumeMode.options)
302
+ filterConsumeMode = this.consumeModeOfPanelAndUrl;
303
+ }
304
+ return [
305
+ this.topAllService === 'Y' && {label: '全部', value:'all'},
306
+ filterConsumeMode.includes("STOD") && {label: this.topStodText, value:'STOD'},
307
+ filterConsumeMode.includes("SELF") && {label: this.topSelfText, value:'SELF'},
308
+ filterConsumeMode.includes("SELL") && {label: this.topCashierText, value:'SELL'},
309
+ filterConsumeMode.includes("CODE") && {label: this.topCodeText, value:'CODE'},
310
+ filterConsumeMode.includes("SEAT") && {label: this.topSeatText, value:'SEAT'},
311
+ filterConsumeMode.includes("TRAVEL") && {label: this.topTravelText, value:'TRAVEL'},
312
+ filterConsumeMode.includes("HDSELF") && {label: this.topFoodText, value:'HDSELF'}
313
+ ].filter(i => i)
314
+ }else if(this.topNavStatus === 'C'){
315
+ //显示-门店分类
316
+ let shopCate = this.searchFilterList.find(item => item.value === 'shop_category');
317
+ return shopCate ? shopCate.options : [];
318
+ }
319
+ return [];
259
320
  }
260
321
  },
261
322
  created() {
@@ -275,6 +336,7 @@
275
336
  this.serverType = gCPVal(container, 'serverType', [['SELL']]);
276
337
  this.shopType = gCPVal(container, 'shopType', '');
277
338
  this.shopListStyle = gCPVal(container, 'shopListStyle', 'v2');
339
+ this.topNavStatus = gCPVal(container, 'topNavStatus', 'N');
278
340
  this.showQuery = gCPVal(container, 'showQuery', 'N');
279
341
  if(this.showQuery === 'Y') this.filterMode = gCPVal(container, 'filterMode', [['filter']])
280
342
  else this.filterMode = [];
@@ -303,6 +365,17 @@
303
365
  if(gCPVal(container,'showStorePrice','Y') === 'Y') cusContent.push('price'); // 折扣/价格
304
366
  this.cusContent = cusContent;
305
367
 
368
+ //顶部导航
369
+ this.topNavStatus = gCPVal(container,'topNavStatus', 'N');
370
+ this.topAllService = gCPVal(container,'topAllService', 'Y');
371
+ this.topCashierText = gCPVal(container,'topCashierText', '聚好兑');
372
+ this.topCodeText = gCPVal(container,'topCodeText', '电子码');
373
+ this.topSeatText = gCPVal(container,'topSeatText', '在线选座');
374
+ this.topTravelText = gCPVal(container,'topTravelText', '旅游门票');
375
+ this.topFoodText = gCPVal(container,'topFoodText', '在线点单');
376
+ this.topSelfText = gCPVal(container,'topSelfText', '支持自提');
377
+ this.topStodText = gCPVal(container,'topStodText', '门店配送');
378
+
306
379
  //style
307
380
  let sValue = `{"cardItemSpace":16,"margin":{"bottom":16,"left":16,"right":16,"top":16},"backgroundColor":"rgba(245, 245, 245, 1)"}`
308
381
  let shopStyle = this.getRelationStatus(container,'shopStyle', { cardItemSpaceStatus:['cardItemSpace'],bodyPaddingStatus:['bodyPadding']}, sValue);
@@ -348,14 +421,31 @@
348
421
  this.travelfPath = gCPVal(container, 'travelfPath', {value: ''}).value;
349
422
  this.initAttr = true;
350
423
  },
351
-
424
+ handleTopItemClick(item, index){
425
+ this.topIndex = index;
426
+ if(this.topNavStatus === 'N') return;
427
+ if(this.topNavStatus === 'C'){
428
+ //门店分类
429
+ console.log("handleTopItemClick", item);
430
+ this.$set(this.searchFilterParams, 'shop_category', item.value);
431
+ }
432
+ if(this.topNavStatus === 'S'){
433
+ //服务类型
434
+ }
435
+ this.page_token = '1';
436
+ this.getList();
437
+ },
438
+ //获取两个数组的交集
439
+ getIntersection(arr1, arr2) {
440
+ return [...new Set(arr1.filter(v => arr2.includes(v)))];
441
+ },
352
442
  getParams(){
353
- let params = {
443
+ let params = this.$xdUniHelper.deleteParamEmptyKey({
354
444
  page_size: this.page_size,
355
445
  page_token: this.page_token,
356
446
  namespace: this.xnamespace,
357
447
  ...this.options,
358
- }
448
+ })
359
449
 
360
450
 
361
451
  const getSFP = (key , value, p)=>{
@@ -364,11 +454,30 @@
364
454
  if(value.length > 0) params[key] = value.join(',');
365
455
  }
366
456
  }
367
-
457
+ //支持顶部门店服务类型筛选
458
+ if(this.topNavStatus === 'S'){
459
+ let curTopNav = this.topShowItemsComp[this.topIndex];
460
+ if(curTopNav.value !== 'all'){
461
+ params['consume_mode'] = curTopNav.value;
462
+ } else {
463
+ if(this.consumeModeOfPanelAndUrl.length === 0){
464
+ getSFP('consume_mode', 'null');
465
+ }else{
466
+ getSFP('consume_mode',this.consumeModeOfPanelAndUrl);
467
+ }
468
+ }
469
+ }else{
470
+ // getSFP('consume_mode',this.serverType);
471
+ if(this.consumeModeOfPanelAndUrl.length === 0){
472
+ getSFP('consume_mode', 'null');
473
+ }else{
474
+ getSFP('consume_mode',this.consumeModeOfPanelAndUrl);
475
+ }
476
+ }
368
477
 
369
478
  getSFP('keyword',this.keyword);
370
479
  getSFP('brand_type',this.shopType);
371
- getSFP('consume_mode',this.serverType);
480
+ // getSFP('consume_mode',this.serverType);
372
481
  getSFP('shop_category_ids',this.searchFilterParams['shop_category']);
373
482
  getSFP('brand_ids',this.searchFilterParams['brand']);
374
483
  getSFP('area_codes',this.searchFilterParams['area']);
@@ -504,39 +613,56 @@
504
613
  },
505
614
  //==evnet===
506
615
 
507
- //==filter===
616
+ //==filter=== 页面初始化时获取过滤条件,仅在首次加载时调用
508
617
  getSearchFilterList(){
509
618
  //未开启过滤条件
510
619
  if(this.showQuery === 'N') {
511
620
  this.searchFilterList = [];
512
- return
621
+ return Promise.resolve([]);
622
+ }
623
+ //获取服务类型(面板跟链接参数的交集)
624
+ let consumeMode = [];
625
+ let urlConsumeMode = this.options['consume_mode'] ? this.options['consume_mode'].split(',') : [];
626
+ let panelConsumeMode = this.serverType;
627
+ if(urlConsumeMode.length === 0) consumeMode = panelConsumeMode;
628
+ else {
629
+ consumeMode = this.getIntersection(panelConsumeMode,urlConsumeMode);
513
630
  }
631
+ this.consumeModeOfPanelAndUrl = consumeMode;
514
632
 
515
- let data = {
633
+ let data = this.$xdUniHelper.deleteParamEmptyKey({
516
634
  ...this.options,
517
635
  namespace: this.xnamespace,
518
636
  keyword: this.keyword,
519
637
  city_code: this.stateCity.city_code,
520
- type:'sell',
521
- }
522
- jfbRootExec("getNewSearchFilterList", {
523
- vm: this,
524
- data: data
638
+ type: 'sell',
639
+ consume_mode: consumeMode.length ? consumeMode.join(',') : 'null'
525
640
  })
526
- .then(res => {
527
- this.searchFilterList = (res.items || []).map(item => {
528
- item.options = item.options.map(it=>{
529
- it.value = it.value + '';
530
- return it;
531
- });
532
- return item;
533
- });
534
- this.$xdHideLoading();
535
- })
536
- .catch(err => {
537
- this.$xdHideLoading();
538
- this.$xdLog.catch(err);
641
+ return new Promise((resolve, reject) => {
642
+ jfbRootExec("getMallNewSearchFilterList", {
643
+ vm: this,
644
+ data: data
539
645
  })
646
+ .then(res => {
647
+ let searchFilterList = (res.items || []).map(item => {
648
+ if(item.value !== 'consume_mode'){
649
+ item.options = item.options.map(it=>{
650
+ it.value = it.value + '';
651
+ return it;
652
+ });
653
+ }
654
+ return item;
655
+ });
656
+ resolve(searchFilterList)
657
+ this.$xdHideLoading();
658
+ })
659
+ .catch(err => {
660
+ this.$xdHideLoading();
661
+ this.$xdLog.catch(err);
662
+ reject(err);
663
+ })
664
+ })
665
+
540
666
  },
541
667
 
542
668
  handleTabs(type){
@@ -581,7 +707,7 @@
581
707
  },
582
708
 
583
709
  //==system event===
584
- onJfbLoad(options) {
710
+ async onJfbLoad(options) {
585
711
 
586
712
 
587
713
  //测试数据
@@ -614,8 +740,41 @@
614
740
  delete options['shop_category_ids'];
615
741
  }
616
742
 
617
- this.options = this.$xdUniHelper.cloneDeep(options);
618
- this.getSearchFilterList();
743
+ // this.options = this.$xdUniHelper.cloneDeep(options);
744
+ this.options = this.reserveParams(options, ['brand_type', 'keyword', 'xnamespace', 'channel_code', 'consume_mode']);
745
+ //进入页面第一次请求时的服务类型获取方式:
746
+ // 1.面板配置的serverType跟链接上的options.consume_mode 取交集
747
+ // 2.链接上的options.consume_mode为空,则取面板配置的serverType
748
+ //根据筛选接口返回的实际支持服务类型,展示顶部导航
749
+ let filterList = await this.getSearchFilterList();
750
+ this.searchFilterList = filterList.filter(item => item.value !== 'consume_mode');
751
+ if(this.topNavStatus === 'C'){
752
+ //若果顶部导航类型为门店分类,则默认选中第一个门店分类获取门店列表
753
+ // let consumeMode = filterList.find(item => item.value === 'consume_mode');
754
+ // this.searchFilterList = filterList.filter(item => item.value !== 'consume_mode');
755
+ let shopCate = filterList.find(item => item.value === 'shop_category');
756
+ let shopCateOptions = shopCate ? shopCate.options : [];
757
+ if(shopCateOptions.length){
758
+ let firstCate = shopCateOptions[0];
759
+ this.$set(this.searchFilterParams, 'shop_category', [firstCate.value]);
760
+ }
761
+ }else if(this.topNavStatus === 'S'){
762
+ //如果顶部导航类型为服务类型
763
+ // let filterList = await this.getSearchFilterList();
764
+ // let consumeMode = filterList.find(item => item.value === 'consume_mode');
765
+ // this.searchFilterList = filterList.filter(item => item.value !== 'consume_mode');
766
+ //根据筛选接口返回的实际支持服务类型(consumeMode.options),展示顶部导航
767
+ // if(consumeMode){
768
+ // this.consumeModeOfPanelAndUrl = this.getIntersection(consumeMode.options, this.consumeModeOfPanelAndUrl);
769
+ // }
770
+ }else{
771
+ // let filterList = await this.getSearchFilterList();
772
+ // this.searchFilterList = filterList.filter(item => item.value !== 'consume_mode');
773
+ }
774
+ let consumeMode = filterList.find(item => item.value === 'consume_mode');
775
+ if(consumeMode && consumeMode.options){
776
+ this.consumeModeOfPanelAndUrl = this.getIntersection(consumeMode.options, this.consumeModeOfPanelAndUrl);
777
+ }
619
778
  this.getList();
620
779
  },
621
780
  onJfbReachBottom(options) {
@@ -646,10 +805,27 @@
646
805
 
647
806
  .jfb-mall-new-shop-list {
648
807
  &__body{
808
+ .top_category{
809
+ height: 80rpx;
810
+ line-height: 80rpx;
811
+ padding: 0 20rpx;
812
+ background-color: #fff;
813
+ white-space: nowrap;
814
+ overflow: auto;
815
+ .top_item{
816
+ font-size: 32rpx;
817
+ color: #333;
818
+ display: inline-block;
819
+ text-align: center;
820
+ &.active{
821
+ color: var(--g-theme-main-color);
822
+ }
823
+ }
824
+ }
649
825
  .query_wrap{
650
826
  position: relative;
651
827
  z-index: 103;
652
- height: 80rpx;
828
+ // height: 160rpx;
653
829
  box-sizing: border-box;
654
830
  &.isFixed {
655
831
  position: fixed;
@@ -662,7 +838,7 @@
662
838
  align-items: center;
663
839
  position: relative;
664
840
  z-index: 103;
665
- height: 100%;
841
+ height: 80rpx;
666
842
 
667
843
  &_title {
668
844
  text-align: center;
@@ -485,7 +485,7 @@ module.exports = {
485
485
  "next_page_token":"",
486
486
  "request_id":"3c64153d7c1eec3a"
487
487
  },
488
- getNewSearchFilterList: {
488
+ getMallNewSearchFilterList: {
489
489
  items: [
490
490
  {
491
491
  title: '门店分类',
@@ -7,6 +7,9 @@ export default (data, gValue, gColor, oldData={})=>{
7
7
  bodyPaddingStatus:['bodyPadding'],
8
8
  cardItemSpaceStatus:['cardItemSpace']
9
9
  }
10
+ if(data.serverType === undefined){
11
+ data.serverType = ['SELL'];
12
+ }
10
13
  return [
11
14
  {
12
15
  ele: 'title',
@@ -55,7 +58,7 @@ export default (data, gValue, gColor, oldData={})=>{
55
58
  server:'supplier-partner',
56
59
  fn:'shop',
57
60
  path:'p1',
58
- }, {consume_mode: 1})
61
+ }, {})
59
62
  .then(res => {
60
63
  data.cb(res['consume_mode'])
61
64
  })
@@ -144,6 +147,120 @@ export default (data, gValue, gColor, oldData={})=>{
144
147
  });
145
148
  },
146
149
  },
150
+ {
151
+ label: "顶部导航",
152
+ ele: "xd-radio",
153
+ valueKey: "topNavStatus",
154
+ value: dataVal({data, key:'topNavStatus', dValue:'N', gValue}),
155
+ groupKey: "content",
156
+ list: [
157
+ {label: "隐藏", "value": "N"},
158
+ {label: "显示-门店分类", "value": "C"},
159
+ {label: "显示-服务类型", "value": "S"}
160
+ ],
161
+ labelInline:true,
162
+ },
163
+ {ele: 'group_start'},
164
+ {
165
+ label: "全部选项",
166
+ ele: "xd-radio",
167
+ valueKey: "topAllService",
168
+ value: dataVal({data, key:'topAllService', dValue:'Y', gValue}),
169
+ groupKey: "content",
170
+ list: [
171
+ {label: "显示", "value": "Y"},
172
+ {label: "隐藏", "value": "N"},
173
+ ],
174
+ labelInline:true,
175
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
176
+ },
177
+ data.serverType.includes('SELF') && {
178
+ label: "支持自提",
179
+ ele: "el-input",
180
+ valueKey: "topSelfText",
181
+ value: dataVal({data, key:'topSelfText', dValue:'', gValue}),
182
+ max: 4,
183
+ groupKey: "content",
184
+ labelInline:true,
185
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
186
+ className: 'input100',
187
+ placeholder: "支持自提"
188
+ },
189
+ data.serverType.includes('STOD') && {
190
+ label: "门店配送",
191
+ ele: "el-input",
192
+ valueKey: "topStodText",
193
+ value: dataVal({data, key:'topStodText', dValue:'', gValue}),
194
+ max: 4,
195
+ groupKey: "content",
196
+ labelInline:true,
197
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
198
+ className: 'input100',
199
+ placeholder: "门店配送"
200
+ },
201
+ data.serverType.includes('SELL') && {
202
+ label: "线下核销",
203
+ ele: "el-input",
204
+ valueKey: "topCashierText",
205
+ value: dataVal({data, key:'topCashierText', dValue:'', gValue}),
206
+ max: 4,
207
+ groupKey: "content",
208
+ labelInline:true,
209
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
210
+ className: 'input100',
211
+ placeholder: "聚好兑",
212
+ notice: "包含了聚好兑、扫一扫、去提货的门店",
213
+ inline: false,
214
+ },
215
+ data.serverType.includes('CODE') && {
216
+ label: "电子码",
217
+ ele: "el-input",
218
+ valueKey: "topCodeText",
219
+ value: dataVal({data, key:'topCodeText', dValue:'', gValue}),
220
+ max: 4,
221
+ groupKey: "content",
222
+ labelInline:true,
223
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
224
+ className: 'input100',
225
+ placeholder: "电子码"
226
+ },
227
+ data.serverType.includes('SEAT') && {
228
+ label: "在线选座",
229
+ ele: "el-input",
230
+ valueKey: "topSeatText",
231
+ value: dataVal({data, key:'topSeatText', dValue:'', gValue}),
232
+ max: 4,
233
+ groupKey: "content",
234
+ labelInline:true,
235
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
236
+ className: 'input100',
237
+ placeholder: "在线选座"
238
+ },
239
+ data.serverType.includes('TRAVEL') && {
240
+ label: "旅游门店",
241
+ ele: "el-input",
242
+ valueKey: "topTravelText",
243
+ value: dataVal({data, key:'topTravelText', dValue:'', gValue}),
244
+ max: 4,
245
+ groupKey: "content",
246
+ labelInline:true,
247
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
248
+ className: 'input100',
249
+ placeholder: "旅游门票"
250
+ },
251
+ data.serverType.includes('HDSELF') && {
252
+ label: "小时达到店",
253
+ ele: "el-input",
254
+ valueKey: "topFoodText",
255
+ value: dataVal({data, key:'topFoodText', dValue:'', gValue}),
256
+ max: 4,
257
+ groupKey: "content",
258
+ labelInline:true,
259
+ hidden: dataVal({data, key:'topNavStatus', dValue:'N', gValue}) !== 'S',
260
+ className: 'input100',
261
+ placeholder: "在线点单"
262
+ },
263
+ {ele: 'group_end'},
147
264
  {
148
265
  label: "展示内容",
149
266
  ele: "title",
@@ -166,7 +283,7 @@ export default (data, gValue, gColor, oldData={})=>{
166
283
  },
167
284
  {ele: 'group_start'},
168
285
  {
169
- label: "横向菜单",
286
+ label: "",
170
287
  ele: "xd-check",
171
288
  groupKey:'content',
172
289
  valueKey: "filterMode",
@@ -174,7 +291,7 @@ export default (data, gValue, gColor, oldData={})=>{
174
291
  list:[
175
292
  {"label": "区域", "value": 'area'},
176
293
  {"label": "品牌", "value": 'brand'},
177
- {"label": "门店分类", "value": 'shop_category'},
294
+ {"label": "分类", "value": 'shop_category', disabled: data.topNavStatus === 'C'},
178
295
  {"label": "筛选", "value": 'filter'},
179
296
  ],
180
297
  labelInline: true,
@@ -166,9 +166,9 @@
166
166
  <cus-poster
167
167
  :key="posterKey"
168
168
  :main-color="mainColor"
169
- v-if="posterList !== null && posterList.length > 0"
169
+ v-if="showPosterList !== null && showPosterList.length > 0"
170
170
  :mode="mode"
171
- :poster-list="posterList"
171
+ :poster-list="showPosterList"
172
172
  :style-obj="{
173
173
  posterSize: posterSize,
174
174
  carouselTime: carouselTime,
@@ -395,6 +395,24 @@
395
395
  paddingTb: Number(this.getPMValue(this.filterPadding, 'TB',0))
396
396
  }
397
397
  },
398
+ showPosterList(){
399
+ let resultList = this.posterList.filter(item=>{
400
+ if(!item.custom_params){
401
+ return true;
402
+ } else {
403
+ let reg = new RegExp('cid=([^&]*)');
404
+ let result = reg.exec(item.custom_params);
405
+ let cid = result && result[1];
406
+ if(cid){
407
+ return cid == this.trueCateId || cid == this.truePid;
408
+ }else{
409
+ return true;
410
+ }
411
+ }
412
+ }).slice(0,this.posterNum);
413
+ console.log('resultList', resultList);
414
+ return resultList;
415
+ },
398
416
  },
399
417
  watch: {
400
418
  container(value,oldValue) {
@@ -953,7 +971,7 @@
953
971
  data: {
954
972
  page_id: this.pageAttr['page_id'], //页面ID
955
973
  container_id: this.containerId, //组件ID
956
- page_size: this.posterNum //可以不传
974
+ page_size: 100 //可以不传
957
975
  },
958
976
  })
959
977
  .then(res => {
@@ -549,8 +549,12 @@
549
549
  cusEntry[quickEntry[i].value] = quickEntry[i].check;
550
550
  }
551
551
  }
552
- this.cusNames = cusNames;
553
- this.cusEntry = cusEntry;
552
+ this.cusNames = Object.assign(cusNames, {
553
+ wb: cusNames.scan
554
+ })
555
+ this.cusEntry = Object.assign(cusEntry, {
556
+ wb: cusEntry.scan
557
+ })
554
558
  console.log(this.cusNames,this.cusEntry,this.showQuickEntry,'this.cusNames')
555
559
  // this.jhdName = getContainerPropsValue(container, 'content.jhdName', '聚好兑');
556
560
  this.jhdName = gCPVal(container, 'jhdName', '聚好兑');
@@ -787,9 +791,13 @@
787
791
  page_token: this.page_token,
788
792
  page_size: this.page_size,
789
793
  brand_id: this.brand_id,
790
- consume_mode: this.consume_mode,
794
+ // consume_mode: this.consume_mode,
791
795
  keyword: this.keyword
792
796
  }
797
+ if(this.consume_mode){
798
+ data.consume_mode = this.consume_mode;
799
+ }
800
+
793
801
  if(this.showBusinessLine==='Y'){
794
802
  if(this.dimension==='business'){
795
803
  data.namespaces = this.namespace
@@ -30,7 +30,7 @@ export default (data, gValue, gColor, oldData) => {
30
30
  console.log(data.layout,data.showStoreImg,data.layout==='v3',oldData,'asdasda')
31
31
  let defQuickEntry = [
32
32
  {check:true,value:'jhd',input:data.jhdName||'',placeholder:'聚好兑名称,默认“聚好兑”'},
33
- {check:true,value:'scan',input:data.scanName||'', placeholder:'扫一扫名称,默认“扫一扫”'},
33
+ {check:true,value:'wb',input:data.scanName||'', placeholder:'扫一扫名称,默认“扫一扫”'},
34
34
  {check:true,value:'qp',input:data.takeGoodsName||'', placeholder:'展快捷码名称,默认“展快捷码”'},
35
35
  {check:false,value:'seat',input:data.buyTicketName||'', placeholder:'去购票名称,默认“去购票”'},
36
36
  // {check: false,value:'code',input:data.code||'',placeholder:'电子码名称,默认“电子码”'},
@@ -361,7 +361,7 @@ export default (data, gValue, gColor, oldData) => {
361
361
  handleCustom({action, data}) {
362
362
  data.cb([
363
363
  {value:'jhd', label: '聚好兑',def:'聚好兑',input:'',check: true,placeholder:'服务类型为支持核销时使用'},
364
- {value:'scan', label: '扫一扫',def:'扫一扫',input:'',check: true, placeholder:'服务类型为支持核销时使用'},
364
+ {value:'wb', label: '扫一扫',def:'扫一扫',input:'',check: true, placeholder:'服务类型为支持核销时使用'},
365
365
  {value:'qp', label: '快捷码',def:'去提货',input:'',check: true,placeholder:'服务类型为支持核销时使用'},
366
366
  {value:'seat', label: '在线选座',def:'去购票',input:'',check: true,placeholder:'去购票名称,默认“去购票”'},
367
367
  // {value:'code', label: '电子码',input:'',check: false,placeholder:'电子码名称,默认“电子码”'},