problem-feedback.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="problem-feedback">
  3. <custom-nav ref="ltm" :title="title" @cTap="cTap"></custom-nav>
  4. <view class="content">
  5. <view class="input">
  6. <textarea v-model="value" maxlength="200" placeholder="请输入反馈内容,我们会为您更好的服务" />
  7. <text class="num">{{ value.length }}/200</text>
  8. </view>
  9. <view class="big-btn" :class="{ value: value.length }" @tap="handup">提交反馈</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import { _API_AppFeedback } from '@/apis/app.js'
  15. export default {
  16. data() {
  17. return {
  18. title: '问题反馈',
  19. value: '',
  20. root: 0
  21. }
  22. },
  23. methods: {
  24. handup() {
  25. if(this.value.trim().length) {
  26. this.$refs.ltm.loading()
  27. _API_AppFeedback({ feedback: this.value }).then(res => {
  28. this.value = ''
  29. this.$refs.ltm.modal('提示', ['我们已经收到您的反馈内容,非常感谢'], 'nocancel')
  30. })
  31. }
  32. },
  33. cTap() {
  34. this.root += 1
  35. if (this.root > 3) {
  36. this.root = 0
  37. plus.nativeUI.prompt("密钥", e => {
  38. if (e.index == 0 && e.value === 'root') {
  39. uni.navigateTo({ url:'../AA-apitest/AA-apitest' })
  40. }
  41. }, "测试环境", "密钥", ["确认","取消"])
  42. }
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss">
  48. .problem-feedback {
  49. @include page();
  50. .content {
  51. padding: 20rpx 30rpx;
  52. .input {
  53. width: 690rpx;
  54. height: 380rpx;
  55. position: relative;
  56. background: #FFFFFF;
  57. border-radius: 10rpx;
  58. .num {
  59. right: 30rpx;
  60. bottom: 20rpx;
  61. position: absolute;
  62. }
  63. textarea {
  64. width: 100%;
  65. height: 100%;
  66. font-size: 26rpx;
  67. padding: 20rpx 30rpx;
  68. box-sizing: border-box;
  69. }
  70. }
  71. .big-btn {
  72. color: #FFFFFF;
  73. border-width: 0;
  74. background: #CCCCCC;
  75. &.value {
  76. background: $app-base-color;
  77. }
  78. }
  79. }
  80. }
  81. </style>