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();