123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <view class="fui-wrap">
- <view class="search-content">
- <u-search placeholder="请输入关键字" v-model="keyword"></u-search>
- </view>
- <u-swiper :list="list" mode="none" :height="200" />
- <u-notice-bar :text="msg" :more-icon="false" color="#5af" bg-color="#d6e8f7"></u-notice-bar>
- <view style="width: 100%; margin-top: 20rpx">
- <u-grid
- :border="false"
- :col="3"
- @click="click"
- >
- <u-grid-item
- v-for="(baseListItem,baseListIndex) in baseList"
- :key="baseListIndex"
- >
- <view class="grid-item-icon" :style="{backgroundColor: baseListItem.bgColor}">
- <image :src="baseListItem.icon"></image>
- </view>
- <text class="grid-text">{{ baseListItem.title }}</text>
- </u-grid-item>
- </u-grid>
- </view>
- <u-gap height="10" bgColor="#bbb"></u-gap>
- <view class="u-page">
- <view class="u-page-title">
- <view class="line"></view>
- <view class="rectangle"></view>
- <view class="rectangle"></view>
- <view class="title-content">最新资讯</view>
- <view class="rectangle"></view>
- <view class="rectangle"></view>
- <view class="line"></view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- debugger
- return {
- keyword: process.env.UNI_FILE_PREFIX ,
- list: [
- '/static/images/swiper/title.png',
- ],
- msg: '加快建设交通强国大会将于2024年8月在南京召开',
- baseList: [
- {
- name: 'photo',
- icon: '/static/images/icons/meeting_info.svg',
- bgColor: '#6abff9',
- title: '大会介绍',
- },
- {
- name: 'lock',
- icon: '/static/images/icons/meeting_apply.svg',
- bgColor: '#f1b06c',
- title: '会议报名',
- },
- {
- name: 'star',
- icon: '/static/images/icons/meeting_point.svg',
- title: '会议指南',
- bgColor: '#ee794d',
- },
- {
- name: 'star',
- icon: '/static/images/icons/meeting_doc.svg',
- title: '交流材料汇编',
- bgColor: '#e66b66',
- },
- {
- name: 'star',
- icon: '/static/images/icons/meeting_traffic.svg',
- title: '交通指引',
- bgColor: '#82cf92',
- },
- {
- name: 'star',
- icon: '/static/images/icons/meeting_contact.svg',
- title: '联系我们',
- bgColor: '#4a75f6',
- },
- ],
- indexList: [],
- urls: [
- 'https://cdn.uviewui.com/uview/album/1.jpg',
- 'https://cdn.uviewui.com/uview/album/2.jpg',
- 'https://cdn.uviewui.com/uview/album/3.jpg',
- 'https://cdn.uviewui.com/uview/album/4.jpg',
- 'https://cdn.uviewui.com/uview/album/5.jpg',
- 'https://cdn.uviewui.com/uview/album/6.jpg',
- 'https://cdn.uviewui.com/uview/album/7.jpg',
- 'https://cdn.uviewui.com/uview/album/8.jpg',
- 'https://cdn.uviewui.com/uview/album/9.jpg',
- 'https://cdn.uviewui.com/uview/album/10.jpg',
- ]
- };
- },
- onLoad() {
- this.loadmore();
- },
- methods: {
- click() {
- },
- scrolltolower() {
- this.loadmore();
- },
- loadmore() {
- for (let i = 0; i < 30; i++) {
- this.indexList.push({
- url: this.urls[uni.$u.random(0, this.urls.length - 1)],
- });
- }
- },
- },
- onShareAppMessage() {
- return {
- title: 'First UI组件库',
- };
- },
- };
- </script>
- <style lang="scss" src="./index.scss">
- </style>
|