Compare commits

..

No commits in common. "985edee594cc5bc3c6b092d08a2248a3398838ca" and "3dbe84e78e99899e51279f5e12d4e9ac277c1447" have entirely different histories.

View File

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