头像上传 token

main
lion 1 year ago
parent 4f104d67e1
commit 49648332e5

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

Loading…
Cancel
Save