工作端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
595 B

<template>
<view class="content">
<view>
<u-button type="primary" text="退出登录" @click="handleLogout"></u-button>
</view>
</view>
</template>
<script>
import { logout } from '@/pages/api'
export default {
methods: {
async handleLogout() {
try {
await logout();
} catch (e) {}
uni.removeStorageSync('token');
uni.reLaunch({
url: '/pages/login/login'
});
}
}
}
</script>
<style lang="scss" scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>