feedbackIndex.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <!-- 帮助反馈页面 -->
  2. <template>
  3. <view class="page-question">
  4. <!-- <view class="text-top">常见问题</view> -->
  5. <view class="bg-list">
  6. <view
  7. v-for="(item, index) in helpClassifyList"
  8. :key="index"
  9. :title="item.helpClassifyName"
  10. class="list-title"
  11. >
  12. <view
  13. class="flex align-center justify-between"
  14. @click.stop="openList(item, index)"
  15. >
  16. <view
  17. class="text-title"
  18. :style="{ color: item.id == 0 ? 'rgba(1, 107, 246, 1)' : '' }"
  19. >{{ item.helpClassifyName }}</view
  20. >
  21. <view @click.stop="openList(item, index)">
  22. <image
  23. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/05/d56c02cad3db64b1874d01e0ceeb48e1.png"
  24. style="width: 21rpx; height: 15rpx"
  25. v-if="item.id == 0"
  26. ></image>
  27. <image
  28. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/05/8ee353c9b70928dc4f81488e75121441.png"
  29. style="width: 21rpx; height: 15rpx"
  30. v-else
  31. ></image>
  32. </view>
  33. </view>
  34. <view
  35. v-for="(problemItem, problemIndex) in item.helpWordList"
  36. :key="problemIndex"
  37. class="list-question"
  38. hover-class="hover"
  39. @click="onClick(problemItem)"
  40. v-if="item.id == 0"
  41. >
  42. <view class="text-item">{{ problemItem.helpWordTitle }}</view>
  43. <!-- <view class="line" v-if="problemIndex!=item.helpWordList.length-1"></view> -->
  44. </view>
  45. </view>
  46. </view>
  47. <view class="bg-box">
  48. <view class="bg-white-box">
  49. <image
  50. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/05/6ea8d56c2451479b6327c56e3c57e91c.png"
  51. class="image"
  52. ></image>
  53. <view class="text-feedback" hover-class="hover" @click="goChat">联系客服</view>
  54. <view class="vertical-line"></view>
  55. <image
  56. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/05/aa32e4508c2505631a17402d4e086cda.png"
  57. class="image"
  58. ></image>
  59. <view class="text-feedback" hover-class="hover" @click="toFeedback"
  60. >我要反馈</view
  61. >
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. helpClassifyList: [],
  71. };
  72. },
  73. onLoad() {
  74. this.getlist();
  75. },
  76. methods: {
  77. openList(item, index) {
  78. if (item.id === 1) {
  79. this.helpClassifyList[index].id = 0;
  80. } else {
  81. this.helpClassifyList[index].id = 1;
  82. }
  83. console.log(this.helpClassifyList);
  84. this.$forceUpdate();
  85. },
  86. getlist() {
  87. this.$Request.get("/app/helpWord/selectHelpList?types=1").then((res) => {
  88. if (res.code == 0) {
  89. this.helpClassifyList = res.data;
  90. this.helpClassifyList.map((item) => {
  91. item.id = 1;
  92. });
  93. } else {
  94. uni.showToast({
  95. title: res.msg,
  96. icon: "none",
  97. });
  98. }
  99. });
  100. },
  101. onClick(item) {
  102. console.log(item);
  103. // return
  104. uni.navigateTo({
  105. url: "./helpDetail?item=" + encodeURIComponent(JSON.stringify(item)),
  106. });
  107. },
  108. // toFeedbackList() {
  109. // wx.openCustomerServiceChat({
  110. // extInfo: {
  111. // url: this.$queue.getData('ZXMessageLink')
  112. // },
  113. // corpId: 'wxc2cd198ca1931c49',
  114. // success(res) {}
  115. // })
  116. // },
  117. // 在线客服
  118. goChat() {
  119. let that = this;
  120. if (uni.getStorageSync("userType") == 1) {
  121. //用户端
  122. // #ifdef MP-WEIXIN
  123. wx.openCustomerServiceChat({
  124. extInfo: {
  125. url: that.$queue.getData("kefu"),
  126. },
  127. corpId: that.$queue.getData("kefuAppid"),
  128. success(res) {
  129. console.log(res);
  130. },
  131. });
  132. // #endif
  133. // #ifdef H5
  134. window.location.href = that.$queue.getData("kefu");
  135. // #endif
  136. // #ifdef APP
  137. let kefu = that.$queue.getData("kefu");
  138. console.log(kefu);
  139. plus.runtime.openURL(kefu, function (res) {});
  140. // #endif
  141. } else {
  142. //企业端
  143. // #ifdef MP-WEIXIN
  144. wx.openCustomerServiceChat({
  145. extInfo: {
  146. url: that.$queue.getData("kefuq"),
  147. },
  148. corpId: that.$queue.getData("kefuAppidq"),
  149. success(res) {
  150. console.log(res);
  151. },
  152. });
  153. // #endif
  154. // #ifdef H5
  155. window.location.href = that.$queue.getData("kefuq");
  156. // #endif
  157. // #ifdef APP
  158. let kefu = that.$queue.getData("kefuq");
  159. console.log(kefu);
  160. plus.runtime.openURL(kefu, function (res) {});
  161. // #endif
  162. }
  163. },
  164. toFeedback() {
  165. uni.navigateTo({
  166. url: "/my/feedback/index",
  167. success: (res) => {},
  168. fail: () => {},
  169. complete: () => {},
  170. });
  171. },
  172. },
  173. };
  174. </script>
  175. <style scoped lang="scss">
  176. .page-question {
  177. padding: 16rpx 40rpx;
  178. box-sizing: border-box;
  179. }
  180. .bg-box {
  181. /* background-color: #ffffff; */
  182. position: fixed;
  183. bottom: 0;
  184. left: 0;
  185. right: 0;
  186. }
  187. .bg-list {
  188. margin-bottom: 100rpx;
  189. background-color: #ffffff;
  190. padding: 34rpx 32rpx 36rpx 32rpx;
  191. box-sizing: border-box;
  192. border: 1rpx solid rgba(227, 231, 236, 1);
  193. border-radius: 12rpx;
  194. background: #fdfdfd;
  195. }
  196. .bg-white-box {
  197. background-color: #ffffff;
  198. margin: 30rpx;
  199. display: flex;
  200. flex-direction: row;
  201. justify-content: center;
  202. align-items: center;
  203. padding: 10rpx;
  204. border-radius: 20rpx;
  205. font-size: 32rpx;
  206. }
  207. .vertical-line {
  208. height: 20rpx;
  209. background-color: #cecece;
  210. width: 2rpx;
  211. margin-left: 30rpx;
  212. margin-right: 30rpx;
  213. }
  214. .line {
  215. width: 100%;
  216. height: 1rpx;
  217. background-color: #999999;
  218. }
  219. .text-title {
  220. color: rgba(29, 33, 41, 1);
  221. font-family: DM Sans;
  222. font-size: 24rpx;
  223. font-weight: 500;
  224. line-height: 32rpx;
  225. letter-spacing: 0%;
  226. text-align: left;
  227. }
  228. .text-item {
  229. font-size: 24rpx;
  230. padding: 24rpx;
  231. color: #999999;
  232. box-sizing: border-box;
  233. }
  234. .list-title {
  235. margin-bottom: 24rpx;
  236. }
  237. .list-title:last-child {
  238. margin-bottom: 0;
  239. }
  240. .list-question {
  241. font-size: 28rpx;
  242. }
  243. .hover {
  244. background-color: #f5f5f5;
  245. opacity: 0.6;
  246. }
  247. .image {
  248. width: 40rpx;
  249. height: 40rpx;
  250. margin-left: 20rpx;
  251. }
  252. .text-feedback {
  253. padding: 20rpx;
  254. /* color: #000000; */
  255. }
  256. .text-top {
  257. margin: 30rpx;
  258. font-size: 34rpx;
  259. }
  260. </style>