Commit 0993b66d authored by zhoucong's avatar zhoucong

vlog我的相片集优化

parent 8f468247
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
} else { //数据为空 } else { //数据为空
this.show = false this.show = false
} }
}else{
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
} }
}) })
}, },
......
...@@ -41,7 +41,6 @@ export default { ...@@ -41,7 +41,6 @@ export default {
openid: uni.getStorageSync("openid"), openid: uni.getStorageSync("openid"),
productType:1 productType:1
}).then(res => { }).then(res => {
console.log(res.data);
if (res.code === "00") { if (res.code === "00") {
this.list=res.data this.list=res.data
}else{ }else{
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
</view> </view>
</view> </view>
<view class="" style="display: flex;"> <view class="" style="display: flex;">
<u-section title="模板选择" :right="false" color="#303133"></u-section><text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Template Selection</text> <u-section title="模板选择" :right="false" color="#303133"></u-section><text
style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Template Selection</text>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image> <image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image>
<view style="display: flex;justify-content: space-around;margin-top: 20rpx;"> <view style="display: flex;justify-content: space-around;margin-top: 20rpx;">
...@@ -22,7 +23,8 @@ ...@@ -22,7 +23,8 @@
<view class="cover"> <view class="cover">
<view class="coverItem" v-for="(item,index) in imgList2" :key="index"> <view class="coverItem" v-for="(item,index) in imgList2" :key="index">
<image class="img" :src="item.url" mode="" @click="changeCover(item.url)"></image> <image class="img" :src="item.url" mode="" @click="changeCover(item.url)"></image>
<u-icon v-if="cover===item.url" class="icon" name="checkmark-circle-fill" color="#2979FF" size="50"></u-icon> <u-icon v-if="cover===item.url" class="icon" name="checkmark-circle-fill" color="#2979FF" size="50">
</u-icon>
</view> </view>
</view> </view>
</view> </view>
...@@ -30,15 +32,18 @@ ...@@ -30,15 +32,18 @@
<view class="cover"> <view class="cover">
<view class="coverItem" v-for="(item,index) in imgList3" :key="index"> <view class="coverItem" v-for="(item,index) in imgList3" :key="index">
<image class="img" :src="item.url" mode="" @click="changeinsidePages(item.url)"></image> <image class="img" :src="item.url" mode="" @click="changeinsidePages(item.url)"></image>
<u-icon v-if="insidePages===item.url" class="icon" name="checkmark-circle-fill" color="#2979FF" size="50"></u-icon> <u-icon v-if="insidePages===item.url" class="icon" name="checkmark-circle-fill" color="#2979FF"
size="50"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;margin-top: 30rpx;"> <view style="display: flex;margin-top: 30rpx;">
<u-section title="详细参数" :right="false" color="#303133"></u-section><text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Parameters</text> <u-section title="详细参数" :right="false" color="#303133"></u-section><text
style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Parameters</text>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image> <image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image>
<image :src="item.url" mode="widthFix" v-for="(item,index) in imgList1" :key="index" style="width: 100%;border-radius: 10rpx;"></image> <image :src="item.url" mode="widthFix" v-for="(item,index) in imgList1" :key="index"
style="width: 100%;border-radius: 10rpx;"></image>
<view class="bottom" @click="beginMaking"> <view class="bottom" @click="beginMaking">
上传照片制作 上传照片制作
</view> </view>
...@@ -48,10 +53,10 @@ ...@@ -48,10 +53,10 @@
export default { export default {
data() { data() {
return { return {
productVo:{},//产品详情 productVo: {}, //产品详情
imgList1:[],//详情列表 imgList1: [], //详情列表
imgList2:[],//封面列表 imgList2: [], //封面列表
imgList3:[],//内页列表 imgList3: [], //内页列表
current: 0, //封面内页切换 current: 0, //封面内页切换
cover: "", //封面 cover: "", //封面
insidePages: "", //内页 insidePages: "", //内页
...@@ -73,15 +78,15 @@ ...@@ -73,15 +78,15 @@
openid: uni.getStorageSync("openid") openid: uni.getStorageSync("openid")
}).then(res => { }).then(res => {
if (res.code === "00") { if (res.code === "00") {
this.productVo=res.data.productVo this.productVo = res.data.productVo
res.data.productVo.imgList.forEach(item=>{ res.data.productVo.imgList.forEach(item => {
if(item.location===5){ if (item.location === 5) {
this.imgList1.push(item) this.imgList1.push(item)
} }
if(item.location===6){ if (item.location === 6) {
this.imgList2.push(item) this.imgList2.push(item)
} }
if(item.location===8){ if (item.location === 8) {
this.imgList3.push(item) this.imgList3.push(item)
} }
}) })
...@@ -101,18 +106,18 @@ ...@@ -101,18 +106,18 @@
this.insidePages = url this.insidePages = url
}, },
beginMaking() { beginMaking() {
if (this.cover === "") { // if (this.cover === "") {
return uni.showModal({ // return uni.showModal({
title: '提示', // title: '提示',
content: '请选择封面', // content: '请选择封面',
}); // });
} // }
if (this.insidePages === "") { // if (this.insidePages === "") {
return uni.showModal({ // return uni.showModal({
title: '提示', // title: '提示',
content: '请选择内页', // content: '请选择内页',
}); // });
} // }
this.$u.route({ this.$u.route({
url: 'pages/vlog/uploadPictures/uploadPictures', url: 'pages/vlog/uploadPictures/uploadPictures',
params: { params: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<view style="padding-top: 30rpx;"> <view style="padding-top: 30rpx;">
<block> <block>
<view class="item"> <view class="item" v-if="scenic.name">
<video class="video" :poster="scenic.coverImgUrl" :src="scenic.showVideoUrl" play-btn-position="center" @error="error" controls></video> <video class="video" :poster="scenic.coverImgUrl" :src="scenic.showVideoUrl" play-btn-position="center" @error="error" controls></video>
<view class="title"> <view class="title">
<text>[ {{scenic.name || ""}} ]</text> <text>[ {{scenic.name || ""}} ]</text>
......
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