Commit e601fee6 authored by zhengke's avatar zhengke

1111

parent 4eda8c83
// pages/GroupTour/GroupList/GroupList.js
let app = getApp();
Page({
/**
......@@ -7,37 +8,40 @@ 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天以上"
},
],
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() {
......@@ -69,9 +73,154 @@ Page({
})
}
},
ChangeSite(val) {
console.log(val.detail);
this.data.listmsg.companyId = val.companyId;
this.data.listmsg.cityId = val.cityId;
this.setData({
site: val.detail
})
this.onLoad();
},
// 获取行程天数及出发城市
GetStartInfo() {
let tagmsg = {
companyId: this.data.site.companyId,
cityId: this.data.site.cityId,
}
app.$api('b2b_get_GetGroupSearchItem', tagmsg).then(res => {
console.log(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){
console.log(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){
console.log('picker发送选择改变,携带值为', e.detail.value)
if(e.target.dataset.type==1){
this.data.listmsg.startDate = e.detail.value;
}else{
this.data.listmsg.endDate = e.detail.value;
}
this.setData({
listmsg: this.data.listmsg
})
},
//点击过滤条件
changeOrderType(e) {
console.log(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
})
console.log(this.data.orderindex,'orderindex');
console.log(this.data.ordertype, 'ordertype');
this.onLoad();
},
//点击确定查询数据
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
})
console.log("listmsg", that.data.listmsg)
app.$api('b2b_get_GetB2BTravelPageList', that.data.listmsg).then(res => {
res.pageData.forEach(x=>{
x.newImgCover = JSON.parse(x.imgCover);
})
console.log(res.pageData,'ssss');
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.onLoad();
},
//点击出发城市
getStartCity(e){
console.log(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.onLoad();
},
ScreenOpen(){
this.setData({
......@@ -90,7 +239,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.GetStartInfo();
let City = this.selectComponent("#CityComp");
City.getCityList();
//初始化数据
this.getList();
},
/**
......
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,7 +43,6 @@
.scroll-header .ScrollActive {
color: #ee4454;
}
.ListItem {
padding: 30rpx 30rpx 15rpx 30rpx;
border-bottom: 1rpx solid #e9e9e9;
......@@ -128,7 +129,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 +172,7 @@
border-radius:27rpx;
display: inline-block;
font-size: 22rpx;
text-align: center;
}
.btnView{
margin-top:20rpx;
......@@ -183,5 +188,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;
}
// 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;
}
// 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
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