| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <template>
- <view class="width-100 height-100 view-page">
- <view class="p-10 dis-flex flex-y-center flex-x-between">
- <view class="search-left-btn">
- <u-image width="35px" height="35px" mode="aspectFit" src="@/static/images/home/logo.png"></u-image>
- </view>
- <view class="width-100">
- <u-search :clearabled="true" height="35px" placeholder="请输入搜索关键字" v-model="keyword" shape="round"
- search="doSearch" @custom="doSearch" :showAction="false" bg-color="#e9f0f8"
- placeholder-color="#65371b"></u-search>
- </view>
- </view>
- <u-swiper height="185" :list="bannerList" @click="clickInfo" keyName="cover"></u-swiper>
- <view class="p-l-r-30 p-t-30 dis-flex flex-x-around nav-btns">
- <view class="nav-btn">
- <view class="nav-btn-icon icon-circle">
- <u-image width="32px" height="32px" mode="aspectFit" src="@/static/images/home/professional.png"></u-image>
- </view>
- <view class="nav-btn-text">专业风采</view>
- </view>
- <view class="nav-btn">
- <view class="nav-btn-icon icon-circle">
- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/dish.png"></u-image>
- </view>
- <view class="nav-btn-text">名菜</view>
- </view>
- <view class="nav-btn">
- <view class="nav-btn-icon icon-circle">
- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/snacks.png"></u-image>
- </view>
- <view class="nav-btn-text">名点</view>
- </view>
- <view class="nav-btn">
- <view class="nav-btn-icon icon-circle">
- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/restaurant.png"></u-image>
- </view>
- <view class="nav-btn-text">名店</view>
- </view>
- </view>
- <view class="info-list">
- <view class="dis-flex flex-x-between info-item" v-for="item in 10">
- <view class="info-pic"></view>
- <view class="info-view">
- <view class="info-title">
- 标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题
- </view>
- <view class="dis-flex info-bottom">
- <view style="margin-right: 20rpx;">10月07日</view>
- <u-icon name="thumb-up" color="#7f7f7f" size="18"></u-icon>
- <view style="margin-right: 20rpx;">点赞</view>
- <u-icon name="eye" color="#7f7f7f" size="18"></u-icon>
- <view>阅读量</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
- export default {
- mixins: [themeMixins],
- data() {
- return {
- chartOption: {
- },
- keyword: '',
- bannerList: [],
- page: {},
- keyword: '',
- list: []
- }
- },
- onLoad(options) {},
- onShow() {
- this.getBanners()
- },
- methods: {
- getBanners() {
- this.$u.api.getInformationList(0, 6, {}).then(res => {
- this.bannerList = res.data.records || []
- })
- },
- clickInfo(index) {
- if (index < 0) {
- return;
- }
- uni.navigateTo({
- url: "/pages/yuecai/information/detail/index?id=" + this.bannerList[index].id,
- })
- },
- doSearch() {
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .search-left-btn {
- width: 35px;
- min-width: 35px;
- height: 35px;
- margin-right: 5px;
- box-sizing: border-box;
- }
- .icon-circle {
- border-radius: 50%;
- border: 4rpx solid #65371b;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .nav-btns {
- border-bottom: 1rpx solid #65371b;
- margin-bottom: 20rpx;
- padding-bottom: 50rpx;
- .nav-btn {
- width: 150rpx;
- .nav-btn-icon {
- margin: auto;
- width: 110rpx;
- height: 110rpx;
- }
- .nav-btn-text {
- width: 100%;
- color: #65371b;
- margin-top: 5rpx;
- font-weight: bolder;
- text-align: center;
- }
- }
- }
- .info-list {
- .info-item {
- padding: 20rpx;
- .info-pic {
- width: 175rpx;
- height: 175rpx;
- background: bisque;
- }
- .info-view {
- width: calc(100% - 195rpx);
- .info-title {
- color: #65371b;
- font-size: 24rpx;
- font-weight: 300;
- line-height: 47rpx;
- word-spacing: 2rpx;
- overflow: hidden;
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 3;
- line-clamp: 3;
- -webkit-box-orient: vertical;
- }
- .info-bottom {
- color: #7f7f7f;
- font-size: 24rpx;
- margin-top: 10rpx;
- }
- }
- }
- }
- </style>
|