FeedbookList.vue
2.54 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
<template>
<div class="feedbook_list">
<p class="btn" @click="handleEdit">
<van-icon class="icon" name="edit" />
我要反馈意见
</p>
<div class="item" v-for="(item, index) in list" :key="index" @click="handleItem(item)">
<div class="line_one">
<p class="content">{{ item.content }}</p>
<p class="new_reply" v-if="item.content == 1">已回复</p>
<van-icon class="icon" name="arrow" />
</div>
<p class="time">{{ item.intime.substring(0, 10) }}</p>
</div>
</div>
</template>
<script>
export default {
data() {
return {
userInfo: '',
list: [],
}
},
mounted() {
let userInfo = localStorage.getItem('userInfo')
if (userInfo) {
this.userInfo = JSON.parse(userInfo)
this.getList()
} else {
this.$toast('未获取到用户信息,请退出重试')
}
},
methods: {
getList() {
this.yxAxios
.post(`${this.yanxueUrl}/api/Manage/FeedBackList`, {
userId: this.userInfo.centerNo,
pageSize:999,
page:1
})
.then((res) => {
this.$toast.clear()
console.log('我的反馈列表:', res.data.data)
if (res.data.status == 1) {
this.list = res.data.data.list
} else {
this.$toast(res.data.message)
}
})
},
handleEdit() {
this.$router.push({ name: 'FeedbookEdit' })
},
handleItem(item) {
this.$router.push({ name: 'FeedbookReply', query: { id: item.id } })
},
},
}
</script>
<style lang="scss">
.feedbook_list {
padding: 45px 24px;
.btn {
text-align: center;
font-size: 32px;
color: #3e8bf8;
margin-bottom: 58px;
}
.item {
padding: 22px 24px;
background: #fafafb;
margin-bottom: 24px;
.line_one {
display: flex;
align-items: center;
justify-content: space-between;
}
.content {
width: 450px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 32px;
white-space: nowrap;
}
.new_reply {
width: 120px;
height: 40px;
background: #ffedec;
border-radius: 20px;
font-size: 24px;
color: #ff2d21;
text-align: center;
line-height: 40px;
}
.icon {
font-size: 24px;
color: #999;
}
.time {
font-size: 24px;
color: #999;
margin-top: 30px;
}
}
}
</style>
<style lang="scss">
// 长辈版
.elder {
.feedbook_list .btn,.feedbook_list .item .content,.feedbook_list .item .time{
font-size: 36px;
}
}
</style>