Browse Source

壁纸去掉动图

gzb
guozhongbo 8 months ago
parent
commit
0d9e84bc27

+ 8
- 4
src/views/regionSection/setting/wallpaper.vue View File

84
                     return false;
84
                     return false;
85
                   }
85
                   }
86
                 "
86
                 "
87
-                accept=".png,.jpeg,.jpg,.gif"
87
+                accept=".png,.jpeg,.jpg"
88
               >
88
               >
89
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.hpath">
89
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.hpath">
90
                   <img :src="$api.showImageUrl + wallpaperInfo.hpath" />
90
                   <img :src="$api.showImageUrl + wallpaperInfo.hpath" />
108
                     return false;
108
                     return false;
109
                   }
109
                   }
110
                 "
110
                 "
111
-                accept=".png,.jpeg,.jpg,.gif"
111
+                accept=".png,.jpeg,.jpg"
112
               >
112
               >
113
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.vpath">
113
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.vpath">
114
                   <img :src="$api.showImageUrl + wallpaperInfo.vpath" />
114
                   <img :src="$api.showImageUrl + wallpaperInfo.vpath" />
122
               </Upload>
122
               </Upload>
123
             </div>
123
             </div>
124
             <div class="wallpaper_tip">
124
             <div class="wallpaper_tip">
125
-              <div>支持格式:jpg、jpeg、gif、png</div>
125
+              <div>支持格式:jpg、jpeg、png</div>
126
               <div>最大限制:2MB</div>
126
               <div>最大限制:2MB</div>
127
             </div>
127
             </div>
128
           </div>
128
           </div>
335
       let size = file.size / 1024 / 1024;
335
       let size = file.size / 1024 / 1024;
336
       let suffix = str[str.length - 1];
336
       let suffix = str[str.length - 1];
337
       suffix = suffix.toLowerCase();
337
       suffix = suffix.toLowerCase();
338
-      if (suffix !== "png" && suffix !== "jpeg" && suffix !== "jpg") {
338
+      if (
339
+        suffix !== "png" &&
340
+        suffix !== "jpeg" &&
341
+        suffix !== "jpg"
342
+      ) {
339
         this.$Message.warning("请上传png、jpeg、jpg类型的文件");
343
         this.$Message.warning("请上传png、jpeg、jpg类型的文件");
340
         return false;
344
         return false;
341
       }
345
       }

+ 7
- 17
src/views/schoolSection/setting/wallpaper.vue View File

110
                     return false;
110
                     return false;
111
                   }
111
                   }
112
                 "
112
                 "
113
-                accept=".png,.jpeg,.jpg,.gif"
113
+                accept=".png,.jpeg,.jpg"
114
               >
114
               >
115
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.hpath">
115
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.hpath">
116
                   <img :src="$api.showImageUrl + wallpaperInfo.hpath" />
116
                   <img :src="$api.showImageUrl + wallpaperInfo.hpath" />
142
                     return false;
142
                     return false;
143
                   }
143
                   }
144
                 "
144
                 "
145
-                accept=".png,.jpeg,.jpg,.gif"
145
+                accept=".png,.jpeg,.jpg"
146
               >
146
               >
147
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.vpath">
147
                 <div class="wallpaper_img_box" v-if="wallpaperInfo.vpath">
148
                   <img :src="$api.showImageUrl + wallpaperInfo.vpath" />
148
                   <img :src="$api.showImageUrl + wallpaperInfo.vpath" />
164
               </Spin>
164
               </Spin>
165
             </div>
165
             </div>
166
             <div class="wallpaper_tip">
166
             <div class="wallpaper_tip">
167
-              <div>支持格式:jpg、jpeg、gif、png</div>
167
+              <div>支持格式:jpg、jpeg、png</div>
168
               <div>最大限制:2MB</div>
168
               <div>最大限制:2MB</div>
169
             </div>
169
             </div>
170
           </div>
170
           </div>
504
       let str = file.name.split(".");
504
       let str = file.name.split(".");
505
       let suffix = str[str.length - 1];
505
       let suffix = str[str.length - 1];
506
       suffix = suffix.toLowerCase();
506
       suffix = suffix.toLowerCase();
507
-      if (
508
-        suffix !== "png" &&
509
-        suffix !== "jpeg" &&
510
-        suffix !== "jpg" &&
511
-        suffix !== "gif"
512
-      ) {
513
-        this.$Message.warning("请上传png、jpeg、jpg、gif类型的图片");
507
+      if (suffix !== "png" && suffix !== "jpeg" && suffix !== "jpg") {
508
+        this.$Message.warning("请上传png、jpeg、jpg类型的图片");
514
         return false;
509
         return false;
515
       }
510
       }
516
       if (size > 2) {
511
       if (size > 2) {
544
       let str = file.name.split(".");
539
       let str = file.name.split(".");
545
       let suffix = str[str.length - 1];
540
       let suffix = str[str.length - 1];
546
       suffix = suffix.toLowerCase();
541
       suffix = suffix.toLowerCase();
547
-      if (
548
-        suffix !== "png" &&
549
-        suffix !== "jpeg" &&
550
-        suffix !== "jpg" &&
551
-        suffix !== "gif"
552
-      ) {
553
-        this.$Message.warning("请上传png、jpeg、jpg、gif类型的图片");
542
+      if (suffix !== "png" && suffix !== "jpeg" && suffix !== "jpg") {
543
+        this.$Message.warning("请上传png、jpeg、jpg类型的图片");
554
         return false;
544
         return false;
555
       }
545
       }
556
       if (size > 2) {
546
       if (size > 2) {

Loading…
Cancel
Save