Commit db1bf4b9 authored by 黄奎's avatar 黄奎

页面修改

parent 1d3453a6
...@@ -101,19 +101,7 @@ Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { ...@@ -101,19 +101,7 @@ Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
} }
}) })
.then(res => { .then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else {
if (res.data.award && res.data.award.mName !== null) {
this.MsgBus.$emit('openRaffleTickets', res.data.award)
}
successCall(res) successCall(res)
}
}, faildCall) }, faildCall)
}, },
...@@ -248,6 +236,9 @@ Vue.prototype.getUrlKey = function (name, url) { ...@@ -248,6 +236,9 @@ Vue.prototype.getUrlKey = function (name, url) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
} }
Vue.prototype.GetHtml = function (str) { Vue.prototype.GetHtml = function (str) {
if (str && str != "") {
return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>') return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&apos;/g, "'"); .replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&apos;/g, "'");
}
return str;
} }
...@@ -187,6 +187,9 @@ ...@@ -187,6 +187,9 @@
this.accountMsg.Mobile = jsonData.Mobile; this.accountMsg.Mobile = jsonData.Mobile;
this.accountMsg.Name = jsonData.Name; this.accountMsg.Name = jsonData.Name;
this.accountMsg.Sex = jsonData.Sex; this.accountMsg.Sex = jsonData.Sex;
}else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} }
}, },
err => {} err => {}
...@@ -225,9 +228,9 @@ ...@@ -225,9 +228,9 @@
position:'top', position:'top',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时 timeout: 2000, // 以毫秒为单位; 0意味着没有超时
}) })
// var jsonData = JSON.stringify(res.data.data); }else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
// window.localStorage.setItem("b2bUser", jsonData); localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} }
}, },
err => {} err => {}
...@@ -283,6 +286,9 @@ ...@@ -283,6 +286,9 @@
position:'top', position:'top',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时 timeout: 2000, // 以毫秒为单位; 0意味着没有超时
}) })
}else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} }
}, },
err => {} err => {}
......
...@@ -152,6 +152,10 @@ ...@@ -152,6 +152,10 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.InfoData = res.data.data; this.InfoData = res.data.data;
} }
else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
}
}, },
err => {} err => {}
); );
......
...@@ -247,6 +247,10 @@ ...@@ -247,6 +247,10 @@
this.DataList = res.data.data.pageData; this.DataList = res.data.data.pageData;
this.pageCount = res.data.data.pageCount; this.pageCount = res.data.data.pageCount;
} }
else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
}
}, },
err => {} err => {}
); );
......
...@@ -239,7 +239,6 @@ ...@@ -239,7 +239,6 @@
res => { res => {
this.$q.loading.hide() this.$q.loading.hide()
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(" res.data.data", res.data.data);
this.InfoData = res.data.data.model; this.InfoData = res.data.data.model;
this.modelPrice = res.data.data.modelPrice; this.modelPrice = res.data.data.modelPrice;
} }
......
...@@ -50,9 +50,11 @@ ...@@ -50,9 +50,11 @@
display: block; display: block;
padding: 20px 25px; padding: 20px 25px;
} }
.order-list{
padding:0; .order-list {
padding: 0;
} }
.order-list li { .order-list li {
margin-bottom: 15px; margin-bottom: 15px;
font-size: 0; font-size: 0;
...@@ -118,18 +120,20 @@ ...@@ -118,18 +120,20 @@
} }
} }
.text-my{ .text-my {
color:#00afff; color: #00afff;
} }
.order_titleMobile{
margin:20px 0 10px 0; .order_titleMobile {
font-size:25px; margin: 20px 0 10px 0;
color:#666; font-size: 25px;
color: #666;
} }
@media only screen and (max-width: 1200px) { @media only screen and (max-width: 1200px) {
.order_tour { .order_tour {
width: 100%!important; width: 100% !important;
padding-right:0!important; padding-right: 0 !important;
} }
} }
...@@ -140,24 +144,18 @@ ...@@ -140,24 +144,18 @@
<template v-if="!$q.screen.xs"> <template v-if="!$q.screen.xs">
<div class="order-header"> <div class="order-header">
<div class="order_title">我的訂單</div> <div class="order_title">我的訂單</div>
<q-tabs <q-tabs v-model="tab" inline-label class="text-my">
v-model="tab" <q-tab :name="item.Type" :label="item.Type" v-for="(item,index) in TitList" @click="handleClick(item)"
inline-label :key="index" />
class="text-my"
>
<q-tab :name="item.Type" :label="item.Type" v-for="(item,index) in TitList" @click="handleClick(item)" :key="index" />
</q-tabs> </q-tabs>
</div> </div>
</template> </template>
<template v-if="$q.screen.xs"> <template v-if="$q.screen.xs">
<div> <div>
<div class="order_titleMobile">我的訂單</div> <div class="order_titleMobile">我的訂單</div>
<q-tabs <q-tabs v-model="tab" inline-label class="text-my">
v-model="tab" <q-tab :name="item.Type" :label="item.Type" v-for="(item,index) in TitList" @click="handleClick(item)"
inline-label :key="index" />
class="text-my"
>
<q-tab :name="item.Type" :label="item.Type" v-for="(item,index) in TitList" @click="handleClick(item)" :key="index" />
</q-tabs> </q-tabs>
</div> </div>
</template> </template>
...@@ -216,7 +214,7 @@ ...@@ -216,7 +214,7 @@
props: [], props: [],
data() { data() {
return { return {
tab:'全部', tab: '全部',
qMsg: { qMsg: {
PageIndex: 1, PageIndex: 1,
PageSize: 10, PageSize: 10,
...@@ -281,10 +279,14 @@ ...@@ -281,10 +279,14 @@
"/api/b2b/user/getrecentorder", "/api/b2b/user/getrecentorder",
this.getOrderMsg, this.getOrderMsg,
res => { res => {
this.$q.loading.hide() this.$q.loading.hide();
console.log("res",res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData; this.DataList = res.data.data.pageData;
this.pageCount = res.data.data.pageCount; this.pageCount = res.data.data.pageCount;
} else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} }
}, },
null null
......
...@@ -160,10 +160,12 @@ ...@@ -160,10 +160,12 @@
padding-left: 20px; padding-left: 20px;
list-style-type: disc; list-style-type: disc;
} }
.order-buy .q-field--with-bottom{
padding-bottom:0!important; .order-buy .q-field--with-bottom {
margin-bottom:20px; padding-bottom: 0 !important;
margin-bottom: 20px;
} }
.account_labelName { .account_labelName {
margin: 20px 0 10px 0; margin: 20px 0 10px 0;
font-size: 15px; font-size: 15px;
...@@ -176,10 +178,12 @@ ...@@ -176,10 +178,12 @@
.order-buy .q-field__control { .order-buy .q-field__control {
min-height: 46px; min-height: 46px;
} }
.otherBeizhu .q-field__control{
min-height:auto; .otherBeizhu .q-field__control {
height:auto; min-height: auto;
height: auto;
} }
.order-buy .q-field__native { .order-buy .q-field__native {
min-height: 46px; min-height: 46px;
} }
...@@ -251,56 +255,68 @@ ...@@ -251,56 +255,68 @@
background-color: #fffde7; background-color: #fffde7;
color: #ff9800; color: #ff9800;
} }
.isShowDiv{
visibility:hidden; .isShowDiv {
height:0; visibility: hidden;
padding:0!important; height: 0;
padding: 0 !important;
} }
@media only screen and (max-width: 980px){ @media only screen and (max-width: 980px) {
.order-info { .order-info {
margin-right: 0; margin-right: 0;
width: 100%; width: 100%;
} }
.order-right{
display:none; .order-right {
display: none;
} }
} }
@media only screen and (max-width: 768px){
.order-buy .tour-desc .tour-cover{ @media only screen and (max-width: 768px) {
width:100%; .order-buy .tour-desc .tour-cover {
margin:0 0 20px 0; width: 100%;
margin: 0 0 20px 0;
} }
.order-buy .tour_content { .order-buy .tour_content {
width: 100%; width: 100%;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: 1px dashed #ddd; border-bottom: 1px dashed #ddd;
} }
.order-buy .row .col-6{
width:100%; .order-buy .row .col-6 {
width: 100%;
} }
.order-buy .row .account_labelName{
margin-top:10px; .order-buy .row .account_labelName {
margin-top: 10px;
} }
.order-buy .data-content .q-col-gutter-y-lg{
margin-top:5px; .order-buy .data-content .q-col-gutter-y-lg {
margin-top: 5px;
} }
.order-buy .row .account-group{
padding-top:0!important; .order-buy .row .account-group {
padding-top: 0 !important;
} }
.order-buy .data-content{
padding-top:5px; .order-buy .data-content {
padding-top: 5px;
} }
.isFixed{
.isFixed {
position: fixed; position: fixed;
top:60px; top: 60px;
right:0; right: 0;
z-index:9999; z-index: 9999;
} }
} }
.order-buy .Order_content .q-gutter-md{
margin-left:0; .order-buy .Order_content .q-gutter-md {
margin-left: 0;
} }
</style> </style>
<template> <template>
<q-page> <q-page>
...@@ -345,8 +361,8 @@ ...@@ -345,8 +361,8 @@
<!-- 旅客资料开始 --> <!-- 旅客资料开始 -->
<div class="order-info-block" v-if="shape==1"> <div class="order-info-block" v-if="shape==1">
<div class="buy-title">旅客資料 <div class="buy-title">旅客資料
<q-btn color="amber" @click="getConnect()" id="home-tab" :class="{'isFixed':isFixed}" type="submit" style="float:right;font-size:17px;font-weight:bold;" <q-btn color="amber" @click="getConnect()" id="home-tab" :class="{'isFixed':isFixed}" type="submit"
label="儲存" /> style="float:right;font-size:17px;font-weight:bold;" label="儲存" />
</div> </div>
<q-form ref="myForm" class="q-gutter-md"> <q-form ref="myForm" class="q-gutter-md">
<div class="member-data" v-for="(item,index) in GuestObj.list" :key="index"> <div class="member-data" v-for="(item,index) in GuestObj.list" :key="index">
...@@ -359,33 +375,39 @@ ...@@ -359,33 +375,39 @@
<div class="row q-col-gutter-x-xs q-col-gutter-y-lg"> <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">中文姓</div> <div class="account_labelName">中文姓</div>
<q-input outlined v-model="item.SurName" :rules="[ val => val && val.length > 0 || '请输入中文姓']" class="bg-grey-1" /> <q-input outlined v-model="item.SurName" :rules="[ val => val && val.length > 0 || '请输入中文姓']"
class="bg-grey-1" />
</div> </div>
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">中文名</div> <div class="account_labelName">中文名</div>
<q-input outlined v-model="item.Name" :rules="[ val => val && val.length > 0 || '请输入中文名']" class="bg-grey-1" /> <q-input outlined v-model="item.Name" :rules="[ val => val && val.length > 0 || '请输入中文名']"
class="bg-grey-1" />
</div> </div>
</div> </div>
<div class="row q-col-gutter-x-xs q-col-gutter-y-lg"> <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">護照姓 ( 英文 )</div> <div class="account_labelName">護照姓 ( 英文 )</div>
<q-input outlined v-model="item.ESurName" :rules="[ val => val && val.length > 0 || '请输入護照姓']" class="bg-grey-1" /> <q-input outlined v-model="item.ESurName" :rules="[ val => val && val.length > 0 || '请输入護照姓']"
class="bg-grey-1" />
</div> </div>
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">護照名 ( 英文 )</div> <div class="account_labelName">護照名 ( 英文 )</div>
<q-input outlined v-model="item.EName" :rules="[ val => val && val.length > 0 || '请输入護照名']" class="bg-grey-1" /> <q-input outlined v-model="item.EName" :rules="[ val => val && val.length > 0 || '请输入護照名']"
class="bg-grey-1" />
</div> </div>
</div> </div>
<div class="row q-col-gutter-x-xs q-col-gutter-y-lg"> <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">身分證字號</div> <div class="account_labelName">身分證字號</div>
<q-input outlined v-model="item.IdCard" :rules="[ val => val && val.length > 0 || '请输入身分證字號']" class="bg-grey-1" /> <q-input outlined v-model="item.IdCard" :rules="[ val => val && val.length > 0 || '请输入身分證字號']"
class="bg-grey-1" />
</div> </div>
</div> </div>
<div class="row q-col-gutter-x-xs q-col-gutter-y-lg"> <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">出生日期</div> <div class="account_labelName">出生日期</div>
<q-input filled v-model="item.Birthday" mask="date" :rules="[ val => val && val.length > 0 || '请选择出生日期']"> <q-input filled v-model="item.Birthday" mask="date"
:rules="[ val => val && val.length > 0 || '请选择出生日期']">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy :ref="'qDateProxy'+index" transition-show="scale" transition-hide="scale"> <q-popup-proxy :ref="'qDateProxy'+index" transition-show="scale" transition-hide="scale">
...@@ -428,11 +450,13 @@ ...@@ -428,11 +450,13 @@
<div class="row q-col-gutter-x-xs q-col-gutter-y-lg"> <div class="row q-col-gutter-x-xs q-col-gutter-y-lg">
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">護照號碼</div> <div class="account_labelName">護照號碼</div>
<q-input outlined v-model="item.PassportNo" :rules="[ val => val && val.length > 0 || '请填写護照號碼']" class="bg-grey-1" /> <q-input outlined v-model="item.PassportNo" :rules="[ val => val && val.length > 0 || '请填写護照號碼']"
class="bg-grey-1" />
</div> </div>
<div class="account-group col-6"> <div class="account-group col-6">
<div class="account_labelName">護照效期截止日期</div> <div class="account_labelName">護照效期截止日期</div>
<q-input filled v-model="item.PassportExpiry" mask="date" :rules="[ val => val && val.length > 0 || '请选择護照效期截止日期']"> <q-input filled v-model="item.PassportExpiry" mask="date"
:rules="[ val => val && val.length > 0 || '请选择護照效期截止日期']">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy :ref="'huzhao'+index" transition-show="scale" transition-hide="scale"> <q-popup-proxy :ref="'huzhao'+index" transition-show="scale" transition-hide="scale">
...@@ -566,7 +590,8 @@ ...@@ -566,7 +590,8 @@
<q-radio v-model="shape" :val="3" label="收據開立" /> <q-radio v-model="shape" :val="3" label="收據開立" />
</div> </div>
</div> </div>
<q-btn color="white" text-color="black" style="width:100%;height:40px;margin-top:10px;display:none;" label="回訂單明細" /> <q-btn color="white" text-color="black" style="width:100%;height:40px;margin-top:10px;display:none;"
label="回訂單明細" />
<q-btn color="primary" style="width:100%;height:40px;margin-top:15px;" label="前往付款" /> <q-btn color="primary" style="width:100%;height:40px;margin-top:15px;" label="前往付款" />
</div> </div>
</div> </div>
...@@ -633,9 +658,9 @@ ...@@ -633,9 +658,9 @@
} }
], ],
GuestObj: {}, //旅客信息 GuestObj: {}, //旅客信息
scrollTop:0, scrollTop: 0,
tabOffsetTop:0, tabOffsetTop: 0,
isFixed:false isFixed: false
}; };
}, },
created() { created() {
...@@ -650,16 +675,17 @@ ...@@ -650,16 +675,17 @@
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
}, },
methods: { methods: {
handleScroll(){ handleScroll() {
this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || document.scrollingElement.scrollTop || 0 this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || document
if(this.scrollTop>this.tabOffsetTop){ .scrollingElement.scrollTop || 0
this.isFixed=true; if (this.scrollTop > this.tabOffsetTop) {
}else{ this.isFixed = true;
this.isFixed=false; } else {
this.isFixed = false;
} }
}, },
getShow(item){ getShow(item) {
item.isShow=!item.isShow; item.isShow = !item.isShow;
this.$forceUpdate(); this.$forceUpdate();
}, },
GetGuestObj() { GetGuestObj() {
...@@ -719,7 +745,7 @@ ...@@ -719,7 +745,7 @@
newArray.push(obj); newArray.push(obj);
}); });
} }
if(tempObj.list.length < tempObj.GuestNum){ if (tempObj.list.length < tempObj.GuestNum) {
for (var i = tempObj.list.length; i < tempObj.GuestNum; i++) { for (var i = tempObj.list.length; i < tempObj.GuestNum; i++) {
newArray.push(this.GetGuestObj()); newArray.push(this.GetGuestObj());
} }
...@@ -729,21 +755,21 @@ ...@@ -729,21 +755,21 @@
} }
} }
this.GuestObj = tempObj; this.GuestObj = tempObj;
this.GuestObj.list.forEach(x=>{ this.GuestObj.list.forEach(x => {
x.isShow=true; x.isShow = true;
}) })
} else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} }
}); });
}, },
getConnect(){ getConnect() {
this.$refs.myForm.validate().then(success => { this.$refs.myForm.validate().then(success => {
if (success) { if (success) {
this.SavePassenger(); this.SavePassenger();
} }
else {
// oh no, user has filled in
// at least one invalid value
}
}) })
}, },
//保存旅客信息 //保存旅客信息
...@@ -763,11 +789,14 @@ ...@@ -763,11 +789,14 @@
type: 'negative', type: 'negative',
message: res.data.message, message: res.data.message,
position: 'top', position: 'top',
color:'secondary', color: 'secondary',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时 timeout: 2000, // 以毫秒为单位; 0意味着没有超时
}) })
this.getTravelGuest(); this.getTravelGuest();
}else{ } else if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
localStorage.removeItem("b2bUser");
this.CommonJump('/login', {})
} else {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: res.data.message, message: res.data.message,
......
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