Browse Source

Merge branch 'main' into hotfix/v1.0.29.2

lianbingjie 1 năm trước cách đây
mục cha
commit
8a51a1536f

+ 1 - 1
apps/bigmember_pc/src/components/article-item/ArticleItem.vue

@@ -417,7 +417,7 @@ export default {
       const keywords = this.getMatchKeys
       if (inFile) {
         const keyword = keywords[0]
-        if (keyword.length > 3) {
+        if (keyword?.length > 3) {
           return `(<span class="highlight-text">${keyword.substring(0, 3)}</span>...在附件中)`
         } else {
           return `(<span class="highlight-text">${keyword}</span>在附件中)`

+ 1 - 0
apps/bigmember_pc/src/components/selector/SelectorCard.vue

@@ -277,6 +277,7 @@ export default {
   }
   ::v-deep {
     .j-button-item {
+      margin-top: 8px;
       border-color: transparent;
     }
     .action-button.show-more {

+ 1 - 0
apps/bigmember_pc/src/views/search/bidding/components/search-bid-header.vue

@@ -82,6 +82,7 @@ const showNewPublish = computed(() => {
       :show-workspace-button="isLogin && !isInApp"
       :showTab="!inBIPropertyIframe"
       @goWorkSpace="goWorkSpace"
+      :immediateSearch="false"
     >
       <div class="flex flex-(row items-center)">
         <div class="flex flex-(row items-center)">

+ 5 - 1
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -117,6 +117,8 @@ function createSearchBidBaseSchema(conf = {}) {
   const showVip = conf.showVip || false
   const infoType = conf.infoType
   const inInjectBI = conf.inInjectBI || false
+  const isInApp = conf.isInApp || false
+  const isVip = conf.isVip || false
 
   // 发布时间
   const publishTimeExpandFree = {
@@ -190,11 +192,11 @@ function createSearchBidBaseSchema(conf = {}) {
     },
     hooks: {}
   }
-
   const SearchBidBaseSchema = [
     {
       key: 'publishTime',
       label: '发布时间:',
+      labelHeight: isVip || !isInApp  ? '22px': '32px',
       defaultVal: 'thisyear',
       _name: 'time',
       _type: 'component',
@@ -203,6 +205,7 @@ function createSearchBidBaseSchema(conf = {}) {
     {
       key: 'selectType',
       label: '搜索范围:',
+      labelHeight: isVip || !isInApp ? '22px' : '30px',
       defaultVal: ['content', 'title'],
       _name: 'type',
       _type: 'component',
@@ -211,6 +214,7 @@ function createSearchBidBaseSchema(conf = {}) {
     {
       key: 'subtype',
       label: '信息类型:',
+      labelHeight: '25px',
       defaultVal: '',
       _name: 'subtype',
       _type: 'component',

+ 20 - 13
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -246,6 +246,7 @@ export default function () {
   function disposeFilterSchema() {
     const conf = computed(() => {
       return {
+        isInApp: isInApp.value,
         isLogin: isLogin.value,
         vipUser: isVip.value && isInApp.value,
         oldUser: isOld.value && isInApp.value,
@@ -557,7 +558,7 @@ export default function () {
   // 条件:1.精准搜索模式 2.返回无数据 3.有主关键词或附加词
   let autoSwitchModel = false
   const { goback } = useRoute().query
-  function changeSearchMode () {
+  function changeSearchMode (searchType) {
     const total = listState.total
     const { searchMode, additionalWords,  input } = inputKeywordsState.value
     const jzModel = searchMode === '0' && (additionalWords || input)
@@ -565,7 +566,7 @@ export default function () {
     if(!autoSwitchModel && jzModel && total === 0) {
       autoSwitchModel = true
       inputKeywordsState.value.searchMode = '1'
-      doQuery()
+      doQuery({}, searchType)
     }
     if(mhModel && autoSwitchModel) {
       if( total > 0) {
@@ -616,12 +617,6 @@ export default function () {
     if (!onTheWhiteList.value) {
       const searchKeywords = inputKeywordsState.value.input
       const hasOneKey = (filterState.value.buyer?.length || filterState.value.winner?.length ||  filterState.value.agency?.length) > 0
-      // 切换三种筛选类型时候判断(切换tab时不弹窗)
-      // if (!searchKeywords && !hasOneKey) {
-      //   if (from.indexOf('tab-') !== -1) {
-      //     return false
-      //   }
-      // }
       // 关键词去两边空格后为空
       if (!searchKeywords && inputKeywordsState.value.additionalWords.length === 0) {
         if (!hasOneKey) {
@@ -640,7 +635,7 @@ export default function () {
     return true
   }
   // 搜索前 处理一些事情
-  function beforeSearch (pageNum) {
+  function beforeSearchSomthing (pageNum) {
     // 列表清空
     list.value = []
     listState.total = 0
@@ -681,16 +676,16 @@ export default function () {
     if(!bSearch) {
       return
     }
-    beforeSearch (pageNum)
+    beforeSearchSomthing (pageNum)
     // Ajax请求
     return doRunQuery(getParams(params)).then((res) => {
-      afterQueryAjax(res)
+      afterQueryAjax(res, searchType)
     })
   }
   // 处理查询请求后的数据以及其他业务
-  function afterQueryAjax (res) {
+  function afterQueryAjax (res, searchType) {
     // 变更搜索模式
-    changeSearchMode()
+    changeSearchMode(searchType)
 
     const { origin } = res
 
@@ -1319,6 +1314,10 @@ export default function () {
           restoreSearchGroupFromLocal()
           const defaultSelectType = ['title', 'content']
           filterState.value.selectType = defaultSelectType
+          if(!goback) {
+            // 非工作台外跳转进入则默认搜索
+            firstSearch()
+          }
         }
 
         // vip 或者 桌面跳转回显筛选条件
@@ -1335,9 +1334,17 @@ export default function () {
             }
           }
         })
+      } else {
+        firstSearch()
       }
+    } else {
+      firstSearch()
     }
   }
+
+  function firstSearch () {
+    return doQuery({}, 'firstSearch')
+  }
   /**
    * 检查是否需要切换模糊搜索、是否展示提示
    * 1. 精准搜索无数据 (自动切换模糊搜索)

+ 6 - 0
apps/bigmember_pc/src/views/search/components/search-header-card.vue

@@ -29,6 +29,11 @@ const props = defineProps({
   showTab: {
     type: Boolean,
     default: true
+  },
+  // 立即搜索
+  immediateSearch: {
+    type: Boolean,
+    default: true
   }
 })
 
@@ -65,6 +70,7 @@ function goWorkSpaceCustom() {
       :show-wx-qr="showWxQr"
       @input="$emit('input', $event)"
       @search="$emit('search', $event)"
+      :immediateSearch="immediateSearch"
     >
       <div class="tab-switch" slot="tab-switch">
         <slot name="tab-switch-content"></slot>

+ 4 - 2
apps/bigmember_pc/src/views/search/components/search-schema-filter.vue

@@ -66,7 +66,7 @@ const getPrefix = {
         'flex-items-start': showLabel && item.label
       }"
       >
-        <div class="search-schema-filter-label" v-if="showLabel && item.label">
+        <div class="search-schema-filter-label" v-if="showLabel && item.label" :style="{'line-height': item.labelHeight}">
           <slot name="item-label">
             {{ item.label }}
           </slot>
@@ -105,6 +105,8 @@ const getPrefix = {
 .search-schema-filter-container {
   &.use-style-col {
     .search-schema-filter-item {
+      display: flex;
+      align-items: start;
       & + .search-schema-filter-item {
         margin-top: 16px;
       }
@@ -136,7 +138,7 @@ const getPrefix = {
     flex-shrink: 0;
     color: #686868;
     font-size: 14px;
-    line-height: 22px;
+    line-height: 23px;
     margin-right: 12px;
     text-align: right;
   }

+ 7 - 2
apps/bigmember_pc/src/views/subscribe/SubPush.vue

@@ -55,8 +55,13 @@
           @onChange="changeTime"
           selectorType="line"
         >
-          <div class="filter-label" slot="header">
-            选择时间:<span
+          <div 
+            class="filter-label"
+            :class="{ 'label-width': showVipTag }"
+            slot="header"
+          >
+            选择时间:
+            <span
               class="el-icon-jy-vip visibility-hidden"
               v-if="showVipTag"
             ></span>