123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <mobile-frame :frameStyle="frameStyle" @toPath="toPath">
- <view class="main">
- <view class="zero one">
- <input type="text" placeholder="搜索商品">
- </view>
- <view class="zero two">
- <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
- <swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
- <image class="image" :src="item.url" mode=""></image>
- </swiper-item>
- </swiper>
- </view>
- <view class="zero thr">
- <view class="list" v-for="(item,index) in btnList" :key="index">
- <image class="image" :src="item.url" mode=""></image>
- <view class="textOver name">
- {{item.name}}
- </view>
- </view>
- </view>
- <view class="zero four">
- <view class="recomList" v-for="(item,index) in recomList" :key="index">
- <view class="title">
- <text>{{item.title}}</text>
- <text>{{item.titles}}</text>
- </view>
- <view class="market">
- <view class="list" v-for="(tag,indexs) in item.list" :key="indexs">
- <image class="image" :src="tag.url" mode=""></image>
- <view class="name">
- {{item.name}}1
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="zero five">
- 数据列表
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- frameStyle: {
- useBar: true
- },
- bannerList: [ // 轮播图
- {
- url: require('@/static/logo.png')
- },
- {
- url: require('@/static/logo.png')
- },
- {
- url: require('@/static/logo.png')
- },
- {
- url: require('@/static/logo.png')
- },
- ],
- btnList: [ //功能按钮
- {
- name: '商品分类',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '首农专区',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '地方特产',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '进口食品',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '扶贫专区',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '自提门店',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '点到优选',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '活动专区',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '兑换中心',
- url: require('@/static/logo.png'),
- route: ''
- },
- {
- name: '员工中心',
- url: require('@/static/logo.png'),
- route: ''
- },
- ],
- recomList: [ //推荐好物
- {
- title: '新品上架',
- titles: '',
- list: [ //产品
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- ]
- },
- {
- title: '发现好货',
- titles: '热销爆款',
- list: [ //产品
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- ]
- },
- {
- title: '首农精选',
- titles: '居家常备',
- list: [ //产品
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- ]
- },
- {
- title: '人气单品',
- titles: '夏季畅销',
- list: [ //产品
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- {
- url: require('@/static/logo.png'),
- name: '产品名称'
- },
- ]
- }
- ]
- };
- },
- onShow: function() {},
- methods: {
- toPath(e) {
- if (e && e.route) uni.redirectTo({
- url: `/${e.route}`
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- padding: 2vw;
- .zero {
- margin: 0 0 2vw 0;
- }
- .one {
- background-color: var(--fFB1Color);
- border-radius: 20px;
- padding: 0 2vw;
- input {
- font-size: var(--font15Size);
- color: var(--f85Color);
- border-radius: 14px;
- width: 100%;
- padding: 1.5vw 0;
- }
- }
- .two {
- swiper {
- height: 50vw;
- border-radius: 5px;
- }
- .list {
- border-radius: 5px;
- .image {
- width: 100%;
- height: 100%;
- border-radius: 5px;
- }
- }
- }
- .thr {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- flex-wrap: wrap;
- .list {
- width: 17vw;
- text-align: center;
- margin: 0 0 2vw 0;
- .image {
- width: 100%;
- height: 16vw;
- margin: 0 0 1vw 0;
- }
- .name {
- font-size: var(--font13Size);
- }
- }
- }
- .four{
- .recomList{
- .title{
-
- }
- .market{
- .list{
-
- }
- }
- }
- }
- }
- </style>
|