Commit 04d8f909 authored by 黄奎's avatar 黄奎

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

parents 4710398e 61404219
......@@ -1005,6 +1005,51 @@
}
}
]
},
//包车
{
"root": "pages/bus",
"pages": [
{
"path": "index",
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "busList",
"style":{
"navigationBarTitleText" : "包车",
"navigationBarBackgroundColor": "#B99846"
}
},
{
"path": "busDetails",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
}
}
},
{
"path": "order"//下单预览页
},{
"path": "orderInfor",//下单信息
"style": {
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
}
}
}, {
"path": "orderdetails"//订单详情
}
]
}
],
......
......@@ -18,11 +18,11 @@
<view class="col"></view>
<view class="visaListNum row">
<view class="visaListNumR">
<text style="font-size: 20rpx;">CNY</text>
<text style="font-size: 20rpx;">{{ item.currencyCode?item.currencyCode:'CNY' }}</text>
<text class="price-Num">
{{parseFloat(item.totalPrice-item.preferentialPrice).toFixed(2)}}
</text>
<text class="price-stuff" style="font-size: 20rpx;color: rgba(164, 164, 164, 1)"></text>
<text class="price-stuff" style="font-size: 20rpx;color: rgba(164, 164, 164, 1)"></text>
</view>
<view class="visaListNumL row items-center">
<!-- #ifdef MP-DI -->
......@@ -98,6 +98,7 @@
orderInfo: null,
showModal: false,
currentData: null,
b2b_user: null,
}
},
watch: {
......@@ -109,7 +110,8 @@
}
},
mounted() {
this.b2b_user = uni.getStorageSync("b2b_user")
console.log(this.b2b_user, '=======b2b_user')
},
methods: {
cancelSuccess() {
......@@ -213,7 +215,7 @@
if (this.submit || this.submitCancel) return;
this.submit = true
this.apipost("GetCodeByOrderNo_post", {
OrderNo: item.directOrderNo,
OrderNo: item.directOrderNo?item.directOrderNo:item.orderNo,
OpenId: mallUserInfo.OpenId,
MallBaseId: mallUserInfo.MallBaseId
}, (res) => {
......@@ -296,7 +298,7 @@
} else if (item.goodsType > 7 && item.goodsType < 12) { //酒店住宿
} else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
url = "bus/index"
} else if (item.goodsType == 15) { //签证
url = "visa/visaList"
} else if (item.goodsType == 16) { //机票
......@@ -315,7 +317,7 @@
} else if (item.goodsType == 7) { //道旅酒店住宿
url = "hotel/list"
} else if (item.goodsTyp == 5) { //目的地用车
url = "bus/index"
} else if (item.goodsType == 6) { //签证
url = "visa/visaList"
} else if (item.goodsType == 1) { //机票
......@@ -340,6 +342,8 @@
msg = `orderId=` + item.erpOrderId
url = `hotel/orderdetails?`;
} else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
msg = `orderId=` + item.erpOrderId
url = `bus/orderdetails?`;
} else if (item.goodsType == 15) url = `visa/visa_SureOrder?` //签证
else if (item.goodsType == 16) url = `airTicket/airTicketOrderDetail?` //机票
// #endif
......@@ -352,6 +356,7 @@
} else if (item.goodsType == 7) { //道旅酒店住宿
url = `hotel/orderdetails?`;
} else if (item.goodsType == 5) { //目的地用车
url = `bus/orderdetails?SalePhone=${item.SalePhone}&`;
} else if (item.goodsType == 6) url = `visa/visa_SureOrder?` //签证
else if (item.goodsType == 1) { //机票
url = `airTicket/airTicketOrderDetail?`
......@@ -367,6 +372,28 @@
},
//取消订单(同行订单取消)
goCancel(item) {
// #ifdef MP-DI
// #endif
// #ifdef MP-AG
if(item.goodsType==5){
wx.showModal({
title: '提示',
content: `${item.SalePhone?'确定拨打服务电话取消订单吗?':'请联系服务人员进行取消?'}`,
success: (tip) => {
if (tip.confirm) {
if(item.SalePhone){
uni.makePhoneCall({
phoneNumber: item.SalePhone,
});
}
}
}
})
return
}
// #endif
let that = this
if (this.submit || this.submitCancel) return
wx.showModal({
......
This diff is collapsed.
<template>
<view class="bus-list column" style="background: #F3F1EF ;">
<view class="bus-listHeaderBox" @click="goBack">
<view class="bus-listHeader row-sbas-n">
<view class="bus-listHeaderL">
{{ busInfor.CityName }}
{{ busInfor.time }}
{{pageTitle}}
</view>
<u-icon name="arrow" :size="32" color="#000" style="position: relative;top: 2rpx;"></u-icon>
</view>
</view>
<view style="height: 1px;flex: 1;overflow: hidden;">
<u-empty v-if="dataList.length === 0&&!showLoading" text="暂无数据" mode="data" padding-top="20"></u-empty>
<view class="column busScrollBox" style="padding: 30rpx;height:100%">
<scroll-view style="height: 100%;" :scroll-y="true" @scrolltolower="lower"
:enable-back-to-top="true" :enable-flex="true"
:scroll-top="scrollTop" @scroll="scroll"
v-if="dataList.length > 0"
class="busScrollBox">
<view class="busScroll row">
<view class="busScrollList"
v-for="(item,index) in dataList"
:key="index"
@click="goDetails(item)">
<view class="busListImg">
<image :src="item.ImageList[0]" mode="aspectFill"/>
</view>
<view class="busListTitle">
{{item.Name}}
</view>
<view class="busListText">
<view class="busListTType">&nbsp;</view>
<view class="busListTMoney row-sbas-n">
<view class="busListTtext">{{ item.TotalNum }}种车型</view>
<view class="busListTM">
<view>
<text>
<!--¥-->
{{ item.CurrencyCode }} </text>
<text>
<!-- #ifdef MP-DI -->
{{parseFloat(item.MinB2CPrice).toFixed(2)}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{parseFloat(item.MinPrice).toFixed(2)}}
<!-- #endif -->
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore v-if="!showLoading" :status="status" :load-text="loadText" :font-size="24"
:margin-top="20" :margin-bottom="20" bg-color="#F3F1EF" color="#111" />
</scroll-view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: '包车',
msg: {
pageIndex:1,
pageSize:15,
CarType: 1,// 类型 1接机 2送机 3包车
Q_SPeopleNum: null,// 起始人数
Q_EPeopleNum: null,// 截止人数
Q_Country: null,// 国家ID
Q_City: null,// 城市ID
Q_AirportId: null,// 机场ID
Q_Date: null,// 预约日期
Q_SPrice: null,// 起始价格
Q_EPrice: null,// 结束价格
Q_OrderBy: null,//排序方式 0 默认 1价格升序 2价格降序
Range: null,// 距离
},
page_count: 0, //总页数
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多商品了",
},
status: "loadmore",
scrollTop: 0,
showLoading: false,
dataList: [],
scrollTop: 0,
busInfor: {},
}
},
onLoad(options){
},
created() {
},
mounted() {
uni.getStorage({
key: "busInfor",
success: (res) => {
let obj = JSON.parse(res.data);
this.busInfor = obj
this.msg.CarType = obj.CarType
this.msg.Q_Country = obj.CountryId
this.msg.Q_City = obj.CityId
this.msg.Q_Date = obj.time
this.msg.Q_SPeopleNum = obj.peopleNum
this.msg.Range = obj.Range
if(obj.CarType == 1) this.pageTitle = '接机'
else if(obj.CarType == 2) this.pageTitle = '送机'
else if(obj.CarType == 3) this.pageTitle = '包车'
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.getList()
},
});
},
methods: {
goDetails(item){
uni.navigateTo({
url: `/pages/bus/busDetails?id=${item.Id}`,
});
},
scroll(e) {
},
//获取列表数据
getList(type) {
if (this.showLoading) return
uni.showLoading();
this.showLoading = true;
if (type == 1) {
this.dataList = [];
}
this.apipost('CarSingle_post_GetTYCarSingleProductPageList', this.msg,
(res) => {
if (res.resultCode == 1) {
this.showLoading = false
uni.hideLoading();
if (this.msg.pageIndex === 1) {
this.dataList = res.data.pageData;
} else {
this.dataList = this.dataList.concat(res.data.pageData);
}
this.page_count = res.data.pageCount;
if(this.msg.pageIndex === 1&&this.page_count==1)this.status = "nomore";
}
}, (err) => {
this.showLoading = false
uni.hideLoading();
uni.showToast({
title: err.message,
icon: 'none',
})
}
);
},
lower(e) {
// TODO: 滚动到了底部,实现翻页加载
if (this.msg.pageIndex < this.page_count) {
this.status = "loading";
this.msg.pageIndex++;
this.getList();
} else {
this.status = "nomore";
}
},
goBack(){
uni.navigateBack({delta:-1})
}
},
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
.bus-list{
height: 100vh;
}
.bus-listHeaderBox{
padding: 19rpx 32rpx;
background: #B99846;
}
.bus-listHeader{
padding: 25rpx 32rpx;
background: #F3F1EF;
border-radius: 12rpx;
}
.bus-listHeaderL{
font-weight: bold;
font-size: 32rpx;
color: #080A09;
}
.busScroll{
flex-wrap: wrap;
}
.busScrollList{
width: 331rpx;
height: 417rpx;
background: #FFFFFF;
border-radius: 12rpx;
overflow: hidden;
margin-bottom: 28rpx;
}
.busScrollList:nth-child(2n){
margin-left: 26rpx;
}
.busListImg{
height: 223rpx;
overflow: hidden;
background: #ddd;
}
.busListImg image{
width: 100%;
height: 100%;
}
.busListTitle{
font-weight: bold;
font-size: 28rpx;
color: #080A09;
padding: 23rpx 27rpx 0 27rpx;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
margin-bottom: 23rpx;
}
.busListText{
padding: 0 27rpx;
font-weight: 500;
font-size: 20rpx;
color: #757776;
}
.busListTM{
color: #FF3166;
}
.busListTM view{
position: relative;
top: -10rpx;
}
.busListTM text:last-child{
font-weight: bold;
font-size: 32rpx;
margin-left: 5rpx;
}
</style>
\ No newline at end of file
<template>
<view class="searchCityBox column">
<view class="searchCityKey column" :style="[titleStyle]">
<view class="searchCityAirp">
<img @click="searchClose"
class="searchAirpClose" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638814439056194770.png"/>
<view>选择机场</view>
</view>
<view class="row items-center">
<view class="internationalSearch">
<u-search placeholder="请输入机场名称/所在城市"
v-model="parameters.KeyWords"
input-align="left"
:value="parameters.KeyWords"
text-color="#111" bg-color="rgba(0,0,0,0)"
@change="getKeyWords"
@confirm="searchKey"
:show-action="false"
style="font-size: 22rpx;"></u-search>
</view>
</view>
<view class="internationalTisp">
{{busInfor.CarType==1?'降落的机场':'起飞的机场'}}
</view>
</view>
<scroll-view :scroll-y="true" style="height: 1px;flex: 1;overflow: hidden;" @scrolltolower="lower">
<view class="searchCityCenterBox">
<template v-if="airportList.length>0">
<view class="searchCityCenter column" v-for="(item,index) in airportList" :key="index"
>
<view class="searchCityTitle">
<view>{{ item.CountryName }}</view>
</view>
<view class="searchCityText row"
v-for="(items,i) in item.AirportList"
:key="i"
@click="currentData(item,items,1)">
<view class="searchCityTextL col">
{{ items.AirportName }}
</view>
<view class="searchCityTextR">
</view>
</view>
</view>
</template>
<u-empty v-show="airportList.length==0&&!showLoading" text="暂无相关数据" mode="data" padding-top="50" color="#000"></u-empty>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
props: ['msg'],
data() {
return {
parameters: {
pageIndex: 1,
pageSize: 15,
CityCode: '',
CityName: '',
GName: '',
KeyWords: '',
},
titleStyle: null,
paddingRight: 0,
showLoading: false,
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
status: "loadmore",
page_count: 0,
busInfor: {},
airportListAll: [],
airportList: [],
}
},
watch: {
msg: {
handler(val, oldval) {
this.busInfor = val
if (this.busInfor.CarType<3) {
this.getAirportList()
}
},
deep: true,
immediate: true
},
},
created() {
const that = this
uni.getSystemInfo({
success(res) {
that.paddingRight = `${res.screenWidth-160}rpx`
that.titleStyle = {
paddingTop: `${res.statusBarHeight}px`
};
},
});
},
methods: {
getAirportList(){
let query = {
Type: this.busInfor.CarType,
CountryId: '',
CityId: '',
}
if(this.busInfor.CarType==1){
query.CountryId = ''
query.CityId = ''
} else {
query.CountryId = this.busInfor.CountryId?this.busInfor.CountryId:this.busInfor.desCountryId,
query.CityId = this.busInfor.CityId?this.busInfor.CityId:this.busInfor.desCityId
}
this.apipost('CarSingle_post_GetCarSingleAllAirportList',query,res=>{
if(res.resultCode==1){
this.airportListAll = res.data
this.airportList = res.data
}
})
},
getKeyWords() {
let query = this.parameters.KeyWords.toLowerCase()
if (query !== '') {
this.airportList = this.airportListAll.filter(item => {
return item.CountryName&&item.CountryName.toLowerCase().includes(query)||item.AirportList.some(x=>x.AirportName.toLowerCase().includes(query));
});
} else {
this.airportList = JSON.parse(JSON.stringify(this.airportListAll));
}
},
searchClose() {
this.$emit('close')
},
lower(e) {
// TODO: 滚动到了底部,实现翻页加载
// if (this.parameters.pageIndex < this.page_count) {
// this.status = "loading";
// this.parameters.pageIndex++;
// } else {
// this.status = "nomore";
// }
},
currentData(item,items) {
this.busInfor.CountryId = item.Country
this.busInfor.CountryName = item.CountryName
this.busInfor.desCountryId = item.Country
this.busInfor.desCountryName = item.CountryName
this.busInfor.ThreeCode = item.ThreeCode
this.busInfor.CityId = items.City
this.busInfor.CityName = items.CityName
this.busInfor.desCityId = items.City
this.busInfor.desCityName = items.CityName
this.busInfor.AirportId = items.AirportId
this.busInfor.AirportName = items.AirportName
this.busInfor.oriLatitude = items.Lat
this.busInfor.oriLongitude = items.Lng
if(this.busInfor.CarType==1){
this.busInfor.startaddress = item.CountryName+items.CityName+items.AirportName
}
if(this.busInfor.CarType==2){
this.busInfor.destination = item.CountryName+items.CityName+items.AirportName
}
console.log(item)
// this.busInfor.CityId = items.CityId
// this.busInfor.CityName = items.CityName
this.$emit('change',this.busInfor)
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
.searchCityBox {
width: 100vw;
height: 100vh;
background: #fff;
}
.internationalSearch {}
.internationalSearch {
width: 1px;
flex: 1;
border-radius: 30rpx;
padding: 5rpx 15rpx;
background: #F6F7F9;
margin-left: 30rpx;
margin-right: 30rpx;
}
.internationalTisp {
font-size: 22rpx;
background: #F3F7FA;
margin-top: 20rpx;
padding: 10rpx 30rpx;
letter-spacing: 2rpx;
}
.searchCityCenter {
}
.searchCityTitle {
font-size: 30rpx;
padding: 20rpx 30rpx 0 30rpx;
/* border-bottom: 1px solid #eee; */
font-weight: bold;
}
.searchCityTitle view {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.searchCityText{
padding: 30rpx 50rpx;
border-bottom: 1px solid #eee;
}
.searchCityTextL {
font-size: 24rpx;
color: #6D6D6F;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.searchCityTextR {
margin-left: 15rpx;
font-size: 32rpx;
color: #B99846;
font-weight: bold;
}
.searchCityTextR text {
color: #000;
font-weight: 100;
font-size: 26rpx;
margin-left: 5rpx;
}
.searchCityAirp{
text-align: center;
font-size: 32rpx;
position: relative;
padding: 20rpx 0 20rpx 0;
}
.searchAirpClose{
position: absolute;
left: 40rpx;
top: 20rpx;
width: 30rpx;
height: 30rpx;
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@
<hotel-good :item="item" :searchObj="searchObj"></hotel-good>
</view>
</view>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24"
<u-loadmore v-if="!showLoading" :status="status" :load-text="loadText" :font-size="24"
:margin-top="20" :margin-bottom="20" bg-color="#F5F5F5" color="#111" />
</scroll-view>
</view>
......@@ -186,6 +186,7 @@
this.HotelList = this.HotelList.concat(res.data.pageData);
}
this.page_count = res.data.pageCount;
if(this.searchObj.pageIndex === 1&&this.page_count==1)this.status = "nomore";
}
}, (err) => {
this.showLoading = false
......
......@@ -73,7 +73,7 @@
<view class="ResInforL">人数</view>
<view class="ResInforR">最多入住{{ roomRateDetails.RatePlanList[0].MaxOccupancy}}人</view>
</view>
<view class="ResInforText row-sb-n">
<view class="ResInforText row">
<view class="ResInforL">取消政策</view>
<view class="ResInforR">
<text v-if="roomRateDetails&&
......
......@@ -74,6 +74,7 @@ export default {
} else if (this.isLineOrder == 3) num = '6'//签证订单
else if (this.isLineOrder == 4) num = '1'//机票订单
else if (this.isLineOrder == 5) num = '8,9,10,11'//酒店订单
else if (this.isLineOrder == 6) num = '12,13,14'//包车订单
if(num){
uni.redirectTo({
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=${num}`,
......
/**
* 通用的 Mapbox 搜索地点函数
* @param {string} cityName - 城市名称,比如 '上海'
* @param {string} keyword - 搜索关键词,比如 '星巴克',如果为空则搜索城市本身
* @returns {Promise<Array<{ name: string, fullAddress: string, longitude: number, latitude: number }>>}
*/
export async function searchPlacesInCity(country,cityName, keyword = '') {
const accessToken = 'pk.eyJ1IjoiYWxleDkwMTIiLCJhIjoiY2xtOGw4NHdkMGFndTNjcnFkeWZncGc2dyJ9.lVrAdPHE0Dg5zoWFidfj4Q'; // TODO: 换成你的实际token
// 先根据城市名称获取中心点
const cityUrl = `https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(cityName)}.json?country=${country}&access_token=${accessToken}&limit=1&language=zh`;
const cityCenter = await new Promise((resolve, reject) => {
uni.request({
url: cityUrl,
method: 'GET',
success: (res) => {
const data = res.data;
if (data && data.features && data.features.length > 0) {
console.log(data)
const [lng, lat] = data.features[0].center;
const bbox = data.features[0].bbox.join(',')
resolve({ lng, lat,bbox });
} else {
reject(new Error('未找到城市中心'));
}
},
fail: (err) => {
reject(err);
}
});
});
let language = country=='JP'?'ja':'en'
// 根据城市中心点+关键词搜索附近地点
const searchQuery = encodeURIComponent(keyword);
const searchUrl = `https://api.mapbox.com/search/searchbox/v1/forward?q=${encodeURIComponent(searchQuery)}&bbox=${cityCenter.bbox}&access_token=${accessToken}&limit=10&country=${country}&language=${language}`;
const places = await new Promise((resolve, reject) => {
uni.request({
url: searchUrl,
method: 'GET',
success: (res) => {
const data = res.data;
if (data && data.features && data.features.length > 0) {
const results = data.features.map(item => ({
name: item.properties.name,
fullAddress: item.properties.full_address,
placeFormat:item.properties.place_formatted,
type:item.properties.feature_type,
longitude: item.geometry.coordinates[0],
latitude: item.geometry.coordinates[1],
}));
resolve(results);
} else {
resolve([]);
}
},
fail: (err) => {
reject(err);
}
});
});
return places;
}
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