Commit 0d1ac6e0 authored by qipeng's avatar qipeng

我的相册

parent f8e85439
......@@ -23,10 +23,13 @@
<view class="acquire-box acquire-boxBlue" @click="jumpToScanFaceClick">
<view class="box-title">获取相片</view>
<view class="box-text">获取拍摄相片</view>
<image class="box-img" src="./../static/album/icon02.png"></image>
</view>
<view class="acquire-box acquire-boxGreen">
<view class="box-title">相片DIY</view>
<view class="box-text">编辑手机相片</view>
<button class="acquire-input" @click="chooseImg"></button>
<image class="box-img" src="./../static/album/icon03.png"></image>
</view>
</view>
......@@ -86,37 +89,37 @@ export default {
list: [{
title: '精彩瞬间',
count: '10W+',
image: './static/album/wonderfulMoment.png',
image: './../static/album/wonderfulMoment.png',
color: '#037EFF'
},
{
title: '网红旅拍',
count: '8W+',
image: './static/album/travalphoto.png',
image: './../static/album/travalphoto.png',
color: '#826847'
},
{
title: '抱枕DIY',
count: '4W+',
image: './static/album/pillow.png',
image: './../static/album/pillow.png',
color: '#1175B4'
},
{
title: '明信片',
count: '4W+',
image: './static/album/postcard.png',
image: './../static/album/postcard.png',
color: '#3478DC'
},
{
title: '旅游台历定制',
count: '4W+',
image: './static/album/deskCalender.png',
image: './../static/album/deskCalender.png',
color: '#1A9B45'
},
{
title: '定制相册',
count: '4W+',
image: './static/album/customPic.png',
image: './../static/album/customPic.png',
color: '#D48D46'
}
],
......@@ -128,6 +131,16 @@ export default {
}
},
methods: {
chooseImg(){
uni.chooseImage({
count: 6, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
console.log(JSON.stringify(res.tempFilePaths))
}
})
},
returnClick() {
uni.navigateBack({
delta: 1
......@@ -471,6 +484,27 @@ export default {
color: #A5D3FF;
line-height: 28rpx;
text-align: center;
position: relative;
z-index: 8;
}
.acquire-input{
width: 334rpx;
height: 240rpx;
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 19;
}
.box-img{
width: 168rpx;
height: 144rpx;
margin: auto;
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
}
}
.acquire-boxBlue{
......
This diff is collapsed.
This diff is collapsed.
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