my_opinion.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="main">
  3. <view class="opinionList" v-for="(item,index) in opinion" :key="index" :data-id="item.id" @click="gotoinfo">
  4. <view class="margin-top-sm margin-lr-sm">
  5. <view class="flex align-center justify-between">
  6. <text>医生:{{item.order.docter.name}}</text>
  7. <view class="phonezi">
  8. 意见单
  9. </view>
  10. </view>
  11. <view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
  12. 咨询类型:<text style="color: rgb(51,51,51);">{{item.order.product_type==1?'电话咨询':'图文咨询'}}</text>
  13. </view>
  14. <view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
  15. 订单号:<text style="color: rgb(51,51,51);">{{item.order.order_sn}}</text>
  16. </view>
  17. <view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
  18. 填写时间:<text style="color: rgb(51,51,51);">{{item.created_at}}</text>
  19. </view>
  20. </view>
  21. </view>
  22. <u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
  23. <view class="cu-tabbar-height"></view>
  24. <view class="cu-tabbar-height"></view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. onLoad(op) {
  30. this.getopinion()
  31. },
  32. data() {
  33. return {
  34. pageindex: 1,
  35. opinion: [],
  36. show: false
  37. }
  38. },
  39. onReachBottom() {
  40. this.getopinion()
  41. },
  42. methods: {
  43. getopinion: async function() {
  44. let res = await this.$request.post("/api/v1/suggest/suggestList", {
  45. page: this.pageindex
  46. })
  47. console.log(res)
  48. if (res.status == 0) {
  49. if (this.pageindex > res.data.last_page) {
  50. uni.showToast({
  51. title: "没有更多了",
  52. icon: "none"
  53. })
  54. } else {
  55. this.opinion = this.opinion.concat(res.data.data)
  56. this.pageindex++
  57. }
  58. }
  59. if (this.opinion.length == 0) {
  60. this.show = true
  61. } else {
  62. this.show = false
  63. }
  64. },
  65. gotoinfo(e) {
  66. uni.navigateTo({
  67. url: "opinionInfo?id=" + e.currentTarget.dataset.id
  68. })
  69. }
  70. },
  71. onShow() {
  72. }
  73. }
  74. </script>
  75. <style lang="scss">
  76. .opinionList {
  77. padding-top: 40rpx;
  78. padding-bottom: 40rpx;
  79. border-radius: 16rpx;
  80. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  81. margin-left: 20rpx;
  82. margin-right: 20rpx;
  83. margin-top: 15rpx;
  84. }
  85. .title_yijian {
  86. font-size: 20rpx;
  87. padding: 8rpx;
  88. border-radius: 20rpx;
  89. background-color: #0B73B9;
  90. color: #fff;
  91. width: 90rpx;
  92. text-align: center;
  93. margin-left: 20rpx;
  94. margin-right: 10rpx;
  95. }
  96. .phonezi {
  97. width: 160rpx;
  98. height: 54rpx;
  99. background: rgb(246, 246, 246);
  100. border-radius: 27rpx;
  101. font-size: 28rpx;
  102. font-family: PingFangSC-Regular, PingFang SC;
  103. font-weight: 400;
  104. color: #666666;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. }
  109. </style>