app网络请求封装修改
This commit is contained in:
@ -54,6 +54,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Logout
|
||||
} from '@/api/common/login.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -61,18 +64,28 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 不同意
|
||||
// 取消
|
||||
handleDisagree() {
|
||||
this.showAgreement = false,
|
||||
uni.showTabBar()
|
||||
uni.showTabBar()
|
||||
},
|
||||
// 同意
|
||||
// 确定
|
||||
handleAgree() {
|
||||
this.showAgreement = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/login/index'
|
||||
// 退出登录
|
||||
Logout().then((res) => {
|
||||
this.showAgreement = false
|
||||
uni.showTabBar()
|
||||
// 1. 清除本地存储的 token
|
||||
uni.removeStorageSync('token');
|
||||
uni.showToast({
|
||||
title: '退出成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/common/login/index'
|
||||
});
|
||||
})
|
||||
uni.showTabBar()
|
||||
|
||||
},
|
||||
// 退出登录
|
||||
logout() {
|
||||
@ -80,19 +93,19 @@
|
||||
uni.hideTabBar()
|
||||
},
|
||||
// 用户协议
|
||||
userAgree(){
|
||||
userAgree() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/userAgreement/index'
|
||||
})
|
||||
},
|
||||
// 隐私协议
|
||||
privacyAgree(){
|
||||
privacyAgree() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/privacyAgreement/index'
|
||||
})
|
||||
},
|
||||
// 关于我们
|
||||
aboutUs(){
|
||||
aboutUs() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/aboutUs/index'
|
||||
})
|
||||
|
Reference in New Issue
Block a user