工作端小程序
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.

34 lines
595 B

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