user-feedback1.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>意见反馈-创业帮</title>
  6. <meta name="keywords" content="意见反馈-创业帮">
  7. <meta name="description" content="意见反馈-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="意见反馈-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgc-back pt0" style="padding-top:0;">
  18. <div id="app">
  19. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="我要反馈" v-if="toptitleisshow" @click-left="goback">
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <div class="bt8f7f7f7 bb8f7f7f7 tc" v-cloak>
  23. <van-field v-model="message" rows="5" autosize type="textarea" maxlength="50" placeholder="请输入您的问题或者建议" show-word-limit @input="checkValue"></van-field>
  24. </div>
  25. <van-cell-group class="feedback" :border="false" v-cloak>
  26. <van-cell class="bb8f7f7f7" title="是否需要电话回复" value="">
  27. <template #right-icon>
  28. <van-checkbox v-model="needCall" icon-size=".426667rem" checked-color="#FF5A32"></van-checkbox>
  29. </template>
  30. </van-cell>
  31. <van-cell title="反馈类型:" :border="false">
  32. <template #label>
  33. <div class="pt16">
  34. <van-button class="border" v-for="item,index in typeTags" plain hairline size="small" @click="chooseTag(item)" :class="item.Id == curTag ? 'feedbackclickbtn' : ''">{{item.Name}}</van-button>
  35. </div>
  36. </template>
  37. </van-cell>
  38. </van-cell-group>
  39. <div class="pt16 pl16 pr16 bc333">
  40. <van-button class="border_radius8" type="primary" block :disabled="canSubmit ? false : true" color="#FFD500" @click="submitfeedback">提交</van-button>
  41. </div>
  42. </div>
  43. <script src="./static/js/klm-vv.min.js"></script>
  44. <script src="./static/js/appfunc.min.js"></script>
  45. <script src="./static/js/klm-axios-config.js"></script>
  46. <script src="./static/js/publicfn.js"></script>
  47. <script>
  48. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  49. // 可以通过下面的方式手动注册
  50. Vue.use(vant.Lazyload);
  51. // 在 #app 标签下渲染一个按钮组件
  52. let app = new Vue({
  53. el: '#app',
  54. data() {
  55. return {
  56. toptitleisshow:false,
  57. active: 0,
  58. canSubmit: false,
  59. message: '',
  60. needCall: true,
  61. curTag: 0,
  62. typeTags: [
  63. ],
  64. };
  65. },
  66. created() {
  67. this.toptitleisshow = toptitleisshow;
  68. this.getfeedtype();
  69. },
  70. watch:{
  71. message:function(){
  72. this.checkValue();
  73. }
  74. },
  75. methods: {
  76. chooseTag(item){
  77. this.curTag = item.Id;
  78. },
  79. checkValue(){
  80. this.canSubmit = (this.message !== '' ) ? true : false;
  81. },
  82. //- 获取反馈类型
  83. async getfeedtype(){
  84. const res = await getRequest('api/v1/userbackkind/list',JSON.stringify({value:'',PageNum:1,PageSize:10}));
  85. if(res.status === '1') {
  86. if(res.data.length !== 0){
  87. this.typeTags = res.data;
  88. }else{
  89. this.typeTags = [{Id:1,Name:'基础类型'}];
  90. };
  91. this.curTag = this.typeTags[0].Id;
  92. }
  93. },
  94. submitfeedback:undebounce(async function(){
  95. //- if(this.message === '') return tips('请填写反馈内容');
  96. //- const Id = PublicLib.getCookieInfo('userId');
  97. //- this.needCall = this.needCall? 1:0;
  98. //- const res = await postRequest('api/v1/userback/add',JSON.stringify({UserId:Id,Content:this.message,IsPhoneCallBack:this.needCall,BackKind:this.curTag}));
  99. //- if(res.status !== '1') return tips(res.info);
  100. tips('提交反馈成功!');
  101. this.message = '';
  102. }),
  103. goback(){
  104. PublicLib.GoBack({Level:1});
  105. }
  106. }
  107. });
  108. </script>
  109. </body>
  110. </html>