仁慧眼-上市公司微财报PC版前端
hailu
2022-11-02 77c50c239cf12e9d14b4eb1812f72125be4f615b
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<template>
    <div class="message">
        <div class="messagebox">
            <div class="head">
                <p class="title">仁软客户关怀中心</p>
                <p class="tips">您的宝贵意见是我们进步的不竭动力</p>
                <p class="btn pointer" @click="toSearch()">返回首页</p>
            </div>
            <!--            反馈意思-->
            <div class="contextbox">
                <div class="content">
                    <div class="content-top">
                        <!--姓名-->
                        <label for="name">
                            <p>姓名 <span style="color: #E56E6E">*</span></p>
                        </label>
                        <input type="text" id="name" v-model="name">
                        <!--电话-->
                        <label for="tel">
                            <p>电话</p>
                        </label>
                        <input type="tel" id="tel" v-model="mobile">
                        <!--邮箱-->
                        <label for="email">
                            <p>邮箱</p>
                        </label>
                        <input type="email" id="email" v-model="email">
                        <!--公司名称-->
                        <label for="companyName">
                            <p>公司名称</p>
                        </label>
                        <input type="text" id="companyName" v-model="company">
                        <!--留言-->
                        <label for="note">
                            <p>请您在此留言,我们会尽快给您回复 <span style="color: #E56E6E">*</span></p>
                        </label>
                        <textarea rows="3" cols="20" id="note" v-model="note">
                        </textarea>
                        <!--                        <input type="text" id="note" v-model="note">-->
                    </div>
                    <div class="content-submit">
                        <input type="submit" class="submit pointer" @click="onSubmit">
                    </div>
                </div>
            </div>
            <!-- <footer>
              <a href="http://huiyan.rensofter.com/caib" style="color:white;">RenSoft@仁软科技</a>  
            </footer> -->
            <p class="bottom"><a href="https://www.rensofter.com/index.html" style="color:white;">RenSoft@仁软科技</a></p>
        </div>
    </div>
</template>
 
<script>
import axios from 'axios'
import {Notify} from 'vant';
 
export default {
    name: 'message',
 
    data() {
        return {
            height: document.documentElement.clientHeight,
            name: '',
            mobile: '',
            email: '',
            company: '',
            note: ''
        }
    },
    methods: {
        toSearch() {
            let id = this.countryName
            this.$router.push('/search')
        },
        // 提交数据请求
        onSubmit() {
            if (this.name.toString().replace(/\s+/g, '') === '') {
                Notify({type: 'danger', message: '请输入姓名'});
                return false
            }
            if (!this.mobile && !this.email){
                Notify({type: 'danger', message: '电话或者邮箱至少填写一处!'});
                return false
            }else{
                if (this.mobile && !(/^1[3456789]\d{9}$/.test(this.mobile))) {
                    Notify({type: 'danger', message: '请输入正确手机号'});
                    return false
                }
                if (this.email && !(/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(this.email))) {
                    Notify({type: 'danger', message: '请输入正确的邮箱'});
                    return false
                }
            }
            // if (this.company.toString().replace(/\s+/g, '') === '') {
            //     Notify({type: 'danger', message: '请输入公司名称'});
            //     return false
            // }
            if (this.note.toString().replace(/\s+/g, '') === '') {
                Notify({type: 'danger', message: '请输入意见或建议'});
                return false
            }
            let data = {
                Name: this.name,
                Mobile: this.mobile,
                Email: this.email,
                Company: this.company,
                Note: this.note,
                TypeInfo: 'Haig'
            }
            this.$axios.request({
                url: '/Advise/AddAdvise',
                data,
                method: 'post'
            }).then((res) => {
                this.name = ''
                this.mobile = ''
                this.email = ''
                this.company = ''
                this.note = ''
                Notify({type: 'success', message: res.data.Msg});
            }, err => {
                Notify({type: 'danger', message: res.data.Msg});
            })
        },
    },
    activated() {
 
    }
}
</script>
 
<style lang="less" scoped>
.message {
    height: 100vh;
    .bottom {
        text-align: center;
        background-color: #9b0707;
        color: #fff;
    }
    .messagebox {
        height: 100%;
        overflow: auto;
        background-color: #b30808;
    }
 
    .head {
        background-image: url(../assets/images/logo1.png);
        background-size: 2.6rem;
        padding: 1.2rem 15px 0;
        background-color: #b30808;
        background-position: 15px 0.2rem;
        background-repeat: no-repeat;
        height: 3.4rem;
        position: relative;
 
        .title {
            height: 1rem;
            line-height: 1rem;
            font-size: 0.6rem;
            color: #fff;
            font-weight: 700;
            text-align: center;
        }
 
        .tips {
            text-align: right;
            font-size: 16px;
            line-height: 2.5;
            color: #fff;
        }
 
        .btn {
            display: inline-block;
            background: rgba(255, 255, 255, .2);
            width: 80px;
            height: 26px;
            line-height: 26px;
            text-align: center;
            border-radius: 13px;
            font-size: 14px;
            color: #fff;
            position: absolute;
            right: 15px;
            top: 15px;
        }
    }
 
    .contextbox {
        padding: 15px;
        background-color: #b30808;
        height: calc(100% - 170px);
 
        .content {
            background-color: #f5f5f5;
            padding: 15px;
        }
    }
}
 
.content-top {
    background-color: white;
    width: 100%;
    padding: 15px 16px 0;
    box-sizing: border-box;
}
 
input {
    border: 1px solid #ccc;
    margin: 0 0 13px;
    height: 25px;
    width: 100%;
}
 
textarea {
    border: 1px solid #ccc;
    width: 100%;
    line-height: 20px;
    margin: 0 0 13px;
}
 
.content-submit {
    padding-bottom: 18px;
    background-color: #fff;
}
 
.content-submit .submit {
    width: 100%;
    text-align: center;
    height: 44px;
    line-height: 42px;
    color: white;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #ee0a24;
    border-color: #ee0a24;
}
 
footer {
    width: 633px;
    margin: 0 auto;
    color: white;
    text-align: center;
    background-color: #9b0707;
    line-height: 30px;
    font-size: 14px;
    position: fixed;
    // left: 0;
    // right: 0;
    bottom: 0;
}
.pointer{
    cursor: pointer;
}
</style>