opinion1.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. <text>{{problem_lenght}}</text>/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. if(this.problem_lenght>200){
  46. uni.showToast({
  47. title:"最多只能输入200个字符",
  48. icon:"none"
  49. })
  50. return false
  51. }
  52. let res = await this.$request.post("/api/v1/feedback/sumitFeedback",{
  53. content:this.problem
  54. })
  55. console.log(res)
  56. if(res.status == 0){
  57. uni.showToast({
  58. title:"提交成功",
  59. icon:"none",
  60. duration:1500
  61. })
  62. setTimeout(()=>{
  63. uni.navigateBack({
  64. delta:1
  65. })
  66. },1500)
  67. }
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss">
  73. .title {
  74. background-color: #FFFFFF;
  75. height: auto;
  76. display: flex;
  77. align-items: center;
  78. padding: 30rpx 30rpx;
  79. font-size: 30rpx;
  80. font-weight: bold;
  81. }
  82. .textArea {
  83. height: auto;
  84. width: 100%;
  85. padding: 0 30rpx;
  86. background-color: #FFFFFF;
  87. .body {
  88. width: 100%;
  89. height: auto;
  90. padding: 35rpx 20rpx;
  91. word-break: break-all;
  92. word-wrap: break-word;
  93. background: #F6F6F6;
  94. border-radius: 10rpx;
  95. }
  96. }
  97. .footer {
  98. width: 100%;
  99. height: auto;
  100. display: block;
  101. position: fixed;
  102. bottom: 0;
  103. }
  104. </style>