wangfei 6 lat temu
rodzic
commit
d0ce778433
3 zmienionych plików z 21 dodań i 5 usunięć
  1. 1
    2
      src/App.vue
  2. 1
    1
      src/views/vote/list.vue
  3. 19
    2
      src/views/vote/signup.vue

+ 1
- 2
src/App.vue Wyświetl plik

@@ -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: {

+ 1
- 1
src/views/vote/list.vue Wyświetl plik

@@ -144,7 +144,7 @@ export default {
144 144
       topList: x => x.toplist,
145 145
       user: x => x.user,
146 146
       theme: x => x.theme,
147
-      myID: x => (x.myprofile.filter(x => x.ActivityId === (x.activity || {}).ActivityId)[0] || {}).MemberId
147
+      myID: x => ((x.myprofile || []).filter(s => s.ActivityId === (x.activity || {}).ActivityId)[0] || {}).MemberId
148 148
     }),
149 149
   },
150 150
   created() {

+ 19
- 2
src/views/vote/signup.vue Wyświetl plik

@@ -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,