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

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