cs_liebiao.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="body">
  3. <u-navbar :autoBack="true" title="村史馆" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="fy_nav_bj">
  5. <image style="width: 100%; height: 100%" src="https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_lb.png"></image>
  6. </view>
  7. <view class="banxin">
  8. <u-picker :show="show" @close="show = false" :closeOnClickOverlay="true" :columns="columns" @cancel="show = false" @confirm="yf_isok"></u-picker>
  9. <view class="" style="margin-top: 40rpx">
  10. <!-- 选择城市 -->
  11. <view class="" style="display: flex">
  12. <view @click="show = true" class="fy_cs">
  13. <uni-icons type="location" size="20"></uni-icons>
  14. <text style="margin: 0 10rpx 0 10rpx">{{ columnsItem }}</text>
  15. <uni-icons type="bottom" size="20"></uni-icons>
  16. </view>
  17. <!-- 选择城市end -->
  18. <view class="">
  19. <u-tabs
  20. :list="tabList"
  21. :lineWidth="0"
  22. :activeStyle="{
  23. border: '1px solid #dac1a1',
  24. color: '#dac1a1'
  25. }"
  26. ></u-tabs>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 村史馆列表 -->
  32. <view class="banxin lb_box" style="">
  33. <view class="a1" v-for="item in 10" :key="item">
  34. <view class="a2">
  35. <image src="https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_item_lb.png" class="a3"></image>
  36. </view>
  37. <view class="a4">湖里社区</view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. show: false,
  47. columns: [['厦门', '泉州', '福州']],
  48. columnsItem: '厦门' /* 选中的城市 */,
  49. tabList: [
  50. {
  51. name: '湖里街道',
  52. id: 0
  53. },
  54. {
  55. name: '江头街道',
  56. id: 1
  57. },
  58. {
  59. name: '殿前街道',
  60. id: 2
  61. },
  62. {
  63. name: '江头街道',
  64. id: 3
  65. }
  66. ]
  67. };
  68. },
  69. methods: {
  70. // 选择城市
  71. yf_isok(e) {
  72. console.log(e);
  73. this.columnsItem = e.value;
  74. this.show = false;
  75. }
  76. }
  77. };
  78. </script>
  79. <style>
  80. .lb_box {
  81. display: flex;
  82. flex-flow: wrap;
  83. justify-content: space-between;
  84. margin-top: 20rpx;
  85. }
  86. .a1 {
  87. margin-bottom: 20rpx;
  88. }
  89. .a2 {
  90. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_bjx.png');
  91. background-size: 100% 100%;
  92. width: 200rpx; /* 六边形容器的宽度 */
  93. height: 210rpx; /* 六边形容器的高度 */
  94. position: relative;
  95. clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
  96. border: 3px solid #f6cf91;
  97. }
  98. .a3 {
  99. width: 100%; /* 图片宽度设置为容器宽度 */
  100. height: 100%; /* 图片高度设置为容器高度 */
  101. object-fit: cover;
  102. }
  103. .a4 {
  104. text-align: center;
  105. margin-top: 10rpx;
  106. }
  107. .banxin {
  108. margin: 0 32rpx 0 32rpx;
  109. }
  110. .fy_nav_bj {
  111. width: 100%;
  112. height: 220rpx;
  113. color: #ffffff;
  114. margin-bottom: 25rpx;
  115. }
  116. .fy_cs {
  117. display: flex;
  118. align-items: center;
  119. width: 255rpx;
  120. height: 50rpx;
  121. margin-top: 20rpx;
  122. }
  123. </style>