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.
70 lines
1.6 KiB
70 lines
1.6 KiB
<template>
|
|
<BaseContainer class="feedback">
|
|
<NavBar title="帮助与反馈" />
|
|
<view class="feedback-form">
|
|
<textarea v-model="suggest" placeholder="请填写具体内容帮助我们了解您的意见和建议。" placeholder-class="input-placeholder" />
|
|
<view class="btn" @click="submitFeedback">提交</view>
|
|
</view>
|
|
</BaseContainer>
|
|
</template>
|
|
|
|
<script>
|
|
import { addFeedback } from '@/api/user';
|
|
export default {
|
|
data() {
|
|
return {
|
|
suggest: '',
|
|
};
|
|
},
|
|
methods: {
|
|
async submitFeedback() {
|
|
if (!this.suggest) {
|
|
return this.$util.showMsg("请输入您的意见和建议");
|
|
}
|
|
try{
|
|
const { data } = await addFeedback({ content: this.suggest });
|
|
this.$util.showMsg("提交成功");
|
|
setTimeout(() => {
|
|
uni.navigateBack();
|
|
}, 1000);
|
|
}catch(e){
|
|
//TODO handle the exception
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.feedback {
|
|
background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%);
|
|
.feedback-form {
|
|
padding: 60rpx 30rpx 0;
|
|
.input-placeholder {
|
|
font-size: 28rpx;
|
|
color: #ABABAB;
|
|
font-weight: bold;
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
height: 420rpx;
|
|
padding: 30rpx;
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
background: #fff;
|
|
border-radius: 10rpx;
|
|
}
|
|
.btn {
|
|
width: 100%;
|
|
height: 80rpx;
|
|
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);
|
|
border-radius: 40rpx;
|
|
color: #fff;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
margin-top: 100rpx;
|
|
}
|
|
}
|
|
}
|
|
</style> |