94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
1
2
3
4
5
6
7
|
<template>
<div class="leftRightPadding">
<p class="suggestion-tip">请选择您反馈的问题类型</p>
<ul class="suggestionList">
<li
@click="chooseHandle(index)"
v-for="(i, index) in suggestionList"
|
5e52ed7c
刘淇
个人中心
|
8
|
:key="i.code"
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
9
10
|
:class="{choosedActive: currentIndex==index}"
>
|
5e52ed7c
刘淇
个人中心
|
11
|
{{i.name}}
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
12
13
14
|
</li>
</ul>
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
15
|
|
5e52ed7c
刘淇
个人中心
|
16
17
18
19
20
21
22
23
24
25
26
27
|
<!--<mt-field label="" placeholder="请详细描述反馈问题,或提出改进建议。(300字以内)" type="textarea" rows="4" v-model="introduction" ></mt-field>-->
<van-field
v-model="introduction"
rows="2"
autosize
type="textarea"
maxlength="300"
placeholder="请详细描述反馈问题,或提出改进建议。(300字以内)"
show-word-limit
/>
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
28
29
|
<div style="margin-top: 34px">
|
5e52ed7c
刘淇
个人中心
|
30
|
<van-button type="info" block @click="submitCon">提交</van-button>
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
31
32
33
34
35
|
</div>
</div>
</template>
<script>
|
5e52ed7c
刘淇
个人中心
|
36
37
|
import { saveFeedbackAndSuggest, getFeedbackType } from '@/api/getUserIfo'
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
38
39
40
41
|
export default {
name: 'suggestionBack',
data() {
return {
|
5e52ed7c
刘淇
个人中心
|
42
|
suggestionList: [],
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
43
44
45
46
|
currentIndex: 0,
introduction: '',
}
},
|
5e52ed7c
刘淇
个人中心
|
47
48
49
|
created(){
this.getFeedbackType()
},
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
50
|
methods: {
|
5e52ed7c
刘淇
个人中心
|
51
52
53
54
55
56
57
58
|
getFeedbackType(){
let jsondata = {}
jsondata.sign = this.$utils.signObject(jsondata)
getFeedbackType(jsondata).then(response => {
console.log(response)
this.suggestionList = response.data
})
},
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
59
60
61
|
chooseHandle: function (i) {
console.log(i)
this.currentIndex = i
|
5e52ed7c
刘淇
个人中心
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
},
submitCon(){
if(this.introduction){
let jsondata = {
feedbackCode:this.suggestionList[this.currentIndex].code,
suggestDesc:this.introduction,
// token:'99ecd32eed1b4ebea71bc73b0aabbb99'
}
jsondata.sign = this.$utils.signObject(jsondata)
saveFeedbackAndSuggest(jsondata).then(response => {
console.log(response)
if(response.code==0){
this.$toast("提交成功");
}
// this.phoneNum = response.data.phoneNum
})
}else{
this.$toast("请填写建议反馈内容");
}
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
82
83
84
85
86
87
88
89
90
91
92
93
|
}
}
}
</script>
<style scoped lang="scss">
.suggestion-tip {
margin: 17px 0 13px;
color: #6666;
}
.suggestionList {
|
5e52ed7c
刘淇
个人中心
|
94
|
overflow: hidden;
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
95
96
97
98
|
li {
float: left;
width: calc((100% - 19px) / 2);
|
5e52ed7c
刘淇
个人中心
|
99
100
|
height: 45px;
line-height: 45px;
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
101
|
margin-bottom: 16px;
|
5e52ed7c
刘淇
个人中心
|
102
|
border: 1px solid #2282C5;
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
103
|
text-align: center;
|
5e52ed7c
刘淇
个人中心
|
104
105
106
|
font-size: 16px;
border-radius: 4px;
color: #2282C5;
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
107
108
109
110
111
|
&:nth-child(odd) {
margin-right: 19px;
}
}
.choosedActive {
|
5e52ed7c
刘淇
个人中心
|
112
|
background: linear-gradient(180deg, #2282C5 0%, #4B8EF1 58%, #63BEFD 100%);
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
113
|
color: #fff;
|
5e52ed7c
刘淇
个人中心
|
114
|
border: 0;
|
94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
115
116
117
118
|
}
}
</style>
|