Commit b063be50 authored by zhengke's avatar zhengke

修改

parent 92756cb5
......@@ -3,14 +3,28 @@
<scroll-view scroll-y="true" class="hotel-pic">
<view class="content">
<view class="left">
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.Path" mode="widthFix"></image>
</view>
<template v-if="isLine==0">
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.Path" mode="widthFix"></image>
</view>
</template>
<template v-else>
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Url)">
<image :src="x.Url" mode="widthFix"></image>
</view>
</template>
</view>
<view class="right">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.Path" mode="widthFix"></image>
</view>
<template v-if="isLine==0">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.Path" mode="widthFix"></image>
</view>
</template>
<template v-else>
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Url)">
<image :src="x.Url" mode="widthFix"></image>
</view>
</template>
</view>
</view>
</scroll-view>
......@@ -24,19 +38,29 @@
imageList:[],
jiList:[],
ouList:[],
allImageSrc:[]
allImageSrc:[],
isLine:0
}
},
onLoad(options) {
if(options.imgObj){
if(options.imgObj&&options.isLine==1){
this.imageList=JSON.parse(decodeURIComponent(options.imgObj))
this.isLine=1;
this.getSeperate();
uni.setNavigationBarTitle({
title: "线路图片",
});
}else{
this.imageList=JSON.parse(options.imgObj);
this.isLine=0;
this.getSeperate();
}
uni.setNavigationBarTitle({
title: "酒店图片",
});
}
},
created() {
uni.setNavigationBarTitle({
title: "酒店图片",
});
},
mounted () {
......@@ -44,7 +68,11 @@
methods: {
getSeperate(){
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.Path)
if(this.isLine==1){
this.allImageSrc.push(x.Url)
}else{
this.allImageSrc.push(x.Path)
}
if(i%2==0){
this.jiList.push(x)
}else{
......
......@@ -453,9 +453,9 @@
this.yeCount=e.value;
},
openPicture() {
let imgObj = JSON.stringify(this.dataList.HotelImg);
let imgObj = this.dataList.imgCover;
uni.navigateTo({
url: "/pages/hotel/picture?imgObj=" + imgObj
url: "/pages/hotel/picture?imgObj=" + encodeURIComponent(imgObj) + '&isLine=1'
})
},
goback() {
......
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