上传文件有token的时候,添加token
This commit is contained in:
@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user