瀏覽代碼

bug修改

wangfei 6 年之前
父節點
當前提交
3f99be335a
共有 1 個文件被更改,包括 8 次插入32 次删除
  1. 8
    32
      src/views/vote/signup.vue

+ 8
- 32
src/views/vote/signup.vue 查看文件

@@ -51,7 +51,7 @@
51 51
 
52 52
 <script>
53 53
 import { createNamespacedHelpers } from "vuex";
54
-import { Toast } from "vant";
54
+import { Dialog } from "vant";
55 55
 import BgImage from "../../assets/toast.gif";
56 56
 const {
57 57
   mapState: mapVoteState,
@@ -109,7 +109,7 @@ export default {
109 109
         }
110 110
       });
111 111
     } else {
112
-      alert("不存在对应的活动信息!");
112
+      Dialog.alert({ message: "不存在对应的活动信息!" })
113 113
     }
114 114
   },
115 115
   methods: {
@@ -146,53 +146,29 @@ this.isLoading=false
146 146
     },
147 147
     SubmitBtn() {
148 148
       if (this.postData.photo == "") {
149
-        Toast.fail({
150
-          duration: 2000, // 持续展示 toast
151
-          forbidClick: true, // 禁用背景点击
152
-          message: "请先上传您的全家福!"
153
-        });
149
+        Dialog.alert({ message: "请先上传您的全家福!" })
154 150
         return false;
155 151
       }
156 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 154
         return false;
163 155
       }
164 156
 
165 157
       if (this.postData.phone == "") {
166
-        Toast.fail({
167
-          duration: 2000, // 持续展示 toast
168
-          forbidClick: true, // 禁用背景点击
169
-          message: "请输入您的联系方式!"
170
-        });
158
+        Dialog.alert({ message: "请输入您的联系方式!" })
171 159
         return false;
172 160
       }
173 161
       var myreg = /^[1][0-9]{10}$/;
174 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 164
         return false;
181 165
       }
182 166
       if (this.postData.name == "") {
183
-        Toast.fail({
184
-          duration: 2000, // 持续展示 toast
185
-          forbidClick: true, // 禁用背景点击
186
-          message: "请输入您的姓名!"
187
-        });
167
+        Dialog.alert({ message: "请输入您的姓名!" })
188 168
         return false;
189 169
       }
190 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 172
         return false;
197 173
       }
198 174