Compare commits

...

2 Commits

Author SHA1 Message Date
985edee594 Merge branch 'main' of http://49.235.147.88:3000/zhangkai/dyqc_hdapp 2025-06-12 17:31:08 +08:00
f090f05749 修改头像 2025-06-12 17:30:59 +08:00

View File

@ -382,31 +382,31 @@
},
upload() {
//
// uni.chooseImage({
// success: (chooseImageRes) => {
// const tempFilePaths = chooseImageRes.tempFilePaths;
// const that = this
// uni.uploadFile({
// url: 'https://testy.hschool.com.cn//api/common/upload', //
// filePath: tempFilePaths[0],
// name: 'file',
// header: {
// "token": uni.getStorageSync("token")
// },
// formData: {
// 'user': 'test'
// },
// success: (res) => {
// let group = JSON.parse(res.data)
// that.upAvatar = group.data.url
// that.avatar = group.data.fullurl
// console.log(group.data)
// console.log(that.avata)
// }
// });
// }
// });
this.show5 = true
uni.chooseImage({
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
const that = this
uni.uploadFile({
url: 'https://naweigetetest2.hschool.com.cn/api/common/upload', //
filePath: tempFilePaths[0],
name: 'file',
header: {
"token": uni.getStorageSync("token")
},
formData: {
'user': 'test'
},
success: (res) => {
let group = JSON.parse(res.data)
that.upAvatar = group.data.url
that.avatar = group.data.fullurl
console.log(group.data)
console.log(that.avata)
}
});
}
});
// this.show5 = true
},
close() {
this.show5 = false