mn_jingshen.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="闽南精神" bgColor="rgba(255,255,255,255)" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="header">
  5. <u-swiper
  6. :list="mn_spiritList"
  7. imgMode="aspectFill"
  8. :height="120"
  9. :indicator="true"
  10. :autoplay="true"
  11. radius="0"
  12. :circular="true"
  13. indicatorStyle="bottom: 10px"
  14. indicatorMode="dot"
  15. indicatorActiveColor="#fff"
  16. indicatorInactiveColor="rgba(255, 255, 255, 0.35)"
  17. ></u-swiper>
  18. </view>
  19. <view class="banner" @click="spiritBtn(index)" v-for="(item, index) in list" :key="item.id">
  20. <view class="box_img">
  21. <image style="width: 100%; height: 100%; border-radius: 50%" :src="item.image" mode=""></image>
  22. </view>
  23. <view class="" style="line-height: 65rpx">
  24. <view class="">{{ item.name }}</view>
  25. <view class="" style="width: 450rpx">{{ item.title }}</view>
  26. </view>
  27. <view class="">
  28. <uni-icons type="forward" size="24"></uni-icons>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. let that;
  35. export default {
  36. data() {
  37. return {
  38. id: '' /* 模型id */,
  39. main_body_id: '',
  40. mn_spiritList: [
  41. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/sy_lbt2.png',
  42. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/sy_lbt1.png',
  43. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/sy_lbt3.jpg',
  44. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/sy_lbt4.jpg',
  45. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/sy_lbt5.png'
  46. ],
  47. // 闽南精神列表
  48. list: [],
  49. // 闽南精神列表内容
  50. ListDetail: []
  51. };
  52. },
  53. onLoad(o) {
  54. that = this;
  55. this.id = o.id;
  56. this.main_body_id = this.$db.get('main_body_id');
  57. this.getColumnList(o.id);
  58. },
  59. methods: {
  60. getColumnList(id) {
  61. this.$api.getColumnList(
  62. {
  63. model_id: 3,
  64. main_body_id: this.main_body_id
  65. },
  66. function (res) {
  67. console.log(res, 'res');
  68. that.list = res.data;
  69. }
  70. );
  71. },
  72. // 精神菜单
  73. spiritBtn(i) {
  74. uni.navigateTo({
  75. url: `/index_fenbao/mn_jingshen/xiang_qing?id=${this.id}&main_body_column_id=${this.list[i].id}&title=${this.list[i].name}`
  76. });
  77. }
  78. }
  79. };
  80. </script>
  81. <style>
  82. /deep/.u-swiper-indicator__wrapper__dot--active {
  83. width: 5px !important;
  84. }
  85. .box {
  86. height: auto;
  87. width: 100%;
  88. background-color: #f8f8f8;
  89. background-attachment: fixed;
  90. border-radius: 16px 16px 0 0;
  91. position: relative;
  92. display: flex;
  93. flex-direction: column;
  94. }
  95. .header {
  96. width: 100%;
  97. height: 255rpx;
  98. }
  99. .banner {
  100. display: flex;
  101. justify-content: space-around;
  102. align-items: center;
  103. margin-left: 32rpx;
  104. margin-bottom: 20rpx;
  105. height: 198rpx;
  106. background: #ffffff;
  107. border-radius: 99rpx 0rpx 0rpx 99rpx;
  108. padding-left: 10rpx;
  109. }
  110. .box_img {
  111. width: 160rpx;
  112. height: 160rpx;
  113. border-radius: 50%;
  114. }
  115. </style>