Commit 42997b7c authored by 罗超's avatar 罗超

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

parents 54334d3c 65847ca0
...@@ -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) {
......
...@@ -64,8 +64,9 @@ export default { ...@@ -64,8 +64,9 @@ export default {
handler(nVal) { handler(nVal) {
// 视图更新后再执行移动操作 // 视图更新后再执行移动操作
this.$nextTick(() => { this.$nextTick(() => {
console.log("更新下标",nVal)
this.currentIndex = nVal; this.currentIndex = nVal;
this.change(nVal)
}); });
} }
}, },
......
...@@ -394,75 +394,6 @@ ...@@ -394,75 +394,6 @@
"path": "index" "path": "index"
}] }]
}, },
//教育列表
{
"root": "pages/school",
"pages": [{
"path": "courseList"
},{
"path": "courseInfo"
},{
"path":"courseContent"
// "style": {
// "navigationStyle": "custom"
// }
},{
"path":"teacherDetails",
"style": {
"navigationStyle": "custom"
}
},{
"path":"articleList"
},{
"path":"articleDetails"
},{
"path":"commentPageList"
},{
"path":"course-submit"
},{
"path":"components/schoolDraw"
},{
"path":"personal/followTeacher"
},{
"path":"personal/studycard"
},{
"path":"personal/cardList"//学习卡中心
},{
"path":"mystudy/mystudy",
"style": {
"navigationStyle": "custom"
}
},{
"path":"mystudy/studyrecord",
"style": {
"navigationStyle": "custom"
}
},{
"path":"mystudy/orderStudy"
},{
"path":"personal/mycollection"
},{
"path":"personal/orderList"
},{
"path":"personal/orderDetail"
},{
"path":"personal/order-commit"//课程待评价
},{
"path":"personal/order-commit-details"//发表评论
},{
"path": "personal/payment-order"//课程代付
},{
"path":"investigation"
},{
"path":"Jiaheactivity"//甲鹤活动
},{
"path":"JIaheactivitydetails"//活动详情
},{
"path":"jieheactivityBM"//甲鹤活动报名
},{
"path":"personal/JhphoneRz"//电话认证
}]
},
//线下服务 //线下服务
{ {
"root": "pages/reserve", "root": "pages/reserve",
...@@ -731,6 +662,23 @@ ...@@ -731,6 +662,23 @@
},{ },{
"path" : "firstShop/list" "path" : "firstShop/list"
}] }, }] },
//餐厅
{
"root": "pages/restaurant",
"pages":[{
"path":"list"
},{
"path":"detail",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
},{
"path":"picture"
},{
"path":"order"
}]
},
//酒店 //酒店
{ {
"root": "pages/hotel", "root": "pages/hotel",
......
<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,
......
<template>
<view class="near-good">
<image src="https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg" mode="aspectFill"></image>
<view class="good-name">上海宋城</view>
</view>
</template>
<script>
</script>
<style>
.near-good{
margin-right: 20rpx;
flex-shrink: 0;
}
.near-good image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
margin-bottom: 29rpx;
}
.near-good .good-name{
font-weight: bold;
color: #1F1F1F;
font-size: 28rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
</style>
<template>
<view class="package-good">
<view class="rm-left">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png" mode="aspectFill">
</image>
</view>
<view class="rm-right">
<view class="package-name">海鲜团队用餐</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;">6人起订</text>
<text>仅周五、周六可用,节假日可用</text>
</view>
<viwe class="give f11">
提前1天预约
</viwe>
<view class="price" style="margin-top:30rpx;">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text>
</view>
</view>
<view class="rm-opera">
<view class="buy" @click="previewOrder">
<view class="buy-content"></view>
<view class="buy-tips">在线订</view>
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
previewOrder(){
uni.navigateTo({
url:"/pages/restaurant/order"
})
},
},
}
</script>
<style>
.package-good {
margin-bottom: 30rpx;
display: flex;
align-items: center;
}
.package-good .king {
color: #DFBE6E !important;
}
.package-good .f11 {
font-size: 22rpx;
font-weight: 500;
}
.package-good .rm-right {
width: 1px;
flex: 1;
}
.package-good .rm-opera{
margin-left: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.package-good .rm-opera .warm-count{
text-align: center;
font-size: 18rpx;
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
}
.package-good .rm-opera .buy{
width: 70rpx;
height: 81rpx;
background: #FFFFFF;
border: 2rpx solid #111111;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.package-good .rm-opera .buy.disabled{
background: #EBEBEB;
border: 2rpx solid #DCDCDC;
}
.package-good .rm-opera .buy.disabled .buy-tips{
background: #A09E9E;
color: #fff;
}
.package-good .rm-opera .buy.disabled .buy-content{
color: #A09E9E;
}
.package-good .rm-opera .buy .buy-tips{
height: 27rpx;
background: #000000;
text-align: center;
color:#DFBE6E;
font-size: 18rpx;
line-height: 27rpx;
}
.package-good .rm-opera .buy .buy-content{
height: 1px;
flex: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 800;
color: #111111;
}
.package-good .rm-right .package-name {
font-size: 30rpx;
font-weight: 800;
color: #111111;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.package-good .rm-right .give {
background: #ECF1F4;
border-radius: 4rpx;
padding: 10rpx;
margin-top:15rpx;
display: inline-block;
}
.package-good .rm-right .price{
font-weight: 800;
font-size: 40rpx;
color:#111;
}
.package-good .rm-left {
width: 174rpx;
height: 257rpx;
border-radius: 20rpx;
margin-right: 30rpx;
position: relative;
overflow: hidden;
}
.package-good .rm-left image {
width: 100%;
height: 100%;
}
.package-good .rm-left .mark {
padding: 14rpx;
background: rgba(0, 0, 0, .4);
color: #FFF;
border-radius: 20rpx 0px 20rpx 0px;
font-size: 24rpx;
font-weight: 500;
position: absolute;
right: 0;
bottom: 0;
}
</style>
<template>
<view class="package-good">
<view class="rm-left">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459631000_626.jpg" mode="aspectFill">
</image>
</view>
<view class="rm-right">
<view class="package-name">海鲜团队用餐</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;">6人起订</text>
<text>仅周五、周六可用,节假日可用</text>
</view>
<viwe class="give f11">
提前1天预约
</viwe>
<view class="price" style="margin-top:30rpx;">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text>
</view>
</view>
<view class="rm-opera">
<view class="buy disabled" @click="previewOrder">
<view class="buy-content"></view>
<view class="buy-tips">已售罄</view>
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
previewOrder(){
uni.navigateTo({
url:"/pages/hotel/order"
})
},
},
}
</script>
<style>
.package-good {
margin-bottom: 30rpx;
display: flex;
align-items: center;
}
.package-good .king {
color: #DFBE6E !important;
}
.package-good .f11 {
font-size: 22rpx;
font-weight: 500;
}
.package-good .rm-right {
width: 1px;
flex: 1;
}
.package-good .rm-opera{
margin-left: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.package-good .rm-opera .warm-count{
text-align: center;
font-size: 18rpx;
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
}
.package-good .rm-opera .buy{
width: 70rpx;
height: 81rpx;
background: #FFFFFF;
border: 2rpx solid #111111;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.package-good .rm-opera .buy.disabled{
background: #EBEBEB;
border: 2rpx solid #DCDCDC;
}
.package-good .rm-opera .buy.disabled .buy-tips{
background: #A09E9E;
color: #fff;
}
.package-good .rm-opera .buy.disabled .buy-content{
color: #A09E9E;
}
.package-good .rm-opera .buy .buy-tips{
height: 27rpx;
background: #000000;
text-align: center;
color:#DFBE6E;
font-size: 18rpx;
line-height: 27rpx;
}
.package-good .rm-opera .buy .buy-content{
height: 1px;
flex: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 800;
color: #111111;
}
.package-good .rm-right .package-name {
font-size: 30rpx;
font-weight: 800;
color: #111111;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.package-good .rm-right .give {
background: #ECF1F4;
border-radius: 4rpx;
padding: 10rpx;
margin-top:15rpx;
display: inline-block;
}
.package-good .rm-right .price{
font-weight: 800;
font-size: 40rpx;
color:#111;
}
.package-good .rm-left {
width: 174rpx;
height: 257rpx;
border-radius: 20rpx;
margin-right: 30rpx;
position: relative;
overflow: hidden;
}
.package-good .rm-left image {
width: 100%;
height: 100%;
}
.package-good .rm-left .mark {
padding: 14rpx;
background: rgba(0, 0, 0, .4);
color: #FFF;
border-radius: 20rpx 0px 20rpx 0px;
font-size: 24rpx;
font-weight: 500;
position: absolute;
right: 0;
bottom: 0;
}
</style>
<template>
<view class="range-slider" :style="'width:' + width + 'rpx;height:' + height + 'rpx'">
<view class="range-bar" :style="'width:100%;height:' + barHeight + 'rpx'">
<view class="range-bar-bg" :style="'background-color:' + backgroundColor + ''"></view>
<view class="range-bar-progress" :style="'margin-left:' + progressBarLeft + 'rpx;width:' + progressBarWidth + 'rpx;background-color:' + activeColor + ''"></view>
</view>
<view
class="block"
:class="{ active: isMinActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + minBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
:data-left="minBlockLeft"
data-tag="minBlock"
>
<slot name="minBlock"></slot>
</view>
<view
class="block"
:class="{ active: isMaxActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + maxBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
:data-left="maxBlockLeft"
data-tag="maxBlock"
>
<slot name="maxBlock"></slot>
</view>
</view>
</template>
<script>
/**
* range-slider v1.0.6
*/
const _windowWidth = uni.getSystemInfoSync().windowWidth;
export default {
data() {
return {
isMinActive: false,
isMaxActive: false,
//#ifdef H5
MAX_LENGTH: 294,
maxBlockLeft: 300,
//#endif
// #ifndef H5
MAX_LENGTH: 700,
maxBlockLeft: 350,
// #endif
minBlockLeft: 0,
progressBarLeft: 0,
progressBarWidth: 350,
originalMinValue: 0,
originalMaxValue: 0
};
},
components: {},
props: {
//组件宽度
width: {
type: Number,
default: 750
},
//组件高度
height: {
type: Number,
default: 100
},
//滑块大小
blockSize: {
type: Number,
default: 50
},
//区间进度条高度
barHeight: {
type: Number,
default: 5
},
//背景条颜色
backgroundColor: {
type: String,
default: '#e9e9e9'
},
//已选择的颜色
activeColor: {
type: String,
default: '#1aad19'
},
//最小值
min: {
type: Number,
default: 0
},
//最大值
max: {
type: Number,
default: 100
},
//设置初始值
values: {
type: Array,
default: function() {
return [0, 100];
}
},
//步长值
step: {
type: Number,
default: 1
},
//live模式,是否动态更新
liveMode: {
type: Boolean,
default: true
}
},
created: function() {
//使用自定义组件编译模式时,支持生命周期为:created
this._refresh();
},
onLoad: function(option) {
//不使用自定义组件编译模式时,支持生命周期为:onload
this._refresh();
},
onUnload: function() {},
watch: {
//组件宽度
width: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.width) {
this._refresh();
}
},
//滑块大小
blockSize: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.blockSize) {
this._refresh();
}
},
//最小值
min: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.min) {
that._refresh();
}
},
//最大值
max: function(newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.max) {
that._refresh();
}
},
//设置初始值
values: function(newVal, oldVal, changedPath) {
var that = this;
var values = that.values;
console.log('refresh', newVal, oldVal);
if (that._isValuesValid(newVal) && that._isValuesValid(values)) {
if (values[0] != oldVal[0] || values[1] != oldVal[1]) that._refresh();
}
}
},
methods: {
//补0
_pad: function(num, n) {
return Array(n - ('' + num).length + 1).join(0) + num;
},
_pxToRpx: function(px) {
return (750 * px) / _windowWidth;
},
_onBlockTouchStart: function(e) {
let tag = e.target.dataset.tag;
if (tag == 'minBlock' || tag == 'maxBlock') {
this.isMinActive = tag == 'minBlock';
this.isMaxActive = tag == 'maxBlock';
//兼容h5平台及某版本微信
if (e.hasOwnProperty('changedTouches')) {
this._blockDownX = e.changedTouches[0].pageX;
} else {
this._blockDownX = e.pageX;
}
//#ifdef H5
this._blockLeft = parseFloat(e.target.dataset.left);
//#endif
// #ifndef H5
this._blockLeft = e.target.dataset.left;
// #endif
this._curBlock = e.target.dataset.tag;
}
},
_onBlockTouchMove: function(e) {
let tag = e.target.dataset.tag;
if (tag == 'minBlock' || tag == 'maxBlock') {
var that = this;
var values = that._calculateValues(e);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
//拖动时也触发事件
var eventDetail = {
minValue: this.formatNumber(values[0], this.step),
maxValue: this.formatNumber(values[1], this.step),
fromUser: true,
originalValue: {
minValue: values[0],
maxValue: values[1]
}
};
this.originalMinValue = values[0];
this.originalMaxValue = values[1];
var eventOption = {};
//
if (this.liveMode) that.$emit('rangechange', eventDetail, eventOption);
}
},
_onBlockTouchEnd: function(e) {
let tag = e.target.dataset.tag;
this.isMinActive = false;
this.isMaxActive = false;
if (tag == 'minBlock' || tag == 'maxBlock') {
var that = this;
var values = that._calculateValues(e.mp.changedTouches[0]);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
var eventDetail = {
minValue: this.formatNumber(values[0], this.step),
maxValue: this.formatNumber(values[1], this.step),
fromUser: true,
originalValue: {
minValue: values[0],
maxValue: values[1]
}
};
this.originalMinValue = values[0];
this.originalMaxValue = values[1];
var eventOption = {};
that.$emit('rangechange', eventDetail, eventOption);
}
},
_isValuesValid: function(values) {
return values != null && values != undefined && values.length == 2;
},
/**
* 根据手势计算相关数据
*/
_calculateValues: function(e) {
var pageX = e.pageX;
//兼容h5平台
if (e.hasOwnProperty('changedTouches')) {
pageX = e.changedTouches[0].pageX;
}
var that = this;
var moveLength = pageX - that._blockDownX;
var left = that._blockLeft + that._pxToRpx(moveLength);
left = Math.max(0, left);
left = Math.min(left, that.MAX_LENGTH);
var minBlockLeft = that.minBlockLeft;
var maxBlockLeft = that.maxBlockLeft;
if (that._curBlock == 'minBlock') {
minBlockLeft = left;
} else {
maxBlockLeft = left;
}
var range = that.max - that.min;
var minLeft = Math.min(minBlockLeft, maxBlockLeft);
var maxLeft = Math.max(minBlockLeft, maxBlockLeft);
var minValue = (minLeft / that.MAX_LENGTH) * range + that.min;
var maxValue = (maxLeft / that.MAX_LENGTH) * range + that.min;
return [minValue, maxValue, minLeft, maxLeft];
},
/**
* 计算滑块坐标
*/
_calculateBlockLeft: function(minValue, maxValue) {
var that = this;
var blockSize = that.blockSize;
var range = that.max - that.min;
var minLeft = ((minValue - that.min) / range) * that.MAX_LENGTH;
var maxLeft = ((maxValue - that.min) / range) * that.MAX_LENGTH;
return [minLeft, maxLeft];
},
/**
* 刷新进度条视图
*/
_refreshProgressBar: function(minBlockLeft, maxBlockLeft) {
var that = this;
var blockSize = that.blockSize;
that.progressBarLeft = minBlockLeft + blockSize / 2;
that.progressBarWidth = Math.abs(maxBlockLeft - minBlockLeft);
},
/**
* 刷新滑块视图
*/
_refreshBlock: function(minBlockLeft, maxBlockLeft) {
var that = this;
that.minBlockLeft = minBlockLeft;
that.maxBlockLeft = maxBlockLeft;
},
/**
* 刷新整个视图
*/
_refresh: function() {
var that = this;
var MAX_LENGTH = that.width - that.blockSize;
that.MAX_LENGTH = MAX_LENGTH;
that.maxBlockLeft = MAX_LENGTH;
that.progressBarWidth = MAX_LENGTH;
var values = that.values;
if (this.originalMinValue && this.originalMinValue) {
values = [this.originalMinValue || values[0], this.originalMaxValue || values[1]];
}
if (that._isValuesValid(values)) {
values[0] = Math.max(that.min, values[0]);
values[0] = Math.min(values[0], that.max);
values[1] = Math.max(that.min, values[1]);
values[1] = Math.min(values[1], that.max);
var leftValues = that._calculateBlockLeft(values[0], values[1]);
that._refreshProgressBar(leftValues[0], leftValues[1]);
that._refreshBlock(leftValues[0], leftValues[1]);
}
},
formatNumber(num, step) {
//格式化数字,保留几位小数
let stepStr = '' + step;
let index = stepStr.indexOf('.');
let len = index > -1 ? stepStr.length - index - 1 : 0;
let offestNum = parseInt(1 + Array(('' + len).length + 1).join(0)) * 0.1;
let tmpNum = num * offestNum;
return ((parseInt(tmpNum / step + (step > 1 ? 1 : step) * 0.5) * step) / offestNum).toFixed(len);
}
}
};
</script>
<style>
.range-slider {
position: relative;
}
.range-bar {
position: absolute;
}
.range-bar {
position: absolute;
top: 50%;
transform: translate(0, -50%);
border-radius: 10000rpx;
}
.range-bar-bg {
position: absolute;
width: 100%;
height: 100%;
border-radius: 10000rpx;
}
.range-bar-progress {
position: absolute;
width: 100%;
height: 100%;
background-color: blueviolet;
}
.block {
position: absolute;
top: 50%;
transform: translate(0, -50%);
background: #fff;
border-radius: 50%;
box-shadow: 0rpx 0rpx 6rpx #ccc;
}
.block.active {
transform: translate(0, -50%) scale(1.5);
}
</style>
<template>
<view class="restaurant-list-item">
<view class="img-box">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png" mode="aspectFill"></image>
</view>
<view class="restaurant-info">
<view class="restaurant-name">乐山禅驿·嘉定院子酒店</view>
<view class="restaurant-start">
<view class="other-rate">
<text>日式料理</text>
<span class="line"></span>
</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>
</template>
<script>
export default {
props:{
restaurantType:{
type:Number,
default:0
}
},
data() {
return {
}
},
}
</script>
<style>
.restaurant-list-item{
margin: 30rpx 0;
padding-bottom: 30rpx;
/* border-bottom: 1rpx solid #E2E2E2; */
display: flex;
align-items: center;
}
.restaurant-list-item .img-box{
width: 220rpx;
height: 280rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 30rpx;
}
.restaurant-list-item .img-box image{
width: 100%;
}
.restaurant-list-item .restaurant-info{
width: 1px;
flex: 1;
}
.restaurant-list-item .restaurant-info .restaurant-name{
font-weight: 500;
color: #111111;
line-height: 30rpx;
font-size: 30rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.restaurant-list-item .restaurant-info .restaurant-start{
margin:10rpx 0;
}
.restaurant-list-item .restaurant-info .restaurant-start .rate{
font-size: 30rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate{
display: inline-block;
position: relative;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate text{
position: relative;z-index: 2;
font-size: 30rpx;
line-height: 30rpx;
font-weight: 500;
color: #111;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate .line{
background-color: #DFBE6E;
height: 6px;
bottom: 2px;
left: 0;
right: 0;
position: absolute;
z-index: 1;
}
.restaurant-list-item .restaurant-info .localtion{
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 10rpx;
}
.restaurant-list-item .restaurant-info .price{
margin-top: 10rpx;
font-weight: 500;
color: #000;
font-size: 20rpx;
text-align: right;
}
.restaurant-list-item .restaurant-info .price .money{
font-size: 36rpx;
}
</style>
<template>
<view class="restaurant-list-item">
<view class="img-box">
<image src="https://dimg04.c-ctrip.com/images/03551120008nt5eb8BB53_C_500_500_Q80.jpg" mode="aspectFill"></image>
</view>
<view class="restaurant-info">
<view class="restaurant-name">北京街头卤煮火烧</view>
<view class="restaurant-start">
<view class="other-rate">
<text>老北京·地道</text>
<span class="line"></span>
</view>
</view>
<view class="localtion">环境内外装修以竹制品体现,夫妻肺片麻辣鲜香,口干嫩滑色泽红亮</view>
<view>
<u-tag text="川菜 " bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;"></u-tag>
<u-tag text="沟口" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
</view>
<view class="price">
<text></text>
<text class="money">200</text>
<text>/起</text>
</view>
</view>
</view>
</template>
<script>
export default {
props:{
restaurantType:{
type:Number,
default:0
}
},
data() {
return {
// key: value
}
},
}
</script>
<style>
.restaurant-list-item{
margin: 30rpx 30rpx 0 30rpx;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #E2E2E2;
display: flex;
align-items: center;
}
.restaurant-list-item .img-box{
width: 220rpx;
height: 280rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 30rpx;
}
.restaurant-list-item .img-box image{
width: 100%;
}
.restaurant-list-item .restaurant-info{
width: 1px;
flex: 1;
}
.restaurant-list-item .restaurant-info .restaurant-name{
font-weight: 500;
color: #111111;
line-height: 30rpx;
font-size: 30rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.restaurant-list-item .restaurant-info .restaurant-start{
margin:10rpx 0;
}
.restaurant-list-item .restaurant-info .restaurant-start .rate{
font-size: 30rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate{
display: inline-block;
position: relative;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate text{
position: relative;z-index: 2;
font-size: 30rpx;
line-height: 30rpx;
font-weight: 500;
color: #111;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate .line{
background-color: #DFBE6E;
height: 6px;
bottom: 2px;
left: 0;
right: 0;
position: absolute;
z-index: 1;
}
.restaurant-list-item .restaurant-info .localtion{
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 10rpx;
}
.restaurant-list-item .restaurant-info .price{
margin-top: 10rpx;
font-weight: 500;
color: #111;
font-size: 20rpx;
text-align: right;
}
.restaurant-list-item .restaurant-info .price .money{
font-size: 36rpx;
}
</style>
<template>
<div class="rtypestyle" style="background: #FFF;">
<div class="left-slider">
<sidebar :active="tid" name="Name" :active-color="mainColor" :border="false" :list="d" @change="changeHandler">
</sidebar>
</div>
<div class="right-slider">
<scroll-view scroll-y="true" style="height: 30vh;">
<div class="item" :class="{'active':d[tid].Id==currentObj.Id}" @click="clickHandler(d[tid])">
<div class="left">不限</div>
</div>
<div class="item" :class="{'active':x.Id==currentObj.Id}" v-for="(x, index) in sd" :key="index" @click="clickHandler(x)">
<div class="left">{{ x.Name }}</div>
</div>
</scroll-view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;">
<view style="flex:1;margin-right: 30rpx;">
<u-button :custom-style="btnStyle" @click="sendResult(-1)">取消</u-button>
</view>
<view style="flex:1;">
<u-button :custom-style="btnStyle2" @click="sendResult(0)">完成</u-button>
</view>
</view>
</div>
</div>
</template>
<script>
import sidebar from "../../../components/sidebar/index";
export default {
props: {
d:{
type:Array,
default:[{
Id:1,
Name:"川菜",
ChildList:[
{
Id:2,
Name:"中餐"
},
{
Id:3,
Name:"汤锅"
},
{
Id:4,
Name:"干锅"
},
{
Id:5,
Name:"火锅"
},
{
Id:6,
Name:"蓉派川菜"
},
{
Id:7,
Name:"渝派川菜"
},
{
Id:8,
Name:"盐帮菜"
}
]
},{
Id:9,
Name:"火锅",
ChildList:[
{
Id:10,
Name:"成都火锅"
},
{
Id:11,
Name:"藏式火锅"
},
{
Id:12,
Name:"重庆火锅"
},
{
Id:13,
Name:"北京火锅"
}
]
}]
},
current:{
type:Object,
default:{
Id:-1,
active:0
}
}
},
watch: {
current:{
handler(newValue, oldValue){
this.$nextTick(() => {
this.active=newValue.active
this.currentObj=newValue
this.changeHandler(this.active)
});
},
deep:true
}
},
data() {
return {
mainColor: "",
tid: 0,
active: 0,
sd: [],
btnStyle:{
borderRadius: '16rpx',
color: '#111',
fontSize: '30rpx',
width: '100%',
border:"1px solid #111",
background:"#FFF"
},
btnStyle2:{
borderRadius: '16rpx',
color: '#fff',
fontSize: '30rpx',
width: '100%',
background:"#111"
},
currentObj:{
Id:-1,
active:0
}
};
},
components: {
sidebar,
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].ChildList;
},
methods: {
changeHandler(i) {
this.tid = i;
this.sd = this.d[this.tid].ChildList;
},
clickHandler(item) {
this.currentObj=item
this.currentObj.active=this.active
// let Id1 = this.d[this.tid].Id;
// let Id2 = item.Id;
// let CategoryIds = Id2;
// let IsEducation = uni.getStorageSync('basedata') ?
// (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
// .IsEducation : 0) :
// 0;
// if (IsEducation == 1) {
// uni.navigateTo({
// url: '/pages/school/courseList?CategoryIds=' + CategoryIds
// });
// } else {
// uni.navigateTo({
// url: '/pages/goods/list?CategoryIds=' + CategoryIds
// });
// }
},
sendResult(t){
if(t==-1){
this.currentObj={
Id:-1,
active:0
}
}
this.$emit("sure-type",this.currentObj)
}
},
};
</script>
<style>
.rtypestyle {
display: flex;
}
.rtypestyle .left-slider {
width: 85px;
background: #f5f5f5;
}
.rtypestyle .right-slider {
padding: 10px;
height: 100%;
width: 1px;
flex: 1;
overflow: hidden;
overflow-y: auto;
}
.rtypestyle .right-slider .item {
background: #f5f5f5;
margin-bottom: 4px;
}
.rtypestyle .right-slider .item.active .left{
background-color: #111;
color: #FFF;
}
.rtypestyle .right-slider .item .left {
padding: 15rpx;
font-size: 28rpx;
font-weight: 600;
color: #666;
}
</style>
//节假日信息
const day=[
{
year:2022,
month:1,
festival:[
{name:'元旦',day:1},
{name:'除夕',day:31},
]
},
{
year:2022,
month:2,
festival:[
{name:'春节',day:1},
{name:'元宵',day:15},
{name:'情人节',day:14}
]
},
{
year:2022,
month:3,
festival:[
{name:'妇女节',day:8},
]
},
{
year:2022,
month:4,
festival:[
{name:'清明',day:4},
]
},
{
year:2022,
month:5,
festival:[
{name:'劳动节',day:1},
{name:'青年节',day:4},
{name:'母亲节',day:10},
]
},
{
year:2021,
month:6,
festival:[
{name:'儿童节',day:1},
{name:'父亲节',day:21},
{name:'端午',day:14},
]
},
{
year:2021,
month:7,
festival:[
{name:'建党节',day:1}
]
},
{
year:2021,
month:8,
festival:[
{name:'建军节',day:1},
{name:'七夕',day:14},
{name:'中元节',day:22},
]
},
{
year:2021,
month:9,
festival:[
{name:'教师节',day:10},
{name:'中秋',day:21}
]
},
{
year:2021,
month:10,
festival:[
{name:'国庆',day:1},
{name:'重阳',day:14}
]
},
{
year:2021,
month:11,
festival:[
{name:'感恩节',day:26}
]
},
{
year:2021,
month:12,
festival:[
{name:'平安夜',day:24},
{name:'圣诞节',day:25}
]
}
]
export default day
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</template> </template>
<script> <script>
import uCharts from '../school/components/u-charts/u-charts.min.js'; //import uCharts from '../school/components/u-charts/u-charts.min.js';
// import calendar from './cp/fl-calendar.vue' // import calendar from './cp/fl-calendar.vue'
var canvaColumn = null; var canvaColumn = null;
...@@ -288,56 +288,56 @@ ...@@ -288,56 +288,56 @@
}, },
showColumn(canvasId,chartData){ showColumn(canvasId,chartData){
canvaColumn=new uCharts({ // canvaColumn=new uCharts({
$this:_self, // $this:_self,
canvasId: canvasId, // canvasId: canvasId,
type: 'column', // type: 'column',
fontSize:11, // fontSize:11,
padding:[5,15,15,15], // padding:[5,15,15,15],
legend:{ // legend:{
show:true, // show:true,
position:'top', // position:'top',
float:'center', // float:'center',
itemGap:30, // itemGap:30,
padding:5, // padding:5,
margin:5, // margin:5,
//backgroundColor:'rgba(41,198,90,0.2)', // //backgroundColor:'rgba(41,198,90,0.2)',
//borderColor :'rgba(41,198,90,0.5)', // //borderColor :'rgba(41,198,90,0.5)',
borderWidth :1 // borderWidth :1
}, // },
dataLabel:true, // dataLabel:true,
dataPointShape:true, // dataPointShape:true,
background:'#FFFFFF', // background:'#FFFFFF',
pixelRatio:_self.pixelRatio, // pixelRatio:_self.pixelRatio,
categories: chartData.categories, // categories: chartData.categories,
series: chartData.series, // series: chartData.series,
animation: true, // animation: true,
enableScroll: true, // enableScroll: true,
xAxis: { // xAxis: {
disableGrid:false, // disableGrid:false,
type:'grid', // type:'grid',
gridType:'dash', // gridType:'dash',
itemCount:4, // itemCount:4,
scrollShow:true, // scrollShow:true,
scrollAlign:'right', // scrollAlign:'right',
}, // },
yAxis: { // yAxis: {
//disabled:true // //disabled:true
gridType:'dash', // gridType:'dash',
splitNumber:4, // splitNumber:4,
min:10, // min:10,
max:180, // max:180,
format:(val)=>{return val.toFixed(0)+'元'}//如不写此方法,Y轴刻度默认保留两位小数 // format:(val)=>{return val.toFixed(0)+'元'}//如不写此方法,Y轴刻度默认保留两位小数
}, // },
width: _self.cWidth*_self.pixelRatio, // width: _self.cWidth*_self.pixelRatio,
height: _self.cHeight*_self.pixelRatio, // height: _self.cHeight*_self.pixelRatio,
extra: { // extra: {
column: { // column: {
type:'group', // type:'group',
width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length // width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length
} // }
}, // },
}); // });
}, },
touchColumn(e){ touchColumn(e){
......
...@@ -4,8 +4,8 @@ export default { ...@@ -4,8 +4,8 @@ export default {
// Vue.prototype.host2 = "http://192.168.0.110:8200" // Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com" // Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.1.5:8088" // Vue.prototype.host2 = "http://192.168.1.5:8088"
Vue.prototype.host2 = "http://192.168.20.17:8014" // Vue.prototype.host2 = "http://192.168.20.17:8014"
//Vue.prototype.host2 = "http://192.168.20.13:8088" Vue.prototype.host2 = "http://192.168.20.24:8400"
// Vue.prototype.host2 = "http://testmall.oytour.com/" // Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue.prototype.host3 = "http://reborn.oytour.com" Vue.prototype.host3 = "http://reborn.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.24" // Vue.prototype.host3 = "http://192.168.20.24"
......
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