jufubao-mall 2.0.40-beta2 → 2.0.40-beta3

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.40-beta2",
3
+ "version": "2.0.40-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -340,7 +340,7 @@
340
340
  </xd-down-drawer>
341
341
  </template>
342
342
  <CusVipOpenDialog
343
- v-if="!isVip"
343
+ v-if="showOpenVipDialog"
344
344
  :bgImg="openVipBgImg"
345
345
  :btnBgImg="openVipBtnBgImg"
346
346
  @onOpen="handleOpenVip"
@@ -732,6 +732,9 @@
732
732
  },
733
733
  defaultUseWalletFirst(){
734
734
  return this.checkPayMethod.includes('wallet');
735
+ },
736
+ showOpenVipDialog(){
737
+ return !this.isVip&&this.is_plus_site;
735
738
  }
736
739
  },
737
740
  watch: {
@@ -417,6 +417,7 @@
417
417
  if(this.topNavStatus === 'S'){
418
418
  //服务类型
419
419
  }
420
+ this.page_token = '1';
420
421
  this.getList();
421
422
  },
422
423
  getParams(){
@@ -585,7 +586,7 @@
585
586
  //未开启过滤条件
586
587
  if(this.showQuery === 'N') {
587
588
  this.searchFilterList = [];
588
- return
589
+ return Promise.resolve([]);
589
590
  }
590
591
  let data = this.$xdUniHelper.deleteParamEmptyKey({
591
592
  ...this.options,
@@ -594,25 +595,29 @@
594
595
  city_code: this.stateCity.city_code,
595
596
  type:'sell',
596
597
  })
597
-
598
- jfbRootExec("getMallNewSearchFilterList", {
599
- vm: this,
600
- data: data
601
- })
602
- .then(res => {
603
- this.searchFilterList = (res.items || []).map(item => {
604
- item.options = item.options.map(it=>{
605
- it.value = it.value + '';
606
- return it;
607
- });
608
- return item;
609
- });
610
- this.$xdHideLoading();
611
- })
612
- .catch(err => {
613
- this.$xdHideLoading();
614
- this.$xdLog.catch(err);
598
+ return new Promise((resolve, reject) => {
599
+ jfbRootExec("getMallNewSearchFilterList", {
600
+ vm: this,
601
+ data: data
615
602
  })
603
+ .then(res => {
604
+ this.searchFilterList = (res.items || []).map(item => {
605
+ item.options = item.options.map(it=>{
606
+ it.value = it.value + '';
607
+ return it;
608
+ });
609
+ return item;
610
+ });
611
+ resolve(this.searchFilterList)
612
+ this.$xdHideLoading();
613
+ })
614
+ .catch(err => {
615
+ this.$xdHideLoading();
616
+ this.$xdLog.catch(err);
617
+ reject(err);
618
+ })
619
+ })
620
+
616
621
  },
617
622
 
618
623
  handleTabs(type){
@@ -657,7 +662,7 @@
657
662
  },
658
663
 
659
664
  //==system event===
660
- onJfbLoad(options) {
665
+ async onJfbLoad(options) {
661
666
 
662
667
 
663
668
  //测试数据
@@ -692,7 +697,17 @@
692
697
 
693
698
  // this.options = this.$xdUniHelper.cloneDeep(options);
694
699
  this.options = this.reserveParams(options, ['brand_type', 'keyword', 'xnamespace', 'channel_code', 'consume_mode']);
695
- this.getSearchFilterList();
700
+ if(this.topNavStatus === 'C'){
701
+ let filterList = await this.getSearchFilterList();
702
+ let shopCate = filterList.find(item => item.value === 'shop_category');
703
+ let shopCateOptions = shopCate ? shopCate.options : [];
704
+ if(shopCateOptions.length){
705
+ let firstCate = shopCateOptions[0];
706
+ this.$set(this.searchFilterParams, 'shop_category', firstCate.value);
707
+ }
708
+ }else{
709
+ this.getSearchFilterList();
710
+ }
696
711
  this.getList();
697
712
  },
698
713
  onJfbReachBottom(options) {