Browse Source

bug修改

wangfei 6 years ago
parent
commit
d0ce778433
3 changed files with 21 additions and 5 deletions
  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 View File

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

+ 1
- 1
src/views/vote/list.vue View File

144
       topList: x => x.toplist,
144
       topList: x => x.toplist,
145
       user: x => x.user,
145
       user: x => x.user,
146
       theme: x => x.theme,
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
   created() {
150
   created() {

+ 19
- 2
src/views/vote/signup.vue View File

141
         })
141
         })
142
         return false
142
         return false
143
       }
143
       }
144
-      if(this.postData.name == ""){
144
+      if(this.theme === 1 && this.postData.message == '') {
145
         Toast.fail({
145
         Toast.fail({
146
           duration: 2000, // 持续展示 toast
146
           duration: 2000, // 持续展示 toast
147
           forbidClick: true, // 禁用背景点击
147
           forbidClick: true, // 禁用背景点击
148
-          message: "请输入您的姓名!"
148
+          message: "请先输入寄语!"
149
         })
149
         })
150
         return false
150
         return false
151
       }
151
       }
152
+
152
       if(this.postData.phone == ""){
153
       if(this.postData.phone == ""){
153
         Toast.fail({
154
         Toast.fail({
154
           duration: 2000, // 持续展示 toast
155
           duration: 2000, // 持续展示 toast
166
         })
167
         })
167
         return false
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
       this.voteMember({
187
       this.voteMember({
171
         actid: this.actid,
188
         actid: this.actid,