Compare commits
2 Commits
3dbe84e78e
...
985edee594
Author | SHA1 | Date | |
---|---|---|---|
985edee594 | |||
f090f05749 |
@ -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://testy.hschool.com.cn//api/common/upload', //仅为示例,非真实的接口地址
|
url: 'https://naweigetetest2.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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user