Explorar el Código

Merge branch 'dev/1.0.36_zsy' of jianyu/web into feature/v1.0.36

zhangsiya hace 1 año
padre
commit
b3e11ba40c

+ 10 - 10
apps/bigmember_pc/src/components/filter-items/KeywordTagsSelector.vue

@@ -1,20 +1,20 @@
 <template>
   <Layout
-    :value='computedVal'
-    :type='type'
-    :trigger="trigger"
+    :value="computedVal"
+    :type="type"
+    trigger="hover"
     :placeholder="placeholder"
     placement="bottom"
   >
     <KeywordTagsSelectorContent
       slot="empty"
-      :list='value'
-      :placeholder='inputPlaceholder'
-      :max-tip='maxTip'
-      :disabled='disabled'
-      :max-list-length='maxListLength'
-      :max-length='maxLength'
-      @change='keywordTagsChange'>
+      :list="value"
+      :placeholder="inputPlaceholder"
+      :max-tip="maxTip"
+      :disabled="disabled"
+      :max-list-length="maxListLength"
+      :max-length="maxLength"
+      @change="keywordTagsChange">
     </KeywordTagsSelectorContent>
   </Layout>
 </template>

+ 8 - 1
apps/bigmember_pc/src/components/filter-items/KeywordTagsSelectorContent.vue

@@ -9,6 +9,8 @@
         :maxlength="maxLength"
         :disabled="disabled || list.length >= maxListLength"
         @keyup.native="onKeyup"
+        @focus.native="onKeydown"
+        @keydown.native="onKeydown"
       ></el-input>
       <span class="add-keyword-btn" :class="{'focus': addKeywordVal}" @click="addKeyTags">添加</span>
     </div>
@@ -83,6 +85,12 @@ export default {
     removeTag (tag) {
       this.list.splice(this.list.indexOf(tag), 1)
       this.$emit('change', this.list)
+    },
+    // dropdown的坑点,微软输入法,input输入的时候会失去焦,dropdown会收起,暂且如此处理
+    onKeydown () {
+      if(this.$parent.$parent && this.$parent.$parent.show) {
+        this.$parent.$parent.show()
+      }
     }
   }
 }
@@ -175,5 +183,4 @@ export default {
     cursor: pointer;
   }
 }
-
 </style>

+ 3 - 1
apps/bigmember_pc/src/views/search/bidding/components/search-bid-filter.vue

@@ -81,7 +81,9 @@ async function getCustomInfo () {
     }
   }
 }
-getCustomInfo()
+if(!inBIPropertyIframe) {
+  getCustomInfo()
+}
 
 const customMoreSchema = computed(() => {
   return {

+ 2 - 1
apps/bigmember_pc/src/views/search/bidding/components/search-list-table.vue

@@ -114,8 +114,9 @@ function toDetail (item) {
           <tr
             v-for="(item, index) in list"
             :class="{ visited: item.visited }"
-            :key="index + '_' + item._id"
+            :key="index + '_' + item.id"
             @click="toDetail(item)"
+            v-visited:articleContent="item.id"
           >
             <td width="48">{{ index + 1 }}</td>
             <td width="315" class="tt-l" v-html="calcTitle(item, index)"></td>

+ 1 - 0
apps/bigmember_pc/src/views/search/bidding/index.vue

@@ -156,6 +156,7 @@ const articleRef = ref({
               @onCollect="onClickSingleCollect"
               @onJoinBid="onJoinBid"
               :config="articleRef"
+              v-visited:articleContent="item.id"
             >
               <template #bi-slot=" { item }">
 

+ 3 - 36
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -3,7 +3,6 @@ import { without, throttle } from 'lodash'
 import { useStore } from '@/store'
 import { useRoute, useRouter } from 'vue-router/composables'
 import { MessageBox } from 'element-ui'
-import { mixinVisited } from '@/utils/mixins/visited-setup.js'
 import  {
   FilterHistoryAjaxModelRestore,
   FilterHistoryAjaxModel2ViewModel,
@@ -78,7 +77,7 @@ export default function () {
 
   // 是否在工作台内
   // 本地调试,可改为工作台内isInApp = ref(true),  isInWeb = ref(false) 提交记得改回!
-  const isInApp = ref(true) ||  ref(InContainer.inApp)
+  const isInApp = ref(InContainer.inApp)
   const isInWeb = ref(InContainer.inWeb)
 
   // 是否是渠道商
@@ -129,14 +128,6 @@ export default function () {
   const APIModel = useQuickSearchModel({
     type: 'search-bid'
   })
-  /***
-   * 列表单条数据是否已读
-   */
-  const {
-    pathVisiting,
-    createPathItem,
-    pathVisited
-  } = mixinVisited()
   /**
    * 列表相关model
    */
@@ -497,7 +488,6 @@ export default function () {
       )
     } catch (error) {}
     if(isLogin.value) {
-      checkVisited(item)
       const prefix = isInApp.value ? '/article/content/' : '/nologin/content/'
       const targetLink = `${prefix}${id}${aHref}`
 
@@ -507,7 +497,6 @@ export default function () {
         newTab: true,
       })
     } else{//没有登录跳转新的详情
-      checkVisited(item, 'nologin')
       // 一切都好渠道合作页,未登录跳转需要弹出登录,重置到已登录后的详情页
       if(cooperateCode.value) {
         window.location.href = '/notin/page'
@@ -530,23 +519,6 @@ export default function () {
       window.open(link)
     }
   }
-  // 检测是否已经存储已读
-  function checkVisited (item, val) {
-    const id = item.id
-    let visited = false
-    if (val) {
-      visited = pathVisited(
-        createPathItem('/nologin/content/*.html', 'id=' + id)
-      )
-    } else {
-      visited = pathVisited(
-        createPathItem('/article/content/*.html', 'id=' + id)
-      )
-    }
-
-    item.visited = visited
-  }
-
   // 获取 store getters
   const userType = computed(() => {
     return useStore().getters['user/userType']
@@ -728,11 +700,6 @@ export default function () {
 
     }
     list.value = list.value.map(item => {
-      // 添加是否已读标志
-      const visited = pathVisited(
-        createPathItem('/article/content/*.html', `id=${item.id}`)
-      )
-      that.$set(item, 'visited', visited)
       // 收藏字段显示
       that.$set(item, 'collection', item.isCollected ? 1 : 0)
 
@@ -1204,7 +1171,7 @@ export default function () {
         result = publishTimeText
       }
     } else {
-      result = '近一年'
+      result = inBIPropertyIframe ? '近5年' : '近一年'
     }
 
     return result
@@ -1287,8 +1254,8 @@ export default function () {
     }
   }
 
+  // 恢复筛选条件
   function getLastFilter () {
-    // 恢复筛选条件
     if(isLogin.value) {
       const { key, _storage } = storageConfig.filter
       const params =_storage.getItem(key)

+ 1 - 1
apps/bigmember_pc/src/views/search/bidding/model/modules/filter.js

@@ -150,7 +150,7 @@ export function useSearchFilterModel(conf) {
       propertyForm: filterState.value.propertyForm?.join(),
       selectType: filterState.value.selectType?.join(','),
       subType: rSubtype,
-      publishTime: rPublishTime,
+      publishTime: rPublishTime || 'fiveyear',
       changeHand: filterState.value.changeHand ?  Number(filterState.value.changeHand) : 0,
       fileExists: filterState.value.fileExists,
       buyerTel: filterState.value.buyerTel,