上传文件有token的时候,添加token

This commit is contained in:
2025-05-13 16:41:48 +08:00
parent 13216d3518
commit ddd3dd981a
7 changed files with 846 additions and 332 deletions

View File

@ -55,6 +55,10 @@
value: {
type: Boolean,
required: true
},
token: {
type: String,
default: ''
}
},
data() {
@ -74,7 +78,8 @@
title: "正在上传中...",
mask: true,
});
uploadFile(avatarUrl).then((res) => {
uploadFile(avatarUrl, this.token).then((res) => {
uni.hideLoading();
this.avatar = res.url;
}).catch(() => {