Commit 1092c328 authored by 罗超's avatar 罗超

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

parents cf863f5d 4e6c3ff2
...@@ -358,6 +358,10 @@ ...@@ -358,6 +358,10 @@
"path":"pickcarcity" "path":"pickcarcity"
},{ },{
"path":"guidecarList" "path":"guidecarList"
},{
"path":"pickcarcity2"//出发和到达选择的地址
},{
"path":"bookaCarList"//定制车页面
},{ },{
"path": "orderList" "path": "orderList"
},{ },{
...@@ -582,6 +586,13 @@ ...@@ -582,6 +586,13 @@
} }
}] }]
}, },
//九寨沟分包
{
"root": "pages/jiuzhai",
"pages": [{
"path":"jz_Line" //九寨-线路
}]
},
//相亲分包 //相亲分包
{ {
"root": "pages/blindDate", "root": "pages/blindDate",
...@@ -711,6 +722,14 @@ ...@@ -711,6 +722,14 @@
"path": "list" "path": "list"
},{ },{
"path": "components/time/index" "path": "components/time/index"
},{
"path": "picture"
},{
"path": "detail",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
}] }]
}, },
//门票 //门票
......
<style scoped lang="scss">
.bookaCarList{
width: 100%;
height: 100vh;
background: #FFF;
.box-top{
width: 100%;
height: 50px;
display: flex;
align-items: center;
padding: 0 15px;
.box-top-b{
width: 100%;
height: 45px;
background: #ECF1F4;
border-radius: 23px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
.box-top-b-l{
width: calc((100vw - 30px - 30px - 30px)/2);
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
text-align: center;
}
}
}
.box-rili{
width: 100%;
height: 80px;
display: flex;
align-items: center;
padding: 0 10px;
position: relative;
}
}
</style>
<template>
<view class="bookaCarList">
<view class="box-top">
<view class="box-top-b">
<view class="box-top-b-l">
{{carMsg.StartCityName}}
</view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zhuanghuan.png" mode="aspectFill" style="width: 20px;height: 20px;"></image>
<view class="box-top-b-l">
{{carMsg.ArriveCityName}}
</view>
</view>
</view>
<view class="box-rili">
<view class="box-rili-scroll">
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "去订车",
msg:{
pageIndex:1,
pageSize:20,
StartCityId:0,
StartCityType:0,
ArriveCityId:0,
ArriveCityType:0,
Q_Date:'',
StartCityName:'',
ArriveCityName:'',
StartDate:'',
EndDate:'',
},
carMsg:{},
page_count:1,
status: "loadmore",
g: [],
}
},
onLoad(options) {
if(options && options.carMsg){
//对象解码
this.carMsg = JSON.parse(decodeURIComponent(options.carMsg))
this.msg.StartCityId = this.carMsg.StartCityId;
this.msg.StartCityType = this.carMsg.StartCityType;
this.msg.ArriveCityId = this.carMsg.ArriveCityId;
this.msg.ArriveCityType = this.carMsg.ArriveCityType;
this.msg.Q_Date = this.carMsg.Q_Date;
}
this.gettimeList()
this.init()
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods:{
gettimeList(){
var date1 = new Date();
var date2 = new Date(date1);
date2.setDate(date1.getDate() + 30);
let nowtime = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate() ;
let htime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate() ;
this.getdiffdate(nowtime,htime)
},
getdiffdate(stime,etime){
console.log(stime,etime)
var diffdate = new Array();
var i=0;
//开始日期小于等于结束日期,并循环
while(stime<=etime){
diffdate[i] = stime;
//获取开始日期时间戳
var stime_ts = new Date(stime).getTime();
//增加一天时间戳后的日期
var next_date = stime_ts + (24*60*60*1000);
//拼接年月日,这里的月份会返回(0-11),所以要+1
var next_dates_y = new Date(next_date).getFullYear()+'-';
var next_dates_m = (new Date(next_date).getMonth()+1 < 10)?'0'+(new Date(next_date).getMonth()+1)+'-':(new Date(next_date).getMonth()+1)+'-';
var next_dates_d = (new Date(next_date).getDate() < 10)?'0'+new Date(next_date).getDate():new Date(next_date).getDate();
stime = next_dates_y+next_dates_m+next_dates_d;
//增加数组key
i++;
}
console.log(diffdate);
//处理为数组
},
init(){
this.request2(
{
url: '/api/AppletCar/GetAppletCarCustomPageList',
data: this.msg
},
res => {
if(res.resultCode==1){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
}
}
}
</script>
This diff is collapsed.
<template>
<view class="pickcarcity" :style="{'height':contentHeight}">
<view class="qcity">
<view class="ctrl-box">
<u-search
action-text="搜索"
:focus="true"
:show-action="true"
radius="40"
v-model="searchKey"
@search="searchHandler"
@custom="searchHandler"
@change="changeHandler"
></u-search>
</view>
<view v-if="show==true">
<scroll-view
:scroll-y="true"
style="height: calc(100vh - 50px)">
<view class="txtype">
<view class="list-cell" v-for="(x, index) in searchList" :key="index" @click="goback(x,2)">
{{x.Name}}
</view>
</view>
</scroll-view>
</view>
<div style='height: calc(100vh - 50px);' v-if="show==false">
<u-index-list :scrollTop="scrollTop">
<view v-for="(item, index) in indexList" :key="index">
<u-index-anchor :index="item.ti" />
<view class="list-cell" v-for="(x,y) in item.children" :key='y' @click="goback(x,2)">
{{x.Name}}
</view>
</view>
</u-index-list>
</div>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "取车城市",
scrollTop:0,
contentHeight:0,
mainColor:'',
secondary:'',
cityList:[],
searchList:[],//搜索出来的
searchKey: "",
show:false,
indexList: [{ti:"A"}, {ti:"B"}, {ti:"C"}, {ti:"D"}, {ti:"E"}, {ti:"F"}, {ti:"G"},{ ti:"H"}, {ti:"I"}, {ti:"J"}, {ti:"K"}, {ti:"L"},
{ti:"M"}, {ti:"N"}, {ti:"O"}, {ti:"P"},{ ti:"Q"}, {ti:"R"}, {ti:"S"}, {ti:"T"}, {ti:"U"},
{ti:"V"}, {ti:"W"}, {ti:"X"}, {ti:"Y"}, {ti:"Z"}
],
dztype:1,
ArriveMsg:{
StartCityId:0,
StartCityType:0
}
}
},
onLoad(option){
if(option && option.type){
this.dztype = option.type
}
if(option && option.StartCityId){
this.ArriveMsg.StartCityId = option.StartCityId;
this.ArriveMsg.StartCityType = option.StartCityType;
}
if(this.dztype ==1){
this.pageTitle = '出发地点'
}else{
this.pageTitle = '到达地点'
}
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init()//城市列表
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
mounted() {
},
methods: {
init(){
uni.showLoading({
title: "加载中",
});
let url = '/api/AppletCar/GetAppletCarDepartCityList';
let msg = {}
if(this.dztype==2){
url = '/api/AppletCar/GetAppletCarArriveCityList';
msg = this.ArriveMsg
}
this.request2(
{
url: url,
data: msg
},
(res) => {
this.cityList = res.data;
this.indexList=[]
this.cityList.forEach(x=>{
let obj = {
ti:(x.PinYin.substr(0,1)).toUpperCase()
}
this.indexList.push(obj)
})
this.indexList.forEach(x=>{
x.children=[];
this.cityList.forEach(j=>{
let obj={}
if(x.ti==(j.PinYin.substr(0,1)).toUpperCase()){
x.children.push(j)
}
})
})
uni.hideLoading();
}
);
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
goback(item,type){
// let Name
// if(type==1){
// Name=item.RegionName
// }else{
// Name=item.Name
// }
console.log(item)
let that = this
let pages = getCurrentPages(); // 当前页面
let beforePage
beforePage = pages[pages.length - 2]; // 前一个页面
// console.log( beforePage.$vm)
setTimeout(()=>{
uni.navigateBack({
delta:1,
success: function() {
beforePage.$vm.getcar(item.Id,item.Type,item.Name,that.dztype); // 执行前一个页面的方法
}
});
},100)
},
searchHandler(val){
if(val!=''){
this.searchList = []
this.cityList.forEach(x=>{
if(x.Name.indexOf(val)!=-1){
this.searchList.push(x)
}
})
this.show=true
}else{
this.show=false
}
},
changeHandler(val) {
if(val==''){
this.show=false
}
},
}
}
</script>
<style>
.pickcarcity{
background: #FFFFFF;
}
.pickcarcity .qcity{
}
.pickcarcity .list-cell {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 10px 24rpx;
overflow: hidden;
color: #323233;
font-size: 14px;
line-height: 24px;
background-color: #fff;
position: relative;
}
.pickcarcity .anchor-text {
color: red;
}
.pickcarcity .kaitong{
width: 100%;
padding: 15px;
background: #FAF8F9;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.pickcarcity .region{
width: 200rpx;
height: 68rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30rpx;
margin-top: 30rpx;
}
.pickcarcity .ctrl-box {
padding: 5px 10px;
}
.pickcarcity .txtype{
width: 100%;
background: #FFF;
height: calc(100vh - 50px);
}
</style>
<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="hotel-list-item">
<view class="img-box">
<image src="http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png" mode="aspectFill"></image>
</view>
<view class="hotel-info">
<view class="hotel-name">乐山禅驿·嘉定院子酒店</view>
<view class="hotel-start">
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view class="rate" v-if="hotelType==0">
<u-rate active-color="#FEB969" inactive-color="#FFF" current="4" active-icon="star" inactive-icon="star" disabled></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">四星</text>
</view>
<view class="other-rate" v-if="hotelType==1">
<text>温泉酒店</text>
<span class="line"></span>
</view>
<view class="other-rate" v-if="hotelType==2">
<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:{
hotelType:{
type:Number,
default:0
}
},
data() {
return {
key: value
}
},
}
</script>
<style>
.hotel-list-item{
margin: 30rpx 0;
padding-bottom: 30rpx;
/* border-bottom: 1rpx solid #E2E2E2; */
display: flex;
align-items: center;
}
.hotel-list-item .img-box{
width: 220rpx;
height: 280rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 30rpx;
}
.hotel-list-item .img-box image{
width: 100%;
}
.hotel-list-item .hotel-info{
width: 1px;
flex: 1;
}
.hotel-list-item .hotel-info .hotel-name{
font-weight: 500;
color: #111111;
line-height: 30rpx;
font-size: 30rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.hotel-list-item .hotel-info .hotel-start{
margin:10rpx 0;
}
.hotel-list-item .hotel-info .hotel-start .rate{
font-size: 30rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
}
.hotel-list-item .hotel-info .hotel-start .other-rate{
display: inline-block;
position: relative;
}
.hotel-list-item .hotel-info .hotel-start .other-rate text{
position: relative;z-index: 2;
font-size: 30rpx;
line-height: 30rpx;
font-weight: 500;
color: #111;
}
.hotel-list-item .hotel-info .hotel-start .other-rate .line{
background-color: #DFBE6E;
height: 6px;
bottom: 2px;
left: 0;
right: 0;
position: absolute;
z-index: 1;
}
.hotel-list-item .hotel-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;
}
.hotel-list-item .hotel-info .price{
margin-top: 10rpx;
font-weight: 500;
color: #000;
font-size: 20rpx;
text-align: right;
}
.hotel-list-item .hotel-info .price .money{
font-size: 36rpx;
}
</style>
<template>
<view class="room-good">
<view class="rm-left">
<image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill">
</image>
<view class="mark">12</view>
</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>
<viwe class="give f11">
免费专辑接机 + 送沟口 + 1张情景演出票
</viwe>
<view class="f11 king" style="margin-top:15rpx;">入住当天18:00前可免费取消</view>
<view class="price">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text>
</view>
</view>
<view class="rm-opera">
<!-- 如果库存少于5显示 -->
<view class="warm-count">剩2间</view>
<view class="buy">
<view class="buy-content"></view>
<view class="buy-tips">在线订</view>
</view>
</view>
</view>
</template>
<script>
</script>
<style>
.room-good {
margin-bottom: 30rpx;
display: flex;
align-items: center;
}
.room-good .king {
color: #DFBE6E !important;
}
.room-good .f11 {
font-size: 22rpx;
font-weight: 500;
}
.room-good .rm-right {
width: 1px;
flex: 1;
}
.room-good .rm-opera{
margin-left: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.room-good .rm-opera .warm-count{
text-align: center;
font-size: 18rpx;
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
}
.room-good .rm-opera .buy{
width: 70rpx;
height: 81rpx;
background: #FFFFFF;
border: 2rpx solid #111111;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.room-good .rm-opera .buy.disabled{
background: #EBEBEB;
border: 2rpx solid #DCDCDC;
}
.room-good .rm-opera .buy.disabled .buy-tips{
background: #A09E9E;
color: #fff;
}
.room-good .rm-opera .buy.disabled .buy-content{
color: #A09E9E;
}
.room-good .rm-opera .buy .buy-tips{
height: 27rpx;
background: #000000;
text-align: center;
color:#DFBE6E;
font-size: 18rpx;
line-height: 27rpx;
}
.room-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;
}
.room-good .rm-right .room-name {
font-size: 30rpx;
font-weight: 800;
color: #111111;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.room-good .rm-right .give {
width: 278rpx;
background: #ECF1F4;
border-radius: 4rpx;
padding: 10rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-top:15rpx;
}
.room-good .rm-right .price{
font-weight: 800;
font-size: 40rpx;
color:#111;
}
.room-good .rm-left {
width: 174rpx;
height: 257rpx;
border-radius: 20rpx;
margin-right: 30rpx;
position: relative;
overflow: hidden;
}
.room-good .rm-left image {
width: 100%;
height: 100%;
}
.room-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="room-good">
<view class="rm-left">
<image src="https://ak-d.tripcdn.com/images/0205w120008nyuc6gA680_R_1080_808_R5_D.jpg" mode="aspectFill">
</image>
<view class="mark">12</view>
</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 class="f11 king" style="margin-top: 15px;">不可取消</view>
<view class="price">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>500</text>
</view>
</view>
<view class="rm-opera">
<!-- 如果库存少于5显示 -->
<view class="buy disabled">
<view class="buy-content"></view>
<view class="buy-tips">已抢完</view>
</view>
</view>
</view>
</template>
<script>
</script>
<style>
.room-good {
margin-bottom: 30rpx;
display: flex;
align-items: center;
}
.room-good .king {
color: #DFBE6E !important;
}
.room-good .f11 {
font-size: 22rpx;
font-weight: 500;
}
.room-good .rm-right {
width: 1px;
flex: 1;
}
.room-good .rm-opera{
margin-left: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.room-good .rm-opera .warm-count{
text-align: center;
font-size: 18rpx;
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
}
.room-good .rm-opera .buy{
width: 70rpx;
height: 81rpx;
background: #FFFFFF;
border: 2rpx solid #111111;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.room-good .rm-opera .buy.disabled{
background: #EBEBEB;
border: 2rpx solid #DCDCDC;
}
.room-good .rm-opera .buy.disabled .buy-tips{
background: #A09E9E;
color: #fff;
}
.room-good .rm-opera .buy.disabled .buy-content{
color: #A09E9E;
}
.room-good .rm-opera .buy .buy-tips{
height: 27rpx;
background: #000000;
text-align: center;
color:#DFBE6E;
font-size: 18rpx;
line-height: 27rpx;
}
.room-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;
}
.room-good .rm-right .room-name {
font-size: 30rpx;
font-weight: 800;
color: #111111;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.room-good .rm-right .give {
width: 278rpx;
background: #ECF1F4;
border-radius: 4rpx;
padding: 10rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-top:15rpx;
}
.room-good .rm-right .price{
font-weight: 800;
font-size: 40rpx;
color:#111;
}
.room-good .rm-left {
width: 174rpx;
height: 257rpx;
border-radius: 20rpx;
margin-right: 30rpx;
position: relative;
overflow: hidden;
}
.room-good .rm-left image {
width: 100%;
height: 100%;
}
.room-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>
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
}, },
//计算周几 //计算周几
getWeek(date) { getWeek(date) {
var weekDay = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; var weekDay = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
var myDate = new Date(Date.parse(date)); var myDate = new Date(Date.parse(date));
return weekDay[myDate.getDay()]; return weekDay[myDate.getDay()];
}, },
...@@ -512,6 +512,8 @@ ...@@ -512,6 +512,8 @@
endDay: this.endDay, endDay: this.endDay,
endWeek: this.endWeek, endWeek: this.endWeek,
day: this.day */ day: this.day */
startWeek: this.startWeek,
endWeek: this.endWeek,
start: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type + start: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type +
this.isFestival(this.start[0], this.start[1], true), this.isFestival(this.start[0], this.start[1], true),
end: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this end: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this
...@@ -522,7 +524,7 @@ ...@@ -522,7 +524,7 @@
endDay: this.date[this.end[0]].month + '-' + this.isFestival(this.end[0], this.end[1], true), endDay: this.date[this.end[0]].month + '-' + this.isFestival(this.end[0], this.end[1], true),
day: this.day day: this.day
}; };
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页 /*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例 *不推荐使用本地缓存,下面是缓存的示例
*/ */
...@@ -598,7 +600,7 @@ ...@@ -598,7 +600,7 @@
// uni.navigateBack({ // uni.navigateBack({
// delta: 1 // delta: 1
// }) // })
} },
} }
}; };
</script> </script>
......
<template>
<view class="waterfalls-box" :style="{ height: height + 'px' }">
<!-- #ifdef MP-WEIXIN -->
<view
v-for="(item, index) of list"
class="waterfalls-list"
:key="item[idKey]"
:id="'waterfalls-list-id-' + item[idKey]"
:ref="'waterfalls-list-id-' + item[idKey]"
:style="{
'--offset': offset + 'px',
'--cols': cols,
top: allPositionArr[index].top || 0,
left: allPositionArr[index].left || 0,
}"
@click="$emit('wapper-lick', item)"
>
<image
class="waterfalls-list-image"
mode="widthFix"
:class="{ single }"
:style="imageStyle"
:src="item[imageSrcKey] || ' '"
@load="imageLoadHandle(index)"
@error="imageLoadHandle(index)"
@click="$emit('image-click', item)"
/>
<slot name="slot{{index}}" />
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view
v-for="(item, index) of list"
class="waterfalls-list"
:key="item[idKey]"
:id="'waterfalls-list-id-' + item[idKey]"
:ref="'waterfalls-list-id-' + item[idKey]"
:style="{
'--offset': offset + 'px',
'--cols': cols,
...listStyle,
...(allPositionArr[index] || {}),
}"
@click="$emit('wapper-lick', item)"
>
<image
class="waterfalls-list-image"
:class="{ single }"
mode="widthFix"
:style="imageStyle"
:src="item[imageSrcKey] || ' '"
@load="imageLoadHandle(index)"
@error="imageLoadHandle(index)"
@click="$emit('image-click', item)"
/>
<slot v-bind="item" />
</view>
<!-- #endif -->
</view>
</template>
<script>
export default {
props: {
list: { type: Array, required: true },
// offset 间距,单位为 px
offset: { type: Number, default: 10 },
// 列表渲染的 key 的键名,值必须唯一,默认为 id
idKey: { type: String, default: "id" },
// 图片 src 的键名
imageSrcKey: { type: String, default: "image_url" },
// 列数
cols: { type: Number, default: 2, validator: (num) => num >= 2 },
imageStyle: { type: Object },
// 是否是单独的渲染图片的样子,只控制图片圆角而已
single: { type: Boolean, default: false },
// #ifndef MP-WEIXIN
listStyle: { type: Object },
// #endif
},
data() {
return {
topArr: [], // left, right 多个时依次表示第几列的数据
allPositionArr: [], // 保存所有的位置信息
allHeightArr: [], // 保存所有的 height 信息
height: 0, // 外层包裹高度
oldNum: 0,
num: 0,
};
},
created() {
this.refresh();
},
methods: {
imageLoadHandle(index) {
const id = "waterfalls-list-id-" + this.list[index][this.idKey],
query = uni.createSelectorQuery().in(this);
query
.select("#" + id)
.fields({ size: true }, (data) => {
this.num++;
this.$set(this.allHeightArr, index, data.height);
if (this.num === this.list.length) {
for (let i = this.oldNum; i < this.num; i++) {
const getTopArrMsg = () => {
let arrtmp = [...this.topArr].sort((a, b) => a - b);
return {
shorterIndex: this.topArr.indexOf(arrtmp[0]),
shorterValue: arrtmp[0],
longerIndex: this.topArr.indexOf(arrtmp[this.cols - 1]),
longerValue: arrtmp[this.cols - 1],
};
};
const { shorterIndex, shorterValue } = getTopArrMsg();
const position = {
top: shorterValue + "px",
left: (data.width + this.offset) * shorterIndex + "px",
};
this.$set(this.allPositionArr, i, position);
this.topArr[shorterIndex] =
shorterValue + this.allHeightArr[i] + this.offset;
this.height = getTopArrMsg().longerValue - this.offset;
}
this.oldNum = this.num;
// 完成渲染 emit `image-load` 事件
this.$emit("image-load");
}
})
.exec();
},
refresh() {
let arr = [];
for (let i = 0; i < this.cols; i++) {
arr.push(0);
}
this.topArr = arr;
this.num = 0;
this.oldNum = 0;
this.height = 0;
},
},
};
</script>
<style lang="scss" scoped>
// 这里可以自行配置
$border-radius: 6px;
.waterfalls-box {
position: relative;
width: 100%;
overflow: hidden;
.waterfalls-list {
width: calc((100% - var(--offset) * (var(--cols) - 1)) / var(--cols));
position: absolute;
background-color: #fff;
border-radius: $border-radius;
// 防止刚开始渲染时堆叠在第一幅图的地方
left: calc(-50% - var(--offset));
.waterfalls-list-image {
width: 100%;
will-change: transform;
border-radius: $border-radius $border-radius 0 0;
display: block;
&.single {
border-radius: $border-radius;
}
}
}
}
</style>
This diff is collapsed.
...@@ -241,6 +241,9 @@ ...@@ -241,6 +241,9 @@
hotelGood hotelGood
}, },
created() { created() {
uni.navigateTo({
url:"/pages/hotel/detail"
})
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店", title: "酒店",
}); });
......
<template>
<view>
<scroll-view scroll-y="true" class="hotel-pic">
<view class="content">
<view class="left">
<view v-for="(x,i) in jiList" :key="i" class="image-box">
<image :src="x.picUrl" mode="widthFix"></image>
</view>
</view>
<view class="right">
<view v-for="(x,i) in ouList" :key="i" class="image-box">
<image :src="x.picUrl" mode="widthFix"></image>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
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:"酒店"
}
],
jiList:[],
ouList:[]
}
},
created() {
uni.setNavigationBarTitle({
title: "酒店图片",
});
this.imageList.forEach((x,i)=>{
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
console.log(this.jiList,this.ouList)
},
mounted () {
}
}
</script>
<style>
.hotel-pic{
height: 100vh;
width: 100vw;
}
.hotel-pic .content{
display: flex;
align-items: flex-start;
padding: 44rpx;
padding-top: 14rpx;
}
.hotel-pic .content .left{
flex:1;
margin-right: 15rpx;
}
.hotel-pic .content .right{
flex:1;
margin-left: 15rpx;
}
.hotel-pic .content .image-box{
width:100%;
margin-top: 30rpx;
}
.hotel-pic .content .image-box image{
width: 100%;
border-radius: 20rpx;
}
</style>
...@@ -1220,10 +1220,21 @@ ...@@ -1220,10 +1220,21 @@
}, },
yj(){ yj(){
uni.navigateTo({ let obj ={ArriveCityId: 7,
url: '/pages/blindDate/persondetails?UserId=123978' ArriveCityName: "九寨沟",
// url: '/pages/blindDate/personal/IDidentification' ArriveCityType: 2,
}) Q_Date: "2021-5-25",
StartCityId: 262,
StartCityName: "成都",
StartCityType: 1}
obj = encodeURIComponent(JSON.stringify(obj))
uni.navigateTo({
url: '/pages/guidecar/bookaCarList?carMsg='+obj
})
// uni.navigateTo({
// url: '/pages/guidecar/index'
// // url: '/pages/blindDate/personal/IDidentification'
// })
} }
}, },
......
<style>
.jz_Line {}
.jz_Content {
margin: 30rpx 30rpx 0 30rpx;
}
.jz_List {
display: flex;
justify-content: space-between;
}
.jz_TuDiv {
width: 280rpx;
height: 220rpx;
border-radius: 6px;
overflow: hidden;
position: relative;
}
.jz_TuDiv .jz_TuBigImg {
width: 100%;
height: 100%
}
.jz_Right {
width: 380rpx;
margin-top: 5px;
font-size: 14px;
}
.jz_LineName {
color: #111111;
font-size: 30rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 600;
}
.jz_Canhoubu {
color: #FF3166;
margin-left: 10px;
}
.jz_redType {
color: #FF3166;
}
.jz_TuDivBotm {
position: absolute;
width: 100%;
height: 18px;
text-align: center;
bottom: 0;
color: #fff;
font-size: 12px;
line-height: 18px;
background-color: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
}
.jz_Remark {
width: 100%;
font-size: 13px;
background-color: #f1f0f0;
padding: 10px;
}
.op_remark {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.jz_ListMain {
padding-bottom: 10px;
border-bottom: 1px solid #d1d1d1;
margin-bottom: 10px;
}
.jz_TuDivBotm img {
width: 12px;
height: 12px;
margin-right: 5px;
}
.jz_calederImg {
width: 16px;
height: 16px;
position: relative;
top: 2px;
margin-right: 5px;
}
.jz_Sort {
width: 100%;
/* justify-content: space-between;
display: flex;
*/
margin: 20px 0;
}
.jz_SortItem {
display: inline-block;
width: 25%;
text-align: center;
}
.Jz_tanchu {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background: #FFF;
position: absolute;
top: 100px;
left: 0;
z-index: 1999;
}
.Jz_tanchu_item {
width: 94%;
margin-left: 3%;
height: 45px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #f1f1f1;
}
.Jz_Mask {
width: 100%;
height: 100%;
background: #000000;
opacity: 0.3;
position: absolute;
left: 0;
top: 130px;
z-index: 999;
}
</style>
<template>
<div class="jz_Line" >
<view class="jz_Content">
<u-search placeholder="目的地,旅游线路" shape="round" v-model="searchKey" input-align="left" :value="searchKey" text-color="#111"
:show-action="false"></u-search>
<view class="jz_Sort">
<view class="jz_SortItem">价格</view>
<view class="jz_SortItem">团期</view>
<view class="jz_SortItem" @click="screenshow=true">线路</view>
<view class="jz_SortItem" @click="isShowDate=true">日期</view>
</view>
<view v-if="screenshow==true" class="Jz_tanchu">
<scroll-view :scroll-y="true" :enable-back-to-top="true" style="max-height: 321px;">
<view class="Jz_tanchu_item" v-for="(item, index) in lineList" :key="index" @click="onItemSelect(item)">
<view style="display: flex;flex-direction: row;align-items: center;">
<span>{{item.label}}</span>
</view>
<u-icon name="success" :color="mainColor" size="30"></u-icon>
</view>
</scroll-view>
</view>
<view v-if="screenshow==true" class="Jz_Mask" @click="screenshow=false"></view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<template v-else>
<view style="height: calc(100vh - 120px);overflow: hidden;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="jz_ListMain" v-for="(item,index) in dataList" :key="index">
<view class="jz_List">
<view class="jz_TuDiv">
<img class="jz_TuBigImg" src="http://imgfile.oytour.com/Upload/DMC/20200603030333648.jpg?x-oss-process=image/resize,l_140"
alt="" />
<view class="jz_TuDivBotm">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/address.png" />成都出发
{{item.dayNum}}
</view>
</view>
<view class="jz_Right">
<view class="jz_LineName">{{item.title}}</view>
<view style="margin:10px 0">
<img class="jz_calederImg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/canlder.png" />{{item.startDate}}<text
class="jz_Canhoubu">不可候补</text>
</view>
<view style="margin-bottom:10px">航班:<text></text>(余位:10)</view>
<view>
同业价:<text class="jz_redType">{{item.b2BPrice}}</text>
<text style="margin-left:10px;">统一售价:<text class="jz_redType">{{item.b2CPrice}}</text></text>
</view>
</view>
</view>
<view class="jz_Remark">
<view class="op_remark" style="margin-bottom:10px;">OP备注:1不占床小孩收费1不占床小孩收费1不占床小孩收费1不占床小孩收费</view>
<view class="op_remark">本团卖点:1不占床小孩收费1不占床小孩收费1不占床小孩收费1不占床小孩收费</view>
</view>
</view>
</scroll-view>
</view>
</template>
</view>
<u-picker mode="time" v-model="isShowDate" @confirm='getStratDate' :params="params"></u-picker>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
pageTitle: '线路',
msg: {
pageIndex: 1,
pageSize: 15
},
time: '',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
dataList: [], //数据
searchKey: '', //搜索数据
value1: 1,
isShowDate: false,
delMsg: {
tcid: 10964
},
lineList: [{
label: '出境日本线',
value: 1,
},
{
label: '国内线',
value: 2,
}
],
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
screenshow: false,
status: "加载中",
page_count:0
};
},
created() {
this.getList();
this.getDetails();
},
methods: {
//获取数据
getList() {
this.apipost(
"b2b_get_GetB2BHomeLineTravelPageList",
this.msg,
res => {
if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData);
this.page_count = res.data.pageCount;
console.log(this.dataList, 'dataList');
} else {
}
},
null
);
},
//获取详情
getDetails() {
this.apipost(
"b2b_get_GetB2BTravelInfoNoDes",
this.delMsg,
res => {
console.log(res, '详情');
if (res.data.resultCode == 1) {
} else {
}
},
null
);
},
//获取日期
getStratDate(val) {
console.log(val, 'val');
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.getList();
} else {
this.status = "nomore";
}
},
},
};
</script>
...@@ -2,11 +2,14 @@ export default { ...@@ -2,11 +2,14 @@ export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285" Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// 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.13:8088"
// 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://192.168.20.24"
Vue.prototype.request = function(param, success, failed) { Vue.prototype.request = function(param, success, failed) {
//网络请求 //网络请求
...@@ -76,41 +79,108 @@ export default { ...@@ -76,41 +79,108 @@ export default {
} }
}); });
} }
// token失效再次登录接口 //请求app接口
Vue.prototype.getLogin_t = function(obj) { Vue.prototype.apipost = function(cmd, msg, success, failed) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; var postData = this.GetPostData(cmd, msg, "");
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0; uni.request({
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0; url: this.host3+'/api/common/post',
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword : method: "Post",
0; header: {
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : ''; 'Content-Type': 'application/json'
this.request2({ //'Referer-Viitto': this.$route.path
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId: SmallShopId,
UserPageType: Up,
CounponPassword: CounponPassword,
KeyWord: KeyWord,
}
}, },
res => { data: postData,
if (res.resultCode == 1) { success: res => {
uni.setStorageSync('mall_UserInfo', res.data); if (res.data.resultCode == 10000) {
uni.removeStorageSync('pid'); let u = uni.getStorageSync("mall_UserInfo");
uni.removeStorageSync('SmallShopId'); if (u) {
uni.removeStorageSync("Up"); this.getLogin_t(u)
uni.removeStorageSync("CounponPassword"); typeof failed == "function" && failed(res.data);
uni.removeStorageSync("KeyWord"); }
} else if (res.data.resultCode != 1) {
if (res.data.message != '') {
uni.showToast({
title: res.data.message,
icon: "none",
});
}
typeof failed == "function" && failed(res.data);
} else {
typeof success == "function" && success(res.data);
} }
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
} }
); })
} },
//获取请求参数
Vue.prototype.GetPostData = function(cmd, msg) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
var token = "";
var key = "";
var MallBaseId = 1; //小程序ID
var TenantId = 1; //商户Id
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: '',
languageId: 0,
cmd: cmd,
MallBaseId: MallBaseId,
TenantId: TenantId,
version:''
}
return postData
},
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0;
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword :
0;
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : '';
this.request2({
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId: SmallShopId,
UserPageType: Up,
CounponPassword: CounponPassword,
KeyWord: KeyWord,
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
uni.removeStorageSync("Up");
uni.removeStorageSync("CounponPassword");
uni.removeStorageSync("KeyWord");
}
}
);
}
// 获取小程序APPID // 获取小程序APPID
Vue.prototype.GetMiniAppId = function() { Vue.prototype.GetMiniAppId = function() {
let appObj = {}; let appObj = {};
...@@ -159,21 +229,21 @@ export default { ...@@ -159,21 +229,21 @@ export default {
}; };
break; break;
case 7: case 7:
appObj = {//韩国馆 appObj = { //韩国馆
AppId: 'wxbb033190e0ffa5db', AppId: 'wxbb033190e0ffa5db',
TenantId: 18, TenantId: 18,
MallBaseId: 8, MallBaseId: 8,
}; };
break; break;
case 8: case 8:
appObj = {//恋爱星球 appObj = { //恋爱星球
AppId: 'wx681f8ad58e6c48e4', AppId: 'wx681f8ad58e6c48e4',
TenantId: 21, TenantId: 21,
MallBaseId: 11, MallBaseId: 11,
}; };
break; break;
case 9: case 9:
appObj = {//罗演的杂货铺 appObj = { //罗演的杂货铺
AppId: 'wx67a8fb290ec58af4', AppId: 'wx67a8fb290ec58af4',
TenantId: 20, TenantId: 20,
MallBaseId: 10, MallBaseId: 10,
......
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