index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="container">
  3. <navbar></navbar>
  4. <baner></baner>
  5. <!-- 管理智慧 -->
  6. <uni-group title="管理智慧" margin-top="20">
  7. <uni-grid :column="3" :highlight="true" @change="change">
  8. <uni-grid-item v-for="(item, index) in data" :index="index" :key="index">
  9. <view class="grid-item-box" style="background-color: #fff; height: 100%">
  10. <image v-if="item.thumbnail" style="width: 100%; height: 100%;" mode="scaleToFill" :src="baseurl + item.thumbnail"></image>
  11. <uni-icons v-else type="image" :size="30" color="#777" />
  12. <text class="text">{{ item.name }}</text>
  13. </view>
  14. </uni-grid-item>
  15. </uni-grid>
  16. </uni-group>
  17. <!-- 财富生活 -->
  18. <uni-group title="财富生活" margin-top="20">
  19. <uni-grid :column="3" :highlight="true" @change="change">
  20. <uni-grid-item v-for="(item, index) in data" :index="index" :key="index">
  21. <view class="grid-item-box" style="background-color: #fff; height: 100%">
  22. <image v-if="item.thumbnail" style="width: 100%; height: 100%;" mode="scaleToFill" :src="baseurl + item.thumbnail"></image>
  23. <uni-icons v-else type="image" :size="30" color="#777" />
  24. <text class="text">{{ item.name }}</text>
  25. </view>
  26. </uni-grid-item>
  27. </uni-grid>
  28. </uni-group>
  29. <!-- 才智青年 -->
  30. <uni-group title="才智青年" margin-top="20">
  31. <uni-grid :column="3" :highlight="true" @change="change">
  32. <uni-grid-item v-for="(item, index) in data" :index="index" :key="index">
  33. <view class="grid-item-box" style="background-color: #fff; height: 100%">
  34. <image v-if="item.thumbnail" style="width: 100%; height: 100%;" mode="scaleToFill" :src="baseurl + item.thumbnail"></image>
  35. <uni-icons v-else type="image" :size="30" color="#777" />
  36. <text class="text">{{ item.name }}</text>
  37. </view>
  38. </uni-grid-item>
  39. </uni-grid>
  40. </uni-group>
  41. </view>
  42. </template>
  43. <script>
  44. import { mapActions, mapState } from "vuex";
  45. export default {
  46. data() {
  47. return {
  48. data: [],
  49. baseurl: 'http://192.168.0.45:9002',
  50. };
  51. },
  52. computed: {},
  53. async mounted() {
  54. this.data = await this.intactQuery({ type: 0 });
  55. },
  56. methods: {
  57. ...mapActions(["intactQuery"]),
  58. },
  59. };
  60. </script>
  61. <style lang="scss" scoped>
  62. .container {
  63. width: 100%;
  64. margin: 0;
  65. padding: 0;
  66. }
  67. .image {
  68. width: 25px;
  69. height: 25px;
  70. }
  71. .text {
  72. font-size: 14px;
  73. margin-top: 5px;
  74. }
  75. .example-body {
  76. /* #ifndef APP-NVUE */
  77. // display: block;
  78. /* #endif */
  79. }
  80. .grid-dynamic-box {
  81. margin-bottom: 15px;
  82. }
  83. .grid-item-box {
  84. flex: 1;
  85. // position: relative;
  86. /* #ifndef APP-NVUE */
  87. display: flex;
  88. /* #endif */
  89. flex-direction: column;
  90. align-items: center;
  91. justify-content: center;
  92. padding: 15px 0;
  93. }
  94. .grid-item-box-row {
  95. flex: 1;
  96. // position: relative;
  97. /* #ifndef APP-NVUE */
  98. display: flex;
  99. /* #endif */
  100. flex-direction: row;
  101. align-items: center;
  102. justify-content: center;
  103. padding: 15px 0;
  104. }
  105. .grid-dot {
  106. position: absolute;
  107. top: 5px;
  108. right: 15px;
  109. }
  110. .swiper {
  111. height: 420px;
  112. }
  113. .more {
  114. width: 100%;
  115. text-align: center;
  116. }
  117. </style>