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.
103 lines
2.6 KiB
103 lines
2.6 KiB
<template>
|
|
<view class="wrap">
|
|
<!-- <view class="stabar"></view> -->
|
|
<!-- <view class="secbar"><label class="back" @click="back()"></label>
|
|
<view class="title">建议与意见反馈</view>
|
|
</view> -->
|
|
<navigation title="建议与意见反馈"></navigation>
|
|
<view class="mainwrap2">
|
|
|
|
<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="" @click="toTable">提交</button>
|
|
</uni-forms>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import navigation from "@/components/navigation/navigation.vue";
|
|
import { mapMutations, mapState } from 'vuex'
|
|
export default {
|
|
components: {navigation},
|
|
data() {
|
|
return {
|
|
formData: {
|
|
mobile: '',
|
|
content: '',
|
|
},
|
|
}
|
|
},
|
|
computed: {
|
|
...mapState('m_user', ['userinfo','userId'])
|
|
},
|
|
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,
|
|
userId: this.userId
|
|
}
|
|
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('非常感谢您提出宝贵的建议。我们非常重视您的反馈,会尽快对相关内容进行改进。')
|
|
|
|
},
|
|
back(){
|
|
uni.navigateBack({
|
|
delta:1,//返回层数,2则上上页
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!--<style scoped>-->
|
|
<style lang="scss">
|
|
@import url("@/static/base_css.css");
|
|
|
|
.table_index {
|
|
margin: 3% 3% 0;
|
|
padding: 50rpx 30rpx;
|
|
width: 94%;
|
|
height: 82vh;
|
|
background-image: linear-gradient(to bottom, #fff, transparent);
|
|
border-radius: 20rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
.uni-easyinput__content-textarea {
|
|
min-height: 500rpx !important;
|
|
}
|
|
.uni-button {
|
|
font-size: 30rpx;
|
|
width: 100%;
|
|
height: 70rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #1367fe;
|
|
border-radius: 50rpx;
|
|
color: #fff;
|
|
line-height: 70rpx;
|
|
}
|
|
</style>
|