index.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <!-- 村史页面 -->
  3. <view class="body" v-else>
  4. <u-navbar :placeholder="true" bgColor="rgba(195, 232, 249)" :leftIconSize="0" titleStyle="font-weight:bold;color:#7a5831">
  5. <view class="u-nav-slot" slot="left" style="display: flex; align-items: center">
  6. <view class="an" style="width: 400rpx; margin-left: 50rpx; margin-top: -40rpx; line-height: 40rpx">
  7. <u-notice-bar text="系统消息提示"></u-notice-bar>
  8. </view>
  9. </view>
  10. </u-navbar>
  11. <view class="block_2">
  12. <view class="box_16">
  13. <u-swiper
  14. :list="cs_swiperList"
  15. imgMode="aspectFill"
  16. :height="210"
  17. showTitle
  18. :indicator="true"
  19. :autoplay="true"
  20. :circular="true"
  21. @click="bannerClick"
  22. indicatorMode="dot"
  23. indicatorActiveColor="#fff"
  24. indicatorInactiveColor="rgba(255, 7, 23, 0.3)"
  25. ></u-swiper>
  26. </view>
  27. <view
  28. class="section_5"
  29. style="
  30. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_bj.png');
  31. background-size: 100% 100%;
  32. "
  33. >
  34. <view class="group_3">
  35. <view class="list_7">
  36. <view class="image-text_20-0" @click="cs_caiDan(index)" v-for="(item, index) in menuList" :key="item">
  37. <image style="width: 100%" :src="item.img"></image>
  38. <text lines="1" class="text-group_2-0">{{ item.name }}</text>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="text-wrapper_13">
  43. <text lines="1" class="text_7">新鲜事</text>
  44. <text lines="1" class="text_8">查看更多》</text>
  45. </view>
  46. <view class="banxin2">
  47. <view class="cs_box_22" v-for="item in xinXianList" :key="item">
  48. <view class="cs_block_5">
  49. <image style="width: 100%; height: 100%; border-radius: 0 50rpx 0 20rpx" :src="item.img"></image>
  50. <view class="tag_1">
  51. <text lines="1" class="text_9">{{ item.title }}</text>
  52. </view>
  53. <view class="tag_3">
  54. <!-- <text lines="1" class="text_10">红色文化活动</text> -->
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. let that;
  65. export default {
  66. components: {},
  67. onLoad(option) {
  68. that = this;
  69. this.getBannerList();
  70. },
  71. data() {
  72. return {
  73. bannerlist: ['https://feicheng.16fw.cn:1443/uploads/20230423/55f2ea70baa2e7ce617f939b70026472.jpg'],
  74. cs_swiperList: [
  75. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_sy_lbt1.png',
  76. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_sy_lbt2.png',
  77. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_sy_lbt3.png',
  78. 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cs_sy_lbt4.png'
  79. ],
  80. menuList: [
  81. {
  82. name: '红色文化',
  83. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp1.png',
  84. path: '/index_fenbao/hongsewenhua/hongsewenhua'
  85. },
  86. {
  87. name: '乡愁乡音',
  88. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp2.png'
  89. },
  90. {
  91. name: '民俗文化',
  92. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp3.png'
  93. },
  94. {
  95. name: '认主归宗',
  96. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp4.png'
  97. },
  98. {
  99. name: '乡村振兴',
  100. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp5.png'
  101. },
  102. {
  103. name: '智慧助老',
  104. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp6.png'
  105. },
  106. {
  107. name: '全民运动',
  108. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp7.png'
  109. },
  110. {
  111. name: '村有圈',
  112. img: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/cd_tp8.png',
  113. path: '/index_fenbao/faBuWenZhang/faBuWenZhang'
  114. }
  115. ],
  116. xinXianList: [
  117. {
  118. img: 'https://p5.itc.cn/q_70/images03/20211006/36f4a86801494fec87b552ba660c44bd.jpeg',
  119. title: '每日趣事'
  120. },
  121. {
  122. img: 'https://pic.rmb.bdstatic.com/bjh/news/bf871bc8d10a1430e7be489e88dea5cc.jpeg',
  123. title: '全民健身'
  124. }
  125. ]
  126. };
  127. },
  128. /* 页面触底 */
  129. onReachBottom() {
  130. console.log('触底了');
  131. },
  132. methods: {
  133. // 菜单
  134. cs_caiDan(index) {
  135. uni.navigateTo({
  136. url: this.menuList[index].path
  137. });
  138. },
  139. getBannerList() {
  140. this.$api.getBannerList({ block: 'home' }, function (res) {
  141. // console.log(res);
  142. if (res.code > 0) {
  143. that.bannerlist = [];
  144. for (var i = 0; i < res.data.length; i++) {
  145. if (res.data[i].type == 'banner') {
  146. that.bannerlist.push({
  147. title: res.data[i].title,
  148. url: that.$config.baseUrl + res.data[i].image,
  149. page: res.data[i].url
  150. });
  151. }
  152. }
  153. }
  154. });
  155. },
  156. bannerClick(index) {
  157. console.log(index);
  158. this.$common.navigateTo(this.bannerlist[index].page);
  159. }
  160. }
  161. };
  162. </script>
  163. <style>
  164. /deep/.u-swiper-indicator__wrapper__dot--active {
  165. width: 5px !important;
  166. }
  167. .box {
  168. height: auto;
  169. width: 100%;
  170. background-attachment: fixed;
  171. border-radius: 16px 16px 0 0;
  172. position: relative;
  173. top: -20px;
  174. padding-top: 10rpx;
  175. }
  176. /deep/.u-icon__icon.data-v-2ee87dc9 {
  177. top: -7rpx !important;
  178. left: 0 !important;
  179. }
  180. .u-swiper__wrapper__item__wrapper__title {
  181. height: 80rpx !important;
  182. font-size: 48rpx !important;
  183. }
  184. .u-swiper__indicator {
  185. z-index: 2 !important;
  186. }
  187. .u-notice-bar {
  188. height: 60rpx;
  189. background-color: #ffffff;
  190. border-radius: 50rpx;
  191. }
  192. .u-notice__content {
  193. height: 40rpx;
  194. line-height: 24rpx;
  195. }
  196. .banxin {
  197. width: 100%;
  198. height: 100rpx;
  199. margin: auto;
  200. background-color: yellowgreen;
  201. }
  202. .banxin2 {
  203. width: 90%;
  204. margin: auto;
  205. }
  206. .u-icon__icon {
  207. top: -10rpx !important;
  208. left: 0 !important;
  209. margin-left: 10rpx;
  210. }
  211. .u-nav-slot {
  212. margin-top: 30rpx;
  213. }
  214. .cs_box_22 {
  215. height: 345rpx;
  216. display: flex;
  217. flex-direction: column;
  218. width: 686rpx;
  219. margin-bottom: 50rpx;
  220. }
  221. .cs_block_5 {
  222. position: relative;
  223. height: 345rpx;
  224. width: 686rpx;
  225. display: flex;
  226. flex-direction: column;
  227. }
  228. .tag_1 {
  229. position: absolute;
  230. background-color: rgba(77, 113, 153, 1);
  231. border-radius: 9rpx 9rpx 32rpx 0rpx;
  232. height: 48rpx;
  233. display: flex;
  234. flex-direction: column;
  235. width: 145rpx;
  236. }
  237. .text_9 {
  238. width: 47rpx;
  239. height: 23rpx;
  240. overflow-wrap: break-word;
  241. color: rgba(255, 255, 255, 1);
  242. font-size: 24rpx;
  243. font-family: SourceHanSansCN-Bold;
  244. font-weight: 700;
  245. text-align: left;
  246. white-space: nowrap;
  247. line-height: 24rpx;
  248. margin: 12rpx 0 0 19rpx;
  249. }
  250. .tag_2 {
  251. position: absolute;
  252. bottom: 36rpx;
  253. right: 20rpx;
  254. }
  255. .text_10 {
  256. width: 147rpx;
  257. height: 29rpx;
  258. overflow-wrap: break-word;
  259. color: rgba(255, 255, 255, 1);
  260. font-size: 30rpx;
  261. font-family: Adobe Heiti Std R;
  262. font-weight: normal;
  263. text-align: left;
  264. white-space: nowrap;
  265. line-height: 30rpx;
  266. }
  267. .block_2 {
  268. width: 750rpx;
  269. background-size: 100% 100%;
  270. display: flex;
  271. flex-direction: column;
  272. justify-content: flex-end;
  273. }
  274. .box_16 {
  275. width: 750rpx;
  276. height: 420rpx;
  277. display: flex;
  278. flex-direction: column;
  279. }
  280. .section_5 {
  281. width: 750rpx;
  282. display: flex;
  283. flex-direction: column;
  284. justify-content: flex-end;
  285. }
  286. .group_3 {
  287. background-color: rgba(255, 255, 255, 0.9);
  288. border-radius: 32rpx;
  289. position: relative;
  290. width: 687rpx;
  291. display: flex;
  292. flex-direction: column;
  293. margin: 40rpx 0 0 31rpx;
  294. }
  295. .list_7 {
  296. display: flex;
  297. flex-flow: wrap;
  298. display: flex;
  299. margin: 30rpx 0 0 31rpx;
  300. }
  301. .image-text_20-0 {
  302. width: 130rpx;
  303. height: 150rpx;
  304. display: flex;
  305. flex-direction: column;
  306. justify-content: space-between;
  307. margin: 1rpx 34rpx 20rpx 0;
  308. }
  309. .text-group_2-0 {
  310. width: 94rpx;
  311. height: 23rpx;
  312. overflow-wrap: break-word;
  313. color: black;
  314. font-size: 24rpx;
  315. font-family: Adobe Heiti Std R;
  316. font-weight: normal;
  317. text-align: center;
  318. white-space: nowrap;
  319. line-height: 24rpx;
  320. margin: 7rpx 0 0 17rpx;
  321. }
  322. .text-wrapper_13 {
  323. width: 669rpx;
  324. height: 34rpx;
  325. flex-direction: row;
  326. display: flex;
  327. justify-content: space-between;
  328. margin: 36rpx 0 32rpx 49rpx;
  329. }
  330. .text_7 {
  331. width: 105rpx;
  332. height: 34rpx;
  333. overflow-wrap: break-word;
  334. color: rgba(49, 37, 32, 1);
  335. font-size: 36rpx;
  336. font-family: Adobe Heiti Std R;
  337. font-weight: normal;
  338. text-align: left;
  339. white-space: nowrap;
  340. line-height: 36rpx;
  341. }
  342. .text_8 {
  343. width: 108rpx;
  344. height: 23rpx;
  345. overflow-wrap: break-word;
  346. color: rgba(102, 102, 102, 1);
  347. font-size: 24rpx;
  348. font-family: Adobe Heiti Std R;
  349. font-weight: normal;
  350. text-align: left;
  351. white-space: nowrap;
  352. line-height: 24rpx;
  353. margin-top: 7rpx;
  354. }
  355. .tag_3 {
  356. position: absolute;
  357. right: 80rpx;
  358. bottom: 10rpx;
  359. height: 48rpx;
  360. display: flex;
  361. flex-direction: column;
  362. }
  363. </style>