policiesAgreement.vue
2.2 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
<template>
<view class="account_safe">
<view class="cell top">
<u-cell-group>
<u-cell title="用户政策" :isLink="true" :url="service" arrow-direction="right"
:rightIconStyle="{fontSize:'26rpx'}" :title-style="{color:'#909097', fontSize:'28rpx'}">
</u-cell>
<u-cell title="隐私协议" :isLink="true" :url="policy"
arrow-direction="right" :rightIconStyle="{fontSize:'26rpx'}"
:title-style="{color:'#909097', fontSize:'28rpx'}">
</u-cell>
</u-cell-group>
</view>
</view>
</template>
<script>
import {
mapState,
mapActions
} from 'vuex'
import {
replaceTextToStar
} from '@/common/commonUtil.js'
export default {
data() {
return {
service: "https://hropublic.oss-cn-beijing.aliyuncs.com/agreement/%E6%A0%A1%E8%81%8C%E9%80%9A%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.html",
policy: "https://hropublic.oss-cn-beijing.aliyuncs.com/agreement/%E6%A0%A1%E8%81%8C%E9%80%9A%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.html",
}
},
onLoad() {
this.service = `/pages/common/webview/webview?navtitle=服务协议&url=${this.service}`
this.policy = `/pages/common/webview/webview?navtitle=隐私政策&url=${this.policy}`
},
computed: {
...mapState({
accountName: (state) => state.vuex_user.username ? state.vuex_user.username : '',
getPhone(state) {
let phone = state.vuex_user.phone;
return phone ? replaceTextToStar(phone) : '';
},
}),
},
methods: {
link(type) {
switch (type) {
case 'account':
this.$u.route('/pages/student/my/edit-account/edit-account');
break;
case 'password':
this.$u.route('/pages/student/my/edit-password/edit-password');
break;
}
},
}
}
</script>
<style lang="scss" scoped>
.account_safe {
width: 100%;
height: 100%;
background-color: #F7F7F7;
padding: 20rpx 0 0 0;
.top {
margin: 0 0 20rpx 0;
}
.cell {
background-color: #FFFFFF;
.u-slot-value {
font-size: 28rpx;
line-height: 40rpx;
color: #202131;
}
}
.cell /deep/ .u-cell {
padding: 12rpx 0;
.u-cell__value {
font-size: 34rpx;
color: rgba(0, 0, 0, 0.5);
}
}
}
</style>