陈冉 6 lat temu
rodzic
commit
87441d79f1
3 zmienionych plików z 39 dodań i 22 usunięć
  1. BIN
      src/assets/toast.gif
  2. 39
    18
      src/views/vote/signup.vue
  3. 0
    4
      vue.config.js

BIN
src/assets/toast.gif Wyświetl plik


+ 39
- 18
src/views/vote/signup.vue Wyświetl plik

1
 <template>
1
 <template>
2
   <div :class="'context theme'+theme">
2
   <div :class="'context theme'+theme">
3
-    <div v-if="isLoading">
4
-      <img src="">
3
+    <div v-if="isLoading" class="prompttoast" @click="closetoast">
4
+      <img :src="BgImage">
5
     </div>
5
     </div>
6
     <div class="ContextBox">
6
     <div class="ContextBox">
7
       <div class="uploadimg">
7
       <div class="uploadimg">
52
 <script>
52
 <script>
53
 import { createNamespacedHelpers } from "vuex";
53
 import { createNamespacedHelpers } from "vuex";
54
 import { Toast } from "vant";
54
 import { Toast } from "vant";
55
+import BgImage from "../../assets/toast.gif";
55
 const {
56
 const {
56
   mapState: mapVoteState,
57
   mapState: mapVoteState,
57
   mapActions: mapVoteActions
58
   mapActions: mapVoteActions
60
   name: "signup",
61
   name: "signup",
61
   data() {
62
   data() {
62
     return {
63
     return {
63
-      isLoading:false,
64
+      BgImage,
65
+      isLoading: false,
64
       messagenum: 0,
66
       messagenum: 0,
65
       postData: {
67
       postData: {
66
         photo: "",
68
         photo: "",
128
             .then(res => {
130
             .then(res => {
129
               that.uploadimg = res.result.url;
131
               that.uploadimg = res.result.url;
130
               that.postData.photo = res.result.url;
132
               that.postData.photo = res.result.url;
133
+              this.closetoast();
131
             })
134
             })
132
             .catch(() => {
135
             .catch(() => {
133
               that.isLoading = false;
136
               that.isLoading = false;
135
         };
138
         };
136
       };
139
       };
137
     },
140
     },
141
+    closetoast(){
142
+this.isLoading=false
143
+    },
138
     messageWrite() {
144
     messageWrite() {
139
       this.messagenum = this.postData.message.length;
145
       this.messagenum = this.postData.message.length;
140
     },
146
     },
147
         });
153
         });
148
         return false;
154
         return false;
149
       }
155
       }
150
-      if(this.theme === 1 && this.postData.message == '') {
156
+      if (this.theme === 1 && this.postData.message == "") {
151
         Toast.fail({
157
         Toast.fail({
152
           duration: 2000, // 持续展示 toast
158
           duration: 2000, // 持续展示 toast
153
           forbidClick: true, // 禁用背景点击
159
           forbidClick: true, // 禁用背景点击
154
           message: "请先输入寄语!"
160
           message: "请先输入寄语!"
155
-        })
156
-        return false
161
+        });
162
+        return false;
157
       }
163
       }
158
 
164
 
159
-      if(this.postData.phone == ""){
165
+      if (this.postData.phone == "") {
160
         Toast.fail({
166
         Toast.fail({
161
           duration: 2000, // 持续展示 toast
167
           duration: 2000, // 持续展示 toast
162
           forbidClick: true, // 禁用背景点击
168
           forbidClick: true, // 禁用背景点击
173
         });
179
         });
174
         return false;
180
         return false;
175
       }
181
       }
176
-      if(this.postData.name == ""){
182
+      if (this.postData.name == "") {
177
         Toast.fail({
183
         Toast.fail({
178
           duration: 2000, // 持续展示 toast
184
           duration: 2000, // 持续展示 toast
179
           forbidClick: true, // 禁用背景点击
185
           forbidClick: true, // 禁用背景点击
180
           message: "请输入您的姓名!"
186
           message: "请输入您的姓名!"
181
-        })
182
-        return false
187
+        });
188
+        return false;
183
       }
189
       }
184
-      if(this.theme === 2 && this.postData.addr == '') {
190
+      if (this.theme === 2 && this.postData.addr == "") {
185
         Toast.fail({
191
         Toast.fail({
186
           duration: 2000, // 持续展示 toast
192
           duration: 2000, // 持续展示 toast
187
           forbidClick: true, // 禁用背景点击
193
           forbidClick: true, // 禁用背景点击
188
           message: "请输入您的所在社区!"
194
           message: "请输入您的所在社区!"
189
-        })
190
-        return false
195
+        });
196
+        return false;
191
       }
197
       }
192
 
198
 
193
       this.voteMember({
199
       this.voteMember({
211
   overflow-y: scroll;
217
   overflow-y: scroll;
212
   // display: flex;
218
   // display: flex;
213
   // justify-content: center;
219
   // justify-content: center;
220
+  .prompttoast {
221
+    width: 100%;
222
+    height: 100%;
223
+    background-color: rgba(1, 1, 1, 0.3);
224
+    display: flex;
225
+    justify-content: center;
226
+    align-items: center;
227
+    position: fixed;
228
+    top: 0;
229
+    left: 0;
230
+    z-index: 5;
214
 
231
 
232
+    img {
233
+      width: 1rem;
234
+      height: 1rem;
235
+      color: linear-gradient(#929292, #FFFFFF)
236
+    }
237
+  }
215
   .ContextBox {
238
   .ContextBox {
216
     width: 94%;
239
     width: 94%;
217
     // height: 5.85rem;
240
     // height: 5.85rem;
266
         background: rgba(220, 229, 236, 0);
289
         background: rgba(220, 229, 236, 0);
267
         line-height: 0.22rem;
290
         line-height: 0.22rem;
268
         font-weight: bold;
291
         font-weight: bold;
269
-        color: rgba(112,125,138,0.96);
292
+        color: rgba(112, 125, 138, 0.96);
270
         padding-top: 0.08rem;
293
         padding-top: 0.08rem;
271
         margin-left: calc(4.5%);
294
         margin-left: calc(4.5%);
272
         overflow-y: scroll;
295
         overflow-y: scroll;
273
-
274
-
275
       }
296
       }
276
       .number {
297
       .number {
277
         position: absolute;
298
         position: absolute;
279
         right: 0.05rem;
300
         right: 0.05rem;
280
 
301
 
281
         #textNum {
302
         #textNum {
282
-          color: rgba(112,125,138,0.96);
303
+          color: rgba(112, 125, 138, 0.96);
283
           font-size: 0.14rem;
304
           font-size: 0.14rem;
284
           font-weight: bolder;
305
           font-weight: bolder;
285
           line-height: 0.2rem;
306
           line-height: 0.2rem;
384
   textarea::-webkit-input-placeholder {
405
   textarea::-webkit-input-placeholder {
385
     font-size: 0.16rem;
406
     font-size: 0.16rem;
386
     font-weight: bolder;
407
     font-weight: bolder;
387
-    color: rgba(112,125,138,1);
408
+    color: rgba(112, 125, 138, 1);
388
     line-height: 0.22rem;
409
     line-height: 0.22rem;
389
   }
410
   }
390
 }
411
 }

+ 0
- 4
vue.config.js Wyświetl plik

7
     proxy: {
7
     proxy: {
8
       '/voteapi': {
8
       '/voteapi': {
9
         // target: 'http://wechatconfigdev.ycjcjy.com',
9
         // target: 'http://wechatconfigdev.ycjcjy.com',
10
-<<<<<<< HEAD
11
         target: 'http://192.168.0.62:8080', // wf
10
         target: 'http://192.168.0.62:8080', // wf
12
-=======
13
-        target: 'http://localhost:8080', // wf
14
->>>>>>> 83865c56adef1f6c6aea63317940c0a221574425
15
         // target: 'http://192.168.0.102:8080', // hyq
11
         // target: 'http://192.168.0.102:8080', // hyq
16
         // target: 'http://192.168.0.11:8080', // zys
12
         // target: 'http://192.168.0.11:8080', // zys
17
         // target: 'http://dev.ycjcjy.com', // frp
13
         // target: 'http://dev.ycjcjy.com', // frp