methods: {
getInfo() {
this.token = sessionStorage.getItem("token");
console.log(this.token);
axios({
method: "GET",
url: "/apis/me",
headers: { Accept: "application/json", Authorization: this.token }
}).then(data => {
console.log(data.data);
if (data.data.status_code == 200) {
var merchantData = data.data.data.merchant;
console.log(merchantData.logo); //这是后台拿的src:http://p8rf5os6x.bkt.clouddn.com/business/fzn9jNaTtr4fXaBUkTQxrBjARDB70trT5poldRVA.jpeg
}
});
}
},
created() {
this.getInfo();
}