setting.vue
893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<template>
<!-- 更多设置 -->
<view class="setting">
<!-- 退出登录 -->
<view class="quit" @click="removeToken">
退出登录
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
removeToken() {
this.$store.dispatch("quit")
this.$refs.uToast.show({
title: '退出成功',
type: 'success'
})
setTimeout(()=>{
this.$Router.pushTab("/pages/my/my")
},500)
}
}
}
</script>
<style lang="scss" scoped>
.setting {
width: 750rpx;
height: 100vh;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.quit {
width: 400rpx;
height: 70rpx;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid black;
}
}
</style>