Commit 1aeb99f2 authored by huangyuanyuan's avatar huangyuanyuan

update

parent 669dc424
......@@ -111,6 +111,57 @@ App({
})
return promise;
},
$apiJavaData: function (url, msg) {
let groupId = 2;
let token = this.state.admin.token;
let secretKey = this.state.admin.secretKey;
let data = {};
var promise = new Promise((resolve, reject) => {
wx.showLoading({
title: '加载中...',
});
let timestamp = (new Date()).valueOf()
let sign = md5('msg=' + encodeURIComponent(JSON.stringify(msg)).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + token + '&' + 'key=' + secretKey)
wx.request({
url: 'https://efficient.oytour.com/' + url, //线上
// url: 'http://47.96.12.235:9001/' + url, //测试
// url: 'http://192.168.2.215:9000/'+ url,
method: 'POST',
data: {
msg: msg,
timestamp: timestamp,
token: token,
sign: sign,
groupId: groupId,
},
success(res) {
wx.hideLoading()
if (res.data.resultCode === 1) {
resolve(res.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
// wx.reLaunch({
// url: '/pages/login/login'
// })
// wx.showToast({
// title: res.data.message,
// icon: 'none',
// duration: 1000
// })
// reject(res.data)
} else {
wx.showToast({
title: res.data.message,
icon: 'none',
duration: 1000
})
reject(res.data)
}
}
})
})
return promise;
},
//
$apiJavaNew: function (url, msg) {
let groupId=2;
......
{
"pages": [
"pages/local/TicketDetails/TicketDetails",
"pages/local/localTrip/localTrip",
"pages/freeTravel/freeList/freeList",
"pages/local/localhome",
"pages/freeTravel/PersonalTailor/PersonalTailor",
"pages/Home/home",
"pages/GroupTour/GroupTour",
"pages/SearchPage/SearchPage",
......@@ -7,8 +12,6 @@
"pages/GroupTour/ChDateNum/ChDateNum",
"pages/GroupTour/GroupDetails/GroupDetails",
"pages/product/product",
"pages/freeTravel/freeList/freeList",
"pages/local/localhome",
"pages/freeTravel/free",
"pages/login/login",
"pages/GroupTour/Pay/Pay",
......@@ -46,6 +49,7 @@
"pages/product/SametradeZW/Successview/Successview",
"component/amount/amount",
"pages/activity/activity"
],
"window": {
"backgroundTextStyle": "light",
......
// component/chooseCity/chooseCity.js
let app = getApp();
Component({
/**
* 组件的属性列表
*/
properties: {
type: {
type: String
}
},
/**
* 组件的初始数据
*/
data: {
countryList: [],
provinceList: [],
cityList: [],
countryID: "",
provinceID: "",
cityID: "",
selectInfo: {
name:"",
id:"",
},
index:[],
},
/**
* 组件的方法列表
*/
methods: {
getCountry() {
console.log(this.data.type)
let that = this;
app.$api('dict_post_Destination_GetCountry', {}).then(res => {
this.setData({
countryList: res
})
if (res.length > 0) {
let countryInfo = that.data.countryList[0];
that.getProvince(countryInfo);
}
}).catch(err => { })
},
getProvince(countryInfo) {
let that = this;
app.$api('dict_post_Destination_GetChildList', { Id: countryInfo.ID }).then(res => {
this.setData({
provinceList: res,
cityList: [],
})
if (res.length > 0) {
let proInfo = that.data.provinceList[0];
that.getCity(proInfo)
} else {
let index = that.data.index[0];
that.data.selectInfo.name = that.data.countryList[index].Name;
that.data.selectInfo.id = that.data.countryList[index].ID;
}
that.setData({
selectInfo: that.data.selectInfo
})
}).catch(err => { })
},
getCity(proInfo) {
let that = this;
app.$api('dict_post_Destination_GetChildList', { Id: proInfo.ID }).then(res => {
this.setData({
cityList: res
})
if(res.length==0){
let index = that.data.index[1];
that.data.selectInfo.name = that.data.provinceList[index].Name;
that.data.selectInfo.id = that.data.provinceList[index].ID;
}else{
that.data.selectInfo.name = that.data.cityList[0].Name;
that.data.selectInfo.id = that.data.cityList[0].ID;
}
that.setData({
selectInfo: that.data.selectInfo
})
}).catch(err => { })
},
changeCountry(e) {
let that = this;
const val = e.detail.value
console.log(val);
this.setData({
index:val,
countryID: this.data.countryList[val[0]]
})
that.getProvince(that.data.countryID);
},
closeCountry(e) {
let country = e.target.dataset.self;
if (country == "country") {
console.log("11")
this.triggerEvent('closeCountryView', " ")
}
},
selectCity(){
let that=this;
// console.log("selectInfo", that.data.selectInfo);
this.triggerEvent('closeCountryView', " ")
this.triggerEvent('selectCity', that.data.selectInfo)
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view bindtap="closeCountry" data-self="country" class="CountrySelect">
<view class="CountryView">
<view class="PickerBtn">
<view bindtap="closeCountry" data-self="country" style="color:#888888">取消</view>
<view bindtap="selectCity" style="color:#EE4454">确定</view>
</view>
<picker-view class="CountryPicker" indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="changeCountry">
<picker-view-column>
<view wx:for="{{countryList}}" wx:key="index" style="line-height: 50px">{{item.Name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{provinceList}}" wx:key="index" style="line-height: 50px">{{item.Name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{cityList}}" wx:key="index" style="line-height: 50px">{{item.Name}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
\ No newline at end of file
.CountrySelect {
position: fixed;
width: 100%;
height: 100%;
background: rgba(17, 17, 17, 0.2);
top: 0;
z-index: 100;
}
.CountrySelect .CountryView {
position: absolute;
bottom: 0;
width: 100%;
background: #fff;
text-align: center;
font-size: 24rpx;
}
.CountrySelect .CountryView .PickerBtn {
padding: 30rpx;
box-sizing: border-box;
border-bottom: 1px solid #f5f5f5;
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
}
.CountrySelect .CountryPicker picker-view-column {
width: 100%;
}
// pages/freeTravel/PersonalTailor/PersonalTailor.js
const date = new Date()
const years = []
const months = []
const days = []
for (let i = 1990; i <= date.getFullYear(); i++) {
years.push(i)
}
for (let i = 1; i <= 12; i++) {
months.push(i)
}
for (let i = 1; i <= 31; i++) {
days.push(i)
}
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
years: years,
year: date.getFullYear(),
months: months,
month: 2,
days: days,
day: 2,
value: [9999, 1, 1],
region: ['广东省', '广州市', '海珠区'],
customItem: '全部'
value: [0, 0],
countryHidden: false,
msg: {
customId: 0,
startDate: "",
budget: "",
audltNumber: 0,
childrenNumber: 0,
contact: '',
phoneNumber: '',
email: '',
weChat: '',
desc: '',
departureName: "",
destinationIds: "",
destinationNames: '',
provideItem: '线路设计',
otherDemand: "",
backDate: "",
},
type: "",
peopleNumber: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
peopleNumber1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
numberHidden: false,
active: [{
lable: '线路设计',
id: 0,
click: true,
},
{
lable: '机票',
id: 1,
click: false,
},
{
lable: '酒店',
id: 2,
click: false,
},
{
lable: '用车',
id: 3,
click: false,
},
{
lable: '用餐',
id: 4,
click: false,
}
],
proHidden: false,
orderState: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
let chooseCity = this.selectComponent('#chooseCity');
chooseCity.getCountry();
},
submitMsg() {
let that = this;
let msg = that.data.msg;
if (msg.departureName == "") {
wx.showToast({
title: "请选择出发地",
icon: 'none',
duration: 1000
})
return;
}
if (msg.destinationNames == "") {
wx.showToast({
title: "请选择目的地",
icon: 'none',
duration: 1000
})
return;
}
if (msg.startDate == "") {
wx.showToast({
title: "请选择出行日期",
icon: 'none',
duration: 1000
})
return;
}
if (msg.audltNumber + msg.childrenNumber < 1) {
wx.showToast({
title: "出行人数至少一人!",
icon: 'none',
duration: 1000
})
return;
}
if (msg.contact == "") {
wx.showToast({
title: "请填写联系人姓名",
icon: 'none',
duration: 1000
})
return;
}
if (msg.phoneNumber == "") {
wx.showToast({
title: "请填写联系人手机号",
icon: 'none',
duration: 1000
})
return;
}
app.$apiJavaData('/api/b2b/free/setTravelCusotom', msg).then(res => {
if (res.resultCode == 1) {
this.setData({
orderState: true,
})
} else {
wx.showToast({
title: res.message,
icon: 'none',
duration: 1000
})
}
}).catch(err => {})
},
proView() {
this.setData({
proHidden: true,
})
},
closePro(e) {
let self = e.target.dataset.self;
if (self == "self") {
this.setData({
proHidden: false,
})
}
},
protext(e) {
let item = e.currentTarget.dataset.item;
let index = item.id;
this.data.active[index].click = !this.data.active[index].click;
this.setData({
active: this.data.active,
})
let arr = [];
this.data.active.forEach(item => {
if (item.click) {
arr.push(item.lable)
}
})
this.data.msg.provideItem = arr.join(',');
this.setData({
msg: this.data.msg,
})
},
otherInput(e) {
this.data.msg.otherDemand = e.detail.value;
this.setData({
msg: this.data.msg
})
},
weixinInput(e) {
this.data.msg.weChat = e.detail.value;
this.setData({
msg: this.data.msg
})
},
emailInput(e) {
this.data.msg.email = e.detail.value;
this.setData({
msg: this.data.msg
})
},
concatPhoneInput(e) {
this.data.msg.phoneNumber = e.detail.value;
let phoneNumber = e.detail.value;
if (phoneNumber.length == 11) {
let checkedNum = this.checkPhoneNum(phoneNumber);
}
this.setData({
msg: this.data.msg
})
},
checkPhoneNum(phoneNumber) {
let str = /^1\d{10}$/;
if (str.test(phoneNumber)) {
return true
} else {
wx.showToast({
title: '手机号不正确',
duration: 500,
icon: 'none',
})
return false
}
},
concatNameInput(e) {
this.data.msg.contact = e.detail.value;
this.setData({
msg: this.data.msg
})
},
budgetInput(e) {
this.data.msg.budget = e.detail.value;
this.setData({
msg: this.data.msg
})
},
changePerson(e) {
let val = e.detail.value;
let that = this;
that.data.msg.audltNumber = that.data.peopleNumber[val[0]];
that.data.msg.childrenNumber = that.data.peopleNumber[val[1]];
},
selectPerson() {
let that = this;
that.setData({
msg: that.data.msg,
numberHidden: false
})
},
closeNumber(e) {
let str = e.target.dataset.self;
if (str == "number") {
this.setData({
numberHidden: false
})
}
},
numberView() {
this.setData({
numberHidden: true
})
},
selectCity(val) {
let that = this;
let vastr = val.detail;
if (that.data.type == "start") {
that.data.msg.departureId = vastr.id;
that.data.msg.departureName = vastr.name;
} else {
that.data.msg.destinationIds = vastr.id;
that.data.msg.destinationNames = vastr.name;
}
that.setData({
msg: that.data.msg
})
},
bindChange: function (e) {
const val = e.detail.value
getCity(e) {
let that = this;
that.setData({
countryHidden: true
})
let type = e.target.dataset.type;
that.setData({
type: type
})
},
closeCountryView() {
this.setData({
countryHidden: false,
})
},
bindDateChange(e) {
let that = this;
let str = e.target.dataset.str;
if (str == "start") {
that.data.msg.startDate = e.detail.value;
} else {
that.data.msg.backDate = e.detail.value;
}
this.setData({
year: this.data.years[val[0]],
month: this.data.months[val[1]],
day: this.data.days[val[2]]
msg: that.data.msg
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
{
"usingComponents": {}
"navigationBarTitleText": "行程定制",
"usingComponents": {
"chooseCity": "/component/chooseCity/chooseCity"
}
}
\ No newline at end of file
......@@ -6,31 +6,153 @@
<view class="title">个人定制</view>
<view class="writeView">
<view class="city">
<view class="site">
<view bindtap="getCity" data-type="start" class="site">
出发地:{{msg.departureName}}
</view>
<view>-</view>
<view style="text-align:right" class="site">
<view bindtap="getCity" data-type="end" style="text-align:right" class="site">
目的地:{{msg.destinationNames}}
</view>
</view>
</view>
<view class="padView" style="padding:0 30rpx">
<view class="data">
<text class="f30" style="color:#999999"><text style="color:#EE4454">*</text>预估出行日期</text>
<view class="Date">
<picker mode="date" data-str="start" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
<input value="{{msg.startDate}}" placeholder="请选择出行时间"></input>
</view>
</picker>
</view>
<!-- <view class="Date">
<picker mode="date" data-str="end" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
{{msg.backDate}}
</view>
</picker>
</view> -->
</view>
<view bindtap="numberView">
<text style="color:#EE4454">*</text>
<text class="f30">{{msg.audltNumber}}</text>
<text class="f20">成人</text>
<text style="margin-left:20rpx" class="f30">{{msg.childrenNumber}}</text>
<text class="f20">儿童</text>
</view>
<view>
<text class="c88 f30">预估人均预算</text>
<input bindinput="budgetInput" placeholder-class="bugetInput" style="display:inline-block;width:400rpx;padding-left:30rpx;font-size: 24rpx;" placeholder="请输入0-99999之间的数字"></input>
</view>
<view>
<text class="f30 c88">需要提供什么</text>
<view bindtap="proView" class="f30" style="display:inline-block;width:400rpx;padding-left:30rpx">
<text class="f26">{{msg.provideItem}}</text>
</view>
</view>
<view class="halfVIew">
<view class="left">
<text style="color:#EE4454">*</text>
<text class="f30">联系人姓名</text>
</view>
<view class="right">
<input bindinput="concatNameInput" placeholder-class="bugetInput" placeholder="请输入联系人姓名"></input>
</view>
</view>
<view class="halfVIew">
<view class="left">
<text style="color:#EE4454">*</text>
<text class="f30">手机号码</text>
</view>
<view class="right">
<input type="number" maxlength="11" bindinput="concatPhoneInput" placeholder-class="bugetInput" placeholder="请输入手机号码"></input>
</view>
</view>
<view class="halfVIew">
<view class="left">
<text class="f30">电子邮箱</text>
</view>
<view class="right">
<input bindinput="emailInput" placeholder-class="bugetInput" placeholder="请输入电子邮箱"></input>
</view>
</view>
<view class="halfVIew">
<view class="left">
<text class="f30">微信号</text>
</view>
<view class="right">
<input bindinput="weixinInput" placeholder-class="bugetInput" placeholder="请输入微信号"></input>
</view>
</view>
<view class="halfVIew">
<view class="left">
<text class="f30">其他需求</text>
</view>
<view class="right">
<input bindinput="otherInput" placeholder-class="bugetInput" placeholder="请输入其他需求"></input>
</view>
</view>
<view bindtap="submitMsg" class="tjBtn">提交需求</view>
<view class="f22" style="color:#5597FF;margin-top:30rpx">
<text style="color:#EE4454">*</text>提交需求后会有专业定制师联系您,为您免费制作方案,可根据实际情况调整细节
</view>
</view>
</view>
</view>
<!-- 国家城市选择 -->
<view hidden="{{!countryHidden}}">
<chooseCity bind:selectCity="selectCity" bind:closeCountryView="closeCountryView" data-type="{{type}}" id="chooseCity"></chooseCity>
</view>
<!-- 人数的选择 -->
<view hidden="{{!numberHidden}}" bindtap="closeNumber" data-self="number" class="CountrySelect">
<view class="CountryView">
<view class="PickerBtn">
<view bindtap="closeNumber" data-self="number" style="color:#888888">取消</view>
<view bindtap="selectPerson" style="color:#EE4454">确定</view>
</view>
<view class="numberView">
<view>成人</view>
<view>儿童</view>
</view>
<picker-view class="CountryPicker" indicator-style="height: 50px;" style="width: 100%; height: 400rpx;" value="{{value}}" bindchange="changePerson">
<picker-view-column>
<view wx:for="{{peopleNumber}}" wx:key="index" style="line-height: 50px">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{peopleNumber1}}" wx:key="index" style="line-height: 50px">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
<!-- 需要提供 -->
<view hidden="{{!proHidden}}" bindtap="closePro" data-self="self" class="CountrySelect commonF">
<view class="CountryView" style="text-align: left;padding:0 30rpx;box-sizing:border-box;height:400rpx">
<view class="f30 bold" style="text-align:center;padding:30rpx;position:relative">需要提供什么
<view class="closePro" data-self="self">x</view>
</view>
<view class="provite">
<text class="{{item.click?'active':''}}" bindtap="protext" data-item="{{item}}" wx:for="{{active}}" wx:key="index">{{item.lable}}</text>
</view>
<!-- <view class="proBtn">确定</view> -->
</view>
</view>
<view class="CountrySelect">
<picker-view class="CountryPicker" indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange">
<view class="PickerBtn">
<view>取消</view>
<view>确定</view>
<!-- 订单提交成功 -->
<view hidden="{{!orderState}}" class="orderView commonF">
<view class="Info">
<view style="text-align:center;position:relative;top:-50rpx">
<image style="width:100rpx;height:100rpx;" src="/images/free/gou.png"></image>
</view>
<view class="f30">您的订单已经成功提交!</view>
<view class="f24 c66">
<view style="padding:20rpx 0">我们正在为您分配定制师</view>
<view>定制师接单后将<text style="color:#EE4454">明天</text>联系您</view>
</view>
<view class="f30 cee" style="text-align:center;margin-top:30rpx">查看订单</view>
</view>
<picker-view-column>
<view wx:for="{{years}}" style="line-height: 50px">{{item}}年</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{months}}" style="line-height: 50px">{{item}}月</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{days}}" style="line-height: 50px">{{item}}日</view>
</picker-view-column>
</picker-view>
</view>
\ No newline at end of file
.InfoView{
width:690rpx;
background:rgba(255,255,255,1);
box-shadow:0px 6rpx 10rpx 0px rgba(76,76,76,0.15);
border-radius:12rpx;
.InfoView {
width: 690rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 6rpx 10rpx 0px rgba(76, 76, 76, 0.15);
border-radius: 12rpx;
margin: 0 auto;
}
.InfoView .title{
width:100%;
height:90rpx;
line-height:90rpx;
border-bottom: 1px solid #E9E9E9;
.InfoView .title {
width: 100%;
height: 90rpx;
line-height: 90rpx;
border-bottom: 1px solid #e9e9e9;
text-align: center;
font-size: 28rpx;
font-weight: 600;
}
.writeView{
.writeView {
padding: 0 30rpx;
box-sizing: border-box;
}
.writeView .city{
.writeView .city {
font-size: 30rpx;
display: flex;
justify-content: space-between;
padding:30rpx 0;
padding: 30rpx 0;
}
.writeView .city .site{
.writeView .city .site {
width: 280rpx;
border-bottom: 1px solid #E9E9E9;
border-bottom: 1px solid #e9e9e9;
padding-bottom: 20rpx;
}
.padView>view {
padding: 20rpx 0;
border-bottom: 1px solid #e9e9e9;
display: flex;
align-items: center;
}
.padView .Date {
width: 400rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
}
.padView .Date picker {
width: 100%;
height: 100%;
}
.padView .Date .picker {
width: 100%;
height: 70rpx;
font-size: 24rpx;
text-align: center;
}
.CountrySelect{
.padView .Date .picker input {
height: 100%;
line-height: 70rpx;
}
.bugetInput {
font-size: 24rpx;
color: #888;
}
.halfVIew {
display: flex;
}
.halfVIew .left {
width: 200rpx;
color: #888;
}
.halfVIew .right {
width: 400rpx;
}
.halfVIew .right input {
font-size: 24rpx;
}
.tjBtn {
width: 630rpx;
height: 90prx;
line-height: 90prx;
background: rgba(238, 68, 84, 1);
border-radius: 12rpx;
font-size: 30rpx;
color: #fff;
justify-content: center;
}
.CountrySelect {
position: fixed;
width: 100%;
height: 100%;
background: rgba(17,17,17,0.2);
background: rgba(17, 17, 17, 0.2);
top: 0;
z-index: 1000;
}
.CountrySelect .CountryPicker{
.CountrySelect .CountryView {
position: absolute;
bottom: 0;
width: 100%;
background: #fff;
text-align: center;
font-size: 24rpx;
height: 600rpx;
}
.CountrySelect .CountryView .PickerBtn {
padding: 30rpx;
box-sizing: border-box;
border-bottom: 1px solid #f5f5f5;
width: 100%;
height: 90rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
}
.CountrySelect .CountryPicker {
position: absolute;
bottom: 0;
}
.CountrySelect .CountryPicker picker-view-column {
width: 100%;
}
.numberView {
display: flex;
justify-self: center;
width: 100%;
border-bottom: 1px solid #f5f5f5;
height: 90rpx;
line-height: 90rpx;
}
.CountrySelect .CountryPicker .PickerBtn{
display: flex;
.numberView>view {
width: 50%;
}
.provite text {
width: 190rpx;
height: 54rpx;
line-height: 54rpx;
border-radius: 27rpx;
text-align: center;
display: inline-block;
margin-right: 40rpx;
background: #f2f2f2;
margin-bottom: 30rpx;
}
.provite .active{
background:rgba(255,223,226,1);
border:1px solid rgba(238, 68, 84, 1);
color:#EE4454;
}
.proBtn {
width: 660rpx;
height: 74rpx;
line-height: 74rpx;
background: rgba(238, 68, 84, 1);
border-radius: 12rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
}
.closePro{
position: absolute;
right: 0;
font-weight: 100;
font-size: 40rpx;
color: #AAAAAA;
top: 20rpx;
}
.orderView{
position: fixed;
background:rgba(0,0,0,0.5);
width: 100%;
height: 100%;
z-index: 200;
top: 0;
}
.orderView .Info{
position: absolute;
width:580rpx;
height:429rpx;
background:rgba(255,255,255,1);
border-radius:12rpx;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: 30rpx;
box-sizing: border-box;
justify-content: space-between;
border-bottom: 1px solid #f5f5f5;
width:
}
\ No newline at end of file
}
......@@ -147,9 +147,7 @@
margin-top:15rpx;
}
.screen .pcikerView{
display: inline-block;
display: inline-block;
}
.MonthList{
display: flex;
......
// pages/local/oneday/oneday.js
let app = getApp();
var util = require('../../../utils/util.js')
Component({
/**
* 组件的属性列表
*/
properties: {
pageIndex: {
type: 'number'
},
},
/**
* 组件的初始数据
*/
data: {
ScreenStatus: false,
countryList: [],
isLogin: app.isLogin,
site: {
companyId: app.state.companyId,
cityId: app.state.cityId,
siteName: app.state.siteName,
},
msg: {
pageIndex: 1,
pageSize: 5,
startDate: "",
endDate: "",
minPrice: -1,
maxPrice: -1,
orderByPrice: 0,
orderBySales: 0,
cityId: 0,
searchKey: "",
},
cityList: [],
dataList: [],
noData: false,
},
/**
* 组件的方法列表
*/
methods: {
zhpx() {
this.data.msg.orderByPrice = 0;
this.data.msg.orderBySales = 0;
this.setData({
msg: this.data.msg
})
this.getList();
},
bySale() {
let sale = this.data.msg.orderBySales;
sale == 0 ? sale = 1 : sale = 0;
this.data.msg.orderByPrice = 0;
this.data.msg.orderBySales = sale;
this.setData({
msg: this.data.msg
})
this.getList();
},
byPrice() {
let orderByPrice = this.data.msg.orderByPrice;
orderByPrice == 0 ? orderByPrice = 1 : orderByPrice = 0;
this.data.msg.orderByPrice = orderByPrice;
this.data.msg.orderBySales = 0;
this.setData({
msg: this.data.msg
})
this.getList();
},
getList() {
this.data.msg.pageIndex = this.properties.pageIndex;
let dataList = this.data.dataList;
app.$apiJavaNew('/api/b2b/food/getFoodList', this.data.msg).then(res => {
console.log("美食", res);
if (res.pageData.length < 5) {
this.setData({
noData: true
})
}
res.pageData.forEach(item => {
dataList.push(item)
})
this.setData({
dataList: dataList
})
this.triggerEvent('oneDayInfo', this.data.noData)
}).catch(err => { })
},
screenOpen() {
this.setData({
ScreenStatus: true,
})
},
closeScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
}
},
minPriceInput(e) {
this.data.msg.minPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
maxPriceInput(e) {
this.data.msg.maxPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
bindDateChange(e) {
let type = e.currentTarget.dataset.type;
let val = e.detail.value;
if (type == "start") {
this.data.msg.startDate = val;
} else {
this.data.msg.endDate = val;
}
this.setData({
msg: this.data.msg
})
if (util.CompareDate(this.data.msg.startDate, this.data.msg.endDate)) {
wx.showToast({
title: "请选择正确的日期!",
icon: 'none',
duration: 1000
})
}
},
// 获取国家
getCityItem() {
app.$apiJavaNew('/api/b2b/food/getFoodCountryCityItem', {}).then(res => {
console.log("目的地", res)
this.setData({
cityList: res
})
}).catch(err => { })
},
getcityId(e) {
let item = e.currentTarget.dataset.item;
this.data.msg.cityId = item
this.setData({
msg: this.data.msg
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="commonF">
<view>
<view style="background:#f4f4f4">
<view class="PxView" style="padding-bottom:20rpx">
<view class="filterList" bindtap='zhpx'>
综合排序
</view>
<view bindtap="bySale" class="filterList">
销量
<image wx:if="{{msg.orderBySales==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderBySales==1}}" src="/images/group/rs.png"></image>
</view>
<view bindtap="byPrice" class="filterList">
价格
<image wx:if="{{msg.orderByPrice==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderByPrice==1}}" src="/images/group/rs.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>
<!-- 列表数据 -->
<view wx:for="{{dataList}}" wx:key="index" class="ListItem commonF">
<view class="imgView">
<image wx:if="{{item.coverImgs[0]}}" src="{{item.coverImgs[0]}}"></image>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2">{{item.name}}
</view>
<view style="color:#888888;font-size:22rpx;height:30rpx;overflow:hidden;text-overflow: ellipsis;white-space:nowrap;">
<image style="width:18rpx;height:22rpx" src="/images/group/adress.png"></image>
景点地址:{{item.address}}
</view>
<view style="color:#888888;">
<text class="tqText1" style="font-size:22rpx">景点特色:{{item.feature}}</text>
</view>
<view class="price">
<text style="font-size:40rpx">¥{{(isLogin!=1 ? item.b2cPrice : item.b2bPrice)}}</text>
<text style="font-size:20rpx" style="color:#888888">起</text>
</view>
</view>
</view>
<view class='Nodataview' wx:if='{{noData}}'>
<text>没有更多数据</text>
</view>
</view>
<!-- 筛选多条件 -->
<view bindtap='closeScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<!-- <view class="title">目的地</view>
<view class="xl">
<text bindtap="getCountryId" class="{{msg.countryId==0?'active':''}}">不限</text>
<text bindtap="getCountryId" class="{{msg.countryId==item.countryId?'active':''}}" data-item="{{item}}" wx:for="{{countryList}}" wx:key="index">{{item.countryName}}</text>
</view> -->
<view class="title">目的地</view>
<view class="xl">
<text bindtap="getcityId" data-item="{{0}}" class="{{msg.cityId==0?'active':''}}">不限</text>
<text bindtap="getcityId" data-item="{{item.cityId}}" class="{{msg.cityId==item.cityId?'active':''}}" wx:for="{{cityList}}" wx:key="index">{{item.cityName}}</text>
</view>
<view class="title">游玩时间</view>
<view class="DatePicker">
<picker class="pcikerView" data-type="start" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
开始:{{msg.startDate}}
</view>
</picker>
<text style="margin:0 15rpx"> - </text>
<picker class="pcikerView" data-type="end" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
结束:{{msg.endDate}}
</view>
</picker>
</view>
<view class='MonthList'>
<text wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">价格区间</view>
<view class="PriceView">
<input bindinput="minPriceInput" value="{{msg.minPrice==-1?'':msg.minPrice}}" type="number" placeholder="0" placeholder-style="text-align:center" />
<text style="padding:0 15rpx">-</text>
<input bindinput="maxPriceInput" value="{{msg.maxPrice==-1?'':msg.maxPrice}}" type="number" placeholder="最高价" placeholder-style="text-align:center" />
</view>
<view class="btnView">
<view bindtap='closeScreen' data-target="self">取消</view>
<view bindtap="getList" style="background:#EE4454;color:#fff;border:none">确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
.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;
padding:15rpx 0;
}
.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;
text-align: center;
font-size: 25rpx;
line-height: 54rpx;
margin-bottom: 20rpx;
}
.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;
text-align: center;
}
.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;
}
.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%;
margin-top: 20rpx;
}
.ListItem .imgView {
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
}
.ListItem>view {
display: inline-block;
}
.commonF .text2{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 26rpx;
}
.ListItem .price{
color:#EE4454;
text-align: right;
}
.xl .active{
background: #EE4454!important;
color:#fff;
}
.tqText1{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
width: 400rpx;
display: inline-block;
height: 30rpx;
}
.Nodataview{
width: 100%;
box-sizing: border-box;
padding: 30rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
\ No newline at end of file
// pages/local/localonedayTrip/localonedayTrip.js
// pages/local/TicketDetails/TicketDetails.js
Page({
/**
* 页面的初始数据
*/
data: {
imgUrls: [
'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'
],
indicatorDots: false,
autoplay: false,
interval: 5000,
duration: 1000
},
/**
......
<view class="ticketDes commonF">
<view class="swiper">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{imgUrls}}">
<swiper-item>
<image src="{{item}}" class="slide-image" width="355" height="150" />
</swiper-item>
</block>
</swiper>
</view>
<view class="ban_view">
<view class="price" style="margin-top:20rpx">
<text class="cee f22">¥</text>
<text class="cee f46">174~150</text>
<text style="margin-left:20rpx" class="c88 f22">最早可定:7月10号</text>
</view>
<view class="bold f32">
三丽鸥彩虹乐园
</view>
<view class="xqView" style="border-bottom:1px solid #E9E9E9">
<view class="left">
<image style="width:20rpx;height:20rpx;margin-right:6rpx" src="/images/group/tuan.png"></image>
<text>开放时间:开放中(日本时间10:00-17:00(周一-周五)</text>
</view>
<view class="right">
<image style="width:14rpx;height:26rpx" src="/images/group/chakn.png"></image>
</view>
</view>
<view class="xqView">
<view class="left">
<image style="width:16rpx;height:20rpx;margin-right:6rpx" src="/images/group/adress.png"></image>
<text>日本千叶县浦安市舞浜1-1号</text>
</view>
<view class="right">
<image style="width:14rpx;height:26rpx" src="/images/group/chakn.png"></image>
</view>
</view>
</view>
<view class="Gray30"></view>
<view class="ticketInfo">
<view style="padding:20rpx 30rpx;border-bottom:1px solid #E9E9E9;">
<image style="width:24rpx;height:26rpx;margin-right:6rpx" src="/images/local/info.png"></image>
<text class="f26">门票信息</text>
</view>
<view class="ticketItem">
<view class="left">
<view>成人票(18-64岁)</view>
<view style="margin-top:10rpx" class="c66">日本东京迪士尼一日游(海洋乐园)</view>
</view>
<view class="right">
<view class="cee">
<text class="f22">¥</text>
<text class="f36">190</text>
</view>
<view>
<text class="Ydbtn">立即预定</text>
</view>
</view>
</view>
<view class="ticketItem">
<view class="left">
<view>成人票(18-64岁)</view>
<view style="margin-top:10rpx" class="c66">日本东京迪士尼一日游(海洋乐园)</view>
</view>
<view class="right">
<view class="cee">
<text class="f22">¥</text>
<text class="f36">190</text>
</view>
<view>
<text class="Ydbtn">立即预定</text>
</view>
</view>
</view>
</view>
<view class="Gray30"></view>
<view class="details">
<view style="padding:20rpx 0;">
<image style="width:24rpx;height:26rpx;margin-right:6rpx" src="/images/local/ydxz.png"></image>
<text class="f26">预定须知</text>
</view>
<view class="deItem">
<view class="f22 cee">预定说明</view>
<view>1、日本国土交通省于平成24年6月(2012年)发布最新规定,每日行车时 间不得超过10小时(以自车库实际发车时间为计算基准),若超时,则 司机有权拒绝,以有效防止巴士司机因过(疲)劳驾驶所衍生之交通状况。 (资料来源:日本国土交通省)。故敬请游客贵宾严格守时。按照导游指 导的集合或游览时间为准。 </view>
</view>
<view class="deItem">
<view class="f22 cee">温馨提示</view>
<view>1、日本国土交通省于平成24年6月(2012年)发布最新规定,每日行车时 间不得超过10小时(以自车库实际发车时间为计算基准),若超时,则 司机有权拒绝,以有效防止巴士司机因过(疲)劳驾驶所衍生之交通状况。 (资料来源:日本国土交通省)。故敬请游客贵宾严格守时。按照导游指 导的集合或游览时间为准。 </view>
</view>
</view>
<view class="Gray30"></view>
<view class="details">
<view style="padding:20rpx 0;">
<image style="width:24rpx;height:26rpx;margin-right:6rpx" src="/images/local/jdjs.png"></image>
<text class="f26">景点介绍</text>
</view>
<view class="deItem">
<view class="f22 cee">园区介绍</view>
<view>1、日本国土交通省于平成24年6月(2012年)发布最新规定,每日行车时 间不得超过10小时(以自车库实际发车时间为计算基准),若超时,则 司机有权拒绝,以有效防止巴士司机因过(疲)劳驾驶所衍生之交通状况。 (资料来源:日本国土交通省)。故敬请游客贵宾严格守时。按照导游指 导的集合或游览时间为准。 </view>
</view>
<view class="deItem">
<view class="f22 cee">交通信息</view>
<view>1、日本国土交通省于平成24年6月(2012年)发布最新规定,每日行车时 间不得超过10小时(以自车库实际发车时间为计算基准),若超时,则 司机有权拒绝,以有效防止巴士司机因过(疲)劳驾驶所衍生之交通状况。 (资料来源:日本国土交通省)。故敬请游客贵宾严格守时。按照导游指 导的集合或游览时间为准。 </view>
</view>
</view>
<!-- -->
<view class="bottomView">
<view class="left">
<text class="f22 cee">¥</text>
<text class="f46 bold cee">174~200</text>
</view>
<view class="right">
<image style="width:26rpx;height:26rpx;margin-right:6rpx" src="/images/local/xs.png"></image>
<text style="f30" style="color:#fff ">查看门票</text>
</view>
</view>
</view>
\ No newline at end of file
.swiper {
width: 100%;
height: 560rpx;
}
.swiper swiper {
height: 100%;
width: 100%;
}
.ban_view {
padding: 0 30rpx;
background: #fff;
}
.ban_view .price {
display: flex;
align-items: center;
}
.ban_view .xqView {
display: flex;
justify-content: space-between;
font-size: 24rpx;
padding: 30rpx 0;
}
.ban_view .xqView .left {
width: 526rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ban_view .xqView .right {
width: 70rpx;
text-align: right;
}
.ticketInfo .ticketItem {
display: flex;
justify-content: space-between;
padding: 0 30rpx;
height: 150rpx;
border-bottom: 1px solid #e9e9e9;
}
.ticketInfo .ticketItem:last-child{
border: none;
}
.ticketInfo .ticketItem>view {
display: inline-flex;
flex-direction: column;
justify-content: center;
}
.ticketInfo .ticketItem .left {
width: 600rpx;
font-size: 22rpx;
}
.ticketInfo .ticketItem .right {
width: 130rpx;
}
.ticketInfo .ticketItem .right .Ydbtn {
display: inline-block;
width: 120rpx;
height: 50rpx;
line-height: 50rpx;
background: rgba(238, 68, 84, 1);
border-radius: 3rpx;
text-align: center;
font-size: 22rpx;
color: #fff;
position: relative;
top:-10rpx;
}
.details{
padding: 0 30rpx;
}
.deItem{
font-size: 22rpx;
}
.deItem>view:first-child{
padding: 20rpx 0;
}
.bottomView{
border-top: 1px solid #e9e9e9;
height: 100rpx;
text-align: center;
}
.bottomView>view{
float: left;
line-height: 100rpx;
height: 100%;
}
.bottomView .left{
width: 410rpx;
}
.bottomView .right{
width:341rpx;
background:rgba(238,68,84,1);
font-size: 30rpx;
}
// pages/local/oneday/oneday.js
let app = getApp();
var util = require('../../../utils/util.js')
Component({
/**
* 组件的属性列表
*/
properties: {
pageIndex: {
type: 'number'
},
},
/**
* 组件的初始数据
*/
data: {
ScreenStatus: false,
countryList: [],
isLogin: app.isLogin,
site: {
companyId: app.state.companyId,
cityId: app.state.cityId,
siteName: app.state.siteName,
},
msg: {
pageIndex: 1,
pageSize: 5,
startDate: "",
endDate: "",
minPrice: -1,
maxPrice: -1,
orderByPrice: 0,
orderBySales: 0,
countryId: 0,
cityId: 0,
searchKey:"",
},
cityList: [],
dataList: [],
noData: false,
},
/**
* 组件的方法列表
*/
methods: {
zhpx() {
this.data.msg.orderByPrice = 0;
this.data.msg.orderBySales = 0;
this.setData({
msg: this.data.msg
})
this.getList();
},
bySale() {
let sale = this.data.msg.orderBySales;
sale == 0 ? sale = 1 : sale = 0;
this.data.msg.orderByPrice = 0;
this.data.msg.orderBySales = sale;
this.setData({
msg: this.data.msg
})
this.getList();
},
byPrice() {
let orderByPrice = this.data.msg.orderByPrice;
orderByPrice == 0 ? orderByPrice = 1 : orderByPrice = 0;
this.data.msg.orderByPrice = orderByPrice;
this.data.msg.orderBySales = 0;
this.setData({
msg: this.data.msg
})
this.getList();
},
getList() {
this.data.msg.pageIndex = this.properties.pageIndex;
let dataList = this.data.dataList;
app.$apiJavaNew('/api/b2b/scenic/getScenicTicketList', this.data.msg).then(res => {
console.log("sfsd",res);
if (res.pageData.length < 5) {
this.setData({
noData: true
})
}
res.pageData.forEach(item => {
dataList.push(item)
})
this.setData({
dataList: dataList
})
this.triggerEvent('oneDayInfo', this.data.noData)
}).catch(err => { })
},
screenOpen() {
this.setData({
ScreenStatus: true,
})
},
closeScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
}
},
minPriceInput(e) {
this.data.msg.minPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
maxPriceInput(e) {
this.data.msg.maxPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
bindDateChange(e) {
let type = e.currentTarget.dataset.type;
let val = e.detail.value;
if (type == "start") {
this.data.msg.startDate = val;
} else {
this.data.msg.endDate = val;
}
this.setData({
msg: this.data.msg
})
if (util.CompareDate(this.data.msg.startDate, this.data.msg.endDate)) {
wx.showToast({
title: "请选择正确的日期!",
icon: 'none',
duration: 1000
})
}
},
// 获取国家
getCountry() {
app.$apiJavaNew('/api/b2b/scenic/getScenicCountryCityItem', {}).then(res => {
console.log("国家",res)
this.setData({
countryList: res
})
}).catch(err => { })
},
getCountryId(e) {
let item = e.currentTarget.dataset.item;
if (item) {
this.data.msg.countryId = item.lineId
this.setData({
cityList: item.cityList,
msg: this.data.msg
})
} else {
this.data.msg.countryId = 0;
this.setData({
cityList: [],
msg: this.data.msg
})
}
},
getcityId(e) {
let item = e.currentTarget.dataset.item;
this.data.msg.cityId = item
this.setData({
msg: this.data.msg
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="commonF">
<view>
<view style="background:#f4f4f4">
<view class="PxView" style="padding-bottom:20rpx">
<view class="filterList" bindtap='zhpx'>
综合排序
</view>
<view bindtap="bySale" class="filterList">
销量
<image wx:if="{{msg.orderBySales==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderBySales==1}}" src="/images/group/rs.png"></image>
</view>
<view bindtap="byPrice" class="filterList">
价格
<image wx:if="{{msg.orderByPrice==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderByPrice==1}}" src="/images/group/rs.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>
<!-- 列表数据 -->
<view wx:for="{{dataList}}" wx:key="index" class="ListItem commonF">
<view class="imgView">
<image wx:if="{{item.coverImgs[0]}}" src="{{item.coverImgs[0]}}"></image>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2">{{item.name}}
</view>
<view style="color:#888888;font-size:22rpx">
<image style="width:18rpx;height:22rpx" src="/images/group/adress.png"></image>
景点地址:{{item.address}}
</view>
<view style="color:#888888;">
<image style="width:22rpx;height:22rpx;margin-right:3px;" src="/images/group/tuan.png"></image>
<text class="tqText1" style="font-size:22rpx">开放时间:{{item.openingHours}}</text>
</view>
<view class="price">
<text style="font-size:40rpx">¥{{(isLogin!=1 ? item.b2cPrice : item.b2bPrice)}}</text>
<text style="font-size:20rpx" style="color:#888888">起</text>
</view>
</view>
</view>
<view class='Nodataview' wx:if='{{noData}}'>
<text>没有更多数据</text>
</view>
</view>
<!-- 筛选多条件 -->
<view bindtap='closeScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<view class="title">国家</view>
<view class="xl">
<text bindtap="getCountryId" class="{{msg.countryId==0?'active':''}}">不限</text>
<text bindtap="getCountryId" class="{{msg.countryId==item.countryId?'active':''}}" data-item="{{item}}" wx:for="{{countryList}}" wx:key="index">{{item.countryName}}</text>
</view>
<view class="title">城市</view>
<view class="xl">
<text bindtap="getcityId" data-item="{{0}}" class="{{msg.cityId==0?'active':''}}">不限</text>
<text bindtap="getcityId" data-item="{{item.cityId}}" class="{{msg.cityId==item.cityId?'active':''}}" wx:for="{{cityList}}" wx:key="index">{{item.cityName}}</text>
</view>
<view class="title">游玩时间</view>
<view class="DatePicker">
<picker class="pcikerView" data-type="start" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
开始:{{msg.startDate}}
</view>
</picker>
<text style="margin:0 15rpx"> - </text>
<picker class="pcikerView" data-type="end" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
结束:{{msg.endDate}}
</view>
</picker>
</view>
<view class='MonthList'>
<text wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">价格区间</view>
<view class="PriceView">
<input bindinput="minPriceInput" value="{{msg.minPrice==-1?'':msg.minPrice}}" type="number" placeholder="0" placeholder-style="text-align:center" />
<text style="padding:0 15rpx">-</text>
<input bindinput="maxPriceInput" value="{{msg.maxPrice==-1?'':msg.maxPrice}}" type="number" placeholder="最高价" placeholder-style="text-align:center" />
</view>
<view class="btnView">
<view bindtap='closeScreen' data-target="self">取消</view>
<view bindtap="getList" style="background:#EE4454;color:#fff;border:none">确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
.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;
padding:15rpx 0;
}
.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;
text-align: center;
font-size: 25rpx;
line-height: 54rpx;
margin-bottom: 20rpx;
}
.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;
text-align: center;
}
.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;
}
.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%;
margin-top: 20rpx;
}
.ListItem .imgView {
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
}
.ListItem>view {
display: inline-block;
}
.commonF .text2{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 26rpx;
}
.ListItem .price{
color:#EE4454;
text-align: right;
}
.xl .active{
background: #EE4454!important;
color:#fff;
}
.tqText1{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
width: 400rpx;
display: inline-block;
height: 30rpx;
}
.Nodataview{
width: 100%;
box-sizing: border-box;
padding: 30rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
\ No newline at end of file
......@@ -13,10 +13,8 @@ Page({
siteName: app.state.siteName,
},
dates: [],
isShowType:1,
//开始时间
sDate:'',
eDate:'',
isShowType:3,
datecount: [
{
id: 1,
......@@ -47,27 +45,8 @@ Page({
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: '',
},
onedaypageIndex:1,
noData:false,
},
/**
......@@ -77,98 +56,88 @@ Page({
let City = this.selectComponent('#CityComp');
City.getCityList();
this.getThemeTag();
let isShowType = this.data.isShowType;
if (isShowType==1){
this.oneDayShow();
}
if (isShowType == 2){
this.ticketShow();
}
if (isShowType == 3) {
this.localFood();
}
},
oneDayShow(){
let oneday = this.selectComponent('#oneday');
oneday.getLine();
oneday.getList();
},
ticketShow(){
let ticket = this.selectComponent('#ticket');
ticket.getCountry();
ticket.getList();
},
localFood() {
let localfood = this.selectComponent('#localfood');
localfood.getCityItem();
localfood.getList();
},
ChangeSite(val) {
console.log(val.detail);
this.setData({
site: val.detail
})
this.onLoad();
},
ScreenOpen() {
},
// 点击改变出游方式
changeType(e){
let type=e.target.dataset.type;
this.setData({
ScreenStatus: true,
isShowType: type,
onedaypageIndex:1,
noData:false
})
},
CloseScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
if (type==1){
this.oneDayShow();
}
},
// 获取主题标签
getThemeTag() {
let tagmsg = {
name: 'theme',
code: 1,
if(type==2){
this.ticketShow();
}
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 => { })
if (type == 3) {
this.localFood();
}
},
PriceTag(e) {
onReachBottom: function () {
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 (that.data.noData) return;
wx.showNavigationBarLoading();
let pageIndex = that.data.onedaypageIndex;
// 每次下拉 page+1
pageIndex = pageIndex + 1;
that.data.onedaypageIndex = pageIndex;
this.setData({
onedaypageIndex: pageIndex
})
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);
if (that.data.isShowType==1){
that.oneDayShow();
}
if (that.data.isShowType == 2) {
that.ticketShow();
}
if (that.data.isShowType == 3) {
this.localFood();
}
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)
// 判断是否可以上拉
oneDayInfo(e){
console.log("eeee", e.detail)
this.setData({
sDate:sDate
noData: e.detail
})
wx.hideNavigationBarLoading()
},
/**
* 生命周期函数--监听页面初次渲染完成
......@@ -208,9 +177,8 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
......
{
"navigationBarTitleText": "当地游",
"usingComponents": {
"search": "/component/Search/search"
"search": "/component/Search/search",
"oneday": "/pages/local/oneday/oneday",
"ticket": "/pages/local/TicketList/TicketList",
"localfood": "/pages/local/LocalFood/LocalFood"
}
}
\ No newline at end of file
<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="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">游玩门票
......@@ -13,117 +15,15 @@
<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>
<oneday wx:if="{{isShowType==1}}" bind:oneDayInfo="oneDayInfo" pageIndex="{{onedaypageIndex}}" id="oneday"></oneday>
<ticket wx:if="{{isShowType==2}}" bind:oneDayInfo="oneDayInfo" pageIndex="{{onedaypageIndex}}" id="ticket"></ticket>
<localfood wx:if="{{isShowType==3}}" bind:oneDayInfo="oneDayInfo" pageIndex="{{onedaypageIndex}}" id="localfood"></localfood>
</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>
</view>
\ No newline at end of file
......@@ -38,76 +38,9 @@
.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;
}
/* 综合排序 */
......
......@@ -15,35 +15,88 @@ Page({
cityId: app.state.cityId,
siteName: app.state.siteName,
},
lineActive:0,
abroadList:[],
isLogin: app.isLogin,
ticketList:[],
foodList:[],
},
/**
* 生命周期函数--监听页面加载
*/
Scrolltap(e) {
let color = e.target.dataset.index;
this.setData({
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();
this.getOneday();
this.getTicket();
this.getFood();
},
ChangeSite(val) {
// 当地美食
getFood() {
let msg = {
countryId: 0,
pageIndex: 1,
pageSize: 4,
fromOrigin: 1,
}
app.$apiJavaNew('/api/b2b/food/getHomeFoodList', msg).then(res => {
console.log("getFood")
console.log(res);
let list = res.pageData;
this.setData({
foodList: list
})
console.log("foodList", this.data.foodList);
}).catch(err => { })
},
// 门票
getTicket() {
let msg = {
pageIndex: 1,
pageSize: 4,
countryId: -1,
fromOrigin: 1,
}
app.$apiJavaNew('/api/b2b/home/getHomeTicketCoupons', msg).then(res => {
let list = res.pageData;
this.setData({
ticketList: list
})
}).catch(err => { })
},
// 境外一日游
getOneday(){
let msg = {
pageIndex: 1,
pageSize: 4,
companyId: this.data.site.companyId,
fromOrigin:1,
}
app.$apiJavaNew('/api/b2b/dayTrip/getHomeRecommendProduct', msg).then(res => {
let abroadList = res.pageData;
this.setData({
abroadList: abroadList
})
}).catch(err => {})
},
getlineTeam(e){
console.log(e);
let item = e.currentTarget.dataset.item;
let index = e.currentTarget.dataset.index;
this.setData({
site: val.detail
lineActive:index,
lineTeamList: item.lineTeamList
})
this.onLoad();
},
GetLine() {
let that = this;
......@@ -59,8 +112,6 @@ Page({
that.setData({
lineList: lineList
})
console.log("lineTeamList", this.data.lineTeamList);
}).catch(err => {
wx.showToast({
......@@ -70,6 +121,19 @@ Page({
})
})
},
Scrolltap(e) {
let color = e.target.dataset.index;
this.setData({
toView: color
})
},
ChangeSite(val) {
console.log(val.detail);
this.setData({
site: val.detail
})
this.onLoad();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
<view class="localhome commonF">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
<view id="searchView">
<search id="CityComp" bind:ChangeSite="ChangeSite"></search>
</view>
<view style="width:100%;height:300rpx;margin-top:36rpx">
<image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626095424470.png'></image>
</view>
......@@ -31,7 +33,7 @@
</view>
<view class="ChooseBan" style="margin-top:40rpx">
<view class="chooseTitle f22">
<text class="active" wx:if="{{index<3}}" wx:key="index" wx:for="{{lineList}}">{{item.lineShortName}}</text>
<text bindtap="getlineTeam" data-item="{{item}}" data-index="{{index}}" class="{{lineActive==index?'active':''}}" wx:if="{{index<3}}" wx:key="index" wx:for="{{lineList}}">{{item.lineShortName}}</text>
</view>
<view class="chooseDiv f28" style="height:210rpx;">
<text wx:if="{{index<5}}" wx:key="index" wx:for="{{lineTeamList}}">{{item.ltName}}</text>
......@@ -44,12 +46,12 @@
</view>
<view class="section">
<view class="likeView">
<!-- <view class="likeView">
<text class="activeText" data-index="oneday" bindtap="Scrolltap">境外一日游</text>
<text data-index="ticket" bindtap="Scrolltap">景点门票</text>
<text data-index="food" bindtap="Scrolltap">当地美食</text>
</view>
<scroll-view scroll-y style="height: 500rpx;" scroll-into-view="{{toView}}">
</view> -->
<scroll-view scroll-y scroll-into-view="{{toView}}">
<view id="oneday" class="scroll-view-item bc_green">
<view class="FlTitleView">
<text class="text" style="color:#61DCD4"> \ \ \ </text>
......@@ -58,28 +60,17 @@
</view>
<!-- 境外一日游 -->
<view class="oneday">
<view class="onedayItem">
<view class="ImgView" style="height:247rpx;">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<text class="country">日本</text>
</view>
<view style="padding:0 20rpx">
<text class="bold f28">日本名古屋周边一日游</text>
<text>\n</text>
<text class="f22 price">¥1999起</text>
</view>
</view>
<view class="onedayItem">
<view wx:for="{{abroadList}}" wx:key="index" class="onedayItem">
<view class="ImgView" style="height:247rpx;">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<text class="country">日本</text>
<image wx-if="{{item.imgCover[0]}}" src="{{item.imgCover[0].url}}"></image>
<text class="country">{{item.lineShortName}}</text>
</view>
<view style="padding:0 20rpx">
<text class="bold f28">日本名古屋周边一日游</text>
<text>\n</text>
<text class="f22 price">¥1999起</text>
<text class="bold f28 text1">{{item.title}}\n</text>
<text class="f22 price">¥{{isLogin!=1 ? item.b2CPrice : item.b2BPrice}}起</text>
</view>
</view>
</view>
</view>
<view id="ticket" class="scroll-view-item bc_red">
......@@ -90,12 +81,12 @@
</view>
<!-- 游玩门票 -->
<view class="ticket">
<view class="ticketItem">
<view wx:for="{{ticketList}}" wx:key="index" class="ticketItem">
<view class="ImgView" style="height:247rpx;">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<image wx:if="item.coverImgs[0]" src="{{item.coverImgs[0]}}"></image>
<view class="ticketView" style="padding:0 20rpx">
<text style="padding-top:25rpx" class="bold f28">日本名古屋周边一日游\n</text>
<text style="text-align:right" class="f22 price">¥1999起</text>
<text style="padding-top:25rpx" class="bold f28 text1">{{item.name}}\n</text>
<text style="text-align:right" class="f22 price">¥{{isLogin!=1 ? item.b2cPrice : item.b2bPrice}}起</text>
</view>
</view>
......@@ -110,24 +101,13 @@
</view>
<!-- 当地美食 -->
<view class="oneday">
<view class="onedayItem">
<view class="ImgView" style="height:247rpx;">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
</view>
<view style="padding:0 20rpx">
<text class="bold f28">日本名古屋周边一日游</text>
<text>\n</text>
<text class="f22 price">¥1999起</text>
</view>
</view>
<view class="onedayItem">
<view wx:for="{{foodList}}" wx:key="index" class="onedayItem">
<view class="ImgView" style="height:247rpx;">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<image wx:if="{{item.coverImgs[0]}}" src="{{item.coverImgs[0]}}"></image>
</view>
<view style="padding:0 20rpx">
<text class="bold f28">日本名古屋周边一日游</text>
<text>\n</text>
<text class="f22 price">¥1999起</text>
<text class="bold f28 text1">{{item.name}}\n</text>
<text class="f22 price">¥{{isLogin!=1 ? item.b2cPrice : item.b2bPrice}}起</text>
</view>
</view>
</view>
......
......@@ -91,6 +91,7 @@
height: 360rpx;
border-radius:12rpx;
border: 1rpx solid #f5f5f5;
margin-bottom: 30rpx;
}
.oneday .onedayItem:nth-child(even){
margin-left: 30rpx;
......@@ -98,6 +99,7 @@
.oneday .onedayItem .price{
color: #EE4454;
float: right;
margin-top: 15rpx;
}
.oneday .onedayItem .ImgView{
position: relative;
......
<!--pages/local/localonedayTrip/localonedayTrip.wxml-->
<text>pages/local/localonedayTrip/localonedayTrip.wxml</text>
/* pages/local/localonedayTrip/localonedayTrip.wxss */
\ No newline at end of file
// pages/local/oneday/oneday.js
let app=getApp();
var util = require('../../../utils/util.js')
Component({
/**
* 组件的属性列表
*/
properties: {
pageIndex:{
type:'number'
},
},
/**
* 组件的初始数据
*/
data: {
ScreenStatus: false,
lineList:[],
isLogin:app.isLogin,
site: {
companyId: app.state.companyId,
cityId: app.state.cityId,
siteName: app.state.siteName,
},
msg: {
pageIndex: 1,
pageSize: 5,
lineId: 0,
lineTeamId: 0,
startDate: "",
endDate: "",
minPrice: -1,
maxPrice: -1,
companyId: app.state.companyId,
cityId: app.state.cityId,
priceOrderByField: 2,
orderByPrice: 0,
orderBySales: 0,
searchKey: "",
startCityId: 0,
countryId: 0,
cityId: 0,
},
lineTeamList:[],
dataList:[],
noData:false,
},
/**
* 组件的方法列表
*/
methods: {
zhpx(){
this.data.msg.orderByPrice = 0;
this.data.msg.orderBySales = 0;
this.setData({
msg: this.data.msg
})
this.getList();
},
bySale(){
let sale = this.data.msg.orderBySales;
sale == 0 ? sale = 1 :sale=0;
this.data.msg.orderByPrice=0;
this.data.msg.orderBySales = sale;
this.setData({
msg: this.data.msg
})
this.getList();
},
byPrice() {
let orderByPrice = this.data.msg.orderByPrice;
orderByPrice == 0 ? orderByPrice = 1 : orderByPrice=0;
this.data.msg.orderByPrice = orderByPrice;
this.data.msg.orderBySales=0;
this.setData({
msg: this.data.msg
})
this.getList();
},
getList(){
this.data.msg.pageIndex = this.properties.pageIndex;
let dataList = this.data.dataList;
app.$apiJavaNew('/api/b2b/dayTrip/getDayTripProductList', this.data.msg).then(res => {
if (res.pageData.length < 5) {
this.setData({
noData: true
})
}
res.pageData.forEach(item => {
dataList.push(item)
})
this.setData({
dataList: dataList
})
this.triggerEvent('oneDayInfo', this.data.noData )
}).catch(err => { })
},
screenOpen(){
this.setData({
ScreenStatus:true,
})
},
closeScreen(e) {
if (e.target.dataset.target == "self") {
this.setData({
ScreenStatus: false,
})
}
},
minPriceInput(e){
this.data.msg.minPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
maxPriceInput(e) {
this.data.msg.maxPrice = e.detail.value;
this.setData({
msg: this.data.msg
})
},
bindDateChange(e){
let type = e.currentTarget.dataset.type;
let val = e.detail.value;
if(type=="start"){
this.data.msg.startDate=val;
}else{
this.data.msg.endDate = val;
}
this.setData({
msg: this.data.msg
})
if (util.CompareDate(this.data.msg.startDate, this.data.msg.endDate)){
wx.showToast({
title: "请选择正确的日期!",
icon: 'none',
duration: 1000
})
}
},
// 获取线路
getLine() {
app.$apiJavaNew('/api/b2b/dayTrip/getLineItem', {}).then(res => {
this.setData({
lineList: res
})
}).catch(err => { })
},
getlineTeam(e){
let item = e.currentTarget.dataset.item;
if (item){
this.data.msg.lineId = item.lineId
this.setData({
lineTeamList: item.lineTeamList,
msg: this.data.msg
})
}else{
this.data.msg.lineId =0;
this.setData({
lineTeamList:[],
msg: this.data.msg
})
}
},
getlineTeamId(e){
let item = e.currentTarget.dataset.item;
this.data.msg.lineTeamId = item
this.setData({
msg: this.data.msg
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="commonF">
<view>
<view style="background:#f4f4f4">
<view class="PxView" style="padding-bottom:20rpx">
<view class="filterList" bindtap='zhpx'>
综合排序
</view>
<view bindtap="bySale" class="filterList">
销量
<image wx:if="{{msg.orderBySales==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderBySales==1}}" src="/images/group/rs.png"></image>
</view>
<view bindtap="byPrice" class="filterList">
价格
<image wx:if="{{msg.orderByPrice==0}}" src="/images/group/bx.png"></image>
<image wx:if="{{msg.orderByPrice==1}}" src="/images/group/rs.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>
<!-- 列表数据 -->
<view wx:for="{{dataList}}" wx:key="index" class="ListItem commonF">
<view class="imgView">
<image wx:if="{{item.imgCover[0]}}" src="{{item.imgCover[0].url}}"></image>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2">{{item.title}}
</view>
<view style="color:#888888;font-size:22rpx">
<image style="width:18rpx;height:22rpx" src="/images/group/adress.png"></image>
出发地:{{item.startCityName}}
</view>
<view style="color:#888888;">
<image style="width:22rpx;height:22rpx;margin-right:3px;" src="/images/group/tuan.png"></image>
<text class="tqText1" style="font-size:22rpx">团期:{{item.startDates}}</text>
</view>
<view class="price">
<text style="font-size:40rpx">¥{{(isLogin!=1 ? item.b2CPrice : item.b2BPrice)}}</text>
<text style="font-size:20rpx" style="color:#888888">起</text>
</view>
</view>
</view>
<view class='Nodataview' wx:if='{{noData}}'>
<text>没有更多数据</text>
</view>
</view>
<!-- 筛选多条件 -->
<view bindtap='closeScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<view class="title">线路</view>
<view class="xl">
<text bindtap="getlineTeam" class="{{msg.lineId==0?'active':''}}">不限</text>
<text bindtap="getlineTeam" class="{{msg.lineId==item.lineId?'active':''}}" data-item="{{item}}" wx:for="{{lineList}}" wx:key="index">{{item.lineShortName}}</text>
</view>
<view class="title">系列</view>
<view class="xl">
<text bindtap="getlineTeamId" data-item="{{0}}" class="{{msg.lineTeamId==0?'active':''}}">不限</text>
<text bindtap="getlineTeamId" data-item="{{item.ltId}}" class="{{msg.lineTeamId==item.ltId?'active':''}}" wx:for="{{lineTeamList}}" wx:key="index">{{item.ltName}}</text>
</view>
<view class="title">游玩时间</view>
<view class="DatePicker">
<picker class="pcikerView" data-type="start" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
开始:{{msg.startDate}}
</view>
</picker>
<text style="margin:0 15rpx"> - </text>
<picker class="pcikerView" data-type="end" mode="date" value="{{date}}" bindchange="bindDateChange">
<view class="picker">
结束:{{msg.endDate}}
</view>
</picker>
</view>
<view class='MonthList'>
<text wx:for="{{dates}}" wx:key="index">{{item.name}}</text>
</view>
<view class="title">价格区间</view>
<view class="PriceView">
<input bindinput="minPriceInput" value="{{msg.minPrice==-1?'':msg.minPrice}}" type="number" placeholder="0" placeholder-style="text-align:center" />
<text style="padding:0 15rpx">-</text>
<input bindinput="maxPriceInput" value="{{msg.maxPrice==-1?'':msg.maxPrice}}" type="number" placeholder="最高价" placeholder-style="text-align:center" />
</view>
<view class="btnView">
<view bindtap='closeScreen' data-target="self">取消</view>
<view bindtap="getList" style="background:#EE4454;color:#fff;border:none">确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
.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;
padding:15rpx 0;
}
.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;
text-align: center;
font-size: 25rpx;
line-height: 54rpx;
margin-bottom: 20rpx;
}
.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;
text-align: center;
}
.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;
}
.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%;
margin-top: 20rpx;
}
.ListItem .imgView {
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
}
.ListItem>view {
display: inline-block;
}
.commonF .text2{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 26rpx;
}
.ListItem .price{
color:#EE4454;
text-align: right;
}
.xl .active{
background: #EE4454!important;
color:#fff;
}
.tqText1{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
width: 400rpx;
display: inline-block;
height: 30rpx;
}
.Nodataview{
width: 100%;
box-sizing: border-box;
padding: 30rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
\ 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