Commit d1428287 authored by renjie's avatar renjie

首页图片太多

parent 966c08f6
...@@ -6,19 +6,19 @@ ...@@ -6,19 +6,19 @@
<view class="body"> <view class="body">
<view class="scroll-view" > <view class="scroll-view" >
<view class="item" @click="jumpToScanFaceClick"> <view class="item" @click="jumpToScanFaceClick">
<image class="img" src="../../static/img/coupon/coupon.jpg"></image> <image class="img" src="../../static/img/album/myAlbum.png"></image>
<text class="title">我的相片</text> <text class="title">我的相片</text>
</view> </view>
<view class="item"> <view class="item">
<image class="img" src="../../static/img/coupon/coupon.jpg"></image> <image class="img" src="../../static/img/album/DIY.png"></image>
<text class="title">影像DIY</text> <text class="title">影像DIY</text>
</view> </view>
<view class="item" @click="jumpToCustomClick"> <view class="item" @click="jumpToCustomClick">
<image class="img" src="../../static/img/coupon/coupon.jpg"></image> <image class="img" src="../../static/img/album/custom.png"></image>
<text class="title">旅拍定制</text> <text class="title">旅拍定制</text>
</view> </view>
<view class="item"> <view class="item">
<image class="img" src="../../static/img/coupon/coupon.jpg"></image> <image class="img" src="../../static/img/album/myVlog.png"></image>
<text class="title">我的Vlog</text> <text class="title">我的Vlog</text>
</view> </view>
</view> </view>
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<u-waterfall v-model="list" ref="uWaterfall"> <u-waterfall v-model="list" ref="uWaterfall">
<template v-slot:left="{leftList}"> <template v-slot:left="{leftList}">
<view class="left demo-water" v-for="(item, index) in leftList" :key="index" @click="jumpToClick(item.title)"> <view class="left demo-water" v-for="(item, index) in leftList" :key="index" @click="jumpToClick(item.title)">
<u-lazy-load threshold="-450" border-radius="10" :image="item.image" :index="index"></u-lazy-load> <image :src="item.image" mode="aspectFill"></image>
<!-- <u-lazy-load threshold="-450" border-radius="10" :image="item.image" :index="index"></u-lazy-load> -->
<view class="info-box" :style="{'background-color': item.color}"> <view class="info-box" :style="{'background-color': item.color}">
<view class="item-title">{{item.title}}</view> <view class="item-title">{{item.title}}</view>
<view class="slogan">一句宣传语</view> <view class="slogan">一句宣传语</view>
...@@ -44,10 +45,11 @@ ...@@ -44,10 +45,11 @@
</template> </template>
<template v-slot:right="{rightList}"> <template v-slot:right="{rightList}">
<view class="demo-water" v-for="(item, index) in rightList" :key="index" @click="jumpToClick(item.title)"> <view class="demo-water" v-for="(item, index) in rightList" :key="index" @click="jumpToClick(item.title)">
<u-lazy-load threshold="-450" border-radius="10" :image="item.image" :index="index"></u-lazy-load> <image :src="item.image" mode="aspectFill"></image>
<!-- <u-lazy-load threshold="-450" border-radius="10" :image="item.image" :index="index"></u-lazy-load> -->
<view class="info-box" :style="{'background-color': item.color}"> <view class="info-box" :style="{'background-color': item.color}">
<view class="item-title">{{item.title}}</view> <view class="item-title">{{item.title}}</view>
<view class="slogan">一句宣传语</view> <view class="slogan">快来定制吧</view>
<view class="bottom"> <view class="bottom">
<view class="img-btn"> <view class="img-btn">
点击定制 点击定制
...@@ -94,51 +96,39 @@ export default { ...@@ -94,51 +96,39 @@ export default {
{ {
title: '精彩瞬间', title: '精彩瞬间',
count: '10W+', count: '10W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg', image: '../../static/img/album/wonderfulMoment.png',
color: '#037EFF' color: '#037EFF'
}, },
{ {
title: '网红旅拍', title: '网红旅拍',
count: '8W+', count: '8W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg', image: '../../static/img/album/travalphoto.png',
color: '#826847' color: '#826847'
}, },
{ {
title: '抱枕DIY', title: '抱枕DIY',
count: '4W+', count: '4W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg', image: '../../static/img/album/pillow.png',
color: '#1175B4' color: '#1175B4'
}, },
{ {
title: '影像公仔', title: '明信片',
count: '10W+', count: '4W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg', image: '../../static/img/album/postcard.png',
color: '#3478DC' color: '#3478DC'
}, },
{ {
title: '8D魔方', title: '旅游台历定制',
count: '10W+', count: '4W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg', image: '../../static/img/album/deskCalender.png',
color: '#1A9B45' color: '#1A9B45'
}, },
{
title: 'T桖DIY',
count: '10W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg',
color: '#D48D46'
},
{
title: '旅行台历',
count: '10W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg',
color: '#037EFF'
},
{ {
title: '定制相册', title: '定制相册',
count: '10W+', count: '4W+',
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg', image: '../../static/img/album/customPic.png',
color: '#037EFF' color: '#D48D46'
}, }
] ]
} }
}, },
...@@ -220,9 +210,12 @@ export default { ...@@ -220,9 +210,12 @@ export default {
} }
.scroll-view { .scroll-view {
display: flex; display: flex;
width: calc(100% + 24rpx); width: calc(100% + 48rpx);
position: relative;
top: 0;
left: -24rpx;
overflow-x: auto; overflow-x: auto;
padding-top: 46rpx; padding: 46rpx 0 0 24rpx;
margin-bottom: 48rpx; margin-bottom: 48rpx;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
...@@ -237,19 +230,11 @@ export default { ...@@ -237,19 +230,11 @@ export default {
width: 200rpx; width: 200rpx;
height: 136rpx; height: 136rpx;
border-radius: 16rpx; border-radius: 16rpx;
padding: 10rpx 12rpx 8rpx 12rpx; // padding: 10rpx 12rpx 8rpx 12rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
background: #F2ECDF;
box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.12); box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.12);
overflow: hidden; overflow: hidden;
} }
.item:nth-child(2) .img {
background: #fff;
}
.item:nth-child(3) .img,
.item:nth-child(4) .img{
background: #d9d9d9;
}
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 700; font-weight: 700;
...@@ -272,6 +257,10 @@ export default { ...@@ -272,6 +257,10 @@ export default {
} }
} }
.demo-water { .demo-water {
image {
border-radius: 16rpx 16rpx 0 0;
width: 100%;
}
/deep/.u-wrap, /deep/.u-wrap,
/deep/.u-lazy-item { /deep/.u-lazy-item {
broder-radius: 16rpx 16rpx 0 0 !important; broder-radius: 16rpx 16rpx 0 0 !important;
......
...@@ -154,13 +154,22 @@ export default { ...@@ -154,13 +154,22 @@ export default {
this.$request('wechatUser/aliFace/faceSearch',data).then(res => {//创建任务 this.$request('wechatUser/aliFace/faceSearch',data).then(res => {//创建任务
uni.hideLoading() uni.hideLoading()
if (res.code === '00') { if (res.code === '00') {
if(res.data.length) {
uni.setScreenBrightness({ uni.setScreenBrightness({
value: this.defaultBrightness, //屏幕亮度值,范围 0~1,0 最暗,1 最亮 value: this.defaultBrightness, //屏幕亮度值,范围 0~1,0 最暗,1 最亮
}) })
uni.navigateTo({ uni.navigateTo({
url: './myPhotoAlbum/myPhotoAlbum' url: './myPhotoAlbum/myPhotoAlbum'
}) })
}else {
this.handleNotFound()
}
}else{ }else{
this.handleNotFound()
}
})
},
handleNotFound() {//---处理没有找到照片或返回错误的逻辑
this.maskShow = true this.maskShow = true
var loop = setInterval(() => { var loop = setInterval(() => {
this.maskCount -= 1 this.maskCount -= 1
...@@ -176,8 +185,6 @@ export default { ...@@ -176,8 +185,6 @@ export default {
}) })
} }
},1000) },1000)
}
})
}, },
takePhoto() { //扫脸 takePhoto() { //扫脸
this.src = '' this.src = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment