瀏覽代碼

消息公共询价跳转我的商机

hangb 7 年之前
父節點
當前提交
7790a1d0c5
共有 4 個文件被更改,包括 26 次插入2 次删除
  1. 4 1
      components/mobile/center/Message.vue
  2. 13 0
      components/mobile/center/Seek.vue
  3. 4 0
      store/index.js
  4. 5 1
      store/option.js

+ 4 - 1
components/mobile/center/Message.vue

@@ -14,7 +14,7 @@
           </div>
           <div class="message">
             <p>{{item.createTime | time}}</p>
-            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/mobile/center/user/seek?seekType=done' : item.type === 'MALL公共询价' ? '/mobile/center/vendor/seek?seekType=wait' : item.type === '商城公共询价采纳结果' ? '/mobile/center/vendor/seek?seekType=done' : ''"
+            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/mobile/center/user/seek?seekType=done' : item.type === 'MALL公共询价' ? '/mobile/center/vendor/seek?seekType=wait&messageType=my' : item.type === '商城公共询价采纳结果' ? '/mobile/center/vendor/seek?seekType=done' : ''"
                v-if="item.type"
                :title="item.content" class="info">{{item.content}}</a>
             <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
@@ -146,6 +146,9 @@
             font-size: .28rem;
             color: #333;
             word-break: break-all;
+            &:active{
+               background: #e1e1e1;
+            }
           }
         }
       }

+ 13 - 0
components/mobile/center/Seek.vue

@@ -94,6 +94,12 @@
         return '已报价'
       }
     },
+    mounted () {
+//      获取链接
+      this.$nextTick(() => {
+        this.myActiveType()
+      })
+    },
     methods: {
       onSearch: function () {
         this.isSearch = true
@@ -116,6 +122,13 @@
         this.page = 1
         this.isChange = true
         this.reloadData()
+      },
+      myActiveType: function () {
+        if (this.$store.state.option.messageType) {
+          this.activeType = 'self'
+        } else {
+          this.activeType = 'all'
+        }
       }
     }
   }

+ 4 - 0
store/index.js

@@ -34,6 +34,10 @@ export const actions = {
     store.commit('option/SET_USER_AGENT', userAgent)
     store.commit('option/SET_COOKIES', cookie)
     // console.log(req.headers.referer)
+    if (route.query) {
+      let messageType = route.query.messageType || ''
+      store.commit('option/GET_MESSAGETYPE', messageType)
+    }
     if (cookie) {
       if (cookie && cookie.length) {
         for (let i = 0; i < cookie.length; i++) {

+ 5 - 1
store/option.js

@@ -35,7 +35,8 @@ export const state = () => ({
   wechatInfo: {
     fetching: false,
     data: {}
-  }
+  },
+  messageType: ''
 })
 
 export const mutations = {
@@ -115,5 +116,8 @@ export const mutations = {
   },
   REQUEST_WECHATINFO_STATUS_FAILURE (state) {
     state.wechatInfo.fetching = false
+  },
+  GET_MESSAGETYPE (state, result) {
+    state.messageType = result || ''
   }
 }