xuxueyang
2024-08-23 61860e8f98422e0e946d6529f172f8c7c29fa049
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
<template>
    <view class="follow-page">
        <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
 
        <view v-else style="min-height: 80vh;">
            <view class="follow-item m-b-40 flex" v-for="(item,index) of list" :key="index">
                <view class="info">
                    <view class="name">投诉反馈内容:{{ item.feedBack  || '-'}}</view>
                    <view class="name">提交时间:{{ item.createTime || '-' }}</view>
                </view>
                <view class="line-gray"></view>
                <view class="info">
                    <view class="name">回复内容:{{ item.reply  || '-'}}</view>
                    <view class="name">回复时间:{{ item.replyTime || '-' }}</view>
                </view>
            </view>
        </view>
        <footer-msg :more="page.total>0&&page.total>page.current*page.size&&list.length>0"></footer-msg>
 
        <view style="min-height:160rpx">
        </view>
 
        <view class="button-green-1 m-t-20 button-fixed-bottom " @click="addFeedback">
            提交投诉/反馈
        </view>
 
 
        <!-- <uni-popup ref="popup" type="bottom">
            <view class="component-popup_input_all">
                <view class="text-center m-b-40" style="font-size: 48rpx;font-weight: 600;">填写投诉/反馈内容</view>
                <view v-for="(item,i) in level_columns" :key="i" class="m-t-20">
                    <view class="m-t-12 flex value-items">
                        <view class="value-item" @click="()=>{
                        if(each.value!==query.value){
                            query.level = each.value
                            query.levelStr = each.label
                            refreshList()
                            $refs.popup.close()
                        }                                                                                                                                                        
                    }" :class="[query.level==each.value?'cur':'']" v-for="(each, j) in item" :key="j">
                            {{ each.label || '-' }}
                        </view>
                    </view>
                </view>
                <view class="button-space"></view>
                <view>
                    <view class="button-green" @click="$refs.popup.close()">关闭
                    </view>
                </view>
            </view>
        </uni-popup> -->
 
    </view>
</template>
 
<script>
    export default {
        data() {
            return {}
        },
        async onPullDownRefresh() {
            await this.refreshList()
            uni.stopPullDownRefresh()
        },
        async onShow() {
 
        },
        async onLoad() {
            this.listApi = '/api/feedback/my/feedback/list'
            this.getList()
        },
        methods: {
            async addFeedback() {
                const res = await this.$message.confirm('', {
                    editable: true,
                    title: '请填写投诉/反馈内容'
                })
                if (res.content && res.confirm) {
                    // 发送请求
                    if (!res.content) {
                        this.$message.showToast('未填写内容')
                    } else {
                        this.$message.showLoading()
                        const {
                            code
                        } = await this.$http.request('post', '', {
                            data: {
                                feedBack: res.content
                            }
                        })
                        this.$message.hideLoading()
                        if (code == 0) {
                            await this.refreshList()
                            this.$message.showToast('提交成功')
                        }
                    }
 
 
                } else {
 
                }
            }
 
        }
    }
</script>
 
<style lang="scss" scoped>
    .follow-page {
        min-height: 99vh;
 
        .follow-item {
            padding: 30rpx;
            background-color: #FFFFFF;
            margin-bottom: 20rpx;
 
 
            .info {
                .name {
                    font-weight: 400;
                    font-size: 24rpx;
                    color: #000000;
                    line-height: 40rpx;
                    margin-top: 6rpx;
                }
 
                .time {
                    font-weight: 400;
                    font-size: 24rpx;
                    color: #a3a3a3;
                    line-height: 40rpx;
                    margin-top: 6rpx;
                }
 
            }
 
            .button {
                padding: 14rpx 36rpx;
                text-align: center;
                margin-left: 10rpx;
                font-weight: 400;
                font-size: 24rpx;
                line-height: 30rpx;
                border-radius: 34rpx;
                margin-top: 10rpx;
 
 
                // min-width: 128rpx;
                height: 30rpx;
 
 
            }
 
            .button-1 {
                color: #999999;
                border: 2rpx solid #999999;
 
            }
 
            .button-2 {
                border: 2rpx solid #20613D;
                color: #20613D;
            }
        }
    }
</style>