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
| <template>
| <div class="helpCenter">
| <assets-head :title="$t('帮助中心')" />
| <div class="content">
| <div class="item" v-for="(item, index) in listArr" :key="index" @click="$router.push({
| path: '/helpDetail',
| query: { // 这个位置把参数都带过去
| ...item
| }
| })">
| <span class="textColor">{{ item.title }}</span>
| <div class="moreBox"><img src="@/assets/image/userCenter/more.png" alt=""></div>
| </div>
| </div>
| </div>
| </template>
|
| <script>
| import { Icon } from 'vant';
| import assetsHead from "@/components/assets-head";
| import Axios from "@/API/login.js";
| export default {
| name: "helpCenter",
| components: {
| [Icon.name]: Icon,
| assetsHead
| },
| data() {
| return {
| listArr: []
| }
| },
| mounted() {
| this.getHelpCenter()
| },
| methods: {
| onClickLeft() {
| this.$router.push('/')
| },
| getHelpCenter() {
| Axios.helpCenter({
| model: 'help_center',
| language: this.$i18n.locale,
| }).then((res) => {
| this.listArr = res.data
| console.log('list', res)
| }).catch((error) => {
| if (error.code === 'ECONNABORTED') { this.$toast(this.$t('网络超时!')); }
| else if (error.msg !== undefined) { this.$toast(this.$t(error.msg)); }
| });
| },
| }
|
| }
| </script>
|
| <style lang="scss" scoped>
| .helpCenter {
| width: 100%;
| box-sizing: border-box;
| }
|
| .content {
| font-size: 26px;
| padding: 0 32px;
| }
|
| .item {
| padding: 35px 0;
| text-decoration: underline;
| display: flex;
| justify-content: space-between;
| }
|
| .moreBox {
| width: 26px;
| height: 26px;
|
| img {
| width: 100%;
| height: 100%;
| }
| }
| </style>
|
|