Browse Source

1. 优化上传提示内容和将上传上限1MB 调为5MB

MONSTER-ygh 11 months ago
parent
commit
81c2df56df

+ 3 - 3
src/views/tourism/marketingActivities/detailsBox/couponManagementDetails.vue

@@ -124,7 +124,7 @@
                   </div>
                   
                 </div>
-                <span>建议尺寸322px X 77px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                <span>建议尺寸322px X 77px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
               </el-form-item>
           </div>
           <div v-show="activeName == 'second'">
@@ -511,7 +511,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);
@@ -519,7 +519,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 3 - 3
src/views/tourism/marketingActivities/detailsBox/eventManagementDetails.vue

@@ -64,7 +64,7 @@
                   </div>
                   
                 </div>
-                <span>建议尺寸375px X 392px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                <span>建议尺寸375px X 392px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
               </el-form-item>
               <el-form-item label="活动起止时间:" prop="eventTime">
                 <span>{{ form.eventTime && form.eventTime.join('—') }}</span>
@@ -337,7 +337,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);
@@ -345,7 +345,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 4 - 4
src/views/tourism/marketingActivities/formBox/couponManagementForm.vue

@@ -151,7 +151,7 @@
                   </div>
                   
                 </div>
-                <span>建议尺寸322px X 77px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                <span>建议上传图片尺寸322px X 77px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
               </el-form-item>
           </div>
           <div v-show="activeName == 'second'">
@@ -569,15 +569,15 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
-      let typeList = ['png','jepg','jpg']
+      let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
       if (!isJPG) {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 4 - 4
src/views/tourism/marketingActivities/formBox/eventManagementForm.vue

@@ -67,7 +67,7 @@
                   </div>
                   
                 </div>
-                <span>建议尺寸375px X 392px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                <span>建议上传图片尺寸375px X 392px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
               </el-form-item>
               <el-form-item label="活动起止时间:" prop="eventTime">
                 <el-date-picker
@@ -360,15 +360,15 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
-      let typeList = ['png','jepg','jpg']
+      let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
       if (!isJPG) {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 3 - 3
src/views/tourism/marketingActivities/formBox/templateManagementForm.vue

@@ -78,7 +78,7 @@
                           <i class="el-icon-plus avatar-uploader-icon"></i>
                         </el-upload>
                       </div>
-                      <span>支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                      <span>支持jpg/png/gif,支持5MB大小以内的图片上传</span>
                     </div>
                   </el-form-item>
                   <el-form-item label="背景图2:" prop="backImage2">
@@ -122,7 +122,7 @@
                       </div>
                       
                     </div>
-                    <span>支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                    <span>支持jpg/png/gif,支持5MB大小以内的图片上传</span>
                   </el-form-item>
                   <el-form-item label="产品区域背景色值:" prop="productBg">
                     <el-color-picker v-model="form.productBg"></el-color-picker>
@@ -374,7 +374,7 @@ export default {
         this.form[name].push(response.data.url)
       }
     },
-    beforeAvatarUpload(file,size=1,typeList=['png','jepg','jpg','gif']) {
+    beforeAvatarUpload(file,size=5,typeList=['png','jepg','jpg','gif']) {
       const isLt2M = file.size / 1024 / 1024 <= size;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       const isJPG = typeList.includes(testmsg);

+ 3 - 3
src/views/tourism/membershipManagement/electronicMembership/formBox/membershipLevelForm.vue

@@ -67,7 +67,7 @@
               </div>
               
             </div>
-            <span>建议尺寸16px X 16px,支持jpg、png,支持100KB大小以内的图片上传</span>
+            <span>建议尺寸16px X 16px,支持jpg、png,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <div class="form-title"><span>会员权益</span></div>
           <el-form-item label="折扣权益:">
@@ -308,7 +308,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 0.1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);
@@ -316,7 +316,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 4 - 4
src/views/tourism/productManagement/formBox/scenicAreaTicketsForm.vue

@@ -50,7 +50,7 @@
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
             </div>
-            <span>支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸343px X 94px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-tabs v-model="activeName">
             <el-tab-pane label="产品介绍" name="first">
@@ -253,15 +253,15 @@ export default {
       
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
-      let typeList = ['png','jepg','jpg']
+      let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
       if (!isJPG) {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 6 - 6
src/views/tourism/routeManagementAll/formBox/routeManagementForm.vue

@@ -76,7 +76,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png、gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸343px X 120px,支持jpg、png、gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="浏览路线图" prop="photos">
             <div style="display: flex;">
@@ -119,7 +119,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png、gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸375px X 667px,支持jpg、png、gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <div class="form-title"><span>内容详情</span></div>
           <el-form-item label=""  label-width="0" prop="content">
@@ -383,7 +383,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -391,7 +391,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },
@@ -406,7 +406,7 @@ export default {
     },
     /**  上传图片 多张  */
     beforeAvatarUploadMore(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -414,7 +414,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 5 - 5
src/views/tourism/scenicAreaManagement/contentManagement/formBox/attractionInfoCultureForm.vue

@@ -66,7 +66,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png、gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸343px X 150px, 支持jpg、png、gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="内容详情" prop="contentType">
             <el-radio-group v-model="form.contentType" @input="setContentType">
@@ -277,7 +277,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -285,7 +285,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },
@@ -300,7 +300,7 @@ export default {
     },
     /**  上传图片 多张  */
     beforeAvatarUploadMore(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -308,7 +308,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 6 - 6
src/views/tourism/scenicAreaManagement/contentManagement/formBox/attractionInfoIntroduceForm.vue

@@ -66,7 +66,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png、gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸343px X 150px,支持jpg、png、gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="景区相册" prop="photos">
             <div style="display: flex;">
@@ -109,7 +109,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png、gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸140px X 90px,支持jpg、png、gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="内容详情" prop="contentType">
             <el-radio-group v-model="form.contentType" @input="setContentType">
@@ -323,7 +323,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -331,7 +331,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },
@@ -346,7 +346,7 @@ export default {
     },
     /**  上传图片 多张  */
     beforeAvatarUploadMore(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -354,7 +354,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 3 - 3
src/views/tourism/scenicAreaManagement/contentManagement/formBox/attractionInfoManagementForm.vue

@@ -64,7 +64,7 @@
               </div>
               
             </div>
-            <span>支持jpg、png,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸200px X 144px,支持jpg、png,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="开放时间:" prop="openDate">
             <el-time-picker
@@ -300,7 +300,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);
@@ -308,7 +308,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 3 - 3
src/views/tourism/scenicAreaManagement/contentManagement/formBox/carouselAdvertisForm.vue

@@ -57,7 +57,7 @@
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
             </div>
-            <span>只能上传.jpg,.png图片</span>
+            <span>建议上传图片尺寸375px X 400px,支持jpg、png,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <el-form-item label="banner背景色值" prop="backgroundColor">
             <el-color-picker v-model="form.backgroundColor"></el-color-picker>
@@ -251,7 +251,7 @@ export default {
       
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 2;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);
@@ -259,7 +259,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 2MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 4 - 4
src/views/tourism/scenicAreaManagement/contentManagement/formBox/tourismStrategyForm.vue

@@ -50,7 +50,7 @@
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
             </div>
-            <span>建议上传120px X 100px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传120px X 100px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
           <div class="form-title"><span>内容详情</span></div>
           <el-form-item label-width="0" label="" prop="detail">
@@ -239,15 +239,15 @@ export default {
       
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
-      let typeList = ['png','jepg','jpg']
+      let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
       if (!isJPG) {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
       return isJPG && isLt2M;
     },

+ 6 - 6
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/pointTypeForm.vue

@@ -42,7 +42,7 @@
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
           </div>
-          <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+          <span>建议上传图片尺寸40px X 40px,支持jpg,png,gif,支持5MB大小以内的图片上传</span>
         </el-form-item>
         <el-form-item label="点位图标" prop="iconPath">
           <div
@@ -70,7 +70,7 @@
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
           </div>
-          <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+          <span>建议上传图片尺寸40px X 40px,支持jpg,png,gif,支持5MB大小以内的图片上传</span>
         </el-form-item>
       </el-form>
     </div>
@@ -277,7 +277,7 @@ export default {
       
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -285,7 +285,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 2MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
 
       // let isSize = new Promise(function (resolve, reject) {
@@ -326,7 +326,7 @@ export default {
       
     },
     beforeAvatarUpload1(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -334,7 +334,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 2MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
 
       // let isSize = new Promise(function (resolve, reject) {

+ 3 - 3
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/scenicGuideForm.vue

@@ -70,7 +70,7 @@
               </div>
               
             </div>
-            <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传图片尺寸40px X 40px,支持jpg,png,gif,支持5MB大小以内的图片上传</span>
           </el-form-item>
         <el-form-item label="点位信息:">
           <el-input :rows="4"  v-model="form.remark" type="textarea" placeholder="请输入点位信息" maxlength="500" show-word-limit />
@@ -343,7 +343,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 <= 1;
+      const isLt2M = file.size / 1024 / 1024 <= 5;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg','gif']
       const isJPG = typeList.includes(testmsg);
@@ -351,7 +351,7 @@ export default {
         this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
       }
       if (!isLt2M) {
-        this.$message.error('上传图片图片大小不能超过 1MB!');
+        this.$message.error('上传图片图片大小不能超过 5MB!');
       }
 
       // let isSize = new Promise(function (resolve, reject) {