Explorar o código

购物车未登录状态下点击判断

yangc %!s(int64=8) %!d(string=hai) anos
pai
achega
fe4fde17cf

+ 5 - 8
components/default/RightBar.vue

@@ -10,7 +10,7 @@
         </li>
         <li class="right-bar-item">
           <el-button type="text" @click="dialogVisible = true">
-          <a @click="onLeaveMessageClick()" class="title">
+          <a class="title">
             <i class="iconfont icon-liuyan icon-xlg"></i>
           </a>
           <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
@@ -87,12 +87,12 @@
         page: 1,
         count: 3,
         currentPage: 1,
-        chatCount: -1
+        chatCount: 0
       }
     },
-    created () {
-      this.$store.dispatch('getMessageBoardInformation', {page: 1, count: 3})
-    },
+//    created () {
+//      this.$store.dispatch('getMessageBoardInformation', {page: 1, count: 3})
+//    },
     components: {
       MessageBoard
     },
@@ -146,9 +146,6 @@
       toBottom () {
         scrollTo(window.scrollY + window.innerHeight, 300)
       },
-      // 打开留言板
-      onLeaveMessageClick () {
-      },
       deleteHistory (item, id) {
         this.$store.dispatch('user/deleteHistory', {id: id})
         this.loadHistorys()

+ 2 - 2
components/help/left.vue

@@ -18,8 +18,8 @@
   // 升序
   function compare (propertyName) {
     return function (object1, object2) {
-      var value1 = object1[propertyName]
-      var value2 = object2[propertyName]
+      let value1 = object1[propertyName]
+      let value2 = object2[propertyName]
       if (value1 > value2) {
         return 1
       } else if (value1 < value2) {

+ 1 - 5
components/messageBoard/MessageBoard.vue

@@ -169,9 +169,6 @@
       messageBoard () {
         return this.$store.state.messageBoard.information.data
       },
-//      user () {
-//        return this.$store.state.messageBoardIsLogin.login.data
-//      },
       user () {
         return this.$store.state.option.user.data
       },
@@ -197,12 +194,12 @@
         let obj = {}
         obj.img = url
         this.dialogImageUrl.push(obj)
-        console.log(this.dialogImageUrl)
       },
       isOpendMessage () {
         this.$emit('openBoardEvent', false)
       },
       isOpenHistory () {
+        this.$store.dispatch('getMessageBoardInformation', {page: 1, count: 3})
         this.showHistory = !this.showHistory
       },
       isHideHistory () {
@@ -220,7 +217,6 @@
         this.isEmail = (/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/).test(this.messageBoard.email)
       },
       confirm () {
-        console.log('messageBoard', this.$store.state.messageBoard.information.data)
         this.$store.dispatch('uploadMessageBoardInformation', {question: this.messageBoard.question, role: this.messageBoard.role, submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城', submitUrl: window.location.href, type: this.messageBoard.type, imgs: this.dialogImageUrl, userTel: '13333333333'})
         if (this.messageBoard) {
           if (!this.messageBoard.question) {