Commit 65847ca0 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents 64bac0a3 6c3b510f
...@@ -34,10 +34,11 @@ ...@@ -34,10 +34,11 @@
:src="item.picUrl" :src="item.picUrl"
/> />
<div class="good-info"> <div class="good-info">
<div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div> <div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 1</div>
<view class="good-sub-name">{{item.subname}}</view>
<div class="good-price-info"> <div class="good-price-info">
<span class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} <span class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
<span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> <!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</span> </span>
<span class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <span class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" /> <u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" />
...@@ -92,7 +93,30 @@ export default { ...@@ -92,7 +93,30 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
</view> </view>
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 2</view>
<view class="good-sub-name">这里的小文字介绍一点特色...</view> <view class="good-sub-name">{{item.subname}}</view>
<view class="good-price-info"> <view class="good-price-info">
<view class="price"> <view class="price">
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} {{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
...@@ -92,7 +92,30 @@ export default { ...@@ -92,7 +92,30 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</div> </div>
<div class="good-info"> <div class="good-info">
<div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div> <div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 3</div>
<div class="good-price-info"> <div class="good-price-info">
<view class="price" :style="{ color: mainColor }"> <view class="price" :style="{ color: mainColor }">
<span>{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}</span> <span>{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}</span>
...@@ -92,7 +92,30 @@ export default { ...@@ -92,7 +92,30 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view> <view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view>
<view class="img-box"><image style="width: 100%; height: 100%;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /></view> <view class="img-box"><image style="width: 100%; height: 100%;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /></view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 4</view>
<view class="good-price-info"> <view class="good-price-info">
<view class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}</view> <view class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
...@@ -73,7 +73,30 @@ export default { ...@@ -73,7 +73,30 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
</view> </view>
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 5</view>
<view class="good-sub-name">这里的小文字介绍一点特色一类...</view> <view class="good-sub-name">{{item.subname}}</view>
<view class="good-price-info"> <view class="good-price-info">
<view class="price" :style="{ color: mainColor }"> <view class="price" :style="{ color: mainColor }">
<view class="good-sub-name" style="flex:1;">1天·共3个观光点</view> <view class="good-sub-name" style="flex:1;">{{item.thirdname}}</view>
<span style="color: #111;"> <span style="color: #111;">
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} {{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
</span> </span>
...@@ -83,7 +83,30 @@ export default { ...@@ -83,7 +83,30 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
<template> <template>
<view <view style="padding: 12px; padding-bottom: 0;width:100%;" :style="{
style="padding: 12px; padding-bottom: 0;width:100%;"
:style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '' 'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}" }">
> <view class="good-four" v-for="(item, gli) in goodList" :key="gli" @click="openGood(item)" :style="{
<view
class="good-four"
v-for="(item, gli) in goodList"
:key="gli"
@click="openGood(item)"
:style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '', border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '' background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}" }">
> <view class="tips" v-if="goodsInfo.showGoodsTag">
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view> <image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" />
<view class="img-box"><image style="width: 100%; height: 100%;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /></view> </view>
<view class="img-box">
<image style="width: 100%; height: 100%;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" />
</view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 6</view>
<view class="good-sub-name">{{item.subname}}</view>
<view class="good-price-info"> <view class="good-price-info">
<view class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} <view class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
<span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> <!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</view> </view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" /> <u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" />
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" /> <u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" />
<u-button <u-button type="primary" size="mini" :ripple="true" :color="goodsInfo.buttonColor" :custom-style="
type="primary"
size="mini"
:ripple="true"
:color="goodsInfo.buttonColor"
:custom-style="
`backgroundColor:${goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}` `backgroundColor:${goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}`
" "
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4" :plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4" :shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'" v-else>
v-else
>
{{ goodsInfo.buyBtnText }} {{ goodsInfo.buyBtnText }}
</u-button> </u-button>
</view> </view>
...@@ -52,117 +41,160 @@ ...@@ -52,117 +41,160 @@
</template> </template>
<script> <script>
import goodSku from '../goods/goodsku'; import goodSku from '../goods/goodsku';
import auth from '@/components/auth/index.vue'; import auth from '@/components/auth/index.vue';
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showSku: false,
sku: {},
showAuth: false,
u: {}
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
}, },
showSkuHandler(g) { props: ['goodList', 'goodsInfo'],
this.sku = g; data() {
this.u = uni.getStorageSync('mall_UserInfo'); return {
if (!this.u) { mainColor: '',
this.u = { activeKey: 0,
nickName: '未登录', showSku: false,
avatarUrl: '' sku: {},
}; showAuth: false,
this.showAuth = true; u: {}
} else { };
this.showSku = true;
}
}, },
reloadUserinfo() { created() {
this.u = uni.getStorageSync('mall_UserInfo'); this.mainColor = this.$uiConfig.mainColor;
// this.showAuth = false;
}, },
//关闭登录窗口 methods: {
gbAuth() { openGood(item) {
this.showAuth = false; //线路
if (item.goodType == 4) {
uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
}
},
showSkuHandler(g) {
this.sku = g;
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
this.showSku = true;
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
} }
} };
};
</script> </script>
<style> <style>
.good-four { .good-four {
position: relative; position: relative;
margin-bottom: 14px; margin-bottom: 14px;
display: flex; display: flex;
height: 102px; height: 102px;
border: 1rpx solid transparent; border: 1rpx solid transparent;
border-radius: 10rpx; border-radius: 10rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 1px 1px 0; padding: 0 1px 1px 0;
overflow: hidden; overflow: hidden;
} }
.good-four .tips {
width: 64rpx; .good-four .tips {
height: 64rpx; width: 64rpx;
position: absolute; height: 64rpx;
top: 0; position: absolute;
left: 0; top: 0;
z-index: 4; left: 0;
} z-index: 4;
.good-four .img-box { }
width: 100px;
height: 100px; .good-four .img-box {
} width: 100px;
.good-four .good-info { height: 100px;
padding: 12px; }
flex: 1;
width: 1rpx; .good-four .good-info {
border: 10rpx; padding: 12px;
padding-bottom: 0; flex: 1;
display: flex; width: 1rpx;
flex-direction: column; border: 10rpx;
/* width:20%; */ padding-bottom: 0;
} display: flex;
.good-four .good-info .good-name { flex-direction: column;
font-size: 13px; /* width:20%; */
height: 34px; }
overflow: hidden;
text-overflow: ellipsis; .good-four .good-info .good-name {
display: -webkit-box; font-size: 13px;
-webkit-line-clamp: 2; height: 34px;
-webkit-box-orient: vertical; overflow: hidden;
} text-overflow: ellipsis;
.good-four .good-info .good-price-info { display: -webkit-box;
display: flex; -webkit-line-clamp: 2;
justify-items: center; -webkit-box-orient: vertical;
align-items: flex-end; }
height: 22px;
flex: 1; .good-four .good-info .good-price-info {
padding-bottom: 10rpx; display: flex;
} justify-items: center;
.good-four .good-info .good-price-info .price { align-items: flex-end;
color: #ff4544; height: 22px;
flex: 1; flex: 1;
font-size: 14px; padding-bottom: 10rpx;
white-space: nowrap; }
text-overflow: ellipsis;
overflow: hidden; .good-four .good-info .good-price-info .price {
} color: #ff4544;
.good-four .good-info .good-price-info .buy { flex: 1;
width: 24px; font-size: 14px;
text-align: right; white-space: nowrap;
} text-overflow: ellipsis;
overflow: hidden;
}
.good-four .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
..good-four .good-info .good-sub-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space: nowrap;
margin-bottom: 10rpx;
font-size: 22rpx;
color: #999999;
/* height: 37px; */
}
</style> </style>
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /> <image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" />
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} 7</view>
<view class="sencond-title">这里的小文字介绍一点特色一类...</view> <view class="sencond-title">{{item.subname}}</view>
<view class="good-price-info"> <view class="good-price-info">
<view> <view>
<u-rate <u-rate
...@@ -96,10 +96,29 @@ export default { ...@@ -96,10 +96,29 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
if(this.IsEducation==1){ //线路
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id }); if (item.goodType == 4) {
}else{ uni.navigateTo({
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id }); url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid
});
}
//酒店
else if (item.goodType == 1) {
uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id
});
}
//餐食
else if (item.goodType == 2) {
uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id
});
}
//景点
else if (item.goodType == 3) {
uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id
});
} }
}, },
showSkuHandler(g) { showSkuHandler(g) {
......
<template> <template>
<view class="hotel-list-item"> <view>
<view class="img-box"> <view class="hotel-list-item" v-for="(item,index) in HotelList" :key="index" @click="goHotelDetail(item.HotelId)">
<image src="http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png" mode="aspectFill"></image> <view class="img-box">
</view> <image :src="item.CoverImg" mode="aspectFill"></image>
<view class="hotel-info"> </view>
<view class="hotel-name">乐山禅驿·嘉定院子酒店</view> <view class="hotel-info">
<view class="hotel-start"> <view class="hotel-name">{{item.HotelName}}</view>
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 --> <view class="hotel-start">
<view class="rate" v-if="hotelType==0"> <!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<u-rate active-color="#FEB969" inactive-color="#FFF" current="4" active-icon="star" inactive-icon="star" disabled></u-rate> <view class="rate" v-if="item.Star>=1&&item.Star<=5">
<text style="margin-left: 20rpx;vertical-align: top;">四星</text> <u-rate active-color="#FEB969" inactive-color="#FFF" :current="item.Star" active-icon="star" inactive-icon="star" disabled></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
</view>
<view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text>
<span class="line"></span>
</view>
<view class="other-rate" v-if="item.Star==8">
<text>精选民宿</text>
<span class="line"></span>
</view>
</view> </view>
<view class="other-rate" v-if="hotelType==1"> <view class="localtion">{{item.Address}}</view>
<text>温泉酒店</text> <view>
<span class="line"></span> <u-tag v-for="(subItem,subIndex) in item.TagList" :key="subIndex" style="margin-right:10rpx;" :text="subItem" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E"
size="mini"></u-tag>
</view> </view>
<view class="other-rate" v-if="hotelType==2"> <view class="price">
<text>精选民宿</text> <text></text>
<span class="line"></span> <text class="money">{{item.B2BPrice}}</text>
<text></text>
</view> </view>
</view> </view>
<view class="localtion">距该酒店直线4.1公里·近九寨千古情景区·沟口</view>
<view>
<u-tag text="亲子设施" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
</view>
<view class="price">
<text></text>
<text class="money">599</text>
<text></text>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props:{ props: {
hotelType:{ HotelList: {
type:Number, type: Array,
default:0 default: null
},
dayObj:{
type: Object,
default: null
} }
}, },
data() { data() {
...@@ -46,32 +53,47 @@ ...@@ -46,32 +53,47 @@
key: value key: value
} }
}, },
created() {
console.log(this.HotelList, 'hotel');
},
methods:{
goHotelDetail(id){
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({
url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj
});
}
}
} }
</script> </script>
<style> <style>
.hotel-list-item{ .hotel-list-item {
margin: 30rpx 30rpx 0 30rpx; margin: 30rpx 30rpx 0 30rpx;
padding-bottom: 30rpx; padding-bottom: 30rpx;
border-bottom: 1rpx solid #E2E2E2; border-bottom: 1rpx solid #E2E2E2;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.hotel-list-item .img-box{
.hotel-list-item .img-box {
width: 220rpx; width: 220rpx;
height: 280rpx; height: 280rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-right: 30rpx; margin-right: 30rpx;
} }
.hotel-list-item .img-box image{
.hotel-list-item .img-box image {
width: 100%; width: 100%;
} }
.hotel-list-item .hotel-info{
.hotel-list-item .hotel-info {
width: 1px; width: 1px;
flex: 1; flex: 1;
} }
.hotel-list-item .hotel-info .hotel-name{
.hotel-list-item .hotel-info .hotel-name {
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
line-height: 30rpx; line-height: 30rpx;
...@@ -80,27 +102,33 @@ ...@@ -80,27 +102,33 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.hotel-list-item .hotel-info .hotel-start{
margin:10rpx 0; .hotel-list-item .hotel-info .hotel-start {
margin: 20rpx 0;
} }
.hotel-list-item .hotel-info .hotel-start .rate{
.hotel-list-item .hotel-info .hotel-start .rate {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: #999999; color: #999999;
line-height: 30rpx; line-height: 30rpx;
} }
.hotel-list-item .hotel-info .hotel-start .other-rate{
.hotel-list-item .hotel-info .hotel-start .other-rate {
display: inline-block; display: inline-block;
position: relative; position: relative;
} }
.hotel-list-item .hotel-info .hotel-start .other-rate text{
position: relative;z-index: 2; .hotel-list-item .hotel-info .hotel-start .other-rate text {
position: relative;
z-index: 2;
font-size: 30rpx; font-size: 30rpx;
line-height: 30rpx; line-height: 30rpx;
font-weight: 500; font-weight: 500;
color: #111; color: #111;
} }
.hotel-list-item .hotel-info .hotel-start .other-rate .line{
.hotel-list-item .hotel-info .hotel-start .other-rate .line {
background-color: #DFBE6E; background-color: #DFBE6E;
height: 6px; height: 6px;
bottom: 2px; bottom: 2px;
...@@ -109,12 +137,13 @@ ...@@ -109,12 +137,13 @@
position: absolute; position: absolute;
z-index: 1; z-index: 1;
} }
.hotel-list-item .hotel-info .localtion{
.hotel-list-item .hotel-info .localtion {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 30rpx; line-height: 30rpx;
text-overflow: -o-ellipsis-lastline; text-overflow: -o-ellipsis-lastline;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -123,14 +152,16 @@ ...@@ -123,14 +152,16 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.hotel-list-item .hotel-info .price{
.hotel-list-item .hotel-info .price {
margin-top: 10rpx; margin-top: 10rpx;
font-weight: 500; font-weight: 500;
color: #FF3166; color: #FF3166;
font-size: 20rpx; font-size: 20rpx;
text-align: right; text-align: right;
} }
.hotel-list-item .hotel-info .price .money{
.hotel-list-item .hotel-info .price .money {
font-size: 36rpx; font-size: 36rpx;
} }
</style> </style>
...@@ -309,6 +309,12 @@ export default { ...@@ -309,6 +309,12 @@ export default {
that.minBlockLeft = minBlockLeft; that.minBlockLeft = minBlockLeft;
that.maxBlockLeft = maxBlockLeft; that.maxBlockLeft = maxBlockLeft;
}, },
_getMaxLength()
{
var that = this;
var MAX_LENGTH = that.width - that.blockSize;
return MAX_LENGTH;
},
/** /**
* 刷新整个视图 * 刷新整个视图
*/ */
......
<template> <template>
<view class="room-good"> <view>
<view class="rm-left"> <view class="room-good" v-for="(item,index) in RoomList">
<image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill"> <view class="rm-left">
</image> <image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill">
<view class="mark">12</view> </image>
</view> <view class="mark">12</view>
<view class="rm-right">
<view class="room-name">藏韵高级双床房</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;">含早餐</text>
<text>1.5m大床 2人入住 24㎡ 有窗</text>
</view> </view>
<viwe class="give f11"> <view class="rm-right">
免费专辑接机 + 送沟口 + 1张情景演出票 <view class="room-name">{{item.RoomName}}</view>
</viwe> <view class="f11">
<view class="f11 king" style="margin-top:15rpx;">入住当天18:00前可免费取消</view> <text class="king" style="margin-right: 14rpx;">{{item.BreakfastTypeStr}}</text>
<view class="price"> <text>{{item.BedTypeStr}} {{item.ServiceNumber}}人入住 {{item.RoomSize}}{{item.HasWindowStr}}</text>
<text class="f11" style="margin-right: 10rpx;"></text> </view>
<text>889</text> <viwe class="give f11" v-if="item.Description">
{{item.Description}}
</viwe>
<view class="f11 king" style="margin-top:15rpx;">{{item.IsCancelStr}}</view>
<view class="price">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>{{item.B2BPrice}}</text>
</view>
</view> </view>
</view> <view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<view class="rm-opera"> <!-- 如果库存少于5显示 -->
<!-- 如果库存少于5显示 --> <view class="warm-count">{{item.Inventory}}</view>
<view class="warm-count">剩2间</view> <view class="buy" @click="previewOrder">
<view class="buy" @click="previewOrder"> <view class="buy-content"></view>
<view class="buy-content"></view> <view class="buy-tips">在线订</view>
<view class="buy-tips">在线订</view> </view>
</view>
<view class="rm-opera" v-if="item.Inventory==0">
<view class="buy disabled">
<view class="buy-content"></view>
<view class="buy-tips">已抢完</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -33,10 +41,16 @@ ...@@ -33,10 +41,16 @@
<script> <script>
export default { export default {
props: {
RoomList: {
type: Array,
default: null
}
},
methods: { methods: {
previewOrder(){ previewOrder() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/hotel/order" url: "/pages/hotel/order"
}) })
}, },
}, },
...@@ -63,7 +77,8 @@ ...@@ -63,7 +77,8 @@
width: 1px; width: 1px;
flex: 1; flex: 1;
} }
.room-good .rm-opera{
.room-good .rm-opera {
margin-left: 10rpx; margin-left: 10rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -71,14 +86,16 @@ ...@@ -71,14 +86,16 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
} }
.room-good .rm-opera .warm-count{
.room-good .rm-opera .warm-count {
text-align: center; text-align: center;
font-size: 18rpx; font-size: 18rpx;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.room-good .rm-opera .buy{
.room-good .rm-opera .buy {
width: 70rpx; width: 70rpx;
height: 81rpx; height: 81rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -87,26 +104,31 @@ ...@@ -87,26 +104,31 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.room-good .rm-opera .buy.disabled{
.room-good .rm-opera .buy.disabled {
background: #EBEBEB; background: #EBEBEB;
border: 2rpx solid #DCDCDC; border: 2rpx solid #DCDCDC;
} }
.room-good .rm-opera .buy.disabled .buy-tips{
.room-good .rm-opera .buy.disabled .buy-tips {
background: #A09E9E; background: #A09E9E;
color: #fff; color: #fff;
} }
.room-good .rm-opera .buy.disabled .buy-content{
.room-good .rm-opera .buy.disabled .buy-content {
color: #A09E9E; color: #A09E9E;
} }
.room-good .rm-opera .buy .buy-tips{
.room-good .rm-opera .buy .buy-tips {
height: 27rpx; height: 27rpx;
background: #000000; background: #000000;
text-align: center; text-align: center;
color:#DFBE6E; color: #DFBE6E;
font-size: 18rpx; font-size: 18rpx;
line-height: 27rpx; line-height: 27rpx;
} }
.room-good .rm-opera .buy .buy-content{
.room-good .rm-opera .buy .buy-content {
height: 1px; height: 1px;
flex: 1; flex: 1;
text-align: center; text-align: center;
...@@ -117,6 +139,7 @@ ...@@ -117,6 +139,7 @@
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
} }
.room-good .rm-right .room-name { .room-good .rm-right .room-name {
font-size: 30rpx; font-size: 30rpx;
font-weight: 800; font-weight: 800;
...@@ -139,13 +162,13 @@ ...@@ -139,13 +162,13 @@
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-top:15rpx; margin-top: 15rpx;
} }
.room-good .rm-right .price{ .room-good .rm-right .price {
font-weight: 800; font-weight: 800;
font-size: 40rpx; font-size: 40rpx;
color:#111; color: #111;
} }
.room-good .rm-left { .room-good .rm-left {
......
This diff is collapsed.
This diff is collapsed.
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<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.picUrl)"> <view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,126 +21,37 @@ ...@@ -21,126 +21,37 @@
export default { export default {
data() { data() {
return { return {
imageList:[ imageList:[],
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
}
],
jiList:[], jiList:[],
ouList:[], ouList:[],
allImageSrc:[] allImageSrc:[]
} }
}, },
onLoad(options) {
if(options.imgObj){
this.imageList=JSON.parse(options.imgObj);
this.getSeperate();
}
},
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店图片", title: "酒店图片",
}); });
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.picUrl)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
console.log(this.jiList,this.ouList)
}, },
mounted () { mounted () {
}, },
methods: { methods: {
getSeperate(){
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.Path)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
},
previewImage(src) { previewImage(src) {
uni.previewImage({ uni.previewImage({
urls: this.allImageSrc, urls: this.allImageSrc,
......
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