Commit 27c5e253 authored by 罗超's avatar 罗超

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

parents 2acf50ba 202ca62e
...@@ -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",
...@@ -718,6 +729,16 @@ ...@@ -718,6 +729,16 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}] }]
},
//门票
{
"root": "pages/ticketCoupons",
"pages": [
{
"path": "list"
},{
"path": "components/time/index"
}]
} }
], ],
"globalStyle": { "globalStyle": {
......
<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>
...@@ -13,6 +13,39 @@ ...@@ -13,6 +13,39 @@
</view> </view>
<view class="content"> <view class="content">
<view class="content_box"> <view class="content_box">
<view class="c_row" style="padding: 0;border: none;">
<u-tabs style='width: 100%;' :is-scroll="false" name="Name" :list="navs" :active-color="mainColor" :current="active" @change="changeHandler2"
:show-bar="true" :activeFontSize="34" :inactive-color="secondary" :bold="true" height="100" duration="0" font-size="28"></u-tabs>
</view>
<view v-if="active==1" style="width: 100%;padding: 10px 0;">
<view class="c_row" v-if="info.IsShowDate==1" style="justify-content: space-between;border-bottom: 1px solid #E2E2E2;">
<view class="ac_o" @click="goaddressx(1)">
<span class='ac_o_h' v-if="carMsg.StartCityName =='' ">出发地</span>
<span class='ztext2' v-else >{{carMsg.StartCityName}}</span>
</view>
<view class="topB" style="height: 20px;align-items: center;" @click="exchange()">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zhuanghuan.png" mode="aspectFill" style="width: 21px;height: 21px;"></image>
</view>
<view class="ac_o" style="text-align: right;" @click="goaddressx(2)">
<span class='ac_o_h' v-if="carMsg.ArriveCityName =='' ">到达地</span>
<span class='ztext2' v-else >{{carMsg.ArriveCityName}}</span>
</view>
</view>
<view style="width: 100%;color: #919191;font-size: 11px;height: 30px;line-height: 30px;border: none;">
时间
</view>
<view style="width: 100%;height: 50px;display: flex;align-items: center;border-bottom: 1px solid #E2E2E2;font-size: 14px;color: #1B1D1E;font-weight: 800;">
<picker mode="date" :value="cardate" :start="startDate" @change="bindDateChange">
<span>{{showcardate}}</span>
<span style='margin-left: 5px;'>{{showweek}}</span>
</picker>
</view>
<view class="carbtn" @click="godingche">
去订车
</view>
</view>
<view v-if="active==0">
<view class="c_row"> <view class="c_row">
<view class="topB" v-if="info.IsShowCity==1" @click="gocity"> <view class="topB" v-if="info.IsShowCity==1" @click="gocity">
<span class='titext'>城市</span> <span class='titext'>城市</span>
...@@ -85,6 +118,9 @@ ...@@ -85,6 +118,9 @@
@click="goList"> @click="goList">
{{info.ButtonText?info.ButtonText:''}} {{info.ButtonText?info.ButtonText:''}}
</view> </view>
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -141,6 +177,8 @@ ...@@ -141,6 +177,8 @@
return { return {
info: {}, info: {},
contentHeight: 0, contentHeight: 0,
navs:[{Name:'城际专车'},{Name:'定制专车'}],
active:0,
mainColor: '', mainColor: '',
scrollTop: 0, scrollTop: 0,
headStyle: {}, headStyle: {},
...@@ -183,6 +221,22 @@ ...@@ -183,6 +221,22 @@
key: 'c785085c46d1eb41b1ebe8d1ec7fd945', key: 'c785085c46d1eb41b1ebe8d1ec7fd945',
latitude: '', latitude: '',
longitude: '', longitude: '',
carMsg:{
StartCityId:0,
StartCityType:'',
ArriveCityId:0,
ArriveCityType:'',
StartCityName:'',
ArriveCityName:'',
Q_Date:'',
},
cardate:'',
startDate:'',
showcardate:'',
showweek:''
} }
}, },
created() { created() {
...@@ -191,7 +245,7 @@ ...@@ -191,7 +245,7 @@
this.nav = uni.getMenuButtonBoundingClientRect().top; this.nav = uni.getMenuButtonBoundingClientRect().top;
this.headStyle.paddingTop = this.nav + 'px'; this.headStyle.paddingTop = this.nav + 'px';
let myDate = new Date(); let myDate = new Date();
myDate = myDate.setDate(myDate.getDate() + 1); myDate = myDate.setDate(myDate.getDate() + 1);//多一天的日期
myDate = new Date(myDate); myDate = new Date(myDate);
let obj = {} let obj = {}
obj.year = myDate.getFullYear(); //年 obj.year = myDate.getFullYear(); //年
...@@ -225,6 +279,13 @@ ...@@ -225,6 +279,13 @@
this.intervalDay = '半天' this.intervalDay = '半天'
} }
} }
let carDate = new Date();
this.carMsg.Q_Date = carDate.getFullYear() +'-'+(carDate.getMonth() + 1)+'-'+carDate.getDate();
let carday = carDate.getDay();
this.startDate = carDate.getFullYear() +'-'+(carDate.getMonth() + 1)+'-'+carDate.getDate();//从啥时候开始
this.showcardate = (carDate.getMonth() + 1)+'-'+carDate.getDate();
this.showweek = this.getweek(carday) //得到定制专车的周几
}, },
onLoad(options) { onLoad(options) {
this.init() //获取司导首页配置 this.init() //获取司导首页配置
...@@ -235,6 +296,89 @@ ...@@ -235,6 +296,89 @@
}); });
}, },
methods: { methods: {
godingche(){//跳入订车页面
if(this.carMsg.StartCityName==''){
uni.showToast({
title:'请选择出发地址',
icon:'none'
})
return
}
if(this.carMsg.ArriveCityName==''){
uni.showToast({
title:'请选择到达地址',
icon:'none'
})
return
}
//对象编码
let obj = encodeURIComponent(JSON.stringify(this.carMsg))
uni.navigateTo({
url: '/pages/guidecar/bookaCarList?carMsg='+obj
})
},
exchange(){//出发地和到达地互换
let obj = {
StartCityId:this.carMsg.ArriveCityId,
StartCityType:this.carMsg.ArriveCityType,
StartCityName:this.carMsg.ArriveCityName,
ArriveCityId:this.carMsg.StartCityId,
ArriveCityType:this.carMsg.StartCityType,
ArriveCityName:this.carMsg.StartCityName,
}
this.carMsg.StartCityId = obj.StartCityId;
this.carMsg.StartCityType = obj.StartCityType;
this.carMsg.StartCityName = obj.StartCityName;
this.carMsg.ArriveCityId = obj.ArriveCityId;
this.carMsg.ArriveCityType = obj.ArriveCityType;
this.carMsg.ArriveCityName = obj.ArriveCityName;
},
goaddressx(type){
if(type==1){
uni.navigateTo({
url: '/pages/guidecar/pickcarcity2?type='+type
})
}else{
if(this.carMsg.StartCityName==''){
uni.showToast({
title:'请先选择出发地',
icon:'none'
})
}else{
uni.navigateTo({
url: '/pages/guidecar/pickcarcity2?type='+type+'&StartCityId='+this.carMsg.StartCityId+'&StartCityType='+this.carMsg.StartCityType
})
}
}
},
bindDateChange(e){
let value = e.detail.value;
let carDate = new Date(value);
if(carDate>=(new Date())){
this.carMsg.Q_Date = value;
this.cardate = value;
let carday = carDate.getDay();
this.showcardate = (carDate.getMonth() + 1)+'-'+carDate.getDate();
this.showweek = this.getweek(carday) //得到定制专车的周几
}else{
uni.showToast({
title:'时间不能小于今天',
icon:'none'
})
}
},
changeHandler2(e){
this.active = e
},
getRegeo() { //进入页面获取当前地址位置 getRegeo() { //进入页面获取当前地址位置
this.amapPlugin.getRegeo({ this.amapPlugin.getRegeo({
success: (data) => { success: (data) => {
...@@ -296,6 +440,20 @@ ...@@ -296,6 +440,20 @@
getPickcar(Name) { //选择取消地址 getPickcar(Name) { //选择取消地址
this.Pickcar = Name this.Pickcar = Name
}, },
getcar(ID,type,Name,cartype){//定制专车的返回地址
if(cartype==1){
this.carMsg.StartCityId = ID;
this.carMsg.StartCityType = type;
this.carMsg.StartCityName = Name;
this.carMsg.ArriveCityId = 0;
this.carMsg.ArriveCityType = '';
this.carMsg.ArriveCityName = '';
}else{
this.carMsg.ArriveCityId = ID;
this.carMsg.ArriveCityType = type;
this.carMsg.ArriveCityName = Name;
}
},
radioChange(item) { //车辆类型 radioChange(item) { //车辆类型
this.carName = item.Name; this.carName = item.Name;
this.msg.CarClass = item.Id; this.msg.CarClass = item.Id;
...@@ -634,6 +792,14 @@ ...@@ -634,6 +792,14 @@
color: #1C1E1F; color: #1C1E1F;
font-weight: bold; font-weight: bold;
} }
.guidecar .ztext2 {
font-size: 28rpx;
color: #1C1E1F;
font-weight: bold;
display: inline-block;
width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.guidecar .btnstyle { .guidecar .btnstyle {
width: 100%; width: 100%;
...@@ -671,4 +837,27 @@ ...@@ -671,4 +837,27 @@
justify-content: space-between; justify-content: space-between;
border-top: 1px solid #f5f5f5 border-top: 1px solid #f5f5f5
} }
.guidecar .ac_o{
width: calc((100vw - 72px - 30px)/2);
height: 40px;
line-height: 40px;
}
.guidecar .ac_o_h{
color: #919191;
}
.guidecar .carbtn{
width: 100%;
margin-top: 34px;
height: 44px;
border-radius: 10px;
background: #111111;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #FFF;
margin-bottom: 20px;
}
</style> </style>
<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>
...@@ -1220,10 +1220,21 @@ ...@@ -1220,10 +1220,21 @@
}, },
yj(){ yj(){
let obj ={ArriveCityId: 7,
ArriveCityName: "九寨沟",
ArriveCityType: 2,
Q_Date: "2021-5-25",
StartCityId: 262,
StartCityName: "成都",
StartCityType: 1}
obj = encodeURIComponent(JSON.stringify(obj))
uni.navigateTo({ uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId=123978' url: '/pages/guidecar/bookaCarList?carMsg='+obj
// url: '/pages/blindDate/personal/IDidentification'
}) })
// 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>
<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>
//节假日信息
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
<template>
<view class="content">
<scroll-view :scroll-y="true" style="height: 100%;">
<view class="header">
<!-- <view class="bar"></view>
<view class="set text-gray">
<text @click="close" style="font-size:40upx;">返回</text>
<text @click="reset" style="font-size:35upx;color:#DDDDDD">清空</text>
</view> -->
<!-- <view class="in-and-out">
<view class="item" v-if="start.length > 0">
<view style="font-size:30upx;color:#C0C0C0">入住日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ startDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ startWeek }}</view>
</view>
<view class="item text" v-if="start.length == 0">
<view>入住日期</view>
</view>
<view class="item">
<view class="count-border" :class="day == 0 ? 'gray' : 'orange'">
<view class="count" style="font-size:26upx;line-height:26upx;">{{ day }}</view>
</view>
</view>
<view class="item text" v-if="end.length == 0">
<view>离店日期</view>
</view>
<view class="item" v-if="end.length > 0">
<view style="font-size:30upx;color:#C0C0C0">离店日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ endDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ endWeek }}</view>
</view>
</view> -->
<view style="font-size: 32rpx;color:#111;text-align: center;padding:30rpx 0;">
<text>选择日期</text>
</view>
<view class="week">
<view></view>
<view></view>
<view></view>
<view></view>
<view></view>
<view></view>
<view></view>
</view>
</view>
<view class="section">
<view v-for="(res, line) in resDate" class="item" :key="line">
<view class="year">{{ res.year }}{{ res.month }}</view>
<view class="day">
<view v-for="week in res.oneDayWeek" class="day-list"
:style="{ width: (dayWidth - 10) / 7 + 'px' }"></view>
<view @tap="selectDay(line, index,(line+1).toString()+index)" v-for="(item, index) in res.day"
:key="index" class="day-list" :class="[
line == start[0] && index == start[1] ? 'bg-orange select-style' : '',
(line >= start[0] && line <= end[0] && index > start[1] && index < end[1]) || (line >= start[0] && index > start[1] && line < end[0]) || (line <= end[0] && index < end[1] && line > start[0]) || (line < end[0] && line > start[0]) ? 'bg-higlt-orange' : '',
line == 0 && index + 1 < nowDay ? 'time-out' : '',
isNaN(item) ? 'is-festival' : '',
(isNaN(item) && line == start[0] && index == start[1]) || (isNaN(item) && line == end[0] && index == end[1]) ? 'not-festival' : '',
(priceStauts.length > 0 && priceStauts[line][index] <0 && start.length>0 && end.length>0) ||(priceStauts.length > 0 && priceStauts[line][index] <0 &&start.length==0 && end.length==0)?'not-sub' : '',
priceStauts.length > 0 && end.length==0 && start.length>0 && priceStauts[line][index]<0 && line+index*2!=lastNot[0]+lastNot[1]*2? 'not-sub' : '',
]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}">
<view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view>
<view class="select-style" v-if="line == start[0] && index == start[1]">入住</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">离店</view>
<view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0">
<view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view>
<view v-if="priceStauts[line][index] <0">无房</view>
</view>
</view>
</view>
</view>
</view>
<view class="submit">
<button class="sub-btn" :disabled="!isSub" @click="submit">
<text v-if="isSub">确定</text>
<text v-if="!isSub">请选择入住日期</text>
</button>
</view>
</scroll-view>
</view>
</template>
<script>
//引入节假日的数据,也可以用后台返回去渲染
import json from './day.js';
export default {
computed: {
//房间是否能预订
isSub() {
if (this.priceStauts.length > 0) {
for (var i = this.start[0]; i <= this.end[0]; i++) {
if (i == this.start[0]) {
for (var j = this.start[1]; j < this.date[i].length; j++) {
if (this.priceStauts[i][j] == -1) return false
}
} else if (this.end[0] == this.start[0]) {
for (var j = this.start[1]; j < this.end[1]; j++) {
if (this.priceStauts[i][j] == -1) return false
}
} else if (i == this.end[0]) {
for (var j = 0; j < this.end[1]; j++) {
if (this.priceStauts[i][j] == -1) return false
}
} else {
for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) return false
}
}
}
}
return this.start.length == 2 && this.end.length == 2 ? true : false
},
//计算日历里的节假日
resDate() {
if (this.date.length == 0) return
for (var i = 0; i < this.date.length; i++) {
for (var j = 0; j < this.festival.length; j++) {
if (this.festival[j].year == this.date[i].year && this.festival[j].month == this.date[i].month) {
for (var k = 0; k < this.festival[j].festival.length; k++) {
if (this.date[i].day.indexOf(this.festival[j].festival[k].day) != -1) {
this.date[i].day[this.date[i].day.indexOf(this.festival[j].festival[k].day)] = this
.festival[j].festival[k].name;
}
}
}
}
}
return this.date;
}
},
data() {
return {
out: 0,
festival: json, //节假日
type: '-', //日期分隔符
date: [], //日期数组对象
dayWidth: 0, //日期的宽度
nowDay: 0, //当前时间的日
start: [], //入住时间
count: 6, //显示月的数量
startDay: '', //入住日期
startWeek: '', //入住时间的周几
end: [], //离开时间
endDay: '', //离开日期
endWeek: '', //离开时间的周几
day: 0, //多少晚
priceStauts: [], //价格状态
lastNot: [0, 10] //前置的无房操作
};
},
mounted () {
console.log("进入了....")
uni.getSystemInfo({
success: res => {
this.dayWidth = res.windowWidth;
}
});
this.setDate();
this.nowDay = new Date().getDate();
/*默认入住离店日期,今日入住明日离店,此处应在setDefaultDate函数内传入vuex里保存的日期进行默认操作
*不推荐使用本地缓存,下边只是使用缓存的示例
*/
uni.getStorage({
key: 'Time',
success: (res) => {
console.log(res)
if (res && res.data) {
var obj = JSON.parse(res.data)
this.start = this.setDefaultDate(obj.start);
this.end = this.setDefaultDate(obj.end);
}
},
fail: () => {
this.start = this.setDefaultDate(this.getDefaultDate(0));
this.end = this.setDefaultDate(this.getDefaultDate(1));
}
})
//如果需要日期的价格,-1为无房,其他价格代表正常
// if (option && option.request) {
// uni.request({
// url: 'http://api.tcdbp.com', //当需要日历价格的时候请求的后台接口地址
// method: 'GET',
// data: {
// count: this.count //获取几个月分的数据
// },
// success: res => {
// if (res.data.status != 1) {
// return uni.showToast({
// title: res.data.message,
// icon: 'none',
// mask: true
// });
// }
// this.priceStauts = res.data.data;
// },
// fail: () => {
// uni.showToast({
// title: '网络错误请稍后再试',
// icon: 'none',
// mask: true
// });
// }
// });
// }
},
watch: {
//离店日期
end(newVal) {
if (this.end.length != 0) {
//计算选择离店日期
this.endDay = this.setMonth(newVal[0]) + this.isFestival(newVal[0], newVal[1]) + '日';
this.endWeek = this.getWeek(this.date[newVal[0]].year + '/' + this.date[newVal[0]].month + '/' + this
.isFestival(newVal[0], newVal[1]));
//计算天数
var startDay = this.date[this.start[0]].year + '/' + this.date[this.start[0]].month + '/' + this
.isFestival(this.start[0], this.start[1]);
var endDay = this.date[newVal[0]].year + '/' + this.date[newVal[0]].month + '/' + this.isFestival(this
.end[0], this.end[1]);
this.day = this.getDay(startDay, endDay);
} else {
this.day = 0;
}
},
//入住日期
start(newVal) {
if (this.start.length > 0) {
this.startDay = this.setMonth(newVal[0]) + this.isFestival(newVal[0], newVal[1]) + '日';
this.startWeek = this.getWeek(this.date[newVal[0]].year + '/' + this.date[newVal[0]].month + '/' + this
.isFestival(
newVal[0], newVal[1]));
}
if (this.priceStauts.length > 0) {
console.log(this.lastNot)
for (var i = newVal[0]; i < this.priceStauts.length; i++) {
if (i == newVal[0]) {
for (var j = newVal[1]; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j]
console.log(this.lastNot)
return
}
}
} else {
for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j];
console.log(this.lastNot)
return
}
}
}
}
//清空
this.lastNot = []
}
}
},
methods: {
//月份补零
setMonth(dateIndex) {
let month = this.date[dateIndex].month;
if (month < 10) {
month = '0' + month;
}
return month + '月';
},
//如果是节假日名称则返回选择的日期天数
isFestival(line, index, push = false) {
var date = this.date[line].day[index];
if (isNaN(date)) {
var newIndex = this.date[line].day.indexOf(date) + 1;
if (push) return newIndex;
return newIndex < 10 ? '0' + newIndex : newIndex;
} else {
if (push) return date;
return date < 10 ? '0' + date : date;
}
},
//获取今天明天的日期
getDefaultDate(AddDayCount) {
var dd = new Date();
dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
var year = dd.getFullYear();
var mon = dd.getMonth() + 1; //获取当前月份的日期
var day = dd.getDate();
return year + '-' + mon + '-' + day;
},
//设置入住时间 如果没有传值则根据默认值设置
setDefaultDate(data) {
var arr = [0, parseInt(this.nowDay - 1)];
var start = data.indexOf('-') != -1 ? data.split('-') : data.split('/');
var year = new Date().getFullYear();
var month = new Date().getMonth() + 1;
for (var i = 0; i < this.date.length; i++) {
if (this.date[i].year == start[0] && this.date[i].month == start[1]) {
if (year == start[0] && month == start[1] && start[2] < this.nowDay) {
arr = [i, parseInt(this.nowDay - 1)];
} else {
arr = [i, parseInt(start[2] - 1)];
}
break;
}
}
return arr;
},
//清空
reset() {
this.start = [];
this.end = [];
this.day = 0;
},
//补零操作
setPull(day) {
if (day < 10) {
day = '0' + day;
}
return day
},
//计算天数
getDay(date1, date2) {
//获得天数
//date1:开始日期,date2结束日期
var a1 = Date.parse(new Date(date1));
var a2 = Date.parse(new Date(date2));
var day = parseInt((a2 - a1) / (1000 * 60 * 60 * 24)); //核心:时间戳相减,然后除以天数
return day;
},
//计算周几
getWeek(date) {
var weekDay = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
var myDate = new Date(Date.parse(date));
return weekDay[myDate.getDay()];
},
//选择入住离开
selectDay(line, index) {
if (line == 0 && index + 1 < this.nowDay) return;
//如果有入住情况和价格则需要进行一些列的判断
if (this.priceStauts.length > 0) {
if ((this.start.length == 0 && this.priceStauts[line][index] < 0) || (this.end.length > 0 && this
.priceStauts[line][index] < 0)) {
return uni.showToast({
title: '该日期已被预订',
icon: 'none'
});
}
if ((this.start.length > 0 && line < this.start[0]) || (line == this.start[0] && this.start[1] >
index)) {
if (this.priceStauts[line][index] < 0)
return uni.showToast({
title: '该日期已被预订',
icon: 'none'
});
this.start = [line, index];
this.end = [];
return;
}
if (this.start.length > 0 && this.end.length == 0) {
if (this.start[0] - line == 0) {
for (var j = this.start[1]; j < index; j++) {
if (this.priceStauts[line][j] < 0)
return uni.showToast({
title: '很抱歉,所选入离店时间包含无房日期',
icon: 'none',
mask: true
});
}
} else {
//如果不在同一个月份有三种情况需要处理
for (var i = this.start[0]; i <= line; i++) {
//开始日期到开始日期当月的最大日期是否包含无房情况
if (i == this.start[0]) {
for (var j = this.start[1]; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] < 0)
return uni.showToast({
title: '很抱歉,所选入离店时间包含无房日期',
icon: 'none',
mask: true
});
}
} else if (i == line) {
//结束日期到当月结束日期之前是否包含无房情况
for (var j = 0; j < index; j++) {
if (this.priceStauts[i][j] < 0)
return uni.showToast({
title: '很抱歉,所选入离店时间包含无房日期',
icon: 'none',
mask: true
});
}
} else {
//中间间隔的月份需要检查每一天是否包含无房情况
for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] < 0)
return uni.showToast({
title: '很抱歉,所选入离店时间包含无房日期',
icon: 'none',
mask: true
});
}
}
}
}
}
}
//如果没有入住时间
if (this.start.length == 0) {
//填充入住时间
this.start = [line, index];
} else if (this.start.length > 0 && this.start[0] == line && this.start[1] == index && this.end.length ==
0) {
return;
} else {
//如果没有离开时间
if (this.end.length == 0) {
//如果有价格和入住离开情况则需要进行判断所选的离店时间时候包含无房日期
if (line < this.start[0] || (line == this.start[0] && index < this.start[1])) {
this.end = this.start;
this.start = [line, index];
} else {
//如果离开时间比入住时间晚则填充
this.end = [line, index];
}
} else {
//如果有离开时间则清空离开时间重新填充入住时间
this.start = [line, index];
this.end = [];
}
}
},
//设置日历
setDate() {
//年份
var year = new Date().getFullYear();
//月份
var month = new Date().getMonth();
console.log("执行了...")
for (let i = 0; i < this.count; i++) {
var day = [];
var week = 0;
for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) {
day.push(j + 1);
}
this.date.push({
year: year,
month: month + 1,
day: day,
oneDayWeek: new Date(Date.parse(year + '/' + (month + 1) + '/' + '01')).getDay()
});
if (month == 11) {
year += 1;
month = 0;
} else {
month++;
}
}
return this.date;
},
//关闭
close() {
uni.navigateBack({
delta: 1
});
},
//确定入住离店事件提交
submit() {
var obj = {
/* startYMD: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type + this.isFestival(
this.start[0], this.start[1]),
startMD: this.date[this.start[0]].month + this.type + this.isFestival(this.start[0], this.start[1]),
startDay: this.startDay,
startWeek: this.startWeek,
endYMD: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this.isFestival(this
.end[0], this.end[1]),
emdMD: this.date[this.end[0]].month + this.type + this.type + this.isFestival(this.end[0], this.end[1]),
endDay: this.endDay,
endWeek: this.endWeek,
day: this.day */
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),
end: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this
.isFestival(this.end[0], this.end[1], true),
startDay: this.date[this.start[0]].month + '-' + this.isFestival(this.start[0], this.start[1],
true),
endDay: this.date[this.end[0]].month + '-' + this.isFestival(this.end[0], this.end[1], true),
day: this.day
};
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例
*/
uni.setStorage({
key: 'Time',
data: JSON.stringify(obj)
})
this.$emit("finish",obj)
//价格清单,应该存入vuex获取缓存中
// if (this.priceStauts.length > 0) {
// var price = []
// if (this.end[0] - this.start[0] == 0) {
// for (var i = this.start[1]; i < this.end[1]; i++) {
// var day = this.date[this.start[0]].year + this.type + this.setPull(this.date[this.start[0]]
// .month) + this.type + this.isFestival(
// this.start[0], i)
// price.push({
// day_str: day,
// price: this.priceStauts[this.start[0]][i]
// })
// }
// } else {
// for (var i = this.start[0]; i <= this.end[0]; i++) {
// console.log(i)
// if (i == this.start[0]) {
// for (var j = this.start[1]; j < this.date[i].day.length; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else if (i == this.end[0]) {
// for (var j = 0; j < this.end[1]; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else {
// for (var j = 0; j < this.date[i].day.length; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// }
// }
// }
// //加入缓存
// uni.setStorage({
// key: 'Price',
// data: JSON.stringify(price)
// })
// }
//跳转到上一页
// uni.navigateBack({
// delta: 1
// })
}
}
};
</script>
<style>
/**确认按钮**/
.submit {
width: 100%;
background: white;
position: fixed;
bottom: 0upx;
height: auto;
}
.sub-btn {
height: auto;
border-radius: 10upx;
background: #111;
color: white;
}
.content {
height: 100%;
z-index: 999;
}
/**不能预订**/
/* 入住离开时间的color */
.bg-orange {
background: #111111 !important;
border-radius: 6px 0px 0px 6px !important;
}
.bg-higlt-orange {
background-color: #fff;
}
/* 节假日的日期样式 */
.is-festival {
font-size: 22rpx !important;
color: #000 !important;
}
/** 非节假日的日期样式**/
.not-festival {
font-size: 18upx;
color: white;
}
/***入住离开时间的日历样式*/
.not-sub {
color: #222222;
background: #dddddd;
}
.select-out-item {
background: #ffffff;
}
.select-style {
color: white !important;
font-size: 20rpx !important;
/* font-size: 20upx; */
/* padding-top: 4upx; */
}
.time-out {
/* text-decoration: line-through; */
color: #ccc !important;
}
/**
* 点击日期的样式
*/
.bg {
background: orange;
}
/**
* 日期部分
*/
.section {
width: 100%;
padding-bottom: 150upx;
height: auto;
padding-top: 176rpx;
background-color: #F1F4F6;
}
.section>.item>.year {
text-align: center;
height: 50rpx;
font-weight: bold;
/* padding-left:30upx;
padding-right: 30upx; */
font-size: 24rpx;
line-height: 50rpx;
color: #1B1D1E;
}
.section>.item>.day {
display: flex;
flex-wrap: wrap;
text-align: center;
margin-left: 5px;
margin-right: 5px;
}
.section>.item>.day>.day-list {
margin-top: 30upx;
margin-bottom: 30upx;
min-height: 100upx;
max-height: 180upx;
display: flex;
font-size: 26rpx;
flex-direction: column;
align-items: center;
justify-content: center;
color:#1B1D1E;
}
/**
* 头部固定
*/
.header {
position: fixed;
top: 0;
width: 100%;
/* height: 400upx; */
background: white;
box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.06);
}
.bar {
width: 100%;
height: var(--status-bar-height);
background: #222222;
}
/**
* 关闭清空
*/
.set {
height: 100upx;
padding-left: 30upx;
padding-right: 30upx;
align-items: center;
display: flex;
justify-content: space-between;
}
/**
* 入住离开时间
*/
.in-and-out {
height: 210upx;
padding-left: 30upx;
padding-right: 30upx;
display: flex;
align-items: center;
justify-content: space-between;
}
/**
* 入住离开的view
*/
.in-and-out>.item {
display: flex;
flex-direction: column;
height: 100upx;
}
/**
* 未选择入离时间时的文字样式
*/
.in-and-out>.text {
margin-top: 100upx;
font-weight: bold;
font-size: 36upx;
color: #c0c0c0;
}
/**
* 一共选择了多少晚的样式
*/
.in-and-out>.item>.count-border {
width: 200upx;
font-size: 28upx;
height: 40upx;
margin-top: 48upx;
text-align: center;
}
.gray {
color: #c0c0c0;
border-bottom: 1px solid #c0c0c0;
}
.orange {
color: orange;
border-bottom: 1px solid orange;
}
/**
* 共多少晚
*/
.in-and-out>.item>.count-border>.count {
font-size: 10px;
}
/**
* 周一到周日
*/
.week {
/* height: 70upx; */
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 25px;
padding-right: 25px;
font-size: 24rpx;
color:#1B1D1E;
background: white;
margin-bottom: 16rpx;
}
.isa {
color: red;
}
.isa2 {
color: red;
}
</style>
<template>
<view class="hotel-list">
<view class="search-box">
<view style="width: 1px; flex: 1;">
<u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search>
</view>
</view>
<view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<!-- 推荐排序 -->
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" @change="change">
</u-dropdown-item>
<!-- 景点类型 -->
<u-dropdown-item v-model="searchObj.enclosure" :title="optionsTitle[1]" :options="options2" @change="change2"></u-dropdown-item>
<u-dropdown-item v-model="searchObj.sort" :title="optionsTitle[2]" :options="options1" @change="change">
</u-dropdown-item>
</u-dropdown>
</view>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="95%" :safe-area-inset-bottom="true">
<canlendar @finish="chosenDateResult"></canlendar>
</u-popup>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="ticket-list">
<view v-for="(item,index) in dataList" :key="item.ID" class="ticket-list-item">
<view class="left-box">
<image class="ticket-img" :src="item.CoverImg" mode="aspectFit"></image>
</view>
<view class="right-box">
<view class="ticket-name">
{{item.Name}}
</view>
<view class="rate-box">
<u-rate v-model="item.ScoreNum" active-color="#FEB969"></u-rate>
<view class="rate">
{{item.ScoreNum}}
<text v-if="item.ScoreNum.length==1">.0</text>
</view>
</view>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
</view>
</template>
<script>
import rangeSlider from "./components/range-slider.vue"
import canlendar from "./components/time/index.vue"
export default {
data() {
return {
dataList:[],
msg:{
pageIndex:1,
pageSize:10,
Name:"",
FoodTypeIds:"",
IsFree:-1,
IsSameDayBuy:-1,
IsWorryFreeRefund:-1,
OrderBy:1,
},
page_count:1,
loading: false,
status: "loadmore",
count:0,
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
showTimePopup:false,
value1: 1,
value2: 2,
searchObj:{
searchKey:"",
sort:1,
enclosure:-1,
rateAndPrice:{
price:{},
priceText:"不限",
rate:[]
},
date:{}
},
tempRateAndPrice:{
price:{},
priceText:"不限",
rate:[]
},
optionsTitle: [
"推荐排序",
"景点类型",
"筛选"
],
rates: [
{
label:"二星/经济",
value:1
},
{
label:"三星/舒适",
value:2
},
{
label:"四星/高档",
value:3
},
{
label:"五星/豪华",
value:4
}
],
options1: [
{
label: '销量最高',
value: 1,
},
],
options2: [
{
label: '不限',
value: -1,
},
{
label: '宝镜岩',
value: 1,
},
{
label: '盆景滩',
value: 2,
},
{
label: '芦苇海',
value: 3,
},
{
label: '五彩池',
value: 4,
},
{
label: '镜海',
value: 5,
},
{
label: '犀牛海',
value: 6,
},
{
label: '诺日朗瀑布',
value: 7,
},
{
label: '火花海',
value: 8,
},
],
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"
}
}
},
components: {
rangeSlider,
canlendar
},
created() {
uni.setNavigationBarTitle({
title: "门票",
});
this.getScenicType();// 获取景点类型
this.getList();// 获取景点门票类型
},
methods: {
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.getList();
} else {
this.status = "nomore";
}
},
chosenDateResult(obj){
this.searchObj.date=obj
this.showTimePopup=false
},
chosenDate(){
// uni.navigateTo({
// url:"/pages/hotel/components/time/index"
// })
this.showTimePopup=true
},
setHotelRate(rateId){
let temp=this.tempRateAndPrice.rate.indexOf(rateId)
if(temp==-1){
this.tempRateAndPrice.rate.push(rateId)
}else{
this.tempRateAndPrice.rate.splice(temp,1)
}
},
resetPrice(){
this.optionsTitle[2]="价格/星级"
this.searchObj.rateAndPrice={
price:{
minValue:0,
maxValue:1000
},
priceText:"不限",
rate:[]
}
this.closeDropdown();
},
surePrice(){
let result=""
if(this.tempRateAndPrice.rate.length>0){
this.rates.forEach(x=>{
if(this.tempRateAndPrice.rate.indexOf(x.value)!=-1){
result+=x.label+","
}
})
}
if(this.tempRateAndPrice.priceText!="不限"){
result+=this.tempRateAndPrice.priceText
}
result=result==""?"价格/星级":result
console.log(result)
this.optionsTitle[2]=result
this.$forceUpdate()
this.searchObj.rateAndPrice=this.tempRateAndPrice
this.closeDropdown();
},
rangechange4(e){
if(e.minValue==0){
if(e.maxValue==1000){
this.tempRateAndPrice.priceText="不限"
}else{
this.tempRateAndPrice.priceText=`¥${e.maxValue}以下`
}
}else if(e.maxValue==1000){
this.tempRateAndPrice.priceText=`¥${e.minValue}以上`
}else{
this.tempRateAndPrice.priceText=`¥${e.minValue} - ¥${e.maxValue}之间`
}
},
closeDropdown() {
this.$refs.uDropdown.close();
},
open(index) {
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮
// 同时内部会自动给当前展开项进行高亮
this.$refs.uDropdown.highlight();
if(index==2){
this.tempRateAndPrice=this.searchObj.rateAndPrice
}
},
close(index) {
// 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
this.$refs.uDropdown.highlight(index);
},
change(index) {
let temp = this.options1.find(x => {
if (x.value == index) {
return x
} else {
return false
}
})
this.optionsTitle[0] = temp.label
},
change2(index){
if(index!=-1){
let temp = this.options2.find(x => {
if (x.value == index) {
return x
} else {
return false
}
})
this.optionsTitle[1] = temp.label
}else{
this.optionsTitle[1] = "附近"
}
},
// 获取景点类型
getScenicType(){
this.request2({
url: '/api/AppletDining/GetFoodType',
data: {
ClassType:1
}
},
res => {
console.log(325,res.data)
}
);
},
//获取景区门票列表
getList(){
this.request2({
url: '/api/AppletDining/GetTicketCouponsPage',
data: this.msg
},
res => {
this.page_count = res.data.pageCount;
this.dataList=res.data.pageData;
if (this.page_count == 1) {
this.status = "nomore";
}
console.log(336,res.data)
}
);
}
},
}
</script>
<style lang="scss" scoped>
.hotel-list {
height: 100vh;
}
.hotel-list .search-box {
height: 88rpx;
background: #ECF1F4;
border-radius: 44rpx;
display: flex;
align-items: center;
padding: 19rpx 30rpx;
margin: 0 30rpx;
}
.hotel-list .search-box .date {
width: 104rpx;
height: 50rpx;
font-size: 22rpx;
font-weight: 500;
color: #111111;
line-height: 29rpx;
}
.hotel-list .search-box .days {
height: 40rpx;
padding: 8rpx 30rpx 8rpx 19rpx;
color: #DFBE6E;
border-right: 1px solid #E2E2E2;
font-size: 24rpx;
}
.hotel-rate-box{
display: flex;
align-items: center;
}
.hotel-rate{
width: 160rpx;
height: 60rpx;
background: #ECF1F4;
border-radius: 10rpx;
font-size: 26rpx;
color: #999999;
line-height: 60rpx;
margin-right: 15rpx;
text-align: center;
}
.hotel-rate:last-child{
margin-right: 0;
}
.hotel-rate.active{
background: #111111;
color: #FFFFFF;
}
.ticket-list{
padding: 0 30rpx;
.ticket-list-item{
height: 340rpx;
padding: 30rpx 0;
display: flex;
// justify-content: space-between;
.left-box{
width: 220rpx;
height: 280rpx;
// background-color: #CFCFCF;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 20rpx;
overflow: hidden;
.ticket-img{
width: 100%;
height: 100%;
}
}
.right-box{
margin-left: 30rpx;
.ticket-name{
height: 70rpx;
line-height: 70rpx;
// display: flex;
// align-items: center;
// justify-content: center;
}
.rate-box{
display: flex;
align-items: center;
.rate{
margin-left: 10rpx;
color: #999999;
}
}
}
}
}
</style>
...@@ -7,6 +7,9 @@ export default { ...@@ -7,6 +7,9 @@ export default {
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,6 +79,73 @@ export default { ...@@ -76,6 +79,73 @@ export default {
} }
}); });
} }
//请求app接口
Vue.prototype.apipost = function(cmd, msg, success, failed) {
var postData = this.GetPostData(cmd, msg, "");
uni.request({
url: this.host3+'/api/common/post',
method: "Post",
header: {
'Content-Type': 'application/json'
//'Referer-Viitto': this.$route.path
},
data: postData,
success: res => {
if (res.data.resultCode == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
typeof failed == "function" && failed(res.data);
}
} 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失效再次登录接口 // token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) { Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
...@@ -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