Pārlūkot izejas kodu

新生信息完善

临城职教中职
杨晓琪 pirms 2 gadiem
vecāks
revīzija
abea03a0ad
2 mainītis faili ar 11 papildinājumiem un 27 dzēšanām
  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 Parādīt failu

@@ -157,24 +157,6 @@ export default {
return Promise.all(ret) 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){ imgToBase64(url){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
if(!url){ if(!url){
@@ -198,13 +180,13 @@ export default {
}, },
validate(array){ 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=>{ let size = array.every(item=>{
return item.size && item.size <= 100 * 1024 * 1024 return item.size && item.size <= 100 * 1024 * 1024
}) })


+ 4
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue Parādīt failu

@@ -150,8 +150,8 @@ export default {
_this.queryData.ID = res.StuInfoFreshEntity.ID; _this.queryData.ID = res.StuInfoFreshEntity.ID;
_this.queryData.Photo = res.StuInfoFreshEntity.Photo; _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.refreshComponent()
_this.queryData.telephone = res.StuInfoFreshEntity.telephone; _this.queryData.telephone = res.StuInfoFreshEntity.telephone;
_this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress; _this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress;
@@ -164,6 +164,8 @@ export default {
let res = await this.$refs["upload"].uploadImage() let res = await this.$refs["upload"].uploadImage()
if(res&&res.length){ if(res&&res.length){
this.queryData.Photo = res[0]["id"]; this.queryData.Photo = res[0]["id"];
}else{
this.queryData.Photo = ""
} }
this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => { this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => {
this.HIDE_LOADING(); this.HIDE_LOADING();


Notiek ielāde…
Atcelt
Saglabāt