Bladeren bron

bug修改

wangfei 6 jaren geleden
bovenliggende
commit
3f99be335a
1 gewijzigde bestanden met toevoegingen van 8 en 32 verwijderingen
  1. 8
    32
      src/views/vote/signup.vue

+ 8
- 32
src/views/vote/signup.vue Bestand weergeven

51
 
51
 
52
 <script>
52
 <script>
53
 import { createNamespacedHelpers } from "vuex";
53
 import { createNamespacedHelpers } from "vuex";
54
-import { Toast } from "vant";
54
+import { Dialog } from "vant";
55
 import BgImage from "../../assets/toast.gif";
55
 import BgImage from "../../assets/toast.gif";
56
 const {
56
 const {
57
   mapState: mapVoteState,
57
   mapState: mapVoteState,
109
         }
109
         }
110
       });
110
       });
111
     } else {
111
     } else {
112
-      alert("不存在对应的活动信息!");
112
+      Dialog.alert({ message: "不存在对应的活动信息!" })
113
     }
113
     }
114
   },
114
   },
115
   methods: {
115
   methods: {
146
     },
146
     },
147
     SubmitBtn() {
147
     SubmitBtn() {
148
       if (this.postData.photo == "") {
148
       if (this.postData.photo == "") {
149
-        Toast.fail({
150
-          duration: 2000, // 持续展示 toast
151
-          forbidClick: true, // 禁用背景点击
152
-          message: "请先上传您的全家福!"
153
-        });
149
+        Dialog.alert({ message: "请先上传您的全家福!" })
154
         return false;
150
         return false;
155
       }
151
       }
156
       if (this.theme === 1 && this.postData.message == "") {
152
       if (this.theme === 1 && this.postData.message == "") {
157
-        Toast.fail({
158
-          duration: 2000, // 持续展示 toast
159
-          forbidClick: true, // 禁用背景点击
160
-          message: "请先输入寄语!"
161
-        });
153
+        Dialog.alert({ message: "请先输入寄语!" })
162
         return false;
154
         return false;
163
       }
155
       }
164
 
156
 
165
       if (this.postData.phone == "") {
157
       if (this.postData.phone == "") {
166
-        Toast.fail({
167
-          duration: 2000, // 持续展示 toast
168
-          forbidClick: true, // 禁用背景点击
169
-          message: "请输入您的联系方式!"
170
-        });
158
+        Dialog.alert({ message: "请输入您的联系方式!" })
171
         return false;
159
         return false;
172
       }
160
       }
173
       var myreg = /^[1][0-9]{10}$/;
161
       var myreg = /^[1][0-9]{10}$/;
174
       if (!myreg.test(this.postData.phone)) {
162
       if (!myreg.test(this.postData.phone)) {
175
-        Toast.fail({
176
-          duration: 2000, // 持续展示 toast
177
-          forbidClick: true, // 禁用背景点击
178
-          message: "手机号格式不正确!"
179
-        });
163
+        Dialog.alert({ message: "手机号格式不正确!" })
180
         return false;
164
         return false;
181
       }
165
       }
182
       if (this.postData.name == "") {
166
       if (this.postData.name == "") {
183
-        Toast.fail({
184
-          duration: 2000, // 持续展示 toast
185
-          forbidClick: true, // 禁用背景点击
186
-          message: "请输入您的姓名!"
187
-        });
167
+        Dialog.alert({ message: "请输入您的姓名!" })
188
         return false;
168
         return false;
189
       }
169
       }
190
       if (this.theme === 2 && this.postData.addr == "") {
170
       if (this.theme === 2 && this.postData.addr == "") {
191
-        Toast.fail({
192
-          duration: 2000, // 持续展示 toast
193
-          forbidClick: true, // 禁用背景点击
194
-          message: "请输入您的所在社区!"
195
-        });
171
+        Dialog.alert({ message: "请输入您的所在社区!" })
196
         return false;
172
         return false;
197
       }
173
       }
198
 
174