You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<template>
|
|
|
|
|
<view class="table_index">
|
|
|
|
|
<uni-section title="建议与反馈" type="line"></uni-section>
|
|
|
|
|
<uni-forms :modelValue="formData">
|
|
|
|
|
<uni-forms-item label="手机" name="mobile">
|
|
|
|
|
<uni-easyinput type="text" v-model="formData.mobile" placeholder="请输入手机号码" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item required name="content" label="内容">
|
|
|
|
|
<uni-easyinput type="textarea" v-model="formData.content" placeholder="请输入您要反馈的内容" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<button class="uni-button" size="mini" type="primary" @click="toTable">提交</button>
|
|
|
|
|
</uni-forms>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { mapMutations, mapState } from 'vuex'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
formData: {
|
|
|
|
|
mobile: '',
|
|
|
|
|
content: '',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState('m_user', ['userinfo'])
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
async toTable(){
|
|
|
|
|
if(this.formData.content.length === 0){
|
|
|
|
|
return uni.$showMsg('请填写您要反馈的内容。')
|
|
|
|
|
}
|
|
|
|
|
const mobileReq = this.formData.mobile;
|
|
|
|
|
const contentReq = this.formData.content;
|
|
|
|
|
const req = {
|
|
|
|
|
content: contentReq,
|
|
|
|
|
mobile: mobileReq,
|
|
|
|
|
nickname: this.userinfo.nickName,
|
|
|
|
|
city: this.userinfo.city
|
|
|
|
|
}
|
|
|
|
|
const {
|
|
|
|
|
data: res
|
|
|
|
|
} = await uni.$http.post('/small/project/feedback/add',req)
|
|
|
|
|
if (!res.success) return uni.$showMsg()
|
|
|
|
|
|
|
|
|
|
this.formData.mobile =''
|
|
|
|
|
this.formData.content =''
|
|
|
|
|
return uni.$showMsg('非常感谢您提出宝贵的建议。我们非常重视您的反馈,会尽快对相关内容进行改进。')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.table_index {
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 20px 30px;
|
|
|
|
|
}
|
|
|
|
|
.uni-button{
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|