service.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <view>
  3. <view class="header">
  4. <ujp-navbar back-icon-color="#fff" title-color="#fff" title="联系客服"></ujp-navbar>
  5. <!-- 问题反馈 -->
  6. <view class="feedback">
  7. <view class="title">
  8. 问题反馈
  9. </view>
  10. <view class="suggestion-feedback" @click="tomessage()" >
  11. <view class="box">
  12. <img src="../../assets/img/riLine-edit-box-line@3x.png" alt="">
  13. </view>
  14. <view class="text">
  15. 建议反馈
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- 常见问题 -->
  21. <view class="common-problem">
  22. <view class="title">
  23. 常见问题
  24. </view>
  25. <view class="tabs">
  26. <u-tabs active-color="#333333" inactive-color="#999999" :list="list" :is-scroll="false"
  27. :current="current" @change="change"></u-tabs>
  28. </view>
  29. <view class="collapse" v-for="(itemList,i) in newsList" :key="i" v-show="current==i">
  30. <!-- -->
  31. <u-collapse v-if="itemList.length" >
  32. <u-collapse-item v-for="(item, index) in itemList" :title="(index+1)+'.'+item.title" :key="index">
  33. <!-- <textarea maxlength="-1" :auto-height="true" v-model="item.content" readonly ></textarea>
  34. --> <view v-html="item.content"></view>
  35. </u-collapse-item>
  36. </u-collapse>
  37. </view>
  38. </view>
  39. <!-- 底部 -->
  40. <view class="bottom">
  41. <view class="service">
  42. <view class="icon">
  43. <u-icon name="server-fill" size="40"></u-icon>
  44. </view>
  45. <view class="text" @click="show = true">
  46. 客服电话(7:00-24:00)
  47. </view>
  48. </view>
  49. </view>
  50. <u-action-sheet :list="serviceList"
  51. @click="clickAcs"
  52. v-model="show"></u-action-sheet>
  53. </view>
  54. </template>
  55. <script>
  56. import * as newsApi from '@/apis/news.js'
  57. export default {
  58. data() {
  59. return {
  60. newsType: 'CJWT-GZ',
  61. list: [
  62. {name: '故障',type: 'CJWT-GZ'},
  63. {name: '软件使用',type: 'CJWT-RJSY'},
  64. {name: '活动优惠',type: 'CJWT-YHHD'},
  65. ],
  66. serviceList: [{
  67. text: '平台服务 400-8899-619',
  68. tel:"400-8899-619",
  69. }, {
  70. text: '故障反馈 15607217777',
  71. tel:"15607217777",
  72. }, {
  73. text: '售后受理 15607217777',
  74. tel:"15607217777",
  75. }],
  76. newsList: [
  77. [],[],[]
  78. ],
  79. current: 0,
  80. show:false,
  81. personInfo:{},
  82. }
  83. },
  84. onReady() {
  85. this.personInfo=this.carhelp.getPersonInfo()
  86. this.getNewsList();
  87. },
  88. methods: {
  89. tomessage(){
  90. if(this.personInfo.id){
  91. this.gotoUrl('pages/user/message')
  92. }else{
  93. uni.showToast({
  94. title:"用户登录后进行反馈"
  95. })
  96. }
  97. },
  98. getNewsList() {
  99. newsApi.newsInfoContentList({
  100. pageIndex: 1,
  101. pageSize: 100,
  102. shortName: this.newsType
  103. }).then((res) => {
  104. var newsList = res.data.data;
  105. this.newsList[this.current] = newsList.reverse()
  106. //this.recordsTotal = res.data.recordsTotal
  107. this.$forceUpdate()
  108. }).catch(error => {
  109. uni.showToast({
  110. title: error,
  111. icon: "none"
  112. })
  113. })
  114. },
  115. clickAcs(i){
  116. uni.makePhoneCall({
  117. phoneNumber: this.serviceList[i].tel //仅为示例
  118. });
  119. },
  120. change(index) {
  121. this.current = index;
  122. this.newsType = this.list[index].type;
  123. if(this.newsList[this.current].length==0){
  124. this.getNewsList(true)
  125. }
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. .header {
  132. height: 300px;
  133. z-index: 999;
  134. background: linear-gradient(180deg, rgba(0, 185, 98, 1) 43%, rgba(246, 246, 246, 1) 100%);
  135. ::v-deep .u-navbar {
  136. background: none !important;
  137. border-bottom: none !important;
  138. }
  139. ::v-deep .u-border-bottom:after {
  140. border-bottom-width: 0px !important;
  141. }
  142. .feedback {
  143. margin: 24rpx 32rpx;
  144. background-color: #fff;
  145. border-radius: 8px;
  146. padding: 20rpx 32rpx 48rpx;
  147. .title {
  148. color: rgba(16, 16, 16, 1);
  149. font-size: 32rpx;
  150. }
  151. }
  152. .suggestion-feedback {
  153. display: flex;
  154. align-items: center;
  155. justify-content: center;
  156. margin: 48rpx 0 0 0;
  157. .box {
  158. width: 48rpx;
  159. height: 48rpx;
  160. border-radius: 4px;
  161. background-color: rgba(0, 185, 98, 1);
  162. text-align: center;
  163. img {
  164. width: 32rpx;
  165. height: 32rpx;
  166. vertical-align: middle;
  167. }
  168. }
  169. .text {
  170. color: rgba(51, 51, 51, 1);
  171. font-size: 40rpx;
  172. margin-left: 16rpx;
  173. }
  174. }
  175. }
  176. .common-problem {
  177. margin: -125px 32rpx 0;
  178. border-radius: 8px;
  179. background-color: #fff;
  180. padding: 20rpx 0;
  181. padding-bottom: 80px;
  182. .title {
  183. color: rgba(16, 16, 16, 1);
  184. font-size: 32rpx;
  185. padding-bottom: 20rpx;
  186. border-bottom: 1px solid rgba(246, 246, 246, 1);
  187. padding-left: 32rpx;
  188. }
  189. .tabs {
  190. width: 400rpx;
  191. padding-bottom: 20rpx;
  192. border-bottom: 1px solid rgba(246, 246, 246, 1);
  193. ::v-deep .u-tab-bar {
  194. background-color: #00B962 !important;
  195. }
  196. }
  197. .collapse {
  198. padding: 0 32rpx;
  199. }
  200. }
  201. .bottom {
  202. position: fixed;
  203. left: 0;
  204. right: 0;
  205. bottom: 0;
  206. background-color: rgba(255, 255, 255, 1);
  207. box-shadow: 0px -4px 6px 0px rgba(0, 0, 0, 0.05);
  208. padding: 24rpx 32rpx;
  209. .service {
  210. display: flex;
  211. align-items: center;
  212. justify-content: center;
  213. height: 44px;
  214. border-radius: 8px;
  215. background-color: rgba(0, 185, 98, 1);
  216. text-align: center;
  217. color: #fff;
  218. font-size: 32rpx;
  219. .text {
  220. margin-left: 16rpx;
  221. }
  222. }
  223. }
  224. </style>