28010de0
chenbiao
add 发票申领 发票填充
|
1
2
3
|
<template>
<view>
<view class="setting-content">
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
4
5
6
|
<uni-list>
<uni-list-item title="关于我们" clickable @click="toAboutOur" showArrow></uni-list-item>
<uni-list-item title="清除缓存" clickable @click="cleanStorage" ></uni-list-item>
|
28010de0
chenbiao
add 发票申领 发票填充
|
7
|
</uni-list>
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
8
|
|
28010de0
chenbiao
add 发票申领 发票填充
|
9
|
<view class="uni-padding-wrap uni-common-mt">
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
10
|
<button type="warn" @click="loginOutAlert">退出登录</button>
|
28010de0
chenbiao
add 发票申领 发票填充
|
11
12
13
|
</view>
</view>
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
14
|
|
28010de0
chenbiao
add 发票申领 发票填充
|
15
16
17
18
|
</view>
</template>
<script>
|
28010de0
chenbiao
add 发票申领 发票填充
|
19
20
21
22
|
export default {
data() {
return {
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
23
|
|
28010de0
chenbiao
add 发票申领 发票填充
|
24
25
26
|
}
},
methods: {
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
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
|
toAboutOur() {
uni.navigateTo({
url: '../aboutOur/aboutOur'
});
},
cleanStorage() {
uni.clearStorageSync();
uni.showToast({
title: "清理缓存成功",
mask: false,
duration:2000
})
},
loginOutAlert(){
let that = this;
uni.showModal({
title:'提示',
content:'是否确定退出登录?',
success: (res) => {
if(res.confirm){
that.loginOut();
}else if(res.cancel){
console.log('用户点击取消')
}
|
28010de0
chenbiao
add 发票申领 发票填充
|
52
|
}
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
})
},
loginOut(){
let that = this;
that.$myRequest({
url: that.$common.userLoginout,
method: 'POST',
data: that.$common.requestSign()
}).then(res => {
// 获取真实数据之前,务必判断状态是否为200
console.log('退出:' + JSON.stringify(res));
if (res.code == 0) {
uni.clearStorageSync();
uni.reLaunch({
url: "../index/index"
})
uni.hideLoading();
} else {
uni.clearStorageSync();
uni.reLaunch({
url: "../index/index"
})
uni.hideLoading();
}
})
|
28010de0
chenbiao
add 发票申领 发票填充
|
84
85
86
87
88
89
90
91
92
93
|
}
}
}
</script>
<style lang="scss">
.setting-content {
background-color: #f6f6f6;
height: 100vh;
}
|
28010de0
chenbiao
add 发票申领 发票填充
|
94
|
</style>
|