|
|
|
@ -1,10 +1,9 @@ |
|
|
|
<template> |
|
|
|
|
|
|
|
<view class="body"> |
|
|
|
|
|
|
|
<view class="body" > |
|
|
|
|
|
|
|
<!-- 头部导航栏 --> |
|
|
|
<view class="navigation page_padding"> |
|
|
|
<view class="navigation page_padding" > |
|
|
|
<view class="status_bar"></view> |
|
|
|
<view class="navigation_title" :class="isScrollShow?'isScrollShow':'' "> |
|
|
|
<template v-if="!isScrollShow "> |
|
|
|
@ -36,175 +35,172 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 轮播图 --> |
|
|
|
<view class="uni-margin-wrap page_padding"> |
|
|
|
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" > |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-red">A</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-green">B</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-blue">C</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
<view v-for="(item,index) in indexDate.zones" :key="item.zone_id"> |
|
|
|
<!-- 轮播图 --> |
|
|
|
<view class="uni-margin-wrap page_padding" v-if="item.zone_code=='BANNER2' && item.zone_status=='NORMAL'"> |
|
|
|
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" > |
|
|
|
<swiper-item v-for="(item1,index1) in item.blocks" :key="item1.block_id"> |
|
|
|
<view class="swiper-item " v-if="item1.block_status=='NORMAL'"> |
|
|
|
<image :src="item1.block_pic" mode=""></image> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 宫格 --> |
|
|
|
<uni-swiper-dot :info="2" :current="current" field="content" mode="default" class="page_padding"> |
|
|
|
<uni-swiper-dot :info="info" :current="current" field="content" mode="default" class="page_padding"> |
|
|
|
<swiper class="grid_swiper" @change="gridSwiper"> |
|
|
|
<swiper-item> |
|
|
|
<view class="grid_content"> |
|
|
|
<view class="grid_item" v-for="(item, index) in 8" :key="index"> |
|
|
|
<view class="grid_item_img"></view> |
|
|
|
<text>Dresses</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<swiper-item v-for="(item,index) in info" :key="item.zone_id"> |
|
|
|
<view class="grid_content"> |
|
|
|
<view class="grid_item" v-for="(item, index) in 8" :key="index"> |
|
|
|
<view class="grid_item_img"></view> |
|
|
|
<text>Dresses</text> |
|
|
|
<view class="grid_item" v-for="(item1, index1) in item.blocks" :key="item1.zone_id"> |
|
|
|
<template v-if="item1.block_status=='NORMAL'"> |
|
|
|
<view class="grid_item_img"> |
|
|
|
<image :src="item1.block_pic" mode=""></image> |
|
|
|
</view> |
|
|
|
<text>{{item.block_title}}</text> |
|
|
|
</template> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</uni-swiper-dot> |
|
|
|
|
|
|
|
<!-- 打折 --> |
|
|
|
<image src="../../static/img/index_discount.png" mode="" class="discount page_padding"></image> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<navigator url="/pages/index/flashSale"> |
|
|
|
|
|
|
|
<!-- 打折 --> |
|
|
|
<image src="../../static/img/index_discount.png" mode="" class="discount page_padding"></image> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<navigator url="/pages/index/flashSale"> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Flash Sale</text> |
|
|
|
<view class="title_right"> |
|
|
|
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" color="#FFFFFF" background-color="#1B1B1B" /> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</navigator> |
|
|
|
|
|
|
|
|
|
|
|
<!-- SPIKE 1 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index" @click="goPage"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom"> |
|
|
|
<text>US$314.00</text> |
|
|
|
<view class="spike1_item_text">US$12.5</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Flash Sale</text> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" color="#FFFFFF" background-color="#1B1B1B" /> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</navigator> |
|
|
|
|
|
|
|
|
|
|
|
<!-- SPIKE 1 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index" @click="goPage"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom"> |
|
|
|
<text>US$314.00</text> |
|
|
|
<view class="spike1_item_text">US$12.5</view> |
|
|
|
|
|
|
|
<!-- HOT SELLS 1 --> |
|
|
|
|
|
|
|
<view class="hotSells1 page_padding"> |
|
|
|
<view class="hotSells1_item" v-for="(item,index) in 2" :key="index"> |
|
|
|
<view class="hotSells1_item_img"></view> |
|
|
|
<text>DazzlingBlue Black</text> |
|
|
|
</view> |
|
|
|
<view class="hotSells2_item" v-for="(item,index) in 3" :key="index"> |
|
|
|
<view class="hotSells2_item_img"></view> |
|
|
|
<text>DazzlingBlue</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- HOT SELLS 1 --> |
|
|
|
|
|
|
|
<view class="hotSells1 page_padding"> |
|
|
|
<view class="hotSells1_item" v-for="(item,index) in 2" :key="index"> |
|
|
|
<view class="hotSells1_item_img"></view> |
|
|
|
<text>DazzlingBlue Black</text> |
|
|
|
</view> |
|
|
|
<view class="hotSells2_item" v-for="(item,index) in 3" :key="index"> |
|
|
|
<view class="hotSells2_item_img"></view> |
|
|
|
<text>DazzlingBlue</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- HOT SELLS 2 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
|
|
|
|
<!-- HOT SELLS 2 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
<text>Hot Selle</text> |
|
|
|
<view class="title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- HOT SELLS 3 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom"> |
|
|
|
<text>US$314.00</text> |
|
|
|
<view class="spike1_item_text1">Creative styling</view> |
|
|
|
|
|
|
|
<!-- HOT SELLS 3 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom"> |
|
|
|
<text>US$314.00</text> |
|
|
|
<view class="spike1_item_text1">Creative styling</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- GOODSTHREE 2 --> |
|
|
|
<view class="goodsthree2"> |
|
|
|
<view class="goodsthree2_item" v-for="(item,index) in 3" :key="index"></view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- GOODSTHREE 2 --> |
|
|
|
<view class="goodsthree2"> |
|
|
|
<view class="goodsthree2_item" v-for="(item,index) in 3" :key="index"></view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 轮播图 --> |
|
|
|
<view class="uni-margin-wrap"> |
|
|
|
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" > |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-red">A</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-green">B</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-blue">C</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- SPIKE 1 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom1"> |
|
|
|
<view class="spike1_item_text">Adidas Yeezy Boost 350 DazzlingBlue Black</view> |
|
|
|
<text>US$314.00</text> |
|
|
|
|
|
|
|
<!-- 轮播图 --> |
|
|
|
<view class="uni-margin-wrap"> |
|
|
|
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" > |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-red">A</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-green">B</view> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-blue">C</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- SPIKE 1 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item" v-for="(item,index) in 8" :key="index"> |
|
|
|
<view class="spike1_item_img"></view> |
|
|
|
<view class="spike1_item_bottom1"> |
|
|
|
<view class="spike1_item_text">Adidas Yeezy Boost 350 DazzlingBlue Black</view> |
|
|
|
<text>US$314.00</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 瀑布流标题 --> |
|
|
|
<view class="index_title1">PRODUCTS FRO YOU</view> |
|
|
|
|
|
|
|
<view class="waterfall"> |
|
|
|
<custom-waterfalls-flow :value="list"> |
|
|
|
<template v-slot:default="item"> |
|
|
|
<view class="item"> |
|
|
|
<view class="title">{{item.title}}</view> |
|
|
|
<view class="desc">{{item.desc}}</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</custom-waterfalls-flow> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 瀑布流标题 --> |
|
|
|
<view class="index_title1">PRODUCTS FRO YOU</view> |
|
|
|
|
|
|
|
<view class="waterfall"> |
|
|
|
<custom-waterfalls-flow :value="list"> |
|
|
|
<template v-slot:default="item"> |
|
|
|
<view class="item"> |
|
|
|
<view class="title">{{item.title}}</view> |
|
|
|
<view class="desc">{{item.desc}}</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</custom-waterfalls-flow> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {defaultRequest} from '../../api/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -217,13 +213,32 @@ |
|
|
|
list: [ |
|
|
|
{ image: 'https://via.placeholder.com/200x500.png/ff0000', title: 'Adidas Yeezy Boost 350 DazzlingBlue Black', desc: 'US$314.00' }, |
|
|
|
{ image: 'https://via.placeholder.com/200x200.png/2878ff', title: 'Adidas Yeezy Boost 350 DazzlingBlue Black', desc: 'US$314.00' } |
|
|
|
] |
|
|
|
], |
|
|
|
indexDate:{}, |
|
|
|
info:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
this.getIndex() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取首页数据配置 |
|
|
|
getIndex(){ |
|
|
|
let data={_action:'getpagedata',pagecode:'HOME'} |
|
|
|
defaultRequest(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
this.indexDate=res.data |
|
|
|
res.data.zones.map(item=>{ |
|
|
|
if(item.zone_code=='ICON'){ |
|
|
|
item.content='' |
|
|
|
this.info.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.info(this.info) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
goPage(){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/productDetails/index', |
|
|
|
@ -371,6 +386,10 @@ |
|
|
|
line-height: 373.33rpx; |
|
|
|
text-align: center; |
|
|
|
color: white; |
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
.uni-bg-red{ |
|
|
|
background-color: red; |
|
|
|
@ -409,6 +428,11 @@ |
|
|
|
height: 97.33rpx; |
|
|
|
margin-bottom: 6.67rpx; |
|
|
|
background-color: #8F9094; |
|
|
|
|
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.grid_item:nth-child(n+4){ |
|
|
|
|