Explorar el Código

Merge branch 'master' of http://git.ycjcjy.com/support-game/wechat

zjxpcyc hace 6 años
padre
commit
1f55e46fd2
Se han modificado 2 ficheros con 20 adiciones y 4 borrados
  1. 1
    2
      src/App.vue
  2. 19
    2
      src/views/vote/signup.vue

+ 1
- 2
src/App.vue Ver fichero

@@ -37,7 +37,6 @@ export default {
37 37
   created() {
38 38
     const env = process.env.NODE_ENV || 'production'
39 39
     console.log("process.env.NODE_ENV =>", env)
40
-
41 40
     if (env === 'production' || env === 'test') {
42 41
       if (location.search && this.toolClass.UrlSearch(location.search).code) {
43 42
         this.code = this.toolClass.UrlSearch(location.search).code
@@ -56,7 +55,7 @@ export default {
56 55
         this.toolClass.getCode(this.appid[env])
57 56
       }
58 57
     } else {
59
-      this.showPage = true
58
+       this.showPage = true
60 59
     }
61 60
   },
62 61
   methods: {

+ 19
- 2
src/views/vote/signup.vue Ver fichero

@@ -141,14 +141,15 @@ export default {
141 141
         })
142 142
         return false
143 143
       }
144
-      if(this.postData.name == ""){
144
+      if(this.theme === 1 && this.postData.message == '') {
145 145
         Toast.fail({
146 146
           duration: 2000, // 持续展示 toast
147 147
           forbidClick: true, // 禁用背景点击
148
-          message: "请输入您的姓名!"
148
+          message: "请先输入寄语!"
149 149
         })
150 150
         return false
151 151
       }
152
+
152 153
       if(this.postData.phone == ""){
153 154
         Toast.fail({
154 155
           duration: 2000, // 持续展示 toast
@@ -166,6 +167,22 @@ export default {
166 167
         })
167 168
         return false
168 169
       }
170
+      if(this.postData.name == ""){
171
+        Toast.fail({
172
+          duration: 2000, // 持续展示 toast
173
+          forbidClick: true, // 禁用背景点击
174
+          message: "请输入您的姓名!"
175
+        })
176
+        return false
177
+      }
178
+      if(this.theme === 2 && this.postData.addr == '') {
179
+        Toast.fail({
180
+          duration: 2000, // 持续展示 toast
181
+          forbidClick: true, // 禁用背景点击
182
+          message: "请输入您的所在社区!"
183
+        })
184
+        return false
185
+      }
169 186
 
170 187
       this.voteMember({
171 188
         actid: this.actid,