customer-center.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#333333"></navbar>
  4. <view class="search-page">
  5. <view class="headline">常见问题</view>
  6. <view class="problem-box" v-if="problemList&&problemList.length>0">
  7. <block v-for="item in problemList">
  8. <view class="problem-item" :key="item.id" @click="toDetails(item.id)">
  9. <text>{{item.problemTitle}}</text>
  10. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  11. </view>
  12. </block>
  13. <loadMore v-if="problemList.length>0" :status="status"></loadMore>
  14. </view>
  15. <EmptyDate bgColor="#fff" v-else></EmptyDate>
  16. <view class="footer">
  17. <view class="submit-feedback" @click="goOnlineCustomer()">智能客服</view>
  18. <view class="submit-feedback" @click.stop="openFeedback()">提交反馈</view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. config: {
  28. back: true,
  29. title: '客服中心',
  30. color: 'black',
  31. backgroundColor: [1, '#fff'],
  32. statusBarFontColor: 'black',
  33. },
  34. keyword: '',
  35. params: {
  36. pageNum: 1,
  37. pageSize: 20,
  38. },
  39. status: 'more',
  40. problemList: [],
  41. };
  42. },
  43. onShow() {},
  44. onLoad() {
  45. this.getProblemList();
  46. },
  47. onReachBottom() {
  48. if (this.status == 'more') {
  49. this.pageNum++;
  50. this.getProblemList();
  51. }
  52. },
  53. methods: {
  54. getProblemList() {
  55. this.$yghttp.get('/common/problem/page', this.params).then((res) => {
  56. if (res && res.code == 200) {
  57. this.problemList = this.problemList.concat(res.rows);
  58. if (this.problemList.length < res.total) {
  59. this.status = 'more';
  60. } else {
  61. this.status = 'noMore';
  62. }
  63. }
  64. });
  65. },
  66. openFeedback() {
  67. uni.navigateTo({
  68. url: '/pages/government/feedback',
  69. });
  70. },
  71. goOnlineCustomer(){
  72. let url="http://channel-poc.alixiaomi.com:8085/intl/index.htm?from=5FW0i7mBUH&locale=zh-CN#"
  73. uni.navigateTo({
  74. url: "/pages/web-view/Apps?path=" + url+'&title=咨询助手'
  75. })
  76. },
  77. toDetails(id) {
  78. uni.navigateTo({
  79. url: '/pages/government/problem_detail?id=' + id,
  80. });
  81. },
  82. },
  83. };
  84. </script>
  85. <style>
  86. page {
  87. background-color: #F8F8F8;
  88. }
  89. </style>
  90. <style lang="scss" scoped>
  91. .container {
  92. padding-bottom: 150rpx;
  93. }
  94. .search-page {
  95. width: 100%;
  96. padding: 28rpx;
  97. .headline {
  98. padding: 30rpx 20px 20rpx;
  99. height: 80rpx;
  100. font-size: 30rpx;
  101. color: #333333;
  102. font-weight: bold;
  103. line-height: 80rpx;
  104. background-color: #fff;
  105. border-radius: 20rpx 20rpx 0 0;
  106. }
  107. .problem-box {
  108. width: 100%;
  109. padding: 0 46rpx;
  110. background-color: #fff;
  111. .problem-item {
  112. height: 122rpx;
  113. display: flex;
  114. justify-content: space-between;
  115. align-items: center;
  116. border-bottom: 1rpx solid #ededed;
  117. .open-more {
  118. width: 100rpx;
  119. max-height: 100%;
  120. }
  121. }
  122. }
  123. .footer {
  124. position: fixed;
  125. bottom: 0;
  126. left: 0;
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. width: 100%;
  131. padding: 30rpx;
  132. background-color: #fff;
  133. }
  134. .submit-feedback {
  135. width: 300rpx;
  136. margin-right: 32rpx;
  137. border-radius: 10rpx;
  138. background: linear-gradient(17deg, #52d5e9 0%, #45c5da 100%) #3c66d9;
  139. text-align: center;
  140. line-height: 80rpx;
  141. color: #fff;
  142. font-size: 30rpx;
  143. &:last-child {
  144. margin-right: 0;
  145. }
  146. }
  147. }
  148. </style>