Commit 9ce32917 authored by 黄奎's avatar 黄奎

1

parent f4723e35
...@@ -64,7 +64,7 @@ module.exports = configure(function (ctx) { ...@@ -64,7 +64,7 @@ module.exports = configure(function (ctx) {
publicPath: ctx.dev ? '/' : './', publicPath: ctx.dev ? '/' : './',
env: ctx.dev env: ctx.dev
? { ? {
BASE_APP_API: 'http://192.168.10.226/api/common/post', BASE_APP_API: 'http://localhost/api/common/post',
JAVA_URL_API: 'http://efficient.oytour.com', JAVA_URL_API: 'http://efficient.oytour.com',
VERSION:require('./package.json').version, VERSION:require('./package.json').version,
......
...@@ -99,78 +99,7 @@ ...@@ -99,78 +99,7 @@
</q-popup-proxy> </q-popup-proxy>
</q-field> </q-field>
</div> </div>
<div class="q-my-md row justify-between" v-if="$q.platform.is.mobile">
<q-select
style="min-width: 90px; z-index: 99999"
unelevated
v-model="room"
dense
:options="theRooms"
emit-value
option-label="name"
option-value="id"
map-options
:label="$t('v101.scattered.kefang')"
standout
@update:model-value="getRoomList"
>
</q-select>
<q-btn
unelevated
class="bg-white hover q-px-xs q-py-sm q-ml-xs text-grey-6"
icon="person"
>
<div class="text-dark q-ml-xs">
{{ auditNum }}{{ $t("v101.scattered.chengren") }}
<span class="q-px-sm">.</span>
<template v-if="childNum > 0">{{ childNum }}</template>
{{ $t("v101.scattered.ertong") }}
</div>
<q-popup-proxy
class="no-shadow absolute"
style="z-index: 0; box-shadow: 0 0 50px #ddd !important"
:offset="[0, 20]"
:model-value="isShowPop"
>
<q-card class="row wrap q-pa-md rounded-borders" style="max-width: 697px">
<div
class="q-mr-md"
v-for="(item, index) in search.searchroomGroup"
:key="index"
style="min-width: 150px"
>
<div class="q-mb-md text-subtitle2">
{{ $t("v101.scattered.kefang") }}{{ index + 1 }}
</div>
<div class="q-my-md">
<q-select
v-model="item.numberOfAdults"
dense
:options="adultList"
emit-value
map-options
:label="$t('v101.scattered.chengren')"
standout
@update:model-value="setPeopleNum"
/>
</div>
<div class="q-my-md">
<q-select
v-model="item.numberOfChildren"
dense
:options="childrenList"
emit-value
map-options
:label="$t('v101.scattered.ertong')"
standout
@update:model-value="setPeopleNum"
/>
</div>
</div>
</q-card>
</q-popup-proxy>
</q-btn>
</div>
<div class="q-my-md row items-center"> <div class="q-my-md row items-center">
<q-input <q-input
v-model="search.MinPrice" v-model="search.MinPrice"
...@@ -312,7 +241,7 @@ export default defineComponent({ ...@@ -312,7 +241,7 @@ export default defineComponent({
HotelMealTypes: [] as Array<HotelRate>, //餐型 HotelMealTypes: [] as Array<HotelRate>, //餐型
HotelDidaPropertyCategory:[] as Array<HotelRate>, HotelDidaPropertyCategory:[] as Array<HotelRate>,
keyWords: "" as stringify, keyWords: "" as stringify,
CityCode : t("v101.scattered.HotelArea1"), CityCode : '' as stringify,
}); });
for (let i = 1; i < 11; i++) { for (let i = 1; i < 11; i++) {
data.theRooms.push(i); data.theRooms.push(i);
...@@ -325,8 +254,7 @@ export default defineComponent({ ...@@ -325,8 +254,7 @@ export default defineComponent({
} }
data.scrollStyle = useScrollModule().scrollStyle; data.scrollStyle = useScrollModule().scrollStyle;
const search = inject(DirtionmaryHelper.HOTEL_QUERY_PARAM) as any; const search = inject(DirtionmaryHelper.DiDaHOTEL_QUERY_PARAM) as any;
// data.searchClone = JSON.parse(JSON.stringify(search.msg))
if (search.searchroomGroup && search.searchroomGroup.length == 0) { if (search.searchroomGroup && search.searchroomGroup.length == 0) {
search.searchroomGroup.push({ search.searchroomGroup.push({
roomNum: 1, roomNum: 1,
...@@ -350,48 +278,6 @@ export default defineComponent({ ...@@ -350,48 +278,6 @@ export default defineComponent({
data.HotelConceptTypes = useHotel.getHotelConcept(); data.HotelConceptTypes = useHotel.getHotelConcept();
data.CityCode=data.CityCode; data.CityCode=data.CityCode;
const methods = { const methods = {
//设置房间里面成人数改变总成人数和儿童数
setPeopleNum() {
data.auditNum = 0;
data.childNum = 0;
search.searchroomGroup.forEach((x) => {
data.auditNum += x.numberOfAdults;
data.childNum += x.numberOfChildren;
});
if (data.auditNum == null || data.auditNum == undefined) {
data.auditNum = 1;
}
if (data.childNum == null || data.childNum == undefined) {
data.childNum = 1;
}
},
//房间数改变
getRoomList(roomNum) {
let length = search.searchroomGroup.length;
if (roomNum > length) {
for (let i = 1; i <= roomNum - length; i++) {
let obj = {
roomNum: i,
numberOfAdults: 1,
numberOfChildren: 0,
};
search.searchroomGroup.push(obj);
}
} else {
search.searchroomGroup = search.searchroomGroup.filter((x: any, i: Number) => {
if (roomNum > i) return x;
});
}
data.auditNum = 0;
data.childNum = 0;
search.searchroomGroup.forEach((x) => {
data.auditNum += x.numberOfAdults;
data.childNum += x.numberOfChildren;
});
data.isShowPop = true;
search.auditNum = data.auditNum;
search.childNum = data.childNum;
},
dateRangeHandler(e: any) { dateRangeHandler(e: any) {
search.CheckInDate = `${e.from.year}/${e.from.month}/${e.from.day}`; search.CheckInDate = `${e.from.year}/${e.from.month}/${e.from.day}`;
search.CheckOutDate = `${e.to.year}/${e.to.month}/${e.to.day} `; search.CheckOutDate = `${e.to.year}/${e.to.month}/${e.to.day} `;
...@@ -404,17 +290,13 @@ export default defineComponent({ ...@@ -404,17 +290,13 @@ export default defineComponent({
); );
}, },
setData() { setData() {
// localStorage.removeItem(DirtionmaryHelper.SCATTERED_HOTEL_DATE); localStorage.removeItem(DirtionmaryHelper.SCATTERED_DiDaHOTEL_DATE);
// let d = { let d = {
// searchroomGroup: search.searchroomGroup, CheckInDate: search.CheckInDate,
// room: data.room, CheckOutDate: search.CheckOutDate,
// auditNum: data.auditNum, };
// childNum: data.childNum, // 先不缓存
// arrivalDate: search.arrivalDate, localStorage.setItem(DirtionmaryHelper.SCATTERED_DiDaHOTEL_DATE, JSON.stringify(d));
// departureDate: search.departureDate,
// };
//先不缓存
//localStorage.setItem(DirtionmaryHelper.SCATTERED_HOTEL_DATE, JSON.stringify(d));
}, },
//获取道旅餐食类型 //获取道旅餐食类型
getdidaMealType() { getdidaMealType() {
...@@ -455,6 +337,7 @@ export default defineComponent({ ...@@ -455,6 +337,7 @@ export default defineComponent({
}); });
} }
data.Areas=newCity; data.Areas=newCity;
search.CityCode = data.Areas[0].CityCode;
} }
}); });
}, },
...@@ -476,6 +359,9 @@ export default defineComponent({ ...@@ -476,6 +359,9 @@ export default defineComponent({
search.Name_CN = data.keyWords; search.Name_CN = data.keyWords;
return setCnt; return setCnt;
}); });
watch(search, (n, o) => {
methods.setData()
})
onMounted(() => { onMounted(() => {
methods.getdidaCity(); methods.getdidaCity();
methods.getdidaBedType(); methods.getdidaBedType();
......
...@@ -220,11 +220,11 @@ export default defineComponent({ ...@@ -220,11 +220,11 @@ export default defineComponent({
setup() { setup() {
const $q = useQuasar(); const $q = useQuasar();
const { t } = useI18n(); const { t } = useI18n();
const search = inject(DirtionmaryHelper.HOTEL_QUERY_PARAM) as any; const search = inject(DirtionmaryHelper.DiDaHOTEL_QUERY_PARAM) as any;
const $router = useRouter(); const $router = useRouter();
watch(search, (n, o) => { watch(search, (n, o) => {
if (data.loading) return; //if (data.loading) return;
console.log("search change"); console.log("search change",search);
data.pages.pageIndex = 1; data.pages.pageIndex = 1;
methods.initHotels(); methods.initHotels();
}); });
......
...@@ -15,15 +15,29 @@ class DirtionmaryHelper { ...@@ -15,15 +15,29 @@ class DirtionmaryHelper {
*/ */
static readonly MENU_KEYS='Current_Menu_Cehck' static readonly MENU_KEYS='Current_Menu_Cehck'
/**
* 菜單選項
*/
static readonly DIDAMENU_KEYS='DIDACurrent_Menu_Cehck'
/** /**
* 子頁面傳遞給主界面的標題KEY * 子頁面傳遞給主界面的標題KEY
*/ */
static readonly PAGE_TITLE_KEY = 'page_title_key' static readonly PAGE_TITLE_KEY = 'page_title_key'
/**
* 子頁面傳遞給主界面的標題KEY
*/
static readonly DiDaPAGE_TITLE_KEY = 'DiDapage_title_key'
/** /**
* 酒店查詢參數 * 酒店查詢參數
*/ */
static readonly HOTEL_QUERY_PARAM = 'hotelqueryparam' static readonly HOTEL_QUERY_PARAM = 'hotelqueryparam'
/**
* 道旅酒店查詢參數
*/
static readonly DiDaHOTEL_QUERY_PARAM = 'hoteldidaqueryparam'
/** /**
* 购物车参数 * 购物车参数
...@@ -70,6 +84,11 @@ class DirtionmaryHelper { ...@@ -70,6 +84,11 @@ class DirtionmaryHelper {
*/ */
static readonly SCATTERED_HOTEL_DATE = "scatteredhoteldate" static readonly SCATTERED_HOTEL_DATE = "scatteredhoteldate"
/**
* 散客预约酒店缓存搜索客房数据等
*/
static readonly SCATTERED_DiDaHOTEL_DATE = "scattereddidahoteldate"
/** /**
* 散客预约酒店缓存客房下单是详情数据 * 散客预约酒店缓存客房下单是详情数据
*/ */
......
This diff is collapsed.
...@@ -60,11 +60,13 @@ ...@@ -60,11 +60,13 @@
MaxPrice: '', //最大金额 MaxPrice: '', //最大金额
Name_CN:"",//酒店名字 Name_CN:"",//酒店名字
CityCode:"", CityCode:"",
searchroomGroup: [] as Array<ang>,//客房数
searchHotelIdList: [],
}) })
provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search) provide(DirtionmaryHelper.DiDaHOTEL_QUERY_PARAM, search)
const menu = inject(DirtionmaryHelper.MENU_KEYS) as any const menu = inject(DirtionmaryHelper.DIDAMENU_KEYS) as any
menu.value = 23 menu.value = 23
const methods = {} const methods = {}
return { return {
......
...@@ -43,6 +43,9 @@ const routes: RouteRecordRaw[] = [{ ...@@ -43,6 +43,9 @@ const routes: RouteRecordRaw[] = [{
path: '/didahotel', //道旅酒店 path: '/didahotel', //道旅酒店
component: () => import('pages/scattered/didaHotel.vue') component: () => import('pages/scattered/didaHotel.vue')
}, },
{
path: '/scattered/HotelDetails/:hotelId/:groupBookingFlg/:lowrateBySetCurrency',
component: () => import('pages/scattered/hotelDetails.vue') },
{ {
path: '/scattered/didaDetails/:hotelId', path: '/scattered/didaDetails/:hotelId',
component: () => component: () =>
......
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