1
0

index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="main">
  3. <view class="list">
  4. <view class="item" v-for="(item, index) in list" :key="index" @click="go('/pages/knowledge/detail?id=' + item.id)">
  5. <view class="title omit">
  6. <text class="icon" v-if="item.top === 1">&#xe61f;</text>
  7. <text>{{ item.title }}</text>
  8. </view>
  9. <view class="desc">
  10. <text>{{ item.type }}</text>
  11. <text>发布于 {{ item.createTime }}</text>
  12. </view>
  13. </view>
  14. <u-empty v-if="list.length == 0" text="你还未绑定就诊人"></u-empty>
  15. </view>
  16. <view class="mfooter">
  17. <button class="btn" @click="go('/pages/user/bind/add')">
  18. <text class="icon">&#xe8d5;</text>
  19. <text>去绑定</text>
  20. </button>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. list: []
  29. };
  30. },
  31. onLoad(e) {
  32. this.getData();
  33. },
  34. methods: {
  35. getData() {
  36. this.http.request({
  37. url: '/app/user/bind/list',
  38. data: this.param,
  39. loading: 'false',
  40. success: (res) => {
  41. this.list = res.data.data;
  42. }
  43. });
  44. },
  45. go(url) {
  46. uni.navigateTo({ url: url });
  47. }
  48. }
  49. };
  50. </script>
  51. <style lang="scss">
  52. .list {
  53. padding: 10px 12px;
  54. background-color: white;
  55. margin: 10px;
  56. border-radius: 10px;
  57. .item {
  58. border-radius: 5px;
  59. padding: 13px 12px 13px 12px;
  60. margin-bottom: 10px;
  61. overflow: hidden;
  62. border-bottom: 1px solid $line;
  63. .title {
  64. font-size: 15px;
  65. font-weight: bold;
  66. .icon {
  67. color: orangered;
  68. padding-right: 3px;
  69. }
  70. }
  71. .desc {
  72. font-size: 14px;
  73. padding-top: 10px;
  74. color: $font-c;
  75. text {
  76. padding-right: 30px;
  77. }
  78. }
  79. }
  80. }
  81. </style>