feedbackIndex.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!-- 帮助反馈页面 -->
  2. <template>
  3. <view>
  4. <!-- <view class="text-top">常见问题</view> -->
  5. <view class="bg-list">
  6. <view v-for="(item,index) in helpClassifyList" :key="index" :title="item.helpClassifyName"
  7. class="list-title padding-bottom">
  8. <view class="flex align-center justify-between" @click.stop="openList(item)">
  9. <view class="text-title">{{item.helpClassifyName}}</view>
  10. <view @click.stop="openList(item)" >
  11. <image src="../static/up.png" style="width: 21rpx;height: 15rpx;" v-if="item.parentId==0"></image>
  12. <image src="../static/dowm.png" style="width: 21rpx;height: 15rpx;" v-else></image>
  13. </view>
  14. </view>
  15. <view v-for="(problemItem,problemIndex) in item.helpWordList" :key="problemIndex" class="list-question"
  16. hover-class="hover" @click="onClick(problemItem)" v-if="item.parentId==0">
  17. <view class="text-item">{{problemItem.helpWordTitle}}</view>
  18. <view class="line" v-if="problemIndex!=item.helpWordList.length-1"></view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="bg-box">
  23. <view class="bg-white-box">
  24. <image src="../static/icon-letter.png" class="image"></image>
  25. <view class="text-feedback" hover-class="hover" @click="goChat">联系客服</view>
  26. <view class="vertical-line"></view>
  27. <image src="../static/icon-edit.png" class="image"></image>
  28. <view class="text-feedback" hover-class="hover" @click="toFeedback">我要反馈</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. helpClassifyList: []
  38. }
  39. },
  40. onLoad() {
  41. this.getlist()
  42. },
  43. methods: {
  44. openList(item) {
  45. var oldhelpClassifyList=item
  46. if(oldhelpClassifyList.parentId==1){
  47. item.parentId=0
  48. }else{
  49. item.parentId=1
  50. }
  51. },
  52. getlist() {
  53. let data={
  54. types:1
  55. }
  56. this.$Request.get("/app/helpWord/selectHelpList",data).then(res => {
  57. if (res.code == 0) {
  58. this.helpClassifyList = res.data
  59. for (var i = 0; i < this.helpClassifyList.length; i++) {
  60. this.helpClassifyList[i].parentId = 1
  61. }
  62. // this.helpClassifyList.isTrue = false
  63. } else {
  64. uni.showToast({
  65. title: res.msg,
  66. icon: 'none'
  67. })
  68. }
  69. });
  70. },
  71. onClick(item) {
  72. console.log(item.helpWordId)
  73. // return
  74. uni.navigateTo({
  75. url: '/my/help/helpDetail?helpWordId=' + item.helpWordId
  76. })
  77. },
  78. goChat() {
  79. let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信
  80. let kefuPhone = this.$queue.getData('kefuPhone');
  81. if (kefu == 1) {
  82. uni.makePhoneCall({
  83. phoneNumber: kefuPhone //仅为示例
  84. });
  85. }else if(kefu == 3){
  86. uni.navigateTo({
  87. url: '/my/setting/customer'
  88. });
  89. } else{
  90. // #ifdef MP-WEIXIN
  91. let that = this
  92. try {
  93. wx.openCustomerServiceChat({
  94. extInfo: {
  95. url: that.$queue.getData('kefuUrl')
  96. },
  97. corpId: that.$queue.getData('kefuAppId'),
  98. success(res) {},
  99. fail(res) {
  100. console.error(res)
  101. }
  102. })
  103. } catch (error) {
  104. console.error("catchcatch" + error)
  105. uni.showToast({
  106. title: '请更新至微信最新版本'
  107. });
  108. }
  109. // #endif
  110. // #ifndef MP-WEIXIN
  111. let url = that.$queue.getData('kefuUrl');
  112. if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
  113. uni.navigateTo({
  114. url
  115. });
  116. } else {
  117. //#ifndef H5
  118. uni.navigateTo({
  119. url: '/pages/index/webView?url=' + url
  120. });
  121. //#endif
  122. //#ifdef H5
  123. window.location.href = url;
  124. //#endif
  125. }
  126. // #endif
  127. }
  128. },
  129. toFeedback() {
  130. uni.navigateTo({
  131. url: '/my/feedback/index',
  132. success: res => {},
  133. fail: () => {},
  134. complete: () => {}
  135. });
  136. }
  137. }
  138. }
  139. </script>
  140. <style>
  141. page {
  142. background-color: #FFFFFF;
  143. height: 100%;
  144. }
  145. .bg-box {
  146. background-color: #FFFFFF;
  147. position: fixed;
  148. bottom: 0;
  149. left: 0;
  150. right: 0;
  151. }
  152. .bg-list {
  153. margin-bottom: 100rpx;
  154. background-color: #FFFFFF;
  155. padding: 30rpx
  156. }
  157. .bg-white-box {
  158. background-color: #F7F7F7;
  159. margin: 30rpx;
  160. display: flex;
  161. flex-direction: row;
  162. justify-content: center;
  163. align-items: center;
  164. padding: 10rpx;
  165. border-radius: 20rpx;
  166. color: #000;
  167. font-size: 32rpx;
  168. }
  169. .vertical-line {
  170. height: 20rpx;
  171. background-color: #cecece;
  172. width: 2rpx;
  173. margin-left: 30rpx;
  174. margin-right: 30rpx;
  175. }
  176. .line {
  177. width: 100%;
  178. height: 1rpx;
  179. background-color: #d3d3d3;
  180. }
  181. .text-title {
  182. color: #000;
  183. font-size: 32rpx;
  184. font-weight: bold;
  185. }
  186. .text-item {
  187. color: #999999;
  188. font-size: 28rpx;
  189. padding: 24rpx 0rpx;
  190. }
  191. .list-title {
  192. margin-bottom: 30rpx;
  193. }
  194. .list-question {
  195. color: #000;
  196. font-size: 28rpx;
  197. }
  198. .hover {
  199. background-color: #ffffff;
  200. opacity: 0.6;
  201. }
  202. .image {
  203. width: 40rpx;
  204. height: 40rpx;
  205. margin-left: 20rpx;
  206. }
  207. .text-feedback {
  208. padding: 20rpx;
  209. /* color: #000000; */
  210. }
  211. .text-top {
  212. margin: 30rpx;
  213. color: #000;
  214. font-size: 34rpx;
  215. }
  216. </style>