学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.6 KiB

1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="咨询投诉"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="tabBox">
  7. <view class="tab" v-for="(item,index) in tabArr" :key="index" @click="$goPage(item.url)">
  8. <view class="icon">
  9. <image :src="item.icon" mode=""></image>
  10. </view>
  11. <view class="text">{{item.text}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="question">
  16. <view class="h1">常见问题</view>
  17. <view class="card que">
  18. <u-collapse :body-style="itemStyle" :border="false">
  19. <u-collapse-item :title="item.question" v-for="(item, index) in itemList" :key="index" style="border-bottom: 1rpx solid #E8E9EC;">
  20. <text style=" color: #999;">{{item.answer}}</text>
  21. <!-- {{item.answer}} -->
  22. </u-collapse-item>
  23. </u-collapse>
  24. </view>
  25. </view>
  26. </view>
  27. <view style="padding: 20rpx 0;" v-if="itemList.length">
  28. <u-loadmore :status="status" />
  29. </view>
  30. <nodata v-if="!itemList.length&&status=='nomore'"></nodata>
  31. </view>
  32. </template>
  33. <script>
  34. import { askedQuestion } from '@/config/api.js'
  35. export default {
  36. data() {
  37. return {
  38. itemStyle: {
  39. marginLeft:'20rpx',
  40. },
  41. itemList: [],
  42. tabArr: [
  43. {text: '我要咨询', icon: require('../../../static/images/index/ic_zixun.png'), url:'/pages/indexEntry/consult/pubConsult/pubConsult', id: 1},
  44. {text: '我要投诉', icon: require('../../../static/images/index/ic_tousu.png'), url: '/pages/indexEntry/consult/pubComplaint/pubComplaint', id: 2,},
  45. {text: '查看记录', icon: require('../../../static/images/index/ic_jilu.png'), url: '/pages/indexEntry/consult/record/record', id: 3},
  46. ],
  47. params: {
  48. pageNo: 1,
  49. pageSize: 20
  50. },
  51. status: 'loading'
  52. }
  53. },
  54. onLoad() {
  55. this.askedQuestionFn()
  56. },
  57. onPullDownRefresh() {
  58. this.params.pageNo = 1
  59. this.itemList = []
  60. this.askedQuestionFn().then(()=>{ uni.stopPullDownRefresh()})
  61. },
  62. methods: {
  63. async askedQuestionFn() {
  64. const {data: res} = await askedQuestion(this.params)
  65. this.params.pageNo ++
  66. this.itemList.push(...res.list)
  67. this.total = res.total
  68. if(this.itemList.length>=this.total) {
  69. this.status = 'nomore'
  70. }else {
  71. this.status = 'loadmore'
  72. }
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .tabBox {
  79. display: flex;
  80. // margin-top: 20rpx;
  81. height: 192rpx;
  82. .tab {
  83. flex: 1;
  84. display: flex;
  85. flex-direction: column;
  86. align-items: center;
  87. justify-content: center;
  88. .icon {
  89. width: 72rpx;
  90. height: 72rpx;
  91. }
  92. .text {
  93. font-size: 28rpx;
  94. margin-top: 18rpx;
  95. }
  96. }
  97. }
  98. .h1 {
  99. line-height: 100rpx;
  100. }
  101. .que {
  102. padding: 28rpx;
  103. }
  104. </style>