<template>
<view @click="toLogout">
</template>
//退出登录
toLogout: function() {
uni.showLoading();
var params = {
url: "/xxx/logout",
method: "DELETE",
data: {
},
callBack: res=> {
uni.hideLoading()
console.log(res)
uni.removeStorageSync('loginResult');
uni.removeStorageSync('token');
uni.removeStorageSync('hadLogin');
uni.removeStorageSync('code');
uni.navigateTo({
url:"/pages/login/login"
})
}
};
http.request(params);
}