opinion1.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template style=" background-color: #FFFFFF">
  2. <view style="height: 100%;width: 100%;background-color: #FFFFFF">
  3. <view style="width: 100vw;height: 100vh;">
  4. <view style="height: 20rpx;w^idth: 100%;background-color: #F6F6F6;"></view>
  5. <!-- 标题 -->
  6. <view class="title">请描述您遇到的问题</view>
  7. <!-- 问题列表 -->
  8. <view class="textArea">
  9. <view class="body">
  10. <textarea placeholder="请描述您遇到的问题" maxlength="200" @input="input" style="font-size: 28rpx;color: #666666;height: 250rpx;width: 100%;" />
  11. <view style="height: 68rpx;width: 100%;color:#999999;padding: 20rpx 30rpx;font-size: 28rpx;text-align: right;">
  12. {{problem_lenght}}/200
  13. </view>
  14. </view>
  15. </view>
  16. <view style="width: 100%;padding:40rpx 30rpx 0 30rpx;font-size: 26rpx;color: #999999;">请详细描述您的问题或建议,我们将及时跟你并解决。</view>
  17. <view class="footer">
  18. <view style="width: 100%;text-align: center;padding-bottom: 35rpx;">
  19. <text style="color: #999999;font-size: 24rpx;">如有疑问,请联系客服\n08:30-22:00</text>
  20. </view>
  21. <view class="cu-bar bg-white tabbar border shop" style="width: 100%;">
  22. <view class="submit" @click="next" style="background-color: #0B73B9; color: #FFFFFF; font-size: 32rpx;" >提交反馈</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. problem:'',
  33. problem_lenght:'0'
  34. }
  35. },
  36. methods:{
  37. //输入问题
  38. input(e){
  39. this.problem = e.detail.value
  40. this.problem_lenght = this.problem.length
  41. console.log(this.problem);
  42. console.log(this.problem_lenght);
  43. },
  44. next:async function(){
  45. let res = await this.$request.post("/api/v1/feedback/sumitFeedback",{
  46. content:this.problem
  47. })
  48. console.log(res)
  49. if(res.status == 0){
  50. uni.showToast({
  51. title:"提交成功",
  52. icon:"none",
  53. duration:1500
  54. })
  55. setTimeout(()=>{
  56. uni.navigateBack({
  57. delta:1
  58. })
  59. },1500)
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .title {
  67. background-color: #FFFFFF;
  68. height: auto;
  69. display: flex;
  70. align-items: center;
  71. padding: 30rpx 30rpx;
  72. font-size: 30rpx;
  73. font-weight: bold;
  74. }
  75. .textArea {
  76. height: auto;
  77. width: 100%;
  78. padding: 0 30rpx;
  79. background-color: #FFFFFF;
  80. .body {
  81. width: 100%;
  82. height: auto;
  83. padding: 35rpx 20rpx;
  84. word-break: break-all;
  85. word-wrap: break-word;
  86. background: #F6F6F6;
  87. border-radius: 10rpx;
  88. }
  89. }
  90. .footer {
  91. width: 100%;
  92. height: auto;
  93. display: block;
  94. position: fixed;
  95. bottom: 0;
  96. }
  97. </style>