|
|
@ -6,7 +6,7 @@ |
|
|
|
<view class="bg-color"></view> |
|
|
|
|
|
|
|
<view class="page-title"> |
|
|
|
三只青蛙 |
|
|
|
{{ configList.index_title }} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="search"> |
|
|
@ -14,7 +14,10 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="swipe"> |
|
|
|
<uv-swiper :list="bannerList" indicator height="320rpx" keyName="url"></uv-swiper> |
|
|
|
<uv-swiper |
|
|
|
:list="bannerList" |
|
|
|
indicator height="320rpx" |
|
|
|
keyName="image"></uv-swiper> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="notice"> |
|
|
@ -26,13 +29,13 @@ |
|
|
|
<uv-grid-item v-for="(item,index) in baseList" :key="index" @click="$utils.navigateTo(item.path)"> |
|
|
|
<image :src="item.image" mode=""></image> |
|
|
|
<text class="menu-text">{{item.title}}</text> |
|
|
|
|
|
|
|
</uv-grid-item> |
|
|
|
</uv-grid> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="map"> |
|
|
|
<image src="../../static/image/home/8.png" mode="aspectFill" /> |
|
|
|
{{ configList.index_center_image }} |
|
|
|
<image :src="configList.index_center_image" mode="aspectFill" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="commodity" |
|
|
@ -45,15 +48,17 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="centre"> |
|
|
|
<view class="boxs"> |
|
|
|
<view class="boxs" |
|
|
|
:key="index" |
|
|
|
v-for="(item, index) in riceProductList"> |
|
|
|
<view class="box-text"> |
|
|
|
<view>三只青蛙低GI大米</view> |
|
|
|
<view>5斤每盒*3盒</view> |
|
|
|
<text class="text1">225</text> |
|
|
|
<text class="text2">原价375</text> |
|
|
|
<view>{{ item.title }}</view> |
|
|
|
<view>{{ item.sku }}</view> |
|
|
|
<text class="text1">{{ item.price }}</text> |
|
|
|
<text class="text2">原价{{ item.oldPrice }}</text> |
|
|
|
</view> |
|
|
|
<view class="box-img"> |
|
|
|
<image src="../../static/logo.png" mode="aspectFill"></image> |
|
|
|
<image :src="item.image" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -65,20 +70,22 @@ |
|
|
|
<view class="box"> |
|
|
|
<view class="top"> |
|
|
|
<view class="top-text"> |
|
|
|
<view>Experience the product</view> |
|
|
|
<view>Conventional product</view> |
|
|
|
<view>常规产品 ___ _</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="centre"> |
|
|
|
<view class="boxs"> |
|
|
|
<view class="boxs" |
|
|
|
:key="index" |
|
|
|
v-for="(item, index) in commonProductList"> |
|
|
|
<view class="box-text"> |
|
|
|
<view>三只青蛙低GI大米</view> |
|
|
|
<view>5斤每盒*3盒</view> |
|
|
|
<text class="text1">225</text> |
|
|
|
<text class="text2">原价375</text> |
|
|
|
<view>{{ item.title }}</view> |
|
|
|
<view>{{ item.sku }}</view> |
|
|
|
<text class="text1">{{ item.price }}</text> |
|
|
|
<text class="text2">原价{{ item.oldPrice }}</text> |
|
|
|
</view> |
|
|
|
<view class="box-img"> |
|
|
|
<image src="../../static/logo.png" mode="aspectFill"></image> |
|
|
|
<image :src="item.image" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -89,7 +96,7 @@ |
|
|
|
<view class="box"> |
|
|
|
<view class="top"> |
|
|
|
<view class="top-text"> |
|
|
|
<view>Experience the product</view> |
|
|
|
<view>News trends</view> |
|
|
|
<view>新闻动态 ___ _</view> |
|
|
|
</view> |
|
|
|
<view class="top1" @click="$utils.navigateTo('/pages_order/home/journalism')"> |
|
|
@ -97,13 +104,16 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="centre"> |
|
|
|
<view class="boxs"> |
|
|
|
<view class="boxs" |
|
|
|
:key="index" |
|
|
|
v-for="(item, index) in newList" |
|
|
|
> |
|
|
|
<view class="images"> |
|
|
|
<image src="../../static/image/home/9.png" mode="aspectFill"></image> |
|
|
|
<image :src="item.image" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
<view class="box-fone"> |
|
|
|
<view>新闻标题</view> |
|
|
|
<view>说明文字说明文字说明文字说明文字说明文字</view> |
|
|
|
<view>{{ item.title }}</view> |
|
|
|
<view>{{ item.title }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -113,7 +123,7 @@ |
|
|
|
<view class="qr"> |
|
|
|
<view class="scan">扫码关注公众号</view> |
|
|
|
<view class="qr-scan"> |
|
|
|
<image src="../../static/image/home/10.png" mode="aspectFill"></image> |
|
|
|
<image :src="configList.down_image" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
<view class="qr-bottom"> |
|
|
|
<view>保存公众号二维码图片</view> |
|
|
@ -143,16 +153,7 @@ |
|
|
|
return { |
|
|
|
area: '长沙', |
|
|
|
notice: '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....', |
|
|
|
bannerList: [{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', |
|
|
|
}, |
|
|
|
{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png', |
|
|
|
}, |
|
|
|
{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', |
|
|
|
}, |
|
|
|
], |
|
|
|
bannerList: [], |
|
|
|
baseList: [{ |
|
|
|
image: '/static/image/home/0.png', |
|
|
|
title: '关于我们', |
|
|
@ -181,7 +182,7 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
image: '/static/image/home/6.png', |
|
|
|
title: '校企合作', |
|
|
|
title: '企业合作', |
|
|
|
}, |
|
|
|
{ |
|
|
|
image: '/static/image/home/7.png', |
|
|
@ -190,15 +191,84 @@ |
|
|
|
], |
|
|
|
productList: [], |
|
|
|
keyword: '', |
|
|
|
commonProductList : [],//常规产品 |
|
|
|
riceProductList : [],//体验产品 |
|
|
|
newList : [],//新闻列表 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
methods: {} |
|
|
|
onShow() { |
|
|
|
this.getBanner() |
|
|
|
this.getRiceNoticeList() |
|
|
|
this.getRiceCommonProductList() |
|
|
|
this.getRiceProductList() |
|
|
|
this.getRiceNewsList() |
|
|
|
this.getRiceIconList() |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
this.getBanner() |
|
|
|
this.getRiceNoticeList() |
|
|
|
this.getRiceCommonProductList() |
|
|
|
this.getRiceProductList() |
|
|
|
this.getRiceNewsList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取轮播图 |
|
|
|
getBanner(){ |
|
|
|
this.$api('getRiceBanner', res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.bannerList = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取公告 |
|
|
|
getRiceNoticeList(){ |
|
|
|
this.$api('getRiceNoticeList', res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.notice = res.result.content |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取常规产品 |
|
|
|
getRiceCommonProductList(){ |
|
|
|
this.$api('getRiceCommonProductList', res => { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
if(res.code == 200){ |
|
|
|
this.commonProductList = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取首页体验产品 |
|
|
|
getRiceProductList(){ |
|
|
|
this.$api('getRiceProductList', res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.riceProductList = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取首页新闻列表 |
|
|
|
getRiceNewsList(){ |
|
|
|
this.$api('getRiceNewsList', res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.newList = res.result.records |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取首页跳转图标 |
|
|
|
getRiceIconList(){ |
|
|
|
this.$api('getRiceIconList', res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.newList = res.result.records |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
.page { |
|
|
|
position: relative; |
|
|
|
.bg-color { |
|
|
|
width: 100%; |
|
|
|
position: absolute; |
|
|
@ -334,6 +404,7 @@ |
|
|
|
.centre { |
|
|
|
margin: 40rpx 20rpx; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
|
|
|
@ -341,6 +412,8 @@ |
|
|
|
display: flex; |
|
|
|
width: 100%; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
|
|
.images { |
|
|
|
width: 180rpx; |
|
|
@ -353,12 +426,11 @@ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.box-fone { |
|
|
|
margin-left: 20rpx; |
|
|
|
|
|
|
|
flex: 1; |
|
|
|
view:nth-child(1) { |
|
|
|
font-size: 36rpx; |
|
|
|
color: #474747; |
|
|
@ -375,6 +447,14 @@ |
|
|
|
.box-img { |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
|
|
|
|
.box-img{ |
|
|
|
height: 220rpx; |
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-text { |
|
|
|
view:nth-child(1) { |
|
|
|