110 lines
1.9 KiB
Vue
110 lines
1.9 KiB
Vue
<template>
|
||
<view>
|
||
<navBar leftText="意见反馈"></navBar>
|
||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||
<view class="feedbackC fixed" :style="'top:'+navH+'px;'">
|
||
<view class="textareaC">
|
||
<textarea v-model="content" placeholder="请输入您要反馈的问题(200 字以内)" placeholder-style="color:#C5C5C5" maxlength="200"></textarea>
|
||
</view>
|
||
</view>
|
||
<view class="submit fixed" @click="clickSubmit()">提交</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import { inject } from 'vue';
|
||
import { feedback } from '@/request/api';
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
navH:inject('navHeight'),
|
||
content:'',
|
||
|
||
}
|
||
},
|
||
onLoad() {
|
||
|
||
},
|
||
methods: {
|
||
clickSubmit()
|
||
{
|
||
if(!this.content)
|
||
{
|
||
uni.showToast({
|
||
title:'请输入您要反馈的问题',
|
||
icon:'none'
|
||
})
|
||
return
|
||
}
|
||
let param = {content:this.content,isJson:1}
|
||
feedback(param).then(res=>{
|
||
if(res.code==200)
|
||
{
|
||
uni.showToast({
|
||
title:res.message,
|
||
icon:'none'
|
||
})
|
||
setTimeout(function() {
|
||
uni.navigateBack()
|
||
}, 1000);
|
||
}else
|
||
uni.showToast({
|
||
title:res.message,
|
||
icon:'none'
|
||
})
|
||
}).catch(error=>{
|
||
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less">
|
||
.topBg
|
||
{
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: auto;
|
||
}
|
||
.feedbackC
|
||
{
|
||
background-color: white;
|
||
margin-top: 10rpx;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
padding: 43rpx 25rpx 0;
|
||
border-radius: 20rpx 20rpx 0 0;
|
||
.textareaC
|
||
{
|
||
background-color: #F3F6F9;
|
||
border-radius: 20rpx;
|
||
padding: 20rpx 27rpx;
|
||
textarea
|
||
{
|
||
width: 100%;
|
||
height: 400rpx;
|
||
font-size: 24rpx;
|
||
font-weight: 500;
|
||
}
|
||
}
|
||
}
|
||
.submit
|
||
{
|
||
background-color: #F97316;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 73rpx;
|
||
margin: 0 25rpx;
|
||
line-height: 80rpx;
|
||
border-radius: 20rpx;
|
||
font-size: 26rpx;
|
||
font-weight: 500;
|
||
color: white;
|
||
text-align: center;
|
||
}
|
||
</style>
|