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