service.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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="gotoUrl('pages/user/message')" >
  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. }
  82. },
  83. onReady() {
  84. this.getNewsList();
  85. },
  86. methods: {
  87. getNewsList() {
  88. newsApi.newsInfoContentList({
  89. pageIndex: 1,
  90. pageSize: 100,
  91. shortName: this.newsType
  92. }).then((res) => {
  93. var newsList = res.data.data;
  94. this.newsList[this.current] = newsList.reverse()
  95. //this.recordsTotal = res.data.recordsTotal
  96. this.$forceUpdate()
  97. }).catch(error => {
  98. uni.showToast({
  99. title: error,
  100. icon: "none"
  101. })
  102. })
  103. },
  104. clickAcs(i){
  105. uni.makePhoneCall({
  106. phoneNumber: this.serviceList[i].tel //仅为示例
  107. });
  108. },
  109. change(index) {
  110. this.current = index;
  111. this.newsType = this.list[index].type;
  112. if(this.newsList[this.current].length==0){
  113. this.getNewsList(true)
  114. }
  115. }
  116. }
  117. }
  118. </script>
  119. <style lang="scss" scoped>
  120. .header {
  121. height: 300px;
  122. z-index: 999;
  123. background: linear-gradient(180deg, rgba(0, 185, 98, 1) 43%, rgba(246, 246, 246, 1) 100%);
  124. /deep/.u-navbar {
  125. background: none !important;
  126. border-bottom: none !important;
  127. }
  128. /deep/.u-border-bottom:after {
  129. border-bottom-width: 0px !important;
  130. }
  131. .feedback {
  132. margin: 24rpx 32rpx;
  133. background-color: #fff;
  134. border-radius: 8px;
  135. padding: 20rpx 32rpx 48rpx;
  136. .title {
  137. color: rgba(16, 16, 16, 1);
  138. font-size: 32rpx;
  139. }
  140. }
  141. .suggestion-feedback {
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. margin: 48rpx 0 0 0;
  146. .box {
  147. width: 48rpx;
  148. height: 48rpx;
  149. border-radius: 4px;
  150. background-color: rgba(0, 185, 98, 1);
  151. text-align: center;
  152. img {
  153. width: 32rpx;
  154. height: 32rpx;
  155. vertical-align: middle;
  156. }
  157. }
  158. .text {
  159. color: rgba(51, 51, 51, 1);
  160. font-size: 40rpx;
  161. margin-left: 16rpx;
  162. }
  163. }
  164. }
  165. .common-problem {
  166. margin: -125px 32rpx 0;
  167. border-radius: 8px;
  168. background-color: #fff;
  169. padding: 20rpx 0;
  170. .title {
  171. color: rgba(16, 16, 16, 1);
  172. font-size: 32rpx;
  173. padding-bottom: 20rpx;
  174. border-bottom: 1px solid rgba(246, 246, 246, 1);
  175. padding-left: 32rpx;
  176. }
  177. .tabs {
  178. width: 400rpx;
  179. padding-bottom: 20rpx;
  180. border-bottom: 1px solid rgba(246, 246, 246, 1);
  181. /deep/.u-tab-bar {
  182. background-color: #00B962 !important;
  183. }
  184. }
  185. .collapse {
  186. padding: 0 32rpx;
  187. }
  188. }
  189. .bottom {
  190. position: fixed;
  191. left: 0;
  192. right: 0;
  193. bottom: 0;
  194. background-color: rgba(255, 255, 255, 1);
  195. box-shadow: 0px -4px 6px 0px rgba(0, 0, 0, 0.05);
  196. padding: 24rpx 32rpx;
  197. .service {
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. height: 44px;
  202. border-radius: 8px;
  203. background-color: rgba(0, 185, 98, 1);
  204. text-align: center;
  205. color: #fff;
  206. font-size: 32rpx;
  207. .text {
  208. margin-left: 16rpx;
  209. }
  210. }
  211. }
  212. </style>