Browse Source

fix:修复标讯搜索相关问题

yangfeng 9 months ago
parent
commit
23554a6fb1

+ 2 - 2
apps/mobile/src/components/home/list.vue

@@ -20,7 +20,7 @@
     </div> -->
     <div class="flex flex-items-center van-hairline--bottom home-list-header">
       <h3 class="header-title">商机推荐</h3>
-      <div class="flex flex-items-center header-value">
+      <div class="flex flex-items-center header-value" v-if="!isSubCount">
         <span class="header-desc">完善信息,推荐更准</span>
         <span
           class="flex flex-items-center header-set"
@@ -219,7 +219,7 @@ export default {
     }
   },
   computed: {
-    ...mapState('user', ['mySelectEntInfo']),
+    ...mapState('user', ['mySelectEntInfo', 'isSubCount']),
     entId() {
       return this.mySelectEntInfo?.ent_id
     },

+ 2 - 6
apps/mobile/src/components/message/message-card.vue

@@ -10,11 +10,7 @@
           <AppIcon name="youbian" size="14" color="#c0c4cc" />
         </div>
       </div> -->
-      <div
-        class="message-card"
-        :class="{ 'have-one': list.length === 1 }"
-        ref="msgCard"
-      >
+      <div class="message-card" ref="msgCard">
         <div
           class="message-group"
           :style="{
@@ -35,7 +31,7 @@
               <template #title>
                 <span class="icon iconfont icon-nav_un_message"></span>
                 <span class="type">{{ item.type }}</span>
-                <span class="flex-1 title">{{ item.title }}</span>
+                <span class="flex-1 title van-ellipsis">{{ item.title }}</span>
               </template>
               <template #default>
                 <span class="time">{{ item.time }}</span>

+ 3 - 0
apps/mobile/src/components/search/bidding/filters.vue

@@ -1422,6 +1422,9 @@ export default {
 ::v-deep {
   .van-dropdown-menu__title {
     color: $gray_9;
+    &--active {
+      color: $main;
+    }
   }
   .highlight {
     color: $main;

+ 18 - 6
apps/mobile/src/components/selector/money-input-group/index.vue

@@ -3,7 +3,8 @@
     <van-field
       type="number"
       v-model="inputMap.start"
-      :placeholder="placeholder"
+      :maxlength="maxLength.start"
+      :placeholder="placeholder.start"
       :class="{ focus: focus.start && hoverBorderHighlight }"
       @click.stop="onClick('start')"
       @input="onInput('start')"
@@ -17,8 +18,9 @@
     <div class="line"></div>
     <van-field
       type="number"
+      :maxlength="maxLength.end"
       v-model="inputMap.end"
-      :placeholder="placeholder"
+      :placeholder="placeholder.end"
       :class="{ focus: focus.end && hoverBorderHighlight }"
       @click.stop="onClick('end')"
       @input="onInput('end')"
@@ -44,13 +46,23 @@ export default {
       type: Boolean,
       default: true
     },
-    placeholder: {
-      type: String,
-      default: '请输入金额'
-    },
     extra: {
       type: String,
       default: '万'
+    },
+    placeholder: {
+      type: Object,
+      default: () => ({
+        start: '请输入金额',
+        end: '请输入金额'
+      })
+    },
+    maxLength: {
+      type: Object,
+      default: () => ({
+        start: 10,
+        end: 10
+      })
     }
   },
   data() {

+ 2 - 2
apps/mobile/src/data/bidding.js

@@ -10,11 +10,11 @@ export const biddingSearchListType = [
 // 招标搜索范围
 export const biddingSearchScope = [
   {
-    label: '标题搜索',
+    label: '标题',
     key: 'title'
   },
   {
-    label: '正文搜索',
+    label: '正文',
     key: 'content'
   },
   {

+ 10 - 5
apps/mobile/src/views/search/result/bidding/index.vue

@@ -2223,8 +2223,10 @@ export default {
           vSwitch: this.vSwitch,
           match_way: wordsMode
         }
+        const loading = this.$toast.loading({ duration: 0 })
         try {
           const { flag } = await setUserSubInfo(params)
+          loading.clear()
           if (flag === 'y') {
             this.saveState()
             openAppOrWxPage(LINKS.关键词列表)
@@ -2474,12 +2476,8 @@ export default {
        * */
       let labelList = formattedList
         .filter((v) => {
-          if (v.label === '搜索范围:') {
-            v.text = v.text.replace(/搜索/g, '')
-          }
           if (v.label === '信息类型:') {
             const isChecked = deepCompareInfoType(v.text)
-            // console.log(isChecked, '是否全选')
             v.text = isChecked ? '' : v.text
           }
           if (this.topSearch.input) {
@@ -2494,7 +2492,11 @@ export default {
       if (searchModeText && this.topSearch.input) {
         labelList = [searchModeText].concat(labelList)
       }
-      if (searchGroup > 0) {
+      const isHaveInfoType = formattedList.some((v) =>
+        v.label.includes('信息类型')
+      )
+      // console.log(isHaveInfoType, 'isHaveInfoType')
+      if (searchGroup > 0 && !isHaveInfoType) {
         labelList = labelList.concat(this.activeSearchGroupInfo.title)
       }
       let label = ''
@@ -3299,4 +3301,7 @@ export default {
   left: 12px;
   right: 12px;
 }
+.customer-corner {
+  z-index: 10;
+}
 </style>