头像上传 token

main
lion 1 year ago
parent 4f104d67e1
commit 49648332e5

@ -121,6 +121,7 @@
showform: false,
maskClose: false,
imgurl: '',
myToken:'',
form: {
nickname: '',
mobile: ''
@ -162,6 +163,7 @@
onLoad() {
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top //
this.myToken = uni.getStorageSync('xtt_lifeData').vuex_token
},
onShow() {
this.getInitUser()
@ -174,7 +176,7 @@
filePath: e.detail.avatarUrl,
name: 'file',
header: {
'Authorization': `Bearer ${this.vuex_token}`
'Authorization': `Bearer ${this.myToken}`
},
success: (res) => {
uni.showToast({

Loading…
Cancel
Save