Commit b063be50 authored by zhengke's avatar zhengke

修改

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