Commit d1428287 authored by renjie's avatar renjie

首页图片太多

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