Commit 4ec2e7be authored by 华国豪's avatar 华国豪 🙄

1

parent d22187b4
{
"pages": [
"pages/Home/home",
"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",
"pages/GroupTour/FillOrder/FillOrder",
......@@ -29,6 +29,7 @@
"pages/member/invesDetails/invesDetails",
"pages/member/Coupon/Coupon",
"pages/visa/visa",
"pages/visa/visaList/visaList",
"pages/Voucher/Voucher",
"pages/Voucher/rating/rating",
"pages/Voucher/VoucherDetails/VoucherDetails",
......
// pages/visa/visa.js
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
timeLimited: {
pageSize: 4,
pageIndex: 1,
companyId: app.state.companyId
},
timeList: [],
hotcountry: [],
hotvisa: [],
isLogin: app.isLogin,
},
// 跳转签证列表页
goListPage: function () {
wx.navigateTo({
url: '/pages/visa/visaList/visaList',
})
},
// 限时优惠
TimeLimited: function() {
app.$apiJavaNew('api/b2b/visa/getVisaProductFlashSale', this.data.timeLimited).then(res => {
this.setData({
timeList: res.pageData
})
}).catch(err => { });
},
// 获取热门签证
Gethotvisa: function() {
let msg = {
pageSize: 8,
pageIndex: 1,
companyId: app.state.companyId
}
app.$apiJavaNew('api/b2b/visa/getHotVisaProduct', msg).then(res => {
this.setData({
hotvisa: res.pageData
})
}).catch(err => { });
},
// 获取签证国家
GetVisaCountry: function() {
app.$apiJavaNew('api/b2b/visa/getVisaHotCountry', this.data.timeLimited).then(res => {
this.setData({
hotcountry: res.pageData
})
}).catch(err => { });
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.TimeLimited()
this.Gethotvisa()
this.GetVisaCountry()
},
/**
......
......@@ -45,22 +45,25 @@
<text class="f30 bold">限时优惠</text>
</view>
<view class="VisaView">
<view class="VisaList XianItem">
<view class="VisaList XianItem" wx:for="{{timeList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png'></image>
<view class="XianDes">
<view>
<image src='/images/visa/c1.png'></image>
<image src='{{item.countryIcon}}'></image>
</view>
<view style="margin-left:20rpx">
<view class="f22 c33">韩国个签</view>
<view style="margin-top:25rpx" class="f30 cee">¥12997</view>
<view class="text">
<view class="f22 c33">{{item.name}}</view>
<view style="margin-top:25rpx" class="f30 cee">¥{{isLogin!=1?item.visaB2CPrice:item.visaPrice}}</view>
<view class="text" wx:if="{{item.visaType==1}}">
个签
</view>
<view class="text" wx:else>
团签
</view>
</view>
</view>
</view>
<view class="VisaList XianItem">
<!-- <view class="VisaList XianItem">
<image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png'></image>
<view class="XianDes">
<view>
......@@ -74,78 +77,35 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
<view class="CommonVTile">
<image style="width:30rpx;height:22rpx" src='/images/visa/t1.png'></image>
<text class="f30 bold">热门国家</text>
<text class="f24" style="color:#888888;float:right">查看更多</text>
<text class="f24" style="color:#888888;float:right" bindtap='goListPage'>查看更多</text>
</view>
<view class="VisaView">
<view class="VisaList hotCountry">
<image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png'></image>
<view class="CountryDes">
<image src='/images/visa/c1.png'></image>
<text>日本</text>
</view>
</view>
<view class="VisaList hotCountry">
<image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png'></image>
<view class="VisaList hotCountry" wx:for="{{hotcountry}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<image src='{{item.countryImage[0]}}'></image>
<view class="CountryDes">
<image src='/images/visa/c1.png'></image>
<text>日本</text>
<image src='{{item.countryIcon}}'></image>
<text>{{item.countryName}}</text>
</view>
</view>
</view>
<view class="CommonVTile">
<image style="width:30rpx;height:22rpx" src='/images/visa/t1.png'></image>
<text class="f30 bold">热门签证</text>
<text class="f24" style="color:#888888;float:right">查看更多</text>
<text class="f24" style="color:#888888;float:right" bindtap='goListPage'>查看更多</text>
</view>
<view class="VisaView" style='margin-left: -40rpx;'>
<view class="VisaList hotVisa">
<view style="width:142rpx;height:98rpx">
<image src='/images/visa/c1.png'></image>
</view >
<view class="f24" style="padding:15rpx;text-align:center">
<view class='c3'>日本</view>
<view class='cee'>¥1200</view>
</view>
</view>
<view class="VisaList hotVisa">
<view style="width:142rpx;height:98rpx">
<image src='/images/visa/c1.png'></image>
</view >
<view class="f24" style="padding:15rpx;text-align:center">
<view class='c3'>日本</view>
<view class='cee'>¥1200</view>
</view>
</view>
<view class="VisaList hotVisa">
<view style="width:142rpx;height:98rpx">
<image src='/images/visa/c1.png'></image>
</view >
<view class="f24" style="padding:15rpx;text-align:center">
<view class='c3'>日本</view>
<view class='cee'>¥1200</view>
</view>
</view>
<view class="VisaList hotVisa">
<view style="width:142rpx;height:98rpx">
<image src='/images/visa/c1.png'></image>
</view >
<view class="f24" style="padding:15rpx;text-align:center">
<view class='c3'>日本</view>
<view class='cee'>¥1200</view>
</view>
</view>
<view class="VisaList hotVisa">
<view class="VisaList hotVisa" wx:for="{{hotvisa}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view style="width:142rpx;height:98rpx">
<image src='/images/visa/c1.png'></image>
<image src='{{item.countryIcon}}'></image>
</view >
<view class="f24" style="padding:15rpx;text-align:center">
<view class='c3'>日本</view>
<view class='cee'>¥1200</view>
<view class='c3'>{{item.countryName}}</view>
<view class='cee'>¥{{isLogin!=1?item.visaB2CPrice:item.visaPrice}}</view>
</view>
</view>
</view>
......
let app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
showBox: false,
isLogin: app.isLogin,
GetVisaCountryMsg: {
companyId: 0,
pageIndex: 1,
pageSize: 12,
},
listmsg: {
visaCountryId: 0,
companyId: -1,//常住地
tags: [],
orderByPrice: 0,
orderByBookAdvance: 0,
pageIndex: 1,
pageSize: 10,
searchKey: "",
},
hotcountry: [],
CountryId: 0,
OrderBy: false,
OrderByBook: false,
cityList: [],
tagItem: [],
cityId: -1,
pageIndex: 1,
totalPage: 1,
},
// 加载更多
scrollGetMore: function () {
this.setData({
'listmsg.pageIndex': this.data.pageIndex + 1,
})
this.getDataList(1)
},
// 重置方法
resetMsg: function () {
let msg = {
visaCountryId: 0,
companyId: -1,//常住地
tags: [],
orderByPrice: 0,
orderByBookAdvance: 0,
pageIndex: 1,
pageSize: 10,
searchKey: "",
}
let tagItem = this.data.tagItem
for (let i = 0; i < tagItem.length; i++) {
tagItem[i].active = false
}
this.setData({
tagItem: tagItem,
listmsg: msg,
OrderBy: false,
OrderByBook: false,
cityId: -1,
CountryId: 0,
showBox: false
})
this.getDataList()
},
// 筛选切换类型 服务 标签
typeChange: function (e) {
let index = e.currentTarget.dataset.index;
this.data.tagItem[index].active = !this.data.tagItem[index].active
this.setData({
tagItem: this.data.tagItem
})
},
// 切换筛选项城市 全部
cityAll: function () {
this.setData({
cityId: -1
})
},
// 切换筛选项城市
cityChange: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
cityId: this.data.cityList[index].cityId
})
},
// 获取签证产品国家筛选子项
GetVisaProListChoose() {
let msg = {};
msg.companyId = this.data.GetVisaCountryMsg.companyId;
msg.visaCountryId = this.data.CountryId;
app.$apiJavaNew('api/b2b/visa/getProductCountryChildSearchItem', msg).then(res => {
let tagItem = res.tagItem
for(let i = 0; i < tagItem.length; i++) {
tagItem[i].active = false
}
this.setData({
cityList: res.cityList,
tagItem: tagItem
})
this.getDataList()
}).catch(err => { });
},
// 时间排序
OrderByPrice: function () {
this.setData({
OrderBy: !this.data.OrderBy,
'listmsg.pageIndex': 1,
pageIndex: 1,
})
this.getDataList()
},
// 受理时间排序
OrderByBookAdvance: function () {
this.setData({
OrderByBook: !this.data.OrderByBook,
'listmsg.pageIndex': 1,
pageIndex: 1,
})
this.getDataList()
},
// 数据查询方法
getDataList: function (type) {
this.data.listmsg.visaCountryId = this.data.CountryId;
this.data.listmsg.orderByPrice = this.data.OrderBy ? 1 : 2;
this.data.listmsg.orderByBookAdvance = this.data.OrderByBook ? 1 : 2;
this.data.listmsg.companyId = this.data.cityId;
this.data.listmsg.tags = [];
let tagItem = this.data.tagItem
for (let i = 0; i < tagItem.length; i++){
if (tagItem[i].active) {
this.data.listmsg.tags.push(tagItem[i].id)
}
}
console.log(this.data.listmsg)
this.setData({
listmsg: this.data.listmsg,
showBox: false,
})
app.$apiJavaNew('api/b2b/visa/getVisaProductList', this.data.listmsg).then(res => {
console.log(res)
let data = res.pageData
for(let i = 0; i < data.length; i++) {
if (data[i].tagTames) {
data[i].tagList = data[i].tagTames.split(",");
}
}
this.setData({
dataList: res.pageData,
totalPage: res.pageCount ? res.pageCount : 1,
pageIndex: res.pageIndex ? res.pageIndex : 1,
})
}).catch(err => { });
},
// 切换国家
setCountry: function (e) {
let id = e.currentTarget.dataset.id
this.setData({
CountryId: id,
'listmsg.pageIndex': 1,
pageIndex: 1,
})
this.getDataList()
},
// 查询弹框
shaxuanShow: function () {
this.setData({
showBox: !this.data.showBox
})
},
// 获取签证国家
GetVisaCountry: function () {
app.$apiJavaNew('api/b2b/visa/getVisaProductSearchItem', this.data.GetVisaCountryMsg).then(res => {
this.setData({
hotcountry: res.pageData,
CountryId: res.pageData[0].id
})
this.GetVisaProListChoose();
}).catch(err => { });
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.GetVisaCountry()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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='visa-list commonF'>
<view class='searcj-box'>
<search></search>
</view>
<scroll-view scroll-x style="height: 180rpx;width: 100%; white-space: nowrap; padding-left: 30rpx;">
<view class='top-scroll-nav'>
<view class='top-scroll-nav-item {{CountryId == item.id ? "active" : "" }}' data-id="{{item.id}}" bindtap='setCountry' wx:for="{{hotcountry}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class='img-box'>
<image src='{{item.countryIcon}}'></image>
</view>
<view class='name'>
{{item.countryName}}
</view>
</view>
</view>
</scroll-view>
<view class='paixu'>
<view bindtap='OrderByPrice' class='{{OrderBy ? "OrderByActive" : ""}}'>
时间最近
<image src='/images/group/bx.png'></image>
</view>
<view bindtap='OrderByBookAdvance' class='{{OrderByBook ? "OrderByActive" : ""}}'>
受理时长
<image src='/images/group/bx.png'></image>
</view>
<view class='shaixuan' bindtap='shaxuanShow'>筛选
<image src='/images/group/s.png'></image>
</view>
</view>
<scroll-view scroll-y style="height: calc(100vh - 384rpx);width: 100%;">
<view class='item-box'>
<view class='list-item' wx:for="{{dataList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="ListItem">
<view class="imgView">
<image src="{{item.coverImage[0].url}}"></image>
<view class="ListDays">
个签
</view>
</view>
<view class="ItemRight" style="width:460rpx;padding-left:15rpx">
<view class="text2 f26">{{item.name}}</view>
<view class="f22" style="color:#888888;padding:15rpx 0">
<image style="width:22rpx;height:22rpx" src="/images/visa/time.png"></image>
出发日期:最早{{item.startDate}}出发
</view>
<view class="f20" style="color:#5597FF">
<text class='visa-tag' wx:for="{{item.tagList}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1">{{item1}}</text>
</view>
<view class="f22" style="color:#888888;padding-top:10rpx;position:relative;">
<image style="width:22rpx;height:22rpx;margin-right:10rpx;" src="/images/visa/day.png"></image>
<text>提前预定:{{item.bookAdvance}}个工作日</text>
<text class="cee f40" style="float:right;position:absolute;top:-9px;right:0;"><text style="font-size:25rpx;">¥</text>{{isLogin!=1?item.visaB2CPrice:item.visaPrice}}<text style="font-size:20rpx;color:#888888;margin-left:10rpx;">起</text>
</text>
</view>
</view>
</view>
</view>
</view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view>
<view class='show-box {{showBox ? "show" : ""}}' bindtap='shaxuanShow'>
<view catchtap>
<view class="title">常住地</view>
<view class='addr-box'>
<text bindtap='cityAll' class='{{cityId == -1 ? "active" : ""}}'>全部</text>
<text bindtap='cityChange' class='{{cityId == item.cityId ? "active" : ""}}' data-index="{{index}}" wx:for="{{cityList}}" wx:for-item="item" wx:for-index="index" wx:key="index">{{item.cityName}}</text>
</view>
<view class="title">签证类型</view>
<view class='addr-box'>
<text wx:for="{{tagItem}}" bindtap='typeChange' data-index="{{index}}" class='{{item.active ? "active" : ""}}' wx:if="{{item.tagType==1}}" wx:for-item="item" wx:for-index="index" wx:key="index">{{item.tagName}}</text>
</view>
<view class="title">产品标签</view>
<view class='addr-box'>
<text wx:for="{{tagItem}}" bindtap='typeChange' data-index="{{index}}" class='{{item.active ? "active" : ""}}' wx:if="{{item.tagType==2}}" wx:for-item="item" wx:for-index="index" wx:key="index">{{item.tagName}}</text>
</view>
<view class="title">特色服务</view>
<view class='addr-box'>
<text wx:for="{{tagItem}}" bindtap='typeChange' data-index="{{index}}" class='{{item.active ? "active" : ""}}' wx:if="{{item.tagType==3}}" wx:for-item="item" wx:for-index="index" wx:key="index">{{item.tagName}}</text>
</view>
<view class="btnView">
<view bindtap='resetMsg'>重置</view>
<view class="GL_sureBtn" bindtap="getDataList">确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
page{
background: #fff;
}
.top-scroll-nav{
display: flex;
margin-top: 30rpx;
}
.searcj-box{
height: 70rpx
}
.top-scroll-nav-item{
margin-right: 50rpx;
text-align: center;
}
.img-box{
display: flex;
align-items: center;
border: 3rpx solid #B2B2B2;
}
.top-scroll-nav-item.active .img-box{
border: 3rpx dashed #EE4454;
}
.top-scroll-nav-item image{
width: 110rpx;
height: 75rpx;
}
.top-scroll-nav-item .name{
font-size: 24rpx;
margin-top: 20rpx;
}
.OrderByActive image{
transform: rotate(180deg);
}
.paixu{
border-bottom: 1px solid #E9E9E9;
}
.paixu>view {
display:inline-block;
font-size:28rpx;
color:#111;
width:20%;
text-align:center;
height:90rpx;
line-height:90rpx;
margin-left: 20rpx;
}
.visa-tag{
background-color: rgba(85,151,255,.5);
padding: 4rpx 11rpx;
color: #5597FF;
font-size: 20rpx;
margin-right: 10rpx;
border-radius:3rpx;
}
.paixu>view image{
width:16rpx;
height:8rpx;
position:relative;
top:-2rpx;
}
.paixu>view.shaixuan image{
width:22rpx;
height:22rpx;
top: 0;
}
.item-box .list-item{
padding: 30rpx;
border-bottom: 1px solid #E9E9E9;
}
.show-box {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 100%;
z-index: 5000;
background: rgba(17, 17, 17, 0.5);
transition: all linear .3s;
}
.show{
left: 0;
}
.ListItem{
display: flex;
}
.ListItem .ListDays{
position: absolute;
left:0;
top:0;
border-top-left-radius: 6rpx;
border-bottom-right-radius: 6rpx;
width:60rpx;
height:40rpx;
background-color: #61DCD4;
color:#fff;
text-align: center;
line-height: 40rpx;
font-size:25rpx;
}
.ListView {
border-top: 1rpx solid #e9e9e9;
width: 100%;
padding-bottom: 20rpx;
margin-top: 20rpx;
}
.ListItem .imgView {
width: 210rpx;
height: 210rpx;
border-radius: 6rpx;
overflow: hidden;
position: relative;
}
.ListItem>view {
display: inline-block;
}
.show-box>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);
}
.show-box>view .title {
font-size: 28rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.addr-box{
display: flex;
flex-wrap: wrap;
}
.addr-box text{
width: 190rpx;
height: 54rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #F2F2F2;
color: #333333;
font-size: 22rpx;
margin-bottom: 30rpx;
border-radius:27px;
border:1px solid #F2F2F2;
margin-right: 20rpx;
}
.addr-box text.active{
color: #EE4454;
background-color: #FFDFE2;
border:1px solid #EE4454;
}
.btnView{
margin-top:20rpx;
display: flex;
justify-content: space-between;
position: absolute;
width: 90%;
bottom: 30rpx;
}
.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;
}
.GL_sureBtn{
background:#EE4454!important;
color:#fff;
border:none;
}
.body_footer{
display: flex;
justify-content: center;
align-items: center;
height: 30px;
font-size: 12px;
color: #666666;
background-color:#F5F5F5;
}
\ No newline at end of file
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 9,
"current": 11,
"list": [
{
"id": 2,
......@@ -110,6 +110,19 @@
"pathName": "pages/member/Coupon/Coupon",
"query": "",
"scene": null
},
{
"id": -1,
"name": "签证首页",
"pathName": "pages/visa/visa",
"query": "",
"scene": null
},
{
"id": -1,
"name": "签证列表页",
"pathName": "pages/visa/visaList/visaList",
"scene": null
}
]
}
......
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