Commit 28d1b0a4 authored by youjie's avatar youjie

no message

parents 1ae5c56f 4a757fff
......@@ -169,7 +169,8 @@ module.exports = function( /* ctx */ ) {
'QStepper',
'QStep',
'QToggle',
'QTime'
'QTime',
'QSpace'
],
directives: [
......
const user = {
get userInfo() {
if (localStorage.b2bUser) {
let u = JSON.parse(window.localStorage.getItem('b2bUser'))
console.log('鑒定權限........', u)
debugger;
if (u.token) {
return u
} else {
localStorage.removeItem('b2bUser')
return null
}
} else {
return null
}
},
set userInfo(u) {
if (u) {
localStorage.setItem('b2bUser', JSON.stringify(u))
}
},
loginOut() {
localStorage.setItem('b2bUser', JSON.stringify(u))
},
appraisal() {
if (!user.userInfo) {
this.CommonJump('/login', { r: encodeURIComponent(location.href) });
}
}
}
export default user
\ No newline at end of file
......@@ -4,11 +4,15 @@ import md5 from 'js-md5'
// import {eventBus} from './eventBus'
// import VueCoreVideoPlayer from 'vue-core-video-players'
import 'viewerjs/dist/viewer.css'
import Vuelidate from 'vuelidate'
import user from './user'
import VueViewer from 'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
Vue.prototype.$EventBus = new Vue()
// Vue.use(VueCoreVideoPlayer)
Vue.use(VueViewer)
Vue.prototype.$md5 = md5;
Vue.use(Vuelidate)
//域名管理对象
Vue.prototype.domainManager = function() {
let domainUrl = '';
......@@ -20,7 +24,7 @@ Vue.prototype.domainManager = function() {
domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
domainUrl = 'http://192.168.10.206:8015'
domainUrl = 'http://192.168.10.206:8015' //'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
}
var obj = {
//主地址
......@@ -196,7 +200,7 @@ Vue.prototype.CommonJump = function(path, obj) {
query: obj
});
}
Vue.prototype.$user = user
Vue.prototype.createCalendar = function(dateStr) {
var days = [];
var date;
......
<template>
<q-dialog v-model="isShow" persistent>
<q-card flat class="light-shadow q-pa-md">
<q-card-section>
<div class="text-h6 text-weight-bold">登錄提示</div>
</q-card-section>
<q-card-section>
<div class="text-center">
<img src="../../assets/img/nonedata/auth.png" width="267">
<div class="q-mt-lg text-grey-8">
你還沒有登錄哦,登錄或註冊後可以享受更多權益
</div>
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="前往註冊" color="primary" class="q-px-lg" @click="goRegist" />
<q-btn unelevated label="立即登錄" color="primary" class="q-px-lg" @click="goLogin" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
export default {
data() {
return {
isShow:true
}
},
created() {
try {
let u = localStorage.getItem("b2bUser")
if(u){
u=JSON.parse(u)
if(u.token){
this.isShow=false
}
}
} catch (error) {
}
},
methods: {
goLogin(){
this.CommonJump('/login', {r:encodeURIComponent(location.href)});
},
goRegist(){
this.CommonJump('/login', {r:encodeURIComponent(location.href),t:1});
}
},
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div :style="{'width':size}" class="inline-block">
<img src="../../assets/img/nonedata/data.png" width="100%" class="q-mb-lg" v-if="iconType=='data'">
<img src="../../assets/img/nonedata/order.png" width="100%" class="q-mb-lg" v-if="iconType=='order'">
<img src="../../assets/img/nonedata/pay.png" width="100%" class="q-mb-lg" v-if="iconType=='pay'">
<div class="text-center text-subtitle1 text-weight-bolder">{{ title }}</div>
<div class="text-center text-grey-6 q-mt-lg" v-if="subtitle!=''">{{ subtitle }}</div>
</div>
</template>
<script>
export default {
props:{
size:{
type:String,
default:"267px"
},
iconType:{
type:String,
default:""
},
title:{
type:String,
default:"暂无信息"
},
subtitle:{
type:String,
default:""
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -182,6 +182,14 @@ export default {
this.$emit("change", item);
}
},
changePriceHandler(dateStr,money){
//this.currentDate.price.originalB2CPrice=money
this.col.forEach(x=>{
if(x.value==dateStr){
x.price.originalB2CPrice=money
}
})
},
reset() {
this.currentDate = "";
},
......
<template>
<div v-if="m && m.priceFlight && m.priceFlight.length > 0">
<div
class="text-h5 text-weight-bold text-left"
ref="feature"
:class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
航班資訊
</div>
<div class="q-my-lg rounded-borders bg-white q-pa-md">
<div v-for="(x,i) in m.priceFlight" :key="i">
<div class="row items-center">
<q-chip size="10px" square color="positive" outline v-if="x.flightType==1">去程</q-chip>
<q-chip size="10px" square color="accent" outline v-if="x.flightType==2">中轉</q-chip>
<q-chip size="10px" square color="negative" outline v-if="x.flightType==3">回程</q-chip>
<div class="q-ml-md text-grey-7">
<div class="row">
<div class="text-subtitle2">{{ formatDateHandler(x.arriveDate) }}</div>
<div class="q-ml-lg row items-center">
<span>{{ x.departureName }}</span>
<q-icon name="iconfont iconswap-right" class="q-mx-sm" size="20px" />
<span>{{ x.arrivalCityName }}</span>
</div>
</div>
</div>
</div>
<div class="q-pl-lg q-mt-md row " style="height:66px; margin-left: 0px;">
<div class="column text-weight-bold">
<div class="col">
{{ formatDateHandler(x.arriveDate,"MM月DD日") }}
</div>
<div>
{{ x.departureTime>x.arrivalTime?formatAddDateHandler(x.arriveDate,1,"MM月DD日"):formatDateHandler(x.arriveDate,"MM月DD日") }}
</div>
</div>
<div class="column text-weight-bold q-ml-md">
<div class="col">
{{ x.departureTime }}
</div>
<div>
{{ x.arrivalTime }}
</div>
</div>
<div class="column items-center q-ml-md">
<div style="width: 8px;height: 8px;border-radius: 8px;background: #ccd6e5;" class="q-mt-sm"></div>
<div class="col" style="background: #ccd6e5;width:2px"></div>
<div style="width: 8px;height: 8px;border-radius: 8px;background: #ccd6e5;" class="q-mb-sm"></div>
</div>
<div class="column text-weight-bold q-ml-md">
<div class="col">
{{ x.departureAirPortName }}
</div>
<div>
{{ x.arrivalAirPortName }}
</div>
</div>
<q-space />
<div class="column">
<div class="col row">
<q-img :src="`http://pic.tripcdn.com/airline_logo/32/${x.flightNumber.substring(0,2).toLowerCase()}.png`" spinner-color="white" style="height: 18px; width: 18px" />
<div class="q-ml-sm" style="font-size:16px;">{{ x.alName }}</div>
</div>
<div class="q-pl-lg text-grey-5">
<span style="text-decoration: dashed;text-decoration-line: underline;">{{ x.flightNumber }}</span>
<span class="q-ml-md">經濟艙</span>
</div>
</div>
</div>
<q-separator color="grey-2" class="q-my-md" v-if="i<m.priceFlight.length-1"/>
</div>
</div>
</div>
</template>
<script>
import { date } from "quasar";
export default {
props: ["price"],
watch: {
price: {
handler(n, o) {
this.m = n;
console.log(n)
},
deep: true,
immediate: true,
},
},
data() {
return {
m: null,
};
},
created() {
this.m = this.price;
},
methods: {
formatDateHandler(dateStr,formatStr =null){
formatStr = formatStr?formatStr:"YYYY年MM月DD日(dddd)"
return date.formatDate(dateStr,formatStr)
},
formatAddDateHandler(dateStr,day,formatStr =null){
formatStr = formatStr?formatStr:"YYYY年MM月DD日(dddd)"
return date.formatDate(date.addToDate(dateStr,{days:day}),formatStr)
}
},
};
</script>
<style></style>
This diff is collapsed.
<template>
<div v-if="m && m.unionCityList">
<div class="text-subtitle2 text-weight-bold">選擇出發城市</div>
<div class="text-grey-6 f12 q-my-sm">此行程包含多個出發城市</div>
<div class="row q-col-gutter-md">
<div v-for="(x,i) in m.unionCityList" :key="i"><q-chip size="14px" square>{{ x.cityName }}</q-chip></div>
</div>
</div>
</template>
<script>
export default {
props: ["price"],
watch: {
price: {
handler(n, o) {
this.m = n;
console.log(n)
},
deep: true,
immediate: true,
},
},
data() {
return {
m: null,
};
},
created() {
this.m = this.price;
},
methods: {
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -2,25 +2,19 @@
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
// Check documentation for full list of Quasar variables
// Your own variables (that are declared here) and Quasar's own
// ones will be available out of the box in your .vue/.scss/.sass files
// It's highly recommended to change the default colors
// to match your app's branding.
// Tip: Use the "Theme Builder" on Quasar's documentation website.
// $primary : #1976D2;
//$primary : #31C3E0;
$primary : #F1416C;
$secondary : #26A69A;
$accent : #9C27B0;
$dark : #1D1D1D;
$positive : #21BA45;
$negative : #C10015;
$info : #31CCEC;
$warning : #F2C037;
$primary: #F1416C;
$secondary: #26A69A;
$accent: #9C27B0;
$dark: #1D1D1D;
$positive: #21BA45;
$negative: #C10015;
$info: #31CCEC;
$warning: #F2C037;
\ No newline at end of file
......@@ -256,7 +256,7 @@
v-if="$q.platform.is.mobile"
>
<q-field
class="q-my-md"
class="q-mt-md"
stack-label
label="選擇日期、選項"
standout
......@@ -270,17 +270,17 @@
class="bg-white q-pa-md"
:priceList="dataList.priceList"
@change="changeChosenDateHandler"
ref="calendar"
ref="calendarMobile"
></calendar>
</q-popup-proxy>
</q-field>
<template v-if="currentPrice && currentPrice.startDate">
<order-preview
class="q-pa-md"
:travel="dataList"
:price="currentPrice"
@reset="resetHandler"
@changeCity="changeCityHandler"
v-if="currentPrice && currentPrice.startDate"
></order-preview>
</template>
</div>
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
......@@ -326,7 +326,7 @@
color="primary"
outline
:label="showOrderPreview ? '取消選擇' : '選擇'"
@click="showOrderPreview = !showOrderPreview"
@click="changeShowOrderPreviewHandler"
class="q-px-lg"
/>
</div>
......@@ -369,6 +369,8 @@
<order-preview
:price="currentPrice"
@reset="resetHandler"
:travel="dataList"
@changeCity="changeCityHandler"
></order-preview>
</div>
</div>
......@@ -411,6 +413,7 @@
<div
:class="{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<flight :price="currentPrice"></flight>
<div
class="text-h5 text-weight-bold text-left"
ref="feature"
......@@ -607,6 +610,7 @@ import Trip from "src/components/trip/trip.vue";
import headStyle4 from "../components/trip/style4";
import headStyle5 from "../components/trip/style5";
import block from "src/components/trip/block/index";
import Flight from 'src/components/trip/flight.vue';
export default {
props: [],
data() {
......@@ -717,6 +721,7 @@ export default {
smaple,
Trip,
block,
Flight
},
watch: {
days: {
......@@ -769,6 +774,13 @@ export default {
// this.getCarData();
},
methods: {
changeShowOrderPreviewHandler(){
this.showOrderPreview=!this.showOrderPreview
if(!this.showOrderPreview){
this.currentPrice=null
this.changeTripShowHandler()
}
},
getTopNum(x) {
this.days = JSON.parse(x);
},
......@@ -779,7 +791,6 @@ export default {
this.$refs[x.val].getBoundingClientRect().top +
this.currentHeight -
60;
console.log(x.top);
});
});
},
......@@ -860,15 +871,30 @@ export default {
//console.log(e)
},
resetHandler() {
this.currentPrice.startDate = "";
this.$refs.calendar.reset();
this.currentPrice=null;
if(this.$q.platform.is.mobile)
this.$refs.calendarMobile.reset()
else
this.$refs.calendar.reset();
},
changeChosenDateHandler(val) {
val.price.version = new Date().getTime();
this.currentPrice = JSON.parse(JSON.stringify(val.price));
this.currentPrice.RealPrice = this.currentPrice.RealPrice?this.currentPrice.RealPrice:this.currentPrice.originalB2CPrice
this.currentPrice.originalB2CPrice = this.currentPrice.RealPrice
if(this.currentPrice.unionCityList && this.currentPrice.unionCityList.length>0){
this.currentPrice.unionCityList.splice(0,0,{
cityId:this.dataList.startCityId,
cityName:this.dataList.startCityName
})
}
if(this.$q.platform.is.mobile){
this.$refs.qDateProxy.hide();
}
this.$forceUpdate()
this.$nextTick(()=>{
this.changeTripShowHandler()
});
},
showDialog() {
this.isShowDialog = true;
......@@ -982,6 +1008,21 @@ export default {
null
);
},
changeCityHandler(unionCity){
this.currentPrice.originalB2CPrice=this.currentPrice.RealPrice
if(unionCity.cityId!=this.dataList.startCityId){
if(unionCity.backFlight && unionCity.backFlight.addPrice){
this.currentPrice.originalB2CPrice+=unionCity.backFlight.addPrice
}
if(unionCity.goFlight && unionCity.goFlight.addPrice){
this.currentPrice.originalB2CPrice+=unionCity.goFlight.addPrice
}
}
console.log(this.$refs)
if(this.$q.platform.is.desktop)
this.$refs.calendar.changePriceHandler(this.currentPrice.startDate,this.currentPrice.originalB2CPrice)
this.$forceUpdate()
},
// 获取车的详情
getCarData() {
this.$q.loading.show();
......
This diff is collapsed.
......@@ -270,6 +270,7 @@ export default {
var jObj = JSON.parse(window.localStorage.getItem("baseifo"));
this.logo = jObj.Config.Logo;
}
this.isLogin=!this.$route.query.t || this.$route.query.t!=1
},
watch: {
loginType: function () {
......
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