Browse Source

留言板

hangb 8 years ago
parent
commit
1cb17abe48

+ 16 - 3
components/common/image-upload/ImageUpload.vue

@@ -51,19 +51,26 @@
     border: none;
   }
   .el-upload--picture-card:hover {
-    border-color: transparent;
+    border-color: #ddd;
     color: transparent;
   }
+  .el-upload-list--picture-card {
+    margin: 0;
+    display: inline-block;
+    vertical-align: top;
+    height: 72px;
+  }
   .el-upload-list--picture-card .el-upload-list__item {
     margin: 0;
     width: 82px;
     height: 70px;
-    border: transparent;
+    border: 1px solid #ccc;
     border-radius: 0;
+    background: transparent;
   }
   .el-upload-list--picture-card .el-upload-list__item-thumbnail {
     max-width: 82px;
-    max-height: 70px;
+    max-height: 66px;
   }
   .el-upload-list__item.is-success .el-upload-list__item-status-label {
     display: none;
@@ -89,4 +96,10 @@
     top: 0;
     text-align: right;
   }
+  .el-dialog--tiny {
+    width: 35%;
+  }
+  .v-modal{
+    z-index: 1983;
+  }
 </style>

+ 16 - 6
components/messageBoard/MessageBoard.vue

@@ -98,7 +98,8 @@
               </div>
             </div>
           </div>
-          <button class="btn" @click="confirm">提交</button>
+          <el-button>
+          <button class="btn" @click="confirm">提交</button></el-button>
         </form>
       </div>
       <div class="msg-table" v-else-if="!showHistory && user.userUU">
@@ -219,12 +220,21 @@
         this.isEmail = (/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/).test(this.messageBoard.email)
       },
       confirm () {
-       // alert(message)
-       /* let imgs = []
-        if (message) {
-          imgs[index] = {'img': message.img}
-        } */
         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.question) {
+          alert('您还没有填写反馈内容')
+        }
+        if (!this.messageBoard.role) {
+          alert('请选择您的身份信息')
+        }
+        if (!this.messageBoard.type) {
+          alert('请选择一种反馈类型')
+        }
+        if (!this.user) {
+          if (!this.messageBoard.userTel && !this.messageBoard.email) {
+            alert('请填写任意一种联系方式')
+          }
+        }
       }
     }
   }

+ 18 - 0
store/componentUmallStoreId.js

@@ -0,0 +1,18 @@
+export const state = () => ({
+  storeId: {
+    fetching: false,
+    data: ''
+  }
+})
+export const mutations = {
+  REQUEST_STOREID (state) {
+    state.storeId.fetching = true
+  },
+  GET_STOREID_FAILURE (state) {
+    state.storeId.fetching = false
+  },
+  GET_STOREID_SUCCESS (state, result) {
+    state.storeId.fetching = false
+    state.storeId.data = result
+  }
+}