feedbackIndex.vue 5.3 KB

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