Commit a7ea261e authored by 华国豪's avatar 华国豪 🙄
parents e29507b0 735b4f75
......@@ -2,6 +2,10 @@
color:#000000;
background: #fff;
}
#searchView{
height: 70rpx;
width: 100%;
}
::-webkit-scrollbar {
width: 0;
height: 0;
......@@ -25,6 +29,10 @@
.commonF .f24{
font-size: 24rpx;
}
.num_wrap .btn[disabled] {
border: 1px solid #888888;
color: #888888;
}
.commonF .f26{
font-size: 26rpx;
}
......@@ -155,6 +163,7 @@ image{
height:90rpx;
background:rgba(245,245,245,1);
padding: 0 26rpx;
position: relative;
}
.commonF .FlTitleView .text{
font-size:20rpx;font-weight:700;
......@@ -166,4 +175,12 @@ image{
width: 100%;
background: #F4F4F4;
height: 30rpx;
}
.commonF .Nodataview{
width: 100%;
box-sizing: border-box;
padding: 30rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
\ No newline at end of file
......@@ -52,7 +52,7 @@ App({
let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + getApp().state.admin.token + '&' + 'key=' + '')
wx.request({
url: 'http://192.168.2.214:8082/api/Common/Post',
url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
// url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
// url: 'https://reborn.oytour.com/api/common/post', //线上
// url: ' http://test.viitto.com/api/common/post',
......@@ -124,6 +124,7 @@ App({
let timestamp = (new Date()).valueOf()
let sign = md5('msg=' + encodeURIComponent(JSON.stringify(msg)).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + token + '&' + 'key=' + secretKey)
wx.request({
// url: 'https://reborn.oytour.com/api/common/post'+ url, //线上
// url: 'http://efficient.oytour.com/'+ url, //线上
// url: 'http://47.96.12.235:9001/' + url, //测试
url: 'http://192.168.2.215:9000/'+ url,
......
{
"pages": [
"pages/freeTravel/freeList/freeList",
"pages/GroupTour/GroupTour",
"pages/SearchPage/SearchPage",
"pages/GroupTour/FillOrder/FillOrder",
"pages/GroupTour/ChDateNum/ChDateNum",
"pages/GroupTour/GroupDetails/GroupDetails",
"pages/product/product",
"pages/freeTravel/freeList/freeList",
"pages/local/localhome",
"pages/freeTravel/free",
"pages/Home/home",
"pages/login/login",
"pages/GroupTour/Pay/Pay",
"pages/GroupTour/FillOrder/FillOrder",
"pages/GroupTour/ChDateNum/ChDateNum",
"pages/GroupTour/GroupDetails/GroupDetails",
"pages/GroupTour/GroupList/GroupList",
"pages/product/product",
"pages/member/member",
"pages/member/memberCenter/memberCenter",
"pages/member/memberInfo/memberInfo",
......
......@@ -29,11 +29,17 @@ Component({
* 组件的方法列表
*/
methods: {
InputFous(){
wx.navigateTo({
url: '/pages/SearchPage/SearchPage',
})
},
getCityList() {
app.$api('b2b_get_site', {}).then(res => {
this.setData({
cityList: res
})
console.log(this.data.cityList)
}).catch(err => {})
},
SetCity(e) {
......
<view class="newsite" catchtouchmove="{{CitySite}}">
<view class="{{CitySite?'newsite back':'newsite'}}" catchtouchmove="{{CitySite}}">
<view style="background:#fff;padding:10rpx 30rpx">
<view class='cityView' hidden="{{InputFous}}">
<view bindtap='ChangeSite' class="head1" style="width:150rpx">
<image src="../../images/home/location.png"></image>
......@@ -7,10 +7,12 @@
<view style="color:#CCCCCC">|</view>
<view class="head3" style="width:500rpx">
<image src="../../images/home/search.png"></image>
<input style="width:100%" placeholder="搜索目的地/交通/景点/酒店"/>
<input bindtap="InputFous" style="width:100%" placeholder="搜索目的地/交通/景点/酒店"/>
</view>
<!-- bindtap="ListenInput" -->
</view>
</view>
<view bindtap="CloseCity" data-target="self" class="cityChange" hidden="{{!CitySite}}">
<view class="CityView">
<view catchtap='SetCity' data-msg="{{item}}" class="CityItem" wx:for="{{cityList}}" wx:key="index">{{item.siteName}}</view>
......@@ -19,36 +21,6 @@
</view>
<!-- 点击输入框 -->
<view class="Inputfocus" hidden="{{!InputFous}}">
<view class="head3" style="width:600rpx">
<image src="../../images/home/search.png"></image>
<input style="width:550rpx;display:inline-block" placeholder="搜索目的地/交通/景点/酒店"/>
</view>
<text class='Seach'>搜索</text>
<view>
<view class="hotTitle">热门推荐</view>
<view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>日本一日游</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>美食</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>日本一日游</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>签证</text>
</view>
</view>
</view>
</view>
<!-- 站点显示隐藏 -->
<!-- <view class="Site" catchtouchmove="true">
<view style="background:#fff;padding:15rpx 0">
......
/* component/Search/search.wxss */
.cityView {
width: 94%;
background: #f2f2f2;
border-radius: 30rpx;
padding: 0 10rpx;
box-sizing: border-box;
display: flex;
align-items: center;
margin: 0 auto;
height: 60rpx;
line-height: 60rpx;
padding: 0 10rpx;
}
.cityView .head1 {
......@@ -43,67 +41,12 @@
/* */
.Inputfocus {
position: fixed;
width: 100%;
height: 100%;
background: #fff;
z-index: 100;
padding: 0 30rpx;
}
.Inputfocus .head3 image {
width: 26rpx;
height: 26rpx;
margin-right: 6rpx;
}
.Inputfocus .head3 {
display: inline-flex;
align-items: center;
color: #888;
background: #f2f2f2;
font-size: 26rpx;
padding-left: 30rpx;
height: 60rpx;
border-radius: 30rpx;
}
.Inputfocus .Seach {
font-size: 30rpx;
font-weight: 500;
color: rgba(238, 68, 84, 1);
margin-left:20rpx;
}
.Inputfocus .hotTitle{
font-size:30rpx;
margin-top:40rpx;
}
.HotItem image{
width: 18rpx;
height: 22rpx;
margin-right:20rpx;
}
.HotItem{
height: 60rpx;
line-height: 60rpx;
padding: 0 25rpx;
background:rgba(242,242,242,1);
border-radius:30rpx;
color: #333333;
font-size: 24rpx;
display: inline-block;
margin-top:30rpx;
margin-right:30rpx;
}
.cityChange{
background:rgba(17,17,17,0.5);
position: fixed;
top: 75rpx;
position: absolute;
width: 100%;
z-index: 100;
height:calc( 100% - 75rpx);
height: 100%;
}
.CityView{
background: #fff;
......@@ -111,7 +54,7 @@
}
.Site{
height: 100%;
background:rgba(17,17,17,0.5);
position: fixed;
top: 0;
width: 100%;
......@@ -123,6 +66,13 @@
font-size:26rpx;
}
.newsite{
position: relative;
padding-top:15rpx;
position: absolute;
margin-bottom:30rpx;
z-index: 2000;
background:rgba(17,17,17,0.5);
width: 100%;
}
.back{
height: 100%;
}
\ No newline at end of file
// components/amount/index.js
Component({
options: {
addGlobalClass: true,
},
/**
* 组件的属性列表
*/
......@@ -7,7 +10,13 @@ Component({
count: { // 商品数量
type: Number,
value: 1
}
},
type:{ // 商品数量
type: String,
},
chosenObj:{
type: Object,
},
},
/**
......@@ -22,6 +31,8 @@ Component({
*/
methods: {
inputChangeHandle: function (event) {
let that = this;
let type = that.data.type;
var val = event.detail.value; //通过这个传递数据
var myEventDetail = {
val: val
......@@ -30,6 +41,16 @@ Component({
this.triggerEvent('myevent', myEventDetail)
},
subtract: function () {
let that=this;
let type = that.data.type;
if (this.data.chosenObj.startDate == "") {
wx.showToast({
title: "请先选择日期",
icon: 'none',
duration: 1000
})
return;
}
var count = this.data.count;
count > 0 ? count-- : 0
this.setData({
......@@ -38,10 +59,33 @@ Component({
var myEventDetail = {
val: count
}
this.triggerEvent('myevent', myEventDetail)
this.triggerEvent('subevent')
if (type == "cr") {
this.triggerEvent('cRsubevent', myEventDetail)
}
if (type == "etz") {
this.triggerEvent('etZsubevent', myEventDetail)
}
// 不占床
if (type == "etbz") {
this.triggerEvent('etbZsubevent', myEventDetail)
}
if (type == "ye") {
this.triggerEvent('yEsubevent', myEventDetail)
}
},
add: function () {
let that=this;
if (this.data.chosenObj.startDate==""){
wx.showToast({
title:"请先选择日期",
icon: 'none',
duration: 1000
})
return;
}
let type = that.data.type;
var count = this.data.count;
this.setData({
count: ++count
......@@ -49,8 +93,21 @@ Component({
var myEventDetail = {
val: count
}
this.triggerEvent('myevent', myEventDetail)
this.triggerEvent('addevent')
if (type=="cr"){
this.triggerEvent('cRaddCount', myEventDetail)
}
if (type == "etz") {
this.triggerEvent('etZaddCount', myEventDetail)
}
// 不占床
if (type == "etbz") {
this.triggerEvent('etbZaddCount', myEventDetail)
}
if (type == "ye") {
this.triggerEvent('yEaddCount', myEventDetail)
}
}
}
})
<view class='num_wrap'>
<button class='btn' catchtap='subtract' disabled='{{count<=0}}'>-</button>
<input type='number' value='{{count}}' bindinput='inputChangeHandle'></input>
<input class="input" type='number' value='{{count}}' bindinput='inputChangeHandle'></input>
<button class='btn' catchtap='add'>+</button>
</view>
......@@ -19,14 +19,11 @@
color: #EE4454;
}
.num_wrap .btn[disabled] {
border: 1px solid #888888;
color: #888888;
}
.btn::after{
border: none;
}
.num_wrap input{
.num_wrap .input{
width: 90rpx;
height: 60rpx;
color: #333;
......
......@@ -11,6 +11,12 @@ Component({
priceData: {
type: Array
},
isLogin: {
type: Number
},
selectIndex: {
type: Number
},
},
/**
......@@ -26,12 +32,29 @@ Component({
* 组件的方法列表
*/
methods: {
selectDate(e){
let item = e.currentTarget.dataset.item;
let index = e.currentTarget.dataset.index;
if(item.price==0 || item.price==""){
return;
}
let msg={
configId: item.configId,
tcid: item.tcid,
selectIndex:index,
ymd: `${item.ym}-${item.day}`
};
this.triggerEvent('childrenEvent', msg);
},
getYearMonthDay() {
let that = this;
let currentYear = that.data.currentDay.substring(0, 4); //当前年份
let currentMonth = that.data.currentDay.substring(5, 7); //当前月份
that.setData({
daysData: that.data.priceData
})
let date = new Date();
let strDate = date.getDate();
......@@ -49,6 +72,7 @@ Component({
for (var i = 0; i < Number(monthDay); i++) {
var priceDict = {
"ymd": `${currentYear}-${currentMonth}-${i+1}`,
"ym": `${currentYear}-${currentMonth}`,
'day': String(i + 1),
'price': 0,
'dis': false
......@@ -64,9 +88,12 @@ Component({
var firstDay = dateObject.getDay(); //得到每个月1号是周几
for (var i in that.data.priceData) {
var price = that.data.priceData[i];
var dayIndex = price.dateStr.substring(price.dateStr.length - 2, price.dateStr.length);
var dayIndex = price.startDate.substring(price.startDate.length - 2, price.startDate.length);
var dayDict = daysData[Number(dayIndex) - 1];
// dayDict.price = that.isLogin !== 1 ? price.price : price.b2BPrice;
dayDict.price = that.isLogin !== 1 ? price.b2CPrice : price.b2BPrice;
dayDict.configId = price.configIDDes;
dayDict.tcid = price.tcid;
if (dayIndex < strDate && strMonth == currentMonth) {
dayDict.price = '';
}
......@@ -76,6 +103,7 @@ Component({
for (var i = 0; i < firstDay; i++) {
var dict = {
"ymd": `${currentYear}-${currentMonth}-${i + 1}`,
"ym": `${currentYear}-${currentMonth}`,
'day': ' ',
price: '',
'dis': true
......@@ -98,6 +126,9 @@ Component({
let Arr = that.data.daysData;
let today = new Date().toLocaleDateString().split('/').join('-');
Arr.forEach(item=>{
if(Number(item.day<10)){
item.day="0"+item.day;
}
item.color =false;
if (!util.CompareDate(today, item.ymd)){
item.color=true;
......@@ -106,7 +137,7 @@ Component({
that.setData({
daysData: Arr
})
// console.log("that.daysData", that.data.daysData)
// console.log("daysData",that.data.daysData)
},
isleapYears(year) {
if (((year % 4) == 0) && ((year % 100) != 0) || ((year % 400) == 0)) {
......
......@@ -3,9 +3,9 @@
<text wx:for="{{week}}" wx:key="index">{{item}}</text>
</view>
<view class="dayView">
<view class="{{item.color?'black':'grey'}}" wx:for="{{daysData}}" wx:key="index">
<view>{{item.day}}</view>
<view hidden="!{{item.price!=''||item.price!=0}}" class="price">¥{{item.price}}</view>
<view bindtap="selectDate" data-item="{{item}}" data-index="{{index}}" class="{{item.color ?' black':'grey'}} {{selectIndex==index ? 'Active' :''}} {{(item.price==''||item.price==0)?'grey':'black'}}" wx:for="{{daysData}}" wx:key="index">
<view hidden="{{item.day=='0 '}}">{{item.day}}</view>
<view hidden="{{item.price==''||item.price==0}}" class="price">¥{{item.price}}</view>
</view>
</view>
......
......@@ -6,6 +6,10 @@
text-align: center;
font-size: 30rpx;
}
.Active{
background: #ff4646;
color: #fff!important;
}
.dayView>view{
width: 107rpx;
height: 80rpx;
......@@ -14,6 +18,9 @@
align-items: center;
font-size: 30rpx;
}
.dayView{
min-height: 300rpx;
}
.dayView .black{
color:#333333;
}
......
This diff is collapsed.
......@@ -3,39 +3,15 @@
<text class="f30 bold">选择出行时间</text>
</view>
<scroll-view scroll-x class="scroll-header">
<view class="ScrollActive scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
</view>
<view class="scroll-view-item">
<view>6月</view>
<view>¥488起</view>
<view bindtap="selectMonth" data-item="{{item}}" data-index="{{index}}" wx:for="{{monthList}}" wx:key="index" class="{{activeTab==index?'ScrollActive scroll-view-item':'scroll-view-item'}}">
<view>{{item.date}}</view>
<view wx:if="{{index<1}}" wx:key="index2" wx:for="{{item.datalist}}" wx:for-item="pre">¥{{pre.b2BPrice}}起</view>
</view>
</scroll-view>
<!-- 日历 -->
<view>
<calendar currentDay="{{currentDay}}" :priceData="{{priceData}}" id="calendar"></calendar>
<view style="padding-bottom:10rpx">
<calendar bind:childrenEvent="childrenEvent" selectIndex="{{selectIndex}}" isLogin="{{isLogin}}" currentDay="{{currentDay}}" priceData="{{priceData}}" id="calendar"></calendar>
</view>
<view class="Gray30"></view>
<view>
......@@ -43,7 +19,7 @@
<view class="personItem">
<view>成人</view>
<view>
<amount count='{{numer}}' data-index='{{index}}' bind:myevent="onGetCount" bind:subevent='subCount' bind:addevent='addCount'></amount>
<amount chosenObj="{{chosenObj}}" type="cr" count='{{chosenObj.crCount}}' data-index='{{index}}' bind:cRsubevent='cRsubevent' bind:cRaddCount='cRaddCount'></amount>
</view>
</view>
<view class="personItem">
......@@ -51,7 +27,7 @@
<text class='c88'>2-12周岁(不含)</text>
</view>
<view>
<amount count='{{numer}}' data-index='{{index}}' bind:myevent="onGetCount" bind:subevent='subCount' bind:addevent='addCount'></amount>
<amount chosenObj="{{chosenObj}}" type="etz" count='{{chosenObj.etzc}}' data-index='{{index}}' bind:etZsubevent='etZsubevent' bind:etZaddCount='etZaddCount'></amount>
</view>
</view>
<view class="personItem">
......@@ -59,7 +35,7 @@
<text class='c88'>2-12周岁(不含)</text>
</view>
<view>
<amount count='{{numer}}' data-index='{{index}}' bind:myevent="onGetCount" bind:subevent='subCount' bind:addevent='addCount'></amount>
<amount chosenObj="{{chosenObj}}" type="etbz" count='{{chosenObj.etbzcCount}}' data-index='{{index}}' bind:etbZsubevent='etbZsubevent' bind:etbZaddCount='etbZaddCount'></amount>
</view>
</view>
<view class="personItem">
......@@ -67,7 +43,7 @@
<text class='c88'>0-2周岁(不含)</text>
</view>
<view>
<amount count='{{numer}}' data-index='{{index}}' bind:myevent="onGetCount" bind:subevent='subCount' bind:addevent='addCount'></amount>
<amount chosenObj="{{chosenObj}}" type="ye" count='{{chosenObj.yeCount}}' data-index='{{index}}' bind:yEsubevent='yEsubevent' bind:yEaddCount='yEaddCount'></amount>
</view>
</view>
</view>
......@@ -75,29 +51,27 @@
<view>
<view class="personItem f30">
<view>航班信息</view>
<view class="f24 c88">退改签及购票说明
<!-- <view class="f24 c88">退改签及购票说明
<image style="width:12rpx;height:24rpx" src="/images/group/chakn.png"></image>
</view>
</view> -->
</view>
</view>
<view class="Gray30"></view>
<view class="p30_4">
<view class="HbanItem">
<view class="HbanItemDes">
<text>成都</text>
<image src="/images/group/hangban.png"></image>
<text>香港(中转)</text>
<view wx:for="{{FlightList}}" wx:key="index" class="HbanItem">
<view class="HbanItemDes">
<text>{{item.departureAirPortName}}</text>
<image src="/images/group/hangban.png"></image>
<text>香港</text>
<text>{{item.arrivalAirPortName}}</text>
</view>
<view style="padding:10rpx 0" class="f22 c88">06:-26 07:30 至 06-26 20:05</view>
<view class="f22 c88">香港航空HX453</view>
<view style="padding:10rpx 0" class="f22 c88">{{item.startDate}}{{item.departureTime}} 至 {{item.arriveDate}}{{item.arrivalTime}}</view>
<view class="f22 c88">{{item.alName}} {{item.flightNumber}}</view>
</view>
</view>
<view class="{{GoodsView?'payFixed PayView':'PayView'}}">
<view style="width:310rpx;">
<view style="width:400rpx;">
<text class="f20">总价:¥</text>
<text class="f46 cee">999</text>
<text class="f46 cee">{{price}}</text>
<text class="f20 c88">/人起</text>
<text bindtap='OpenGoodsView' style="padding-left:10rpx" class="f22 c55">明细</text>
<image bindtap='OpenGoodsView' style="width:18rpx;height:8rpx" src="/images/group/mx1.png"></image>
......@@ -114,17 +88,38 @@
<view class="f30 bold" style="padding-top:15rpx">费用明细
<image bindtap='CloseGoodsView' data-target="self" style="width:30rpx;height:30rpx;float:right;margin:15rpx 15rpx 0 0" src="/images/group/close.png"></image>
</view>
<view class="flexbe f26 c11">
<view>基本团费</view>
<view>¥1990</view>
</view>
<view class="flexbe f26 c33">
<view>成人</view>
<view>¥1990</view>
<view>¥{{adultPrice}}</view>
</view>
<view class="flexbe f26 c33">
<view>儿童</view>
<view>¥1990</view>
<view>¥{{childrenPrice}}</view>
</view>
<view class="flexbe f26 c11">
<view>婴儿</view>
<view>¥{{babyPrice}}</view>
</view>
<view class="flexbe f26 c11">
<view>杂费</view>
<view>¥{{zf}}</view>
</view>
<view class="flexbe f26 c11">
<view>儿童占床费</view>
<view>¥{{zcf}}</view>
</view>
<view class="flexbe f26 c11">
<view>儿童不占床费</view>
<view>¥{{bzcf}}</view>
</view>
<view class="flexbe f26 c11">
<view>签证费用</view>
<view>¥{{qzPrice}}</view>
</view>
<view class="flexbe f26 c11">
<view>退签费用</view>
<view>¥{{backVisaPrice}}</view>
</view>
</view>
</view>
......
......@@ -2,6 +2,7 @@
display: flex;
white-space: nowrap;
background: #e5efff;
/* height: 95rpx; */
}
.DateNum .scroll-header .scroll-view-item {
......@@ -9,9 +10,10 @@
font-size: 24rpx;
color: #111;
width: 166rpx;
height: 90rpx;
height: 82rpx;
align-items: center;
flex-direction: column;
position: relative;
}
.DateNum .scroll-header .ScrollActive {
......@@ -74,7 +76,7 @@
align-items: center;
}
.startPay{
width:341rpx;
width:250rpx;
background:rgba(238,68,84,1);
color: #fff;
font-size: 30rpx;
......
// pages/GroupTour/FillOrder/FillOrder.js
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
payInfo: {},
data: {
teamType:0,
},
contact: {
ContactMobile: "",
ContactName: "",
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
let payInfo = wx.getStorageSync('payInfo');
this.setData({
payInfo: payInfo
})
let that = this;
let msg = {};
if (options) {
// console.log("options", options)
msg.configId = decodeURIComponent(options.idDes);
msg.tcid = options.tcid;
if (options.teamType) {
msg.teamType = options.teamType;
that.data.teamType = options.teamType;
}
that.data.teamType = options.teamType;
cityId: that.data.cityId,
that.setData({
msg: msg
})
this.getData(msg);
}
},
getData(msg) {
let that = this;
app.$api('b2b_get_GetB2BTravelInfoV1', msg).then(res => {
let data = res;
that.setData({
data: res,
})
}).catch(err => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
Name(e) {
this.data.payInfo.ContactName = e.detail.value;
this.setData({
payInfo: this.data.payInfo
})
},
Mobile(e) {
let that = this;
let phoneNumber = e.detail.value;
that.data.payInfo.ContactMobile = e.detail.value;
if (phoneNumber.length==11){
let checkedNum = that.checkPhoneNum(phoneNumber);
}
that.data.payInfo.ContactMobile = phoneNumber;
that.setData({
payInfo: that.data.payInfo
})
},
checkPhoneNum(phoneNumber) {
let str = /^1\d{10}$/;
if (str.test(phoneNumber)) {
return true
} else {
wx.showToast({
title: '手机号不正确',
duration: 500,
icon: 'none',
})
return false
}
},
StartYd() {
wx.navigateTo({
url: '/pages/GroupTour/Pay/Pay',
let that = this;
if (that.data.payInfo.ContactMobile == "" || !that.data.payInfo.ContactMobile || that.data.payInfo.ContactMobile.length<11) {
wx.showToast({
title: "请输入正确的手机号",
icon: 'none',
duration: 1000
})
return;
}
if (that.data.payInfo.ContactName == "" || !that.data.payInfo.ContactName) {
wx.showToast({
title: "请输入联系人姓名",
icon: 'none',
duration: 1000
})
return;
}
app.$api('sellorder_post_SetOrderInfoForB2B', that.data.payInfo).then(res => {
let data = res;
if (res.resultCode == 1) {
wx.navigateTo({
url: '/pages/GroupTour/Pay/Pay',
})
}
}).catch(err => {
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
<view class="FillOrder commonF">
<view class="OrderDes">
<view class="title f36">
希尔顿假期系列6日5晚跟团游
{{data.ltName}}{{data.dayNum}}天{{data.nightNum}}
</view>
<view class="body">
<view class="c66 f26">成都出发 2019-06-05出发2019-06-25返程</view>
<view class="c66 f26">{{data.startCityName}}出发</view>
<view class="c66 f26">
<text>2成人 , </text>
<text>1儿童</text>
<text> | 1房间</text>
<text>{{payInfo.ManNum}}成人 , </text>
<text>{{payInfo.ChirdNeedBedNum}}儿童 , </text>
<text>{{payInfo.BabyNum}}婴儿</text>
<!-- <text> | 1房间</text> -->
</view>
</view>
......@@ -18,11 +19,11 @@
<view class="FormMsg f30" style="padding-left: 30rpx;">联系人信息</view>
<view class="FormMsg">
<view>联系人</view>
<view><input placeholder='请输入联系人名称'></input></view>
<view><input bindinput="Name" placeholder='请输入联系人名称' value="{{contact.ContactName}}"></input></view>
</view>
<view class="FormMsg">
<view>手机号码</view>
<view><input placeholder='请输入手机号码'></input></view>
<view><input type="number" maxlength="11" bindinput="Mobile" value="{{contact.ContactMobile}}" placeholder='请输入手机号码'></input></view>
</view>
<view class="FormMsg">
<view>电子邮件</view>
......@@ -30,11 +31,11 @@
</view>
</view>
<view class="PayView">
<view style="width:310rpx;">
<view style="width:400rpx;">
<text class="f20">总价:¥</text>
<text class="f46 cee">999</text>
<text class="f46 cee">{{payInfo.PreferPrice}}</text>
<text class="f20 c88">/人起</text>
<text bindtap='OpenGoodsView' style="padding-left:10rpx" class="f22 c55">明细</text>
<!-- <text bindtap='OpenGoodsView' style="padding-left:10rpx" class="f22 c55">明细</text> -->
<image bindtap='OpenGoodsView' style="width:18rpx;height:8rpx" src="/images/group/mx1.png"></image>
</view>
......
......@@ -70,7 +70,7 @@
align-items: center;
}
.startPay{
width:341rpx;
width:260rpx;
background:rgba(238,68,84,1);
color: #fff;
font-size: 30rpx;
......
// pages/GroupTour/GroupDetails/GroupDetails.js
let app = getApp();
var WxParse = require('../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
background: ["http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png", "http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627100255196.jpg", "http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png", "http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png","http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"]
msg: {
teamType: 0,
idDes: "",
tcid: "",
},
imgCover: [],
dataList: {},
isLogin: app.isLogin,
toDayObj: {},
priceList: [],
FlightList: [],
feature: {},
dayList: [],
serve:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
let that = this;
let msg = {
teamType: 0,
idDes: "",
tcid: "",
cityId: app.state.cityId,
}
if (options) {
msg.configId = decodeURIComponent(options.idDes);
msg.tcid = options.tcid;
// msg.configId = options.idDes = decodeURIComponent("5aEwngdTBnM%3D%0A");
// msg.tcid = options.tcid = "3458";
if (options.teamType){
msg.teamType = options.teamType;
}
that.setData({
msg: msg
})
console.log("msg", that.data.msg)
this.getData();
}
},
getData() {
let that = this;
app.$api('b2b_get_GetB2BTravelInfoV1', that.data.msg).then(res => {
console.log(res);
let data = res;
data.priceList.forEach(item => {
item.date = item.startDate.split("-")[1] + "/" + item.startDate.split("-")[2];
})
let FlightList = "";
FlightList = data.currentPriceInfo && data.currentPriceInfo.priceFlight ? data.currentPriceInfo.priceFlight : '';
data.dayList.forEach(dayitem => {
dayitem.trafficList = [];
dayitem.ScenicList = [];
dayitem.HotelList = [];
dayitem.RestaList = [];
dayitem.tipList = [];
dayitem.title = {};
dayitem.dayArray.forEach(typeitem => {
if (typeitem.type == 1) {
dayitem.trafficList.push(typeitem);
}
if (typeitem.type == 2) {
dayitem.ScenicList.push(typeitem);
}
if (typeitem.type == 3) {
dayitem.HotelList.push(typeitem);
}
if (typeitem.type == 4) {
dayitem.RestaList.push(typeitem);
}
if (typeitem.type == 6) {
dayitem.tipList.push(typeitem);
}
if (typeitem.type == 6) {
dayitem.title = typeitem;
}
})
});
that.setData({
imgCover: JSON.parse(res.imgCover),
dataList: res,
toDayObj: data.currentPriceInfo,
priceList: data.priceList,
FlightList: FlightList,
feature: data.feature.tripImageList,
dayList: data.dayList,
})
console.log("dayList", that.data.dayList)
WxParse.wxParse('feeInclude', 'html', res.feature.feeInclude, that, 0);
WxParse.wxParse('warmTip', 'html', res.feature.warmTip, that, 0);
WxParse.wxParse('visaRemark', 'html', res.feature.warmTip, that, 0);
WxParse.wxParse('b2BRemark', 'html', res.feature.warmTip, that, 0);
}).catch(err => {})
},
closeServe(e){
let self=e.target.dataset.self;
if(self=="self"){
this.setData({
serve:false
})
}
},
oPenServe(){
this.setData({
serve: true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
StartYd(){
StartYd() {
console.log(this.data.msg);
let msg = this.data.msg;
wx.navigateTo({
url: '/pages/GroupTour/ChDateNum/ChDateNum',
url: '/pages/GroupTour/ChDateNum/ChDateNum?idDes=' + encodeURIComponent(msg.configId) + "&tcid=" + msg.tcid + "&teamType=" + msg.teamType,
})
},
serveView(){
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
......@@ -111,10 +111,8 @@
align-items: center;
justify-content: center;
}
.HbanView{
margin-top:30rpx;
}
.HbanView .HbanItem{
margin-top:15rpx;
border-bottom:1rpx solid #E9E9E9;
padding-bottom:15rpx;
}
......@@ -224,6 +222,7 @@
margin-left:15rpx;
padding-left:40rpx;
margin-top:6rpx;
min-height: 100rpx;
}
.dayList{
padding-bottom:30rpx;
......@@ -259,4 +258,27 @@
background:rgba(238,68,84,1);
color: #fff;
font-size: 30rpx;
}
\ No newline at end of file
}
.serve{
position: fixed;
width: 100%;
height: 100%;
top: 0;
background:rgba(0,0,0,0.5);
}
.serve>view{
position: absolute;
bottom: 0;
padding: 30rpx 40rpx;
box-sizing: border-box;
background: #fff;
width: 100%;
}
.serve>view>view{
padding:15rpx 0;
}
.serve>view image{
width: 24rpx;
height: 24rpx;
}
// pages/GroupTour/GroupList/GroupList.js
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
StopResh:false,
dates:[],
datecount:[
{
id:1,
name:"1天"
}, {
id: 2,
name: "2天"
}, {
id: 3,
name: "3天"
}, {
id: 4,
name: "4天"
}, {
id: 5,
name: "5天"
}, {
id: 6,
name: "6天"
}, {
id: 7,
name: "7-8天"
}, {
id: 9,
name: "9-10天"
}, {
id: 10,
name: "10天以上"
},
],
ScreenStatus:false,
StopResh: false,
dates: [],
startCityList: [],
datecount: [],
//显示默认天数
showDays: -1,
ckedStartCity: 0,
listmsg: {
cityId: "262",
companyId: 0,
endDate: "",
lineId: 0,
lineTeamId: 0,
maxPrice: -1,
maxTripDay: -1,
minPrice: -1,
minTripDay: -1,
orderByDate: 2,
orderByPrice: 0,
orderBySales: 0,
pageIndex: 1,
pageSize: 20,
priceOrderByField: 2,
searchKey: "本州大阪.东京",
startCityId: 0,
startDate: ""
},
ScreenStatus: false,
dataList: [],
site: {
companyId: app.state.companyId,
cityId: app.state.cityId
},
isLogin: app.isLogin,
orderType: 0,
orderindex: 1
},
// 最近3个月
loadDates() {
let dates=[];
let dates = [];
let d = new Date().getMonth();
for (let i = 0; i < 3; i++) {
d++;
d = d > 12 ? d - 12 : d;
let obj={
id:d,
let obj = {
id: d,
name: d + "月"
}
dates.push(obj);
}
this.setData({
dates:dates
dates: dates
})
},
PXClick() {
this.setData({
StopResh:true,
StopResh: true,
})
},
ClosePXView(e) {
if (e.target.dataset.target == "self") {
this.setData({
StopResh: false,
})
}
},
bindDateChange(e){
console.log('picker发送选择改变,携带值为', e.detail.value)
ChangeSite(val) {
this.data.listmsg.companyId = val.companyId;
this.data.listmsg.cityId = val.cityId;
this.setData({
site: val.detail
})
this.getList();
},
ScreenOpen(){
// 获取行程天数及出发城市
GetStartInfo() {
let tagmsg = {
companyId: this.data.site.companyId,
cityId: this.data.site.cityId,
}
app.$api('b2b_get_GetGroupSearchItem', tagmsg).then(res => {
res.startCity.unshift({
id: 0,
startCityName: '不限'
})
this.setData({
startCityList: res.startCity,
datecount: res.tripDay
})
}).catch(err => { })
},
//价格区间输入框改变
bindKeyInput: function (e) {
if (e.target.dataset.type == 1) {
this.data.listmsg.minPrice = e.detail.value;
this.setData({
listmsg: this.data.listmsg
})
} else {
this.data.listmsg.maxPrice = e.detail.value;
this.setData({
listmsg: this.data.listmsg
})
}
},
//点击行程天数
getTripDay(e) {
this.data.listmsg.maxTripDay = e.target.dataset.id;
this.setData({
listmsg: this.data.listmsg,
showDays: e.target.dataset.id
})
},
//点击月份的到出发结束日期
getStartMonth(e) {
let year = new Date().getFullYear();
let month = e.target.dataset.type;
let firstdate = year + '-' + month + '-01';
let day = new Date(year, month, 0);
let lastdate = year + '-' + month + '-' + day.getDate();//获取当月最后一天日期
this.data.listmsg.startDate = firstdate;
this.data.listmsg.endDate = lastdate;
this.setData({
listmsg: this.data.listmsg
})
},
//给日期赋值
bindDateChange(e) {
if (e.target.dataset.type == 1) {
this.data.listmsg.startDate = e.detail.value;
} else {
this.data.listmsg.endDate = e.detail.value;
}
this.setData({
ScreenStatus:true,
listmsg: this.data.listmsg
})
},
//点击过滤条件
changeOrderType(e) {
let type = e.target.dataset.type;
if (this.data.orderindex == type) {
this.data.ordertype = this.data.ordertype == 0 ? 1 : 0
} else {
this.data.orderindex = type
this.data.ordertype = 0
}
this.setData({
orderindex: this.data.orderindex,
ordertype: this.data.ordertype
})
this.getList();
},
//点击确定查询数据
getList() {
let that = this;
that.data.listmsg.companyId = that.data.site.companyId;
that.data.listmsg.cityId = that.data.site.cityId;
if (this.data.isLogin == 1) {
this.data.listmsg.priceOrderByField = 2;
} else {
this.data.listmsg.priceOrderByField = 4;
}
this.data.listmsg.orderByDate = this.data.orderindex == 1 ? (this.data.ordertype == 0 ? 2 : 1) : 0;
this.data.listmsg.orderByPrice = this.data.orderindex == 2 ? (this.data.ordertype == 0 ? 2 : 1) : 0;
this.data.listmsg.orderBySales = this.data.orderindex == 3 ? (this.data.ordertype == 0 ? 2 : 1) : 0;
this.setData({
listmsg: that.data.listmsg
})
app.$api('b2b_get_GetB2BTravelPageList', that.data.listmsg).then(res => {
res.pageData.forEach(x => {
x.newImgCover = JSON.parse(x.imgCover);
})
this.setData({
dataList: res.pageData,
ScreenStatus: false
})
}).catch(err => { })
},
//点击重置
resetMsg() {
this.data.listmsg.startDate = '';
this.data.listmsg.endDate = '';
this.data.listmsg.maxTripDay = -1;
this.data.showDays = -1;
this.data.listmsg.minPrice = -1;
this.data.listmsg.maxPrice = -1;
this.setData({
listmsg: this.data.listmsg,
showDays: this.data.showDays
})
this.getList();
},
//点击出发城市
getStartCity(e) {
this.data.listmsg.startCityId = e.target.dataset.id;
this.data.ckedStartCity = e.target.dataset.index;
this.setData({
listmsg: this.data.listmsg,
ckedStartCity: this.data.ckedStartCity
})
this.getList();
},
//跳转至详情
Godetail(e) {
let item = e.currentTarget.dataset;
wx.navigateTo({
url: '/pages/GroupTour/GroupDetails/GroupDetails?idDes=' + encodeURIComponent(item.id) + "&tcid=" + item.tcid,
})
},
ScreenOpen() {
this.setData({
ScreenStatus: true,
})
},
CloseScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
}
},
......@@ -90,7 +235,20 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
if (options.lineId){
that.data.listmsg.lineId=options.lineId;
that.setData({
listmsg: that.data.listmsg,
})
}
this.GetStartInfo();
let City = this.selectComponent("#CityComp");
City.getCityList();
//初始化数据
this.getList();
},
/**
......@@ -141,4 +299,4 @@ Page({
onShareAppMessage: function () {
}
})
\ No newline at end of file
})
This diff is collapsed.
.PxView .jView image {
width: 16rpx;
height: 8rpx;
position: relative;
top:-2rpx;
}
.PxView>view {
display: inline-block;
font-size: 28rpx;
color: #111;
width: 25%;
width: 20%;
text-align: center;
height: 90rpx;
line-height: 90rpx;
......@@ -41,12 +43,24 @@
.scroll-header .ScrollActive {
color: #ee4454;
}
.ListItem {
padding: 30rpx 30rpx 15rpx 30rpx;
border-bottom: 1rpx solid #e9e9e9;
}
.ListItem .ListDays{
position: absolute;
left:0;
top:0;
border-top-left-radius: 6rpx;
border-bottom-right-radius: 6rpx;
width:60rpx;
height:40rpx;
background-color: #61DCD4;
color:#fff;
text-align: center;
line-height: 40rpx;
font-size:25rpx;
}
.ListView {
border-top: 1rpx solid #e9e9e9;
width: 100%;
......@@ -58,6 +72,8 @@
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
overflow: hidden;
position: relative;
}
.ListItem>view {
......@@ -128,7 +144,10 @@
height:54rpx;
background:rgba(242,242,242,1);
border-radius:27rpx;
display: inline-block;
text-align: center;
font-size:25rpx;
line-height: 54rpx;
margin-bottom:20rpx;
}
.screen .DatePicker{
display: flex;
......@@ -168,6 +187,7 @@
border-radius:27rpx;
display: inline-block;
font-size: 22rpx;
text-align: center;
}
.btnView{
margin-top:20rpx;
......@@ -183,5 +203,14 @@
border-radius:30rpx;
text-align: center;
font-size: 24rpx;
display: inline-block;
display: inline-block;
}
.ckedDays{
color:#fff!important;
background-color: #EE4454!important;
}
.GL_sureBtn{
background:#EE4454!important;
color:#fff;
border:none;
}
......@@ -6,50 +6,6 @@ Page({
* 页面的初始数据
*/
data: {
background: [
{
title: 1,
list: [
{
name: '南压线',
id: 1,
},
{
name: '中南办',
id: 1,
},
{
name: '中东办',
id: 1,
},
{
name: '韩国线',
id: 1,
}
],
},
{
title: 1,
list: [
{
name: '南压线2',
id: 1,
},
{
name: '中南办2',
id: 1,
},
{
name: '中东办2',
id: 1,
},
{
name: '韩国线2',
id: 1,
}
],
}
],
indicatorDots: true,
vertical: false,
autoplay: false,
......@@ -58,86 +14,230 @@ Page({
duration: 500,
previousMargin: 0,
nextMargin: 0,
companyId: app.state.companyId,
cityId: app.state.cityId,
tiaoshui:[],
tiaoshui: [],
isLogin: app.isLogin,
site: {
companyId: app.state.companyId,
cityId: app.state.cityId,
siteName: app.state.siteName,
},
lineList: [],
toView: '',
dataList: [],
arrlist: [],
windowHeight: 100 +'px',
scrollHeight: 'auto',
fixedNav:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
let that = this;
let City = this.selectComponent('#CityComp');
City.getCityList();
wx.getSystemInfo({
success: function(res) {
that.setData({
windowHeight: res.windowHeight+'px'
});
}
});
this.loadTiaoshui();
this.LineTeam();
},
Godetail(e){
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/GroupTour/GroupDetails/GroupDetails?idDes=' + encodeURIComponent(item.idDes) + "&tcid=" + item.tcid,
})
},
GodetailList(e){
let item = e.currentTarget.dataset.item;
console.log(item)
wx.navigateTo({
url: '/pages/GroupTour/GroupDetails/GroupDetails?idDes=' + encodeURIComponent(item.id) + "&tcid=" + item.tcid,
})
},
Gourl(e) {
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/GroupTour/GroupList/GroupList?lineId=' + item.lineId,
})
},
ChangeSite(val) {
console.log(val.detail);
this.setData({
site: val.detail
})
this.onLoad();
},
Scrolltap(e) {
let color = e.target.dataset.index;
this.setData({
scrollHeight: this.data.windowHeight,
})
this.setData({
toView: color,
})
},
// 获取线路系列列表数据
GetLoadList(sno) {
let that = this;
if (sno < that.data.lineList.length) {
let msg = {
pageIndex: 1,
pageSize: 4,
companyId: that.data.site.companyId,
lineId: that.data.lineList[sno].lineId,
lineTeamId: 0
}
app.$api('b2b_get_GetB2BHomeLineTravelPageList', msg).then(res => {
let obj = {
lineName: that.data.lineList[sno].lineName,
lineId: that.data.lineList[sno].lineId,
LineList: [],
}
obj.LineList.push(res.pageData);
that.data.dataList.push(obj);
that.setData({
dataList: that.data.dataList
})
this.GetLoadList(sno + 1)
}).catch(err => {})
} else {
let dataList = that.data.dataList;
dataList.forEach(item => {
item.LineList[0].forEach(line => {
if (line.imgCover) {
line.imgCover = JSON.parse(line.imgCover);
}
})
})
that.setData({
dataList: dataList
})
}
},
LineTeam() {
let that = this;
let msg = {
companyId: that.data.site.companyId,
cityId: that.data.site.cityId
}
app.$apiJavaNew('/api/b2b/group/getHomeLineSort', msg).then(res => {
that.setData({
lineList: res,
dataList: [],
arrList: []
})
console.log("lineList", that.data.lineList)
this.GetLoadList(0);
}).catch(err => {
})
},
loadTiaoshui() {
let that=this;
let that = this;
let msg = {
pageIndex: 1,
pageSize: 12,
pageSize: 4,
groupRecommendType: 1,
companyId: that.data.companyId,
cityId: that.data.cityId
companyId: that.data.site.companyId,
cityId: that.data.site.cityId
}
app.$apiJavaNew('/api/b2b/group/getHomeRecommendPrice', msg).then(res => {
that.setData({
tiaoshui: res.pageData
})
console.log(that.data.tiaoshui)
}).catch(err => {
wx.showToast({
title: err.message,
icon: 'none',
duration: 1000
})
})
},
onPageScroll: function(e) {
let that=this;
// console.log(e);//{scrollTop:99}
let query = wx.createSelectorQuery();
//选择id
query.select('#scrollView').boundingClientRect()
query.exec(function(res) {
if (res[0].top<30){
that.setData({
fixedNav: true,
scrollHeight:that.data.windowHeight
})
}else{
that.setData({
fixedNav: false,
scrollHeight:"auto"
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
<view class="group commonF">
<search></search>
<view class="page-section page-section-spacing">
<view id="searchView">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
</view>
<!-- <view class="page-section page-section-spacing">
<swiper class="swiper" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="rgba(242,242,242,1);" indicator-active-color="rgba(238,68,84,1)" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{background}}" wx:key="*this">
<swiper-item>
......@@ -16,7 +19,20 @@
</swiper-item>
</block>
</swiper>
</view>
</view> -->
<scroll-view scroll-x class="scroll-banner">
<view wx:for="{{lineList}}" wx:key="index" class="scroll-view-item">
<view bindtap="Gourl" data-item="{{item}}" class="Item">
<view>
<image style="width:42rpx;height:48rpx" src="{{item.appLineIcon}}"></image>
</view>
<text class="f22">{{item.lineShortName}}</text>
</view>
</view>
</scroll-view>
<view style="padding:30rpx">
<view style="height:180rpx">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627093227533.png"></image>
......@@ -27,7 +43,7 @@
<view class="tsView">
<view class="f30" style="margin-top:10rpx;padding-left:30rpx">跳水特价</view>
<view class="inlineBlock">
<view class="ViewItem" wx:for="{{tiaoshui}}" wx-if="{{index<4}}" wx:key="index">
<view catchtap="Godetail" data-item="{{item}}" class="ViewItem" wx:for="{{tiaoshui}}" wx:key="index">
<image wx-if="{{item.imgCover.length}}" src="{{item.imgCover[0].url}}"></image>
<view class="itemDes">
<view class="f28 text1" style="color:#fff;padding-top:20rpx">{{item.title}}</view>
......@@ -37,75 +53,48 @@
</view>
</view>
</view>
</view>
</view>
<!-- 印象精选 -->
<view>
<view class="f30" style="margin-top:10rpx;padding-left:30rpx">印象精选</view>
<scroll-view scroll-x class="scroll-header">
<view class="ScrollActive scroll-view-item">日本线</view>
<view class="scroll-view-item">东南亚线</view>
<view class="scroll-view-item">韩国线</view>
<view class="scroll-view-item">日本线</view>
<view class="scroll-view-item">东南亚线</view>
<view class="scroll-view-item">韩国线</view>
<view class="scroll-view-item">日本线</view>
<view class="scroll-view-item">东南亚线</view>
<view class="scroll-view-item">韩国线</view>
<scroll-view scroll-x class="{{fixedNav ? 'scroll-header NavFixed':'scroll-header'}}">
<view wx:for="{{lineList}}" wx:key="index" data-index="{{'view'+index}}" bindtap="Scrolltap" class="{{toView=='view'+index?'ScrollActive':''}}">{{item.lineShortName}}
</view>
</scroll-view>
<scroll-view id="scrollView" scroll-y style="height:{{scrollHeight}}" scroll-into-view="{{toView}}">
<block wx:for="{{dataList}}" wx:key="index">
<view id="{{'view'+index}}">
<!-- 跟团游 -->
<view class="FlTitleView">
<text class="text" style="color:#61DCD4"> \ \ \ </text>
<text style="font-size:30rpx;color:#000000;font-weight:600;margin:0 12rpx">{{item.lineName}} </text>
<text class="text" style="color:#61DCD4"> \ \ \</text>
<text bindtap="Gourl" data-item="{{item}}" style="position: absolute;right:30rpx" class="f24 c88">查看更多</text>
</view>
<view class="Gtour CommonList">
<view bindtap="GodetailList" data-item="{{line}}" wx:for-item="line" wx:for="{{item.LineList[0]}}" wx:key="index2">
<view class="imgView">
<text class="country">日本</text>
<image wx:if="line.imgCover.length" src="{{line.imgCover[0].Url}}"></image>
</view>
<view class='pad title text1'>{{line.title}}</view>
<view class="pad">
<!-- <text class="xl">销量432份</text> -->
<text class="price">¥{{isLogin!==1 ? line.b2CPrice : line.b2BPrice}}起</text>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
<!-- 跟团游 -->
<view class="FlTitleView">
<text class="text" style="color:#61DCD4"> \ \ \ </text>
<text style="font-size:30rpx;color:#000000;font-weight:600;margin:0 12rpx"> 跟团游 </text>
<text class="text" style="color:#61DCD4"> \ \ \</text>
</view>
<view class="Gtour CommonList">
<view>
<view class="imgView">
<text class="country">日本</text>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view class='pad title'>日本东京大阪</view>
<view class="pad">
<text class="xl">销量432份</text>
<text class="price">¥1990.00起</text>
</view>
</view>
<view>
<view class="imgView">
<text class="country">日本</text>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view class='pad title'>日本东京大阪</view>
<view class="pad">
<text class="xl">销量432份</text>
<text class="price">¥1990.00起</text>
</view>
</view>
<view>
<view class="imgView">
<text class="country">日本</text>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view class='pad title'>日本东京大阪</view>
<view class="pad">
<text class="xl">销量432份</text>
<text class="price">¥1990.00起</text>
</view>
</view>
<view>
<view class="imgView">
<text class="country">日本</text>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view class='pad title'>日本东京大阪</view>
<view class="pad">
<text class="xl">销量432份</text>
<text class="price">¥1990.00起</text>
</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -5,8 +5,12 @@
.swiper {
height: 220rpx;
}
.scroll-banner{
display: flex;
white-space: nowrap;
.group .Item {
}
.scroll-banner .scroll-view-item{
display: inline-block;
width: 187rpx;
height: 174rpx;
......@@ -14,8 +18,18 @@
padding-top: 50rpx;
box-sizing: border-box;
}
.group .Item>view {
.scroll-banner .scroll-view-item .Item{
width: 100%;
height: 100%;
}
.NavFixed{
position: fixed;
top: 0;
left: 0;
background: #ffffff;
z-index:1000;
}
.scroll-banner .Item>view {
width: 100%;
text-align: center;
}
......
<!--pages/Home/home.wxml-->
<view class="Home commonF">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
<view id="searchView">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
</view>
<view class="tab1">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626103242285.png"></image>
</view>
......
// pages/SearchPage/SearchPage.js
Page({
/**
* 页面的初始数据
*/
data: {
searchKey:"",
chineseValue:'跟团游',
typeHidden:false,
type:'gentuan',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
CloseSelect(e){
console.log(e);
let self = e.target.dataset.self;
console.log(self)
if(self=="self"){
this.setData({
typeHidden: false,
})
}
},
typeViewShow(){
this.setData({
typeHidden: true,
})
},
searchInput(data){
let value = this.data.searchKey;
if (value==""){
wx.showToast({
title: "请输入搜索内容",
icon: 'none',
duration: 1000
})
return;
}
console.log(value)
if (this.data.type == "gentuan") {
wx.navigateTo({
url: '/pages/GroupTour/GroupList/GroupList?searchKey=' + this.data.searchKey,
})
}
},
inputValue(e){
let value = e.detail.value;
this.setData({
searchKey: value
})
},
goUrl(e){
let data=e.target.dataset.type;
let chineseValue = e.target.dataset.value;
this.setData({
chineseValue: chineseValue,
typeHidden:false,
type: data,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!-- 点击输入框 -->
<view class="Inputfocus" bindtap="CloseSelect" data-self="self">
<view class="head3" style="width:600rpx">
<view bindtap="typeViewShow" class="typeView">{{chineseValue}}
<image src="/images/group/mx2.png"></image>
</view>
<!-- <view style="width:26rpx;height:26rpx;"><image src="../../images/home/search.png"></image></view> -->
<input bindinput="inputValue" data-self="self" value="{{value}}" style="width:520rpx;display:inline-block" placeholder="搜索目的地/交通/景点/酒店" />
<view class="TypeList" hidden="{{!typeHidden}}">
<view bindtap="goUrl" data-type="gentuan" data-value="跟团游">跟团游</view>
</view>
</view>
<text bindtap="searchInput" class='Seach'>搜索</text>
<!-- <view>
<view class="hotTitle">热门推荐</view>
<view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>日本一日游</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>美食</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>日本一日游</text>
</view>
<view class="HotItem">
<image src="../../images/visa/hot.png"></image>
<text>签证</text>
</view>
</view>
</view> -->
</view>
\ No newline at end of file
.Inputfocus {
position: absolute;
width: 100%;
height: 100%;
background: #fff;
padding: 0 30rpx;
}
.typeView{
display: inline-block;
width: 200rpx;
position: relative;
}
.typeView image{
width: 20rpx!important;
height: 15rpx!important;
position: absolute;
right: 6rpx;
top: 15rpx;
}
.Inputfocus .head3 image {
width: 26rpx;
height: 26rpx;
margin-right: 6rpx;
}
.Inputfocus .head3 {
display: inline-flex;
align-items: center;
color: #888;
background: #f2f2f2;
font-size: 26rpx;
padding-left: 30rpx;
height: 60rpx;
border-radius: 30rpx;
position: relative;
}
.TypeList{
position: absolute;
left: 0;
top: 60rpx;
background: #fff;
width: 200rpx;
border: 1px solid #f5f5f5;
box-shadow: 0 0 0 5rpx #f5f5f5;
z-index: 100;
transition: all linear 0.5s;
padding:15rpx 30rpx;
}
.TypeList>view{
padding: 10rpx 0;
}
.Inputfocus .Seach {
font-size: 30rpx;
font-weight: 500;
color: rgba(238, 68, 84, 1);
margin-left:20rpx;
}
.Inputfocus .hotTitle{
font-size:30rpx;
margin-top:40rpx;
}
.HotItem image{
width: 18rpx;
height: 22rpx;
margin-right:20rpx;
}
.HotItem{
height: 60rpx;
line-height: 60rpx;
padding: 0 25rpx;
background:rgba(242,242,242,1);
border-radius:30rpx;
color: #333333;
font-size: 24rpx;
display: inline-block;
margin-top:30rpx;
margin-right:30rpx;
}
\ No newline at end of file
<view class="commonF Ticket">
<search></search>
<view id="searchView">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
</view>
<view style="width:100%;height:300rpx;margin-top:36rpx;position: relative;z-index:0">
<image style="position: relative;z-index:0" src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626103539899.png'></image>
</view>
......
// pages/freeTravel/freeList/freeList.js
let app=getApp();
let app = getApp();
Page({
/**
......@@ -58,12 +58,24 @@ Page({
cityId: app.state.cityId,
startDate: '',
endDate: '',
minPrice: '',
maxPrice: '',
minPrice: -1,
maxPrice: -1,
companyId: app.state.companyId,
priceOrderByField: 0,
searchKey: '',
orderByDate:0,
orderByPrice:0,
},
datalist:[],
noData: false,
orderindex:1,
ordertype: 0,
lineTeam:[],
startCity:[],
tripDay:[],
dates:[],
},
/**
......@@ -71,9 +83,87 @@ Page({
*/
onLoad: function (options) {
let listmsg= this.data.listmsg;
if (this.data.isLogin == 1) {
listmsg.priceOrderByField = 2;
} else {
listmsg.priceOrderByField = 4;
}
this.setData({
listmsg: listmsg
})
let City = this.selectComponent('#CityComp');
City.getCityList();
this.getThemeTag();
this.loadRecoItems();
this.loadDates();
this.GetList();
},
ChangeLine(e){
let that = this;
that.data.listmsg.lineTeamId = e.target.dataset.id;
that.setData({
listmsg: that.data.listmsg
})
},
GetMonth(e){
let that = this;
let month = e.target.dataset.month;
console.log("month", month);
let num = new Date(month.year, month.id, 0);
console.log(num.getDate());
that.data.listmsg.startDate = month.year + "-" + month.month+"-"+"01";
that.data.listmsg.endDate = month.year + "-" + month.month + "-" + num.getDate();
that.setData({
listmsg: that.data.listmsg
})
console.log("that.data.listmsg",that.data.listmsg)
},
// 获取线路
loadRecoItems() {
let that = this;
app.$api('b2b_get_GetFreeSearchItem', { companyId:that.data.site.companyId}).then(res => {
console.log(res);
that.setData({
lineTeam:res.lineTeam,
startCity: res.startCity,
tripDay: res.tripDay
})
console.log("startCity", this.data.startCity);
}).catch(err => { })
},
// 最近3个月
loadDates() {
let dates = [];
let d = new Date().getMonth();
let y = new Date().getFullYear();
for (let i = 0; i < 3; i++) {
d++;
d = d > 12 ? d - 12 : d;
let month = d < 10 ? "0"+d : d;
let obj = {
year:y,
id: d,
month: month,
name: d + "月"
}
dates.push(obj);
}
this.setData({
dates: dates
})
},
bindDateChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
let listmsg = this.data.listmsg;
listmsg.endDate = e.detail.value;
this.setData({
listmsg: listmsg
})
},
ChangeSite(val) {
console.log(val.detail);
......@@ -97,13 +187,12 @@ Page({
},
// 获取主题标签
getThemeTag() {
let tagmsg={
let tagmsg = {
name: 'theme',
code: 1,
}
let that = this;
app.$api('travel_get_GetTravelPriceTag', tagmsg).then(res => {
console.log(res);
let ThemeTagList = res;
ThemeTagList.forEach(item => {
item.show = 0;
......@@ -113,19 +202,47 @@ Page({
})
}).catch(err => { })
},
PriceTag(e){
let that=this;
// 列表数据
GetList() {
let that = this;
const datalist = that.data.datalist;
app.$api('b2b_get_GetB2BFreePageList', that.data.listmsg).then(res => {
if (res.pageData.length == 0) {
that.setData({
noData: true
})
}else{
res.pageData.forEach(item => {
item.imgCover = JSON.parse(item.imgCover);
if (item.priceTags) {
item.priceTags = item.priceTags.split(",");
}
datalist.push(item)
})
that.setData({
datalist: datalist
})
}
wx.hideNavigationBarLoading()
}).catch(err => { })
},
PriceTag(e) {
let that = this;
console.log(e.target.dataset.tag);
let listmsg = that.data.listmsg;
let tag = e.target.dataset.tag;
let index = e.target.dataset.index;
let priceTag = that.data.listmsg.priceTag;
let ThemeTagList = that.data.ThemeTagList;
priceTag=[];
priceTag = [];
that.setData({
listmsg: listmsg
})
ThemeTagList.forEach(item => {
item.SNO = 0;
})
......@@ -133,7 +250,7 @@ Page({
priceTag.push(tag.ID);
that.data.listmsg.priceTag = priceTag;
priceTag.forEach(tag => {
ThemeTagList.forEach(item => {
ThemeTagList.forEach(item => {
if (tag == item.ID) {
item.SNO = -1;
}
......@@ -143,13 +260,33 @@ Page({
ThemeTagList: ThemeTagList,
listmsg: listmsg
})
console.log("listmsg", listmsg);
}
this.GetList();
that.GetList();
},
GetList(){
changeOrderType(e) {
let type=e.target.dataset.type;
let orderindex = this.data.orderindex;
let ordertype = this.data.ordertype;
let listmsg = this.data.listmsg;
let orderByDate = this.data.listmsg.orderByDate;
let orderByPrice = this.data.listmsg.orderByPrice;
if (orderindex == type) {
orderindex = ordertype == 0 ? 1 : 0
} else {
orderindex = type
ordertype = 0
}
this.data.listmsg.orderByDate= orderindex == 1 ? (ordertype == 0 ? 2 : 1) : 0;
this.data.listmsg.orderByPrice = orderindex == 2 ? (ordertype == 0 ? 2 : 1) : 0;
this.setData({
orderindex: orderindex,
ordertype: ordertype,
listmsg: listmsg
})
this.GetList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......@@ -182,14 +319,26 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
wx.stopPullDownRefresh();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
let that=this;
if (that.data.noData) return;
wx.showNavigationBarLoading();
let listmsg = that.data.listmsg;
let pageIndex = that.data.listmsg.pageIndex;
// 每次下拉 page+1
pageIndex = pageIndex+1;
that.data.listmsg.pageIndex = pageIndex;
this.setData({
listmsg: listmsg
})
console.log("listmsg", that.data.listmsg)
this.GetList();
},
/**
......
{
"navigationBarTitleText": "首页",
"navigationBarTitleText": "自由行",
"usingComponents": {
"search": "/component/Search/search"
}
......
<view class='GroupList commonF' catchtouchmove="{{StopResh}}">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
<view id="searchView">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
</view>
<view class="ListView">
<view class="PxView">
<view class="jView" bindtap='PXClick'>
综合排序
<view class="jView" data-type="{{0}}" bindtap='changeOrderType'>
综合
<!-- <image src="/images/group/bx.png"></image> -->
</view>
<view class="jView">
时间
<image src="/images/group/bx.png"></image>
<view class="jView" data-type="{{1}}" bindtap='changeOrderType'>
团期
<image wx:if="{{listmsg.orderByDate==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{listmsg.orderByDate==1}}" src="/images/group/rx.png"></image>
<image wx:if="{{listmsg.orderByDate==2}}" src="/images/group/rs.png"></image>
</view>
<view class="jView">
<view class="jView" data-type="{{2}}" bindtap='changeOrderType'>
价格
<image src="/images/group/bx.png"></image>
<image wx:if="{{listmsg.orderByPrice==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{listmsg.orderByPrice==1}}" src="/images/group/rx.png"></image>
<image wx:if="{{listmsg.orderByPrice==2}}" src="/images/group/rs.png"></image>
</view>
<view bindtap='ScreenOpen' class="SView">
筛选
......@@ -20,36 +27,36 @@
</view>
</view>
<scroll-view scroll-x class="scroll-header">
<view bindtap='PriceTag' data-index="{{0}}" data-tag="{{item}}" class="ScrollActive scroll-view-item">不限</view>
<view bindtap='PriceTag' data-index="{{1}}" data-tag="{{item}}" wx:key="index" wx:for="{{ThemeTagList}}" class="ScrollActive scroll-view-item">{{item.Content}}</view>
<scroll-view wx:if="{{ThemeTagList.length>0}}" scroll-x class="scroll-header">
<view bindtap='PriceTag' data-index="{{0}}" data-tag="{{item}}" class="listmsg.priceTag.length==0?'ScrollActive scroll-view-item':'scroll-view-item'">不限</view>
<view bindtap='PriceTag' data-index="{{1}}" data-tag="{{item}}" wx:key="index" wx:for="{{ThemeTagList}}" class="{{item.SNO==-1?'ScrollActive scroll-view-item':'scroll-view-item'}}">{{item.Content}}</view>
</scroll-view>
<!-- 列表数据 -->
<view class="ListItem">
<view class="ListItem" wx:for="{{datalist}}" wx:key="index">
<view class="imgView">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<image wx:if="{{item.imgCover.length}}" src="{{item.imgCover[0].Url}}"></image>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2 f26">日本本州~精品假期~免费升级:2晚东京 市中心*东京曼迪酒店+1晚特色机票
<view class="text2 f26">{{item.lineName}}+{{item.ltName}}+{{item.productRecommend}}
</view>
<view class="f22" style="color:#888888;padding:15rpx 0">
<image style="width:18rpx;height:22rpx" src="/images/group/adress.png"></image>
出发地:成都
<image style="width:22rpx;height:22rpx" src="/images/group/tuan.png"></image>
最近团期:2019-08-90
出发地:{{item.startCityName}}
</view>
<view class="f20" style="color:#5597FF">
精品添加
<view class="f22" style="color:#888888;padding:15rpx 0">
<image style="width:22rpx;height:22rpx" src="/images/group/tuan.png"></image>
出发日期:最早{{item.startDate}}出发
</view>
<view class="f22" style="color:#888888;padding-top:15rpx">
<image style="width:22rpx;height:22rpx" src="/images/group/p.png"></image>
<text>余位:充足</text>
<text class="cee f40" style="float:right;position:relative;top:-20rpx">¥1900</text>
<view class="f22" style="color:#888888;padding-top:15rpx;text-align:right">
<text class="cee f40" style="position:relative;top:-20rpx">¥{{isLogin!=1 ? item.b2CPrice : item.b2BPrice}}</text>
</view>
</view>
</view>
<view class='Nodataview' wx:if='{{noData}}'>
<text>没有更多数据</text>
</view>
</view>
<!-- 筛选条件 -->
<view bindtap='ClosePXView' data-target="self" class="Condition" hidden="{{!StopResh}}">
......@@ -60,52 +67,46 @@
<view>销量从高到低</view>
</view>
</view>
<!-- 筛选多条件 -->
<view bindtap='CloseScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<!-- 筛选多条件 hidden="{{!ScreenStatus}}" -->
<view bindtap='CloseScreen' data-target="self" class="screen" >
<view>
<view class="title">系列</view>
<view class="title">线路</view>
<view class="xl">
<text>本州 147升级版</text>
<text>希尔顿假期系列</text>
<text>希尔顿假期系列</text>
<text>小王子x列</text>
<text bindtap="ChangeLine" data-id="{{0}}" class="{{listmsg.lineTeamId==0?'Msgactive':''}}">不限</text>
<text bindtap="ChangeLine" data-id="{{item.id}}" class="{{listmsg.lineTeamId==item.id?'Msgactive':''}}" wx:key="index" wx:for="{{lineTeam}}">{{item.name}}</text>
</view>
<view class="title">出发日期</view>
<view class="DatePicker">
<picker class="pcikerView" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<picker class="pcikerView" mode="date" value="{{listmsg.startDate}}" >
<view class="picker">
{{listmsg.startDate}}
</view>
</picker>
<text style="margin:0 15rpx"> - </text>
<picker class="pcikerView" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<picker class="pcikerView" mode="date" value="{{listmsg.endDate}}" bindchange="bindDateChange" >
<view class="picker">
{{listmsg.endDate}}
</view>
</picker>
</view>
<view class='MonthList'>
<text wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
<text bindtap="GetMonth" data-month="{{item}}" wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">出发城市</view>
<view class='MonthList' style="margin-top:25rpx">
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>不限</text>
<text wx:key="index" wx:for="{{startCity}}">{{item.startCityName}}</text>
</view>
<view class="title">行程天数</view>
<view class='MonthList' style="margin-top:25rpx">
<text wx:for="{{datecount}}" wx:key="index">{{item.name}}</text>
<text wx:for="{{tripDay}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">价格区间</view>
<!-- <view class="title">价格区间</view>
<view class="PriceView">
<input placeholder="2000" placeholder-style="text-align:center" />
<input placeholder="最低价" style="text-align:center" />
<text style="padding:0 15rpx">-</text>
<input placeholder="最高价" placeholder-style="text-align:center" />
</view>
<input placeholder="最高价" style="text-align:center" />
</view> -->
<view class="btnView">
<view>重置</view>
<view style="background:#EE4454;color:#fff;border:none">确定</view>
......
.PxView .jView image {
width: 16rpx;
height: 8rpx;
position: relative;
top: -5rpx;
}
.Msgactive{
background: #EE4454!important;
color: #fff;
}
.PxView>view {
display: inline-block;
font-size: 28rpx;
......@@ -16,6 +22,7 @@
.PxView .SView image {
width: 22rpx;
height: 22rpx;
}
.scroll-header {
......@@ -124,18 +131,22 @@
margin-right: 30rpx;
}
.screen .picker{
width:296rpx;
width:100%;
height:54rpx;
line-height:54rpx;
background:rgba(242,242,242,1);
border-radius:27rpx;
display: inline-block;
font-size: 22rpx;
text-align: center;
}
.screen .DatePicker{
display: flex;
/* display: flex; */
margin-top:15rpx;
}
.screen .pcikerView{
display: inline-block;
width: 280rpx;
}
.MonthList{
......
// pages/freeTravel/freeList/freeList.js
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
isLogin: app.isLogin,
site: {
companyId: app.state.companyId,
cityId: app.state.cityId,
siteName: app.state.siteName,
},
dates: [],
isShowType:1,
//开始时间
sDate:'',
eDate:'',
datecount: [
{
id: 1,
name: "1天"
}, {
id: 2,
name: "2天"
}, {
id: 3,
name: "3天"
}, {
id: 4,
name: "4天"
}, {
id: 5,
name: "5天"
}, {
id: 6,
name: "6天"
}, {
id: 7,
name: "7-8天"
}, {
id: 9,
name: "9-10天"
}, {
id: 10,
name: "10天以上"
},
],
ScreenStatus: false,
listmsg: {
minTripDay: -1,
maxTripDay: -1,
pageIndex: 1,
pageSize: 10,
lineId: 0,
lineTeamId: 0,
dayNum: -1,
monthdate: [],
priceTag: [],
startCityId: 0,
cityId: app.state.cityId,
startDate: '',
endDate: '',
minPrice: '',
maxPrice: '',
companyId: app.state.companyId,
priceOrderByField: 0,
searchKey: '',
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let City = this.selectComponent('#CityComp');
City.getCityList();
this.getThemeTag();
},
ChangeSite(val) {
console.log(val.detail);
this.setData({
site: val.detail
})
this.onLoad();
},
ScreenOpen() {
this.setData({
ScreenStatus: true,
})
},
CloseScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
}
},
// 获取主题标签
getThemeTag() {
let tagmsg = {
name: 'theme',
code: 1,
}
let that = this;
app.$api('travel_get_GetTravelPriceTag', tagmsg).then(res => {
console.log(res);
let ThemeTagList = res;
ThemeTagList.forEach(item => {
item.show = 0;
})
that.setData({
ThemeTagList: ThemeTagList
})
}).catch(err => { })
},
PriceTag(e) {
let that = this;
console.log(e.target.dataset.tag);
let listmsg = that.data.listmsg;
let tag = e.target.dataset.tag;
let index = e.target.dataset.index;
let priceTag = that.data.listmsg.priceTag;
let ThemeTagList = that.data.ThemeTagList;
priceTag = [];
that.setData({
listmsg: listmsg
})
ThemeTagList.forEach(item => {
item.SNO = 0;
})
if (index != 0) {
priceTag.push(tag.ID);
that.data.listmsg.priceTag = priceTag;
priceTag.forEach(tag => {
ThemeTagList.forEach(item => {
if (tag == item.ID) {
item.SNO = -1;
}
})
})
that.setData({
ThemeTagList: ThemeTagList,
listmsg: listmsg
})
console.log("listmsg", listmsg);
}
this.GetList();
},
GetList() {
},
// 点击改变出游方式
changeType(e){
let type=e.target.dataset.type;
this.setData({
isShowType: type
})
},
//选择时间
bindDateChange(e){
console.log(e);
let sDate = e.detail.value;
console.log(sDate)
this.setData({
sDate:sDate
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "当地游",
"usingComponents": {
"search": "/component/Search/search"
}
}
\ No newline at end of file
<view class='GroupList commonF' catchtouchmove="{{StopResh}}">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
<view class="ListView">
<view class="ltView">
<view class="{{isShowType==1?'showType':''}}" data-type="{{1}}" bindtap="changeType">
境外一日游
<view class="ltLine"></view>
</view>
<view class="{{isShowType==2?'showType':''}}" data-type="{{2}}" bindtap="changeType">游玩门票
<view class="ltLine"></view>
</view>
<view class="{{isShowType==3?'showType':''}}" data-type="{{3}}" bindtap="changeType">当地美食
<view class="ltLine"></view>
</view>
</view>
<view class="PxView">
<view class="filterList" bindtap='PXClick'>
综合排序
<!-- <image src="/images/group/bx.png"></image> -->
</view>
<view class="filterList">
销量
<image src="/images/group/bx.png"></image>
</view>
<view class="filterList">
价格
<image src="/images/group/bx.png"></image>
</view>
<view bindtap='ScreenOpen' class="SView">
筛选
<image src="/images/group/s.png"></image>
</view>
</view>
<scroll-view scroll-x class="scroll-header">
<view bindtap='PriceTag' data-index="{{0}}" data-tag="{{item}}" class="ScrollActive scroll-view-item">不限</view>
<view bindtap='PriceTag' data-index="{{1}}" data-tag="{{item}}" wx:key="index" wx:for="{{ThemeTagList}}" class="ScrollActive scroll-view-item">{{item.Content}}</view>
</scroll-view>
<!-- 列表数据 -->
<view class="ListItem">
<view class="imgView">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2 f26">日本本州~精品假期~免费升级:2晚东京 市中心*东京曼迪酒店+1晚特色机票
</view>
<view class="f22" style="color:#888888;padding:15rpx 0">
<image style="width:18rpx;height:22rpx" src="/images/group/adress.png"></image>
出发地:成都-东京
</view>
<view class="f20 ltTherme" style="color:#5597FF">
<view>明日可订</view>
<view>主题乐园</view>
<view>亲子游</view>
<!-- 精品添加 -->
</view>
<view class="f22" style="color:#888888;padding-top:15rpx">
<image style="width:22rpx;height:22rpx;margin-right:3px;" src="/images/group/tuan.png"></image>
<text>团期:07月08日</text>
<text class="cee f40" style="float:right;position:relative;top:-20rpx">
<text class="f20">¥</text>1900<text class="f20" style="color:#888888">起</text></text>
</view>
</view>
</view>
</view>
<!-- 筛选条件 -->
<view bindtap='ClosePXView' data-target="self" class="Condition" hidden="{{!StopResh}}">
<view style="padding:0 30rpx">
<view>综合排序</view>
<view>价格从低到高</view>
<view>价格从低到高</view>
<view>销量从高到低</view>
</view>
</view>
<!-- 筛选多条件 -->
<view bindtap='CloseScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<view class="title">目的地</view>
<view class="xl">
<text>日本</text>
<text>韩国</text>
<text>巴厘岛</text>
</view>
<view class="title">游玩城市</view>
<view class='MonthList' style="margin-top:25rpx">
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
<text>成都</text>
</view>
<view class="title">游玩时间</view>
<view class="DatePicker">
<picker class="pcikerView" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<view class="picker">
{{sDate}}
</view>
</picker>
<text style="margin:0 15rpx"> - </text>
<picker class="pcikerView" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<view class="picker">
{{eDate}}
</view>
</picker>
</view>
<view class='MonthList'>
<text wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">行程天数</view>
<view class='MonthList' style="margin-top:25rpx">
<text wx:for="{{datecount}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">价格区间</view>
<view class="PriceView">
<input placeholder="2000" placeholder-style="text-align:center" />
<text style="padding:0 15rpx">-</text>
<input placeholder="最高价" placeholder-style="text-align:center" />
</view>
<view class="btnView">
<view>重置</view>
<view style="background:#EE4454;color:#fff;border:none">确定</view>
</view>
</view>
</view>
</view>
.PxView,.scroll-header{
background-color: #F4F4F4;
}
.ltView view{
display: inline-block;
width:30%;
font-size:30rpx;
padding:25rpx 0;
color:#111111;
text-align: center;
position: relative;
}
.ltView view .ltLine{
width:40%;
margin:auto;
position: absolute;
bottom:0;
left:10%;
height:2px;
padding:0;
display: none;
background-color: #EE4454;
}
.showType{
color:#EE4454!important;
}
.showType .ltLine{
display: inline-block!important;
}
.ltTherme view{
display: inline-block;
padding:0 10rpx;
margin-right:20rpx;
border-radius: 2rpx;
background-color: #CCE0FF;
color:#5597FF;
}
.ltView view:first-child{
margin-left:45rpx;
}
.PxView>view{
padding:0 20rpx;
border-radius: 27rpx;
height:54rpx;
line-height: 54rpx;
display:inline-block;
font-size:24rpx;
background-color: #fff;
width: 20%;
margin:30rpx 30rpx 0 0;
text-align: center;
}
.PxView>view:first-child{
margin-left:30rpx;
}
.PxView .filterList image {
width: 16rpx;
height: 8rpx;
}
.PxView .SView image {
width: 22rpx;
height: 22rpx;
}
.scroll-header {
display: flex;
white-space: nowrap;
padding:20rpx 0 30rpx 0;
border-bottom: 1rpx solid #e9e9e9;
height: 120rpx;
}
.scroll-header view {
height: 54rpx;
line-height: 54rpx;
display: inline-block;
margin-left: 30rpx;
font-size: 24rpx;
color: #111;
background: #fff;
padding: 0 30rpx;
border-radius: 27rpx;
}
.scroll-header .ScrollActive {
color: #333333;
}
.ListItem {
padding: 30rpx 30rpx 15rpx 30rpx;
border-bottom: 1rpx solid #e9e9e9;
}
.ListView {
border-top: 1rpx solid #e9e9e9;
width: 100%;
padding-bottom: 20rpx;
margin-top: 20rpx;
}
.ListItem .imgView {
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
}
.ListItem>view {
display: inline-block;
}
/* 综合排序 */
.Condition {
font-size: 26rpx;
position: fixed;
width: 100%;
background: rgba(17, 17, 17, 0.5);
top: 190rpx;
height: calc(100% - 190rpx);
border-top: 1rpx solid #e9e9e9;
}
.Condition>view {
background: #fff;
}
.Condition>view view {
padding: 15rpx 0;
}
/* 筛选多条件 */
.screen {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 5000;
background: rgba(17, 17, 17, 0.5);
}
.screen>view {
width: 690rpx;
min-height: 100%;
background: rgba(255, 255, 255, 1);
border-radius: 12rpx 0px 0px 12rpx;
position: absolute;
right: 0;
padding: 30rpx;
color: rgba(17, 17, 17, 1);
}
.screen>view .title {
font-size: 28rpx;
font-weight: bold;
}
.screen>view .xl text{
height: 54rpx;
display: inline-block;
line-height: 54rpx;
background: rgba(242, 242, 242, 1);
border-radius: 27rpx;
padding: 0 20rpx;
font-size:22rpx;
margin-bottom: 30rpx;
margin-right: 30rpx;
}
.screen .picker{
width:296rpx;
height:54rpx;
background:rgba(242,242,242,1);
border-radius:27rpx;
display: inline-block;
text-align:center;
font-size:20rpx;
line-height: 54rpx;
color:#999999;
}
.screen .DatePicker{
display: flex;
margin-top:15rpx;
}
.screen .pcikerView{
display: inline-block;
}
.MonthList{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.MonthList text{
display: inline-block;
width:190rpx;
height:54rpx;
line-height:54rpx;
background:rgba(242,242,242,1);
border-radius:27rpx;
font-size: 22rpx;
text-align: center;
color:#333333;
margin-bottom:25rpx;
}
.PriceView {
display: flex;
margin-top:15rpx;
}
.PriceView input{
width:296rpx;
height:54rpx;
line-height:54rpx;
background:rgba(242,242,242,1);
border-radius:27rpx;
display: inline-block;
font-size: 22rpx;
}
.btnView{
margin-top:20rpx;
display: flex;
justify-content: space-between;
}
.btnView>view{
width:300rpx;
height:60rpx;
line-height:60rpx;
background:rgba(255,255,255,1);
border:1px solid rgba(204, 204, 204, 1);
border-radius:30rpx;
text-align: center;
font-size: 24rpx;
display: inline-block;
}
......@@ -26,11 +26,19 @@ Page({
toView: color
})
},
ChangeSite(val) {
console.log(val.detail);
this.setData({
site: val.detail
})
this.onLoad();
},
onLoad: function (options) {
let City = this.selectComponent('#CityComp');
City.getCityList();
this.GetLine();
},
ChangeSite(val) {
this.setData({
site: val.detail
......
// pages/local/localonedayTrip/localonedayTrip.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/local/localonedayTrip/localonedayTrip.wxml-->
<text>pages/local/localonedayTrip/localonedayTrip.wxml</text>
/* pages/local/localonedayTrip/localonedayTrip.wxss */
\ No newline at end of file
......@@ -45,9 +45,9 @@
<view class='series_left' data-index='{{index}}' bindtap='seriesLeft'></view>
<scroll-view class='header_series' scroll-x scroll-into-view="{{item.seriesView}}" scroll-with-animation="{{true}}">
<view class='header_series_box'>
<view id='series_{{index}}_left'></view>
<view id='{{"series_"+index+"_left"}}'></view>
<block wx:for="{{item.lineTeam}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2">
<view class='header_series_text {{item.lineTeamNum===index2?"series_select":""}}' data-index1='{{index}}' data-index2='{{index2}}' bindtap='seriesClick'>{{item2.shortName}}</view>
<view class='header_series_text {{item.lineTeamNum===index2?"series_select":""}}' data-index='{{index}}' data-index='{{index2}}' bindtap='seriesClick'>{{item2.shortName}}</view>
</block>
<view id='series_{{index}}_right'></view>
</view>
......
......@@ -13,12 +13,14 @@
},
"compileType": "miniprogram",
"libVersion": "2.7.2",
"appid": "wxb25e6cd9b147f76c",
"appid": "wx84f47e77fa67edb7",
"projectname": "FLASHMAN",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
......
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
......@@ -8,6 +8,16 @@ const formatTime = date => {
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
const YYMMDD = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('-')
}
const CompareDate=(date1, date2)=> {
var oDate1 = new Date(date1);
var oDate2 = new Date(date2);
......@@ -26,4 +36,5 @@ const formatNumber = n => {
module.exports = {
formatTime: formatTime,
CompareDate: CompareDate,
YYMMDD: YYMMDD,
}
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