lefengyang
2026-08-09 c71e806d1966a83aad55880c8a456358182a82be
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
<template>
    <view class="page_bg">
        <uv-navbar title="意见反馈" :autoBack="true" :placeholder="true" leftIconColor="#fff" bgColor="rgba(0,0,0,0)" titleStyle="color:#fff"></uv-navbar>
        
        <view class="feedback">
            <uv-textarea v-model="content" placeholder="请输入反馈内容" height="400rpx" customStyle="background:#ECEFF6" textStyle="font-size:27rpx"></uv-textarea>
        </view>
        
        <view class="feedback_btn" @click="clickFeedback">
            提交反馈
        </view>
        
        <view class="foot_tips">
            客服电话:{{phone}}
        </view>
        
    </view>
</template>
 
<script>
    import { feekback,configPhone } from '@/api/api.js'
    export default {
        data() {
            return {
                content: '',
                userId: '',
                phone: ''
            }
        },
        onLoad() {
            this.userId = uni.getStorageSync('userId');
            this.getConfigPhone()
        },
        methods: {
            getConfigPhone(){
                configPhone().then(res=>{
                    console.log(res.msg)
                    this.phone = res.msg
                })
            },
            clickFeedback(){
                if(!this.content || this.content.trim() == ''){
                    uni.showToast({
                        title: '请输入反馈内容',
                        duration: 2000,
                        icon: 'none'
                    });
                    this.content = ''
                    return
                }
                feekback({
                    content: this.content,
                    userId: this.userId
                }).then(res=>{
                    console.log(res)
                    uni.showToast({
                        title: res.msg,
                        duration: 2000,
                        icon: 'none'
                    });
                    if(res.code == 200){
                        uni.navigateBack({
                            delta: 1
                        });
                    }
                })
                
            }
        }
    }
</script>
 
<style lang="scss" scoped>
.foot_tips{
    position: fixed;
    left: 0;
    bottom: 100rpx;
    right: 0;
    text-align: center;
    font-size: 30rpx;
    color: rgba(0,0,0,0.7);
    line-height: 38rpx;
}
.feedback_btn{
    width: 423rpx;
    height: 96rpx;
    background: linear-gradient( 142deg, #6FD2FF 0%, #268DFF 100%);
    box-shadow: 0rpx 12rpx 27rpx 0rpx rgba(56,151,243,0.38);
    border-radius: 385rpx 385rpx 385rpx 385rpx;
    font-size: 30rpx;
    color: #FFFFFF;
    line-height: 96rpx;
    text-align: center;
    margin: 60rpx auto 0;
}
.feedback{
    margin: 20rpx 30rpx 0;
    background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0.5) 100%);
    box-shadow: 8rpx 8rpx 23rpx 0rpx rgba(67,147,248,0.1), -8rpx -8rpx 23rpx 0rpx rgba(255,255,255,0.4);
    border-radius: 23rpx 23rpx 23rpx 23rpx;
    border: 2rpx solid #FFFFFF;
    box-sizing: border-box;
    padding:30rpx;
}
.page_bg{
    width: 100%;
    min-height: calc(100vh - var(--window-bottom));
    background:url('/static/img/bg_2.jpg') no-repeat center top;
    background-size: 100% auto;
}
</style>