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.

93 lines
1.9 KiB

3 years ago
<template>
<view class="index">
<view class="inp-box">
3 years ago
<textarea
@input="sumfontnum"
maxlength="100"
@blur="bindTextAreaBlur"
placeholder-style="color:#999999;"
placeholder="请填写您宝贵的反馈意见"
v-model="content"/>
3 years ago
<view class="fontnum">{{fontnum}}/100</view>
</view>
3 years ago
<view class="tips">该反馈功能只做收集会员反馈信息不做解答如有问题需要解答可联系服务老师进行沟通</view>
<view class="tips">您反馈的信息我们会及时跟进感谢您的宝贵建议谢谢</view>
3 years ago
<view class="submit-btn" @click="submitClick()">提交</view>
3 years ago
</view>
</template>
<script>
3 years ago
import { feedBack } from '@/api/knowledge'
3 years ago
export default{
data(){
return {
3 years ago
content:'',
3 years ago
fontnum:0
}
},
methods:{
bindTextAreaBlur: function (e) {
console.log(e.detail.value)
},
sumfontnum(e){
this.fontnum = e.detail.value.length
3 years ago
},
submitClick(){
feedBack({content:this.content}).then((res)=>{
if(res.success){
uni.showToast({
title: '反馈成功!',
duration:2000
})
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},2000)
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
3 years ago
}
}
</script>
<style lang="less" scoped>
.inp-box{
3 years ago
width: 690rpx;
3 years ago
background: #fff;
padding: 24rpx;
font-size: 28rpx;
position: relative;
3 years ago
margin: 20px auto 0;
border-radius: 12rpx;
3 years ago
.fontnum{
font-size: 24rpx;
color: #999;
position: absolute;
right: 28rpx;
bottom: 16rpx;
}
}
3 years ago
.tips{
padding: 0 32rpx;
font-size: 24rpx;
color: #FF0000;
margin: 12px 0;
}
3 years ago
.submit-btn{
width: 208rpx;
height: 80rpx;
3 years ago
background: #F99C10;
3 years ago
color: #fff;
text-align: center;
line-height: 80rpx;
3 years ago
border-radius: 12rpx;
margin: 60rpx auto;
3 years ago
}
</style>