From 5cfbfdf67c8e059585fafd1f74e52152611329ad Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 6 Aug 2021 15:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=A4=A7=E5=B0=8F=E9=99=90=E5=88=B6=EF=BC=8C=E6=9C=80?= =?UTF-8?q?=E5=A4=A71M?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/api/index.js | 7 ------- .../views/my-components/lili/upload-pic-input.vue | 8 ++------ .../views/my-components/lili/upload-pic-thumb.vue | 12 ++---------- manager/src/views/promotion/live/liveDetail.vue | 13 ++++++++++--- manager/src/views/sys/oss-manage/ossManage.vue | 4 ++-- .../src/views/change-password/change-password.vue | 4 +--- .../views/goods/goods-seller/goodsOperationSec.vue | 6 +++--- .../views/my-components/lili/upload-pic-input.vue | 8 ++------ .../views/my-components/lili/upload-pic-thumb.vue | 12 ++---------- .../order/after-order/orderComplaintDetail.vue | 4 ++-- seller/src/views/promotion/live/addLive.vue | 8 ++++---- 11 files changed, 30 insertions(+), 56 deletions(-) diff --git a/manager/src/api/index.js b/manager/src/api/index.js index a0af28cb..897f96c5 100644 --- a/manager/src/api/index.js +++ b/manager/src/api/index.js @@ -16,16 +16,9 @@ let commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common // 文件上传接口 export const uploadFile = commonUrl+ "/common/upload/file"; -// 验证码渲染图片接口 -export const drawCodeImage = commonUrl + "/common/captcha/draw/"; -// 获取菜单 -export const getMenuList = managerUrl + "/permission/getMenuList"; // Websocket export const ws = managerUrl + "/ws"; -export const getMessageSendData = ""; - - //获取所有city export const getAllCity = (params) => { return getRequest(commonUrl + '/common/region/allCity', params) diff --git a/manager/src/views/my-components/lili/upload-pic-input.vue b/manager/src/views/my-components/lili/upload-pic-input.vue index 2db882e0..6ad5bddf 100644 --- a/manager/src/views/my-components/lili/upload-pic-input.vue +++ b/manager/src/views/my-components/lili/upload-pic-input.vue @@ -27,7 +27,7 @@ :on-error="handleError" :format="['jpg','jpeg','png','gif','bmp']" accept=".jpg, .jpeg, .png, .gif, .bmp" - :max-size="maxSize*1024" + :max-size="1024" :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize" :before-upload="beforeUpload" @@ -74,10 +74,6 @@ export default { type: Boolean, default: false }, - maxSize: { - type: Number, - default: 5 - }, maxlength: Number, icon: { type: String, @@ -116,7 +112,7 @@ export default { this.loading = false; this.$Notice.warning({ title: "文件大小过大", - desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 " + this.maxSize + "M." + desc: "所选文件大小过大, 不得超过1M." }); }, // 上传前 diff --git a/manager/src/views/my-components/lili/upload-pic-thumb.vue b/manager/src/views/my-components/lili/upload-pic-thumb.vue index 467c054b..55103adb 100644 --- a/manager/src/views/my-components/lili/upload-pic-thumb.vue +++ b/manager/src/views/my-components/lili/upload-pic-thumb.vue @@ -29,7 +29,7 @@ :on-success="handleSuccess" :on-error="handleError" :format="['jpg','jpeg','png','gif']" - :max-size="maxSize*1024" + :max-size="1024" :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize" :before-upload="handleBeforeUpload" @@ -72,10 +72,6 @@ export default { type: Boolean, default: true }, - maxSize: { - type: Number, - default: 5 - }, limit: { type: Number, default: 10 @@ -147,11 +143,7 @@ export default { this.$Notice.warning({ title: "文件大小过大", desc: - "所选文件‘ " + - file.name + - " ’大小过大, 不得超过 " + - this.maxSize + - "M." + "所选文件大小过大,不能超过1M." }); }, // 上传之前钩子 diff --git a/manager/src/views/promotion/live/liveDetail.vue b/manager/src/views/promotion/live/liveDetail.vue index a808aa83..38b8bde4 100644 --- a/manager/src/views/promotion/live/liveDetail.vue +++ b/manager/src/views/promotion/live/liveDetail.vue @@ -58,12 +58,12 @@ + :on-format-error="handleFormatError" :max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
-
直播间背景图,图片规则:建议像素1080*1920,大小不超过2M
+
直播间背景图,图片规则:建议像素1080*1920,大小不超过1M
@@ -79,7 +79,7 @@ + :on-format-error="handleFormatError" :max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
@@ -191,6 +191,13 @@ export default { this.imageVisible = true; this.imageSrc = src; }, + // 上传文件超过大小限制 + handleMaxSize(file) { + this.$Notice.warning({ + title: "文件大小过大", + desc: "所选文件大小过大, 不得超过 1M.", + }); + }, /** * 获取直播间详情 */ diff --git a/manager/src/views/sys/oss-manage/ossManage.vue b/manager/src/views/sys/oss-manage/ossManage.vue index 88fe7f52..ec7383fe 100644 --- a/manager/src/views/sys/oss-manage/ossManage.vue +++ b/manager/src/views/sys/oss-manage/ossManage.vue @@ -187,7 +187,7 @@ :headers="accessToken" :on-success="handleSuccess" :on-error="handleError" - :max-size="5120" + :max-size="1024" :on-exceeded-size="handleMaxSize" multiple type="drag" @@ -694,7 +694,7 @@ export default { handleMaxSize(file) { this.$Notice.warning({ title: "文件大小过大", - desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 5M.", + desc: "所选文件大小过大, 不得超过 1M.", }); }, // 上传成功回调 diff --git a/seller/src/views/change-password/change-password.vue b/seller/src/views/change-password/change-password.vue index 52f63c33..98c8799d 100644 --- a/seller/src/views/change-password/change-password.vue +++ b/seller/src/views/change-password/change-password.vue @@ -1,9 +1,7 @@
@@ -316,7 +316,7 @@ export default { handleMaxSize(file) { this.$Notice.warning({ title: "超过文件大小限制", - desc: "图片 " + file.name + " 不能超过2mb", + desc: "图片不能超过1mb", }); }, // 获取详情 diff --git a/seller/src/views/promotion/live/addLive.vue b/seller/src/views/promotion/live/addLive.vue index 220af7c8..1f9b78bc 100644 --- a/seller/src/views/promotion/live/addLive.vue +++ b/seller/src/views/promotion/live/addLive.vue @@ -67,12 +67,12 @@
+ :on-format-error="handleFormatError" :max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
-
直播间背景图,图片规则:建议像素1080*1920,大小不超过2M
+
直播间背景图,图片规则:建议像素1080*1920,大小不超过1M
@@ -88,7 +88,7 @@ + :on-format-error="handleFormatError" :max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
@@ -467,7 +467,7 @@ export default { handleMaxSize(file) { this.$Notice.warning({ title: "图片超过限制大小!", - desc: file.name + "图片超过规定限制大小,请重新上传", + desc: "图片超过规定限制大小,请重新上传", }); },