Browse Source

去掉留言板form表单,原厂专区和品牌推荐进入店铺页面的全部新窗口打开

hangb 8 years ago
parent
commit
71481a6157

+ 48 - 45
components/messageBoard/MessageBoard.vue

@@ -10,7 +10,7 @@
     <div class="modal-body msg-body">
       <div v-if="showHistory">
         <h3>亲爱的&nbsp;<span v-text="user.userName || '游客'">&nbsp;&nbsp;</span> ,您的意见对我们很重要!</h3>
-        <form name="messageBoardForm" method="post">
+        <div class="form-message">
           <div class="txtArea">
             <b class="first">*</b>
             <textarea @keyup="textareaLength" placeholder="请将您在使用当前页面遇到的任何问题、建议或意见反馈给我们。注意:不要输入您的隐私信息,如:账户密码等。" v-model="messageBoard.question" maxlength="500"></textarea>
@@ -61,22 +61,18 @@
             </div>
             <div class="img-item">
               <image-upload @fileAction="listenFile">
-                <img src="/images/messageBoard/msg_uploadPic.png" alt="">
               </image-upload>
             </div>
             <div class="img-item">
               <image-upload @fileAction="listenFile">
-                <img src="/images/messageBoard/msg_uploadPic.png" alt="">
               </image-upload>
             </div>
             <div class="img-item">
               <image-upload @fileAction="listenFile">
-                <img src="/images/messageBoard/msg_uploadPic.png" alt="">
               </image-upload>
             </div>
             <div class="img-item">
               <image-upload @fileAction="listenFile">
-                <img src="/images/messageBoard/msg_uploadPic.png" alt="">
               </image-upload>
             </div>
           </div>
@@ -98,9 +94,8 @@
               </div>
             </div>
           </div>
-          <el-button>
-          <button class="btn" @click="confirm">提交</button></el-button>
-        </form>
+            <button class="btn" @click="confirm">提交</button>
+        </div>
       </div>
       <div class="msg-table" v-else-if="!showHistory && user.userUU">
         <div class="history" v-for="message in messageBoardCurrent.content">
@@ -158,7 +153,8 @@
         isLogin: false,
         txtVal: 0,
         isMobile: true,
-        isEmail: true
+        isEmail: true,
+        messageBoard: {}
       }
     },
     components: {
@@ -166,9 +162,9 @@
       PageComponent
     },
     computed: {
-      messageBoard () {
-        return this.$store.state.messageBoard.information.data
-      },
+//      messageBoard () {
+//        return this.$store.state.messageBoard.information.data
+//      },
 //      user () {
 //        return this.$store.state.messageBoardIsLogin.login.data
 //      },
@@ -189,6 +185,10 @@
       }
     },
     methods: {
+      lookImg () {
+//        this.isHide = true
+        this.$emit('imgEvent', true)
+      },
       listenPage (page) {
         this.pageParams.page = page
         this.$emit('pageEvent', page)
@@ -197,7 +197,6 @@
         let obj = {}
         obj.img = url
         this.dialogImageUrl.push(obj)
-        console.log(this.dialogImageUrl)
       },
       isOpendMessage () {
         this.$emit('openBoardEvent', false)
@@ -211,28 +210,32 @@
       textareaLength () {
         this.txtVal = this.messageBoard.question.length
       },
-       // 判断手机号
+      // 判断手机号
       checkMobile () {
         this.isMobile = (/^[\d]{8,11}$/).test(this.messageBoard.userTel)
       },
-     // 判断邮箱
+      // 判断邮箱
       checkEmail () {
         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) {
-            Message.error('您还没有填写反馈内容')
+            Message.info('您还没有填写反馈内容')
           } else if (!this.messageBoard.role) {
-            Message.error('请选择您的身份信息')
+            Message.info('请选择您的身份信息')
           } else if (!this.messageBoard.type) {
-            Message.error('请选择一种反馈类型')
+            Message.info('请选择一种反馈类型')
           } else if (!this.user) {
             if (!this.messageBoard.userTel && !this.messageBoard.email) {
-              Message.error('请填写任意一种联系方式')
+              Message.info('请填写任意一种联系方式')
             }
+          } else {
+            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'})
+            this.isOpendMessage()
+            Message.info('感谢您的宝贵意见')
+//            window.location.reload()
+            this.messageBoard = {}
           }
         }
       }
@@ -240,7 +243,7 @@
   }
 </script>
 <style scoped>
-    /*分页*/
+  /*分页*/
   .page {
     text-align: center;
   }
@@ -303,14 +306,14 @@
   .messageBoard .modal-body h3 span{
     color: #5078cb;
   }
-  .messageBoard .modal-body form{
+  .messageBoard .modal-body .form-message{
     width: 680px;
     text-align: center;
   }
-  .messageBoard .modal-body form .txtArea{
+  .messageBoard .modal-body .form-message .txtArea{
     position: relative;
   }
-  .messageBoard .modal-body form textarea {
+  .messageBoard .modal-body .form-message textarea {
     padding: 10px 10px 20px 10px;
     width: 576px;
     height: 110px;
@@ -320,7 +323,7 @@
     letter-spacing: 1px;
     line-height: 18px;
   }
-  .messageBoard .modal-body form span.count_tip{
+  .messageBoard .modal-body .form-message span.count_tip{
     position: absolute;
     bottom: 4px;
     right: 55px;
@@ -334,7 +337,7 @@
     text-align: right;
     padding-right: 5px;
   }
-  .messageBoard .modal-body form p{
+  .messageBoard .modal-body .form-message p{
     padding-left: 40px;
     text-align: left;
     font-size: 14px;
@@ -344,7 +347,7 @@
   .messageBoard .modal-body p.radioCheck{
     padding-left: 65px;
   }
-  .messageBoard .modal-body form input{
+  .messageBoard .modal-body .form-message input{
     padding: 0 10px;
     margin-left: 20px;
     height: 30px;
@@ -354,17 +357,17 @@
     border: #c5c5c5 1px solid;
     vertical-align: sub;
   }
-  .messageBoard .modal-body form label{
+  .messageBoard .modal-body .form-message label{
     margin-right: 25px;
   }
-  .messageBoard .modal-body form .img-warp{
+  .messageBoard .modal-body .form-message .img-warp{
     position: relative;
     overflow: hidden;
     width: 80%;
     margin: 0 auto;
     text-align: center;
   }
-  .messageBoard .modal-body form div.img-item{
+  .messageBoard .modal-body .form-message div.img-item{
     position: relative;
     float: left;
     margin-right: 23px;
@@ -374,10 +377,10 @@
     border: #C9C9C9 1px solid;
     font-size: 14px;
   }
-  .messageBoard .modal-body form div.img-item:last-child{
+  .messageBoard .modal-body .form-message div.img-item:last-child{
     margin-right: 0;
   }
-  .messageBoard .modal-body form div.img-item input[type="file"]{
+  .messageBoard .modal-body .form-message div.img-item input[type="file"]{
     position: absolute;
     top: 0;
     left: -20px;
@@ -385,28 +388,28 @@
     height: 70px;
     opacity: 0;
   }
-  .messageBoard .modal-body form div.img-item img{
+  .messageBoard .modal-body .form-message div.img-item img{
     display: inline-block;
     max-width: 80px;
     max-height: 60px;
     z-index: 10;
     margin-top: 4px;
   }
-  .messageBoard .modal-body form p.tip{
+  .messageBoard .modal-body .form-message p.tip{
     text-align: left;
     color: #999;
     font-size: 12px;
     padding-left: 68px;
   }
-  .messageBoard .modal-body form label{
+  .messageBoard .modal-body .form-message label{
     margin-bottom: 10px;
     font-size: 14px;
     font-weight: normal;
   }
-  .messageBoard .modal-body form input[type='text']{
+  .messageBoard .modal-body .form-message input[type='text']{
     width: 295px;
   }
-  .messageBoard .modal-body form button{
+  .messageBoard .modal-body .form-message button{
     margin: 10px auto;
     width: 100px;
     height: 35px;
@@ -415,27 +418,27 @@
     border-radius: 0;
     text-align: center;
   }
-  .messageBoard .modal-body form .msg-message>label{
+  .messageBoard .modal-body .form-message .msg-message>label{
     font-size: 14px;
   }
-  .messageBoard .modal-body form .msg-message span{
+  .messageBoard .modal-body .form-message .msg-message span{
     margin: 0 auto;
     font-size: 12px;
     margin-left: 5px;
   }
-  .messageBoard .modal-body form .input-style span{
+  .messageBoard .modal-body .form-message .input-style span{
     color: #666;
   }
-  .messageBoard .modal-body form .msg-message span i{
+  .messageBoard .modal-body .form-message .msg-message span i{
     padding-right: 5px;
     color: #4777C6;
   }
-  .messageBoard .modal-body form b{
+  .messageBoard .modal-body .form-message b{
     margin-right: 5px;
     font-weight: bold;
     color: #FF5A5C;
   }
-  .messageBoard .modal-body form b.first{
+  .messageBoard .modal-body .form-message b.first{
     position: relative;
     top: -95px;
     left: 2px;
@@ -550,7 +553,7 @@
   .msg-message .modal-body div.txtArea{
     padding-left: 55px;
   }
-  .messageBoard .modal-body form p.radioLabel{
+  .messageBoard .modal-body .form-message p.radioLabel{
     margin-bottom: 10px;
   }
   .radioLabel {

+ 1 - 1
components/provider/RecommendOriginal.vue

@@ -4,7 +4,7 @@
     <div class="hr-blue"></div>
     <ul class="recommend-list list-unstyled list-inline">
       <li class="recommend" v-for="(store, index) in stores">
-        <a :href="'/store/' + store.uuid">
+        <a :href="'/store/' + store.uuid" target="_blank">
           <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'" /></div>
           <div class="content">
             <div class="name">

+ 1 - 1
components/provider/Suppliers.vue

@@ -24,7 +24,7 @@
       <tr v-for="store in stores.content" v-if="store">
         <td>
           <div class="logo">
-            <a :href="'/store/' + store.uuid"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
+            <a :href="'/store/' + store.uuid" target="_blank"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
           </div>
         </td>
         <td colspan="3">