From abea03a0adf12c956fd1acb8517c6f7f38b1438e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 18 Aug 2022 17:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=94=9F=E4=BF=A1=E6=81=AF=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../learun-mpui/learun-ui-mp/upload.vue | 32 ++++--------------- .../LearunApp-2.2.0/pages/welcome/list.vue | 6 ++-- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue index e6ec87c13..16224c6e1 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue @@ -157,24 +157,6 @@ export default { return Promise.all(ret) }, - validate(array){ - // let type = array.every(item=>{ - // return item.type && item.type.substring(0,6) == "image/" - // }) - // if(!type){ - // this.TOAST('文件类型错误'); - // return false - // } - let size = array.every(item=>{ - return item.size && item.size <= 10 * 1024 * 1024 - }) - if(!size){ - this.TOAST('文件大小不得超过10M'); - return false - } - return true - }, - imgToBase64(url){ return new Promise((resolve,reject)=>{ if(!url){ @@ -198,13 +180,13 @@ export default { }, validate(array){ - let type = array.every(item=>{ - return item.type && item.type.substring(0,6) == "image/" - }) - if(!type){ - this.TOAST('文件类型错误'); - return false - } + // let type = array.every(item=>{ + // return item.type && item.type.substring(0,6) == "image/" + // }) + // if(!type){ + // this.TOAST('文件类型错误'); + // return false + // } let size = array.every(item=>{ return item.size && item.size <= 100 * 1024 * 1024 }) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue index 26773f034..9721ec248 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue @@ -150,8 +150,8 @@ export default { _this.queryData.ID = res.StuInfoFreshEntity.ID; _this.queryData.Photo = res.StuInfoFreshEntity.Photo; - _this.photo = [{url:res.StuInfoFreshEntity.Url,id:res.StuInfoFreshEntity.Photo}]; - _this.fileList = res.StuInfoFreshEntity.FilesList + _this.photo = res.StuInfoFreshEntity.Photo?[{url:res.StuInfoFreshEntity.Url,id:res.StuInfoFreshEntity.Photo}]:[]; + _this.fileList = res.StuInfoFreshEntity.FilesList||[] _this.refreshComponent() _this.queryData.telephone = res.StuInfoFreshEntity.telephone; _this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress; @@ -164,6 +164,8 @@ export default { let res = await this.$refs["upload"].uploadImage() if(res&&res.length){ this.queryData.Photo = res[0]["id"]; + }else{ + this.queryData.Photo = "" } this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => { this.HIDE_LOADING();