<template>
|
<view class="option-container">
|
<uni-easyinput type="textarea" v-model="content" placeholder="请输入您想要对我们说的话"></uni-easyinput>
|
|
<view @click="submitOpinion" class="button-green" style="margin-top: 36rpx;">立即发送</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
content: '',
|
}
|
},
|
methods: {
|
async submitOpinion() {
|
if (this.content.trim()) {
|
|
this.$message.showLoading()
|
const {code} = await this.$http.request('post','/api/current/customer/feedback',{
|
data:{
|
content:this.content.trim()
|
}
|
})
|
this.$message.hideLoading()
|
|
if(code==0){
|
this.content = ''
|
this.$message.showToast('反馈成功')
|
}
|
}else{
|
this.$message.showToast('未填写建议')
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.option-container {
|
/deep/ .uni-easyinput__content-textarea {
|
min-height: 500rpx;
|
}
|
}
|
</style>
|