index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }"
  3. :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
  4. <tm-menubars title="意见反馈" :shadow="0" :showback="true"></tm-menubars>
  5. <div class="zhuti">
  6. <tm-sheet class="kuang" style="padding-bottom: 70px !important;">
  7. <view style="width: 94%;margin:0 auto;">
  8. <view class="pt-20 pr-30 text-size-g dianz text-align-right">
  9. <image src="/static/img/59.png" mode="widthFix"></image>
  10. <text class="text-white text-size-m">意见建议记录</text>
  11. </view>
  12. <view class="mt-20 ml-15">
  13. <text class="text-white text-size-lg">*请选择反馈问题的类型</text>
  14. </view>
  15. <view class="mt-40" @click="aa(1)">
  16. <tm-checkbox v-model="checked1" label="使用投诉"></tm-checkbox>
  17. <text class="text-size-s fr mr-50 mt-20">联系客服</text>
  18. </view>
  19. <view @click="aa(2)">
  20. <tm-checkbox v-model="checked2" label="交易问题"></tm-checkbox>
  21. <text class="text-size-s fr mr-50 mt-20">联系客服</text>
  22. </view>
  23. <view @click="aa(3)">
  24. <tm-checkbox v-model="checked3" label="软件使用问题"></tm-checkbox>
  25. <text class="text-size-s fr mr-50 mt-20">功能异常、产品建议等</text>
  26. </view>
  27. <view class="mt-20 ml-15 ">
  28. <text class="text-white text-size-lg">*请发表您的意见</text>
  29. <tm-input class="shuru mt-30" :vertical="true" :height="200" input-type="textarea" placeholder="请发表您的意见" v-model="beizu" ></tm-input>
  30. </view>
  31. </view>
  32. </tm-sheet>
  33. <tm-button :round="24" class="sao mb-40 mt-40" block @click="tijiao">提交</tm-button>
  34. </div>
  35. <!-- 弹出层消息 -->
  36. <tm-message ref="toast"></tm-message>
  37. </view>
  38. </template>
  39. <script>
  40. import{myRequest} from '@/api/request.js'
  41. export default {
  42. data() {
  43. return {
  44. checked1:false,
  45. checked2:false,
  46. checked3:false,
  47. beizu:''
  48. };
  49. },
  50. onLoad() {
  51. },
  52. created() {
  53. this.sys = uni.getSystemInfoSync();
  54. },
  55. methods: {
  56. tijiao(){
  57. var that=this;
  58. if( !this.checked1 && !this.checked2 && !this.checked3){
  59. that.$refs.toast.show({model:'warn',label:'请选择问题类型'})
  60. return
  61. }else if(this.beizu==""){
  62. that.$refs.toast.show({model:'warn',label:'请填写意见'})
  63. return
  64. }
  65. that.type=this.checked1?1:this.checked2?2:this.checked3?3:'';
  66. myRequest({
  67. url: "/api/Opinion/addProblem",
  68. method:'post',
  69. data:{type:that.type,problem:that.beizu}
  70. }).then(res => {
  71. console.log(res.data)
  72. if (res.data.code == 200) {
  73. that.$refs.toast.show({model:'success',label:res.data.msg})
  74. setTimeout(function(){
  75. uni.navigateBack();
  76. },2000)
  77. }else{
  78. that.$refs.toast.show({model:'error',label:res.data.msg})
  79. }
  80. })
  81. },
  82. aa(num){
  83. if(num==1){
  84. this.checked1=true;
  85. this.checked2=false;
  86. this.checked3=false;
  87. }else if(num==2){
  88. this.checked1=false;
  89. this.checked2=true;
  90. this.checked3=false;
  91. }else if(num==3){
  92. this.checked1=false;
  93. this.checked2=false;
  94. this.checked3=true;
  95. }
  96. },
  97. },
  98. }
  99. </script>
  100. <style lang="scss">
  101. /deep/ .tm-menubars .body{
  102. background-color: #1b1b1b !important;
  103. }
  104. /deep/ .zhuti{padding: 10px 10px;}
  105. /deep/ .kuang{margin:0 !important;padding: 0px !important;}
  106. .dianz image{width: 30px;vertical-align: middle;margin-right: 10px;}
  107. /deep/ .tm-checkbox-boey-label{color: white !important;}
  108. /deep/ .border-primary-a-1{border-color: #303440;background: #303440;}
  109. /deep/ .shuru .grey-darken-5{
  110. background-color: #0d0d0d!important;
  111. padding: 0px !important;
  112. }
  113. .shuru{border:1px solid #303030;border-radius: 10px !important;padding:0px;background: #0D0D0D !important;}
  114. /deep/ .sao uni-button{background-color: #303440 !important;width: 88% !important;}
  115. </style>