瀏覽代碼

feat: 筛选条件未登录跳转判断

zhangsiya 1 年之前
父節點
當前提交
566c9ce885

+ 8 - 4
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -16,7 +16,10 @@ function noPower() {
   $bus.$emit('search:filter:no-power')
 }
 
-function beforeChangeHandle ($event, char) {
+function beforeChangeHandle ($event, char, isLogin) {
+  if(isLogin) {
+    return true
+  }
   // 发布时间
   if(char === 'publishTime') {
     if($event.value === 'sinceLastYear') {
@@ -57,6 +60,7 @@ const moreFiltersNeedVipKeyList = [
 
 
 function createSearchBidBaseSchema(conf = {}) {
+  const isLogin = conf.isLogin || false
   const vipUser = conf.vipUser || false
   const oldUser = conf.oldUser || false
   const showVip = conf.showVip || false
@@ -71,7 +75,7 @@ function createSearchBidBaseSchema(conf = {}) {
       vipModuleShow: showVip,
       freeConf: {
         beforeChange ($event) {
-          return beforeChangeHandle($event, 'publishTime')
+          return beforeChangeHandle($event, 'publishTime', isLogin)
         },
         options: ['lately7', 'lately30', 'sinceLastYear'],
       },
@@ -101,7 +105,7 @@ function createSearchBidBaseSchema(conf = {}) {
       options: defaultScopeOptions,
       freeConf: {
         beforeChange($event) {
-          return beforeChangeHandle($event, 'selectType')
+          return beforeChangeHandle($event, 'selectType', isLogin)
         },
         options: freeOptions,
       },
@@ -152,7 +156,7 @@ function createSearchBidBaseSchema(conf = {}) {
           selectorType: 'line',
           showDataType: infoType,
           beforeChange ($event) {
-            return beforeChangeHandle($event, 'subtype')
+            return beforeChangeHandle($event, 'subtype', isLogin)
           },
         },
         hooks: {}

+ 1 - 0
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -185,6 +185,7 @@ export default function () {
   function disposeFilterSchema() {
     const conf = computed(() => {
       return {
+        isLogin: isLogin.value,
         vipUser: isVip.value && isInApp.value,
         oldUser: isOld.value && isInApp.value,
         showVip: isLogin.value && isInApp.value,