set.vue
4.6 KB
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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!-- 设置 -->
<template>
<view class="set-wrap">
<!-- logo -->
<view
class="logo-box u-flex-col u-row-center u-col-center"
v-if="initShop.name"
>
<image class="logo-img" :src="initShop.logo" mode="aspectFit"></image>
<view class="app-name u-m-t-50">{{ initShop.name }}</view>
</view>
<!-- cell -->
<view class="set-box">
<view
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
>
<view class="cell-title">占用缓存</view>
<view class="cell-right u-flex u-col-center">
<view class="cell-content">{{ storageSize }}</view>
<text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text>
</view>
</view>
<view
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
>
<view class="cell-title">当前版本</view>
<view class="cell-right u-flex u-col-center">
<view class="cell-content">{{ initShop.version }}</view>
<text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text>
</view>
</view>
<view
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
@tap="$Router.push('/pages/public/feedback')"
>
<view class="cell-title">意见反馈</view>
<view class="cell-right u-flex u-col-center"
><text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text
></view>
</view>
<view
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
@tap="$Router.push(`/pages/public/richtext?id=${initShop.about_us}`)"
>
<view class="cell-title">关于我们</view>
<view class="cell-right u-flex u-col-center"
><text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text
></view>
</view>
<view
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
@tap="
$Router.push(`/pages/public/richtext?id=${initShop.privacy_protocol}`)
"
>
<view class="cell-title">隐私协议</view>
<view class="cell-right u-flex u-col-center"
><text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text
></view>
</view>
<!-- #ifdef APP-PLUS -->
<view
v-if="isLogin"
class="cell-item u-flex u-col-center u-row-between u-p-x-30 u-p-y-20"
@tap="onDeleteAccount"
>
<view class="cell-title">注销账号</view>
<view class="cell-right u-flex u-col-center"
><text
class="u-iconfont uicon-arrow-right u-m-l-10"
style="color: #999"
></text
></view>
</view>
<!-- #endif -->
</view>
<!-- copyright -->
<view
class="copyright-box u-flex-col u-row-center u-col-center u-p-t-80 u-p-b-50"
v-if="initShop.copyright"
>
<view class="copyright-text">{{ initShop.copyright[0] }}</view>
<view class="copyright-text">{{ initShop.copyright[1] }}</view>
</view>
<!-- 登录提示 -->
<shopro-auth-modal></shopro-auth-modal>
</view>
</template>
<script>
import { mapState, mapActions, mapGetters } from "vuex";
export default {
components: {},
data() {
return {
storageSize: uni.getStorageInfoSync().currentSize + "Kb",
};
},
computed: {
...mapGetters(["initShop", "isLogin"]),
},
onLoad() {
console.log('initShop',this.initShop);
},
methods: {
...mapActions(["logout"]),
onDeleteAccount() {
let that = this;
uni.showModal({
title: "注销账户",
confirmColor: "#FF4D4F",
content: `注销此账号后您的数据将不再保留,是否继续注销?`,
success: (res) => {
res.confirm &&
that.$http("user.delete").then((res) => {
if (res.code === 1) {
that.logout();
}
});
},
});
},
},
};
</script>
<style lang="scss">
.set-box {
background-color: #fff;
.cell-item {
border-bottom: 1px solid #f5f5f5;
.cell-title {
font-size: 28rpx;
color: #333;
}
.cell-content {
color: #999;
}
}
}
.logo-box {
padding: 110rpx 0;
.app-name {
font-size: 36rpx;
font-weight: 600;
color: #333333;
}
}
.copyright-box {
.copyright-text {
font-size: 22rpx;
font-weight: 500;
color: #c4c4c4;
}
}
</style>