Parcourir la source

新生信息完善

临城职教中职
杨晓琪 il y a 2 ans
Parent
révision
abea03a0ad
2 fichiers modifiés avec 11 ajouts et 27 suppressions
  1. +7
    -25
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue
  2. +4
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue

+ 7
- 25
Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue Voir le fichier

@@ -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
})


+ 4
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue Voir le fichier

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


Chargement…
Annuler
Enregistrer