Commit 33b7fdd0 authored by zhengke's avatar zhengke

修改酒店

parent d28d6907
......@@ -1156,7 +1156,6 @@ export default {
x.roomOptions = arr;
}
})
console.log(this.SimilarList,'SimilarList');
} else {
this.Error(res.data.message);
}
......@@ -1212,7 +1211,7 @@ export default {
},
//点击预订传递参数
bookHotel(roomOptionCd){
if(sessionStorage.getItem("UserId")==''&& !localStorage.userInfo){
if(!localStorage.OpenB2BCode && !localStorage.userInfo){
return this.Error('请登录!')
}
......
......@@ -338,7 +338,7 @@ export default {
if (url.indexOf("?") != -1) {
let str = url.split("?")[1];
let uid = str.split("uid=")[1];
sessionStorage.setItem("UserId", decodeURIComponent(uid));
localStorage.setItem("OpenB2BCode", decodeURIComponent(uid));
}
},
methods: {
......
......@@ -147,7 +147,8 @@
</div>
</div>
<div>
<input type="button" class="HP_zhifu" @click="gotoPay" value="立即支付" />
<input v-if="isShowBtn" type="button" class="HP_zhifu" @click="gotoPay('HotelPay')" value="立即支付" />
<input v-if="!isShowBtn" type="button" class="HP_zhifu" @click="gotoPay('HotelHome')" value="返回首页" />
</div>
</div>
<div class="PayBefore_Right">
......@@ -166,7 +167,8 @@ export default {
TotalPrice:0,
//订单号
bookingNumber:0,
msgList:''
msgList:'',
isShowBtn:true
};
},
created() {
......@@ -175,11 +177,14 @@ export default {
this.TotalPrice=this.msgList.bookMoney;
this.bookingNumber=this.msgList.orderId;
}
if(localStorage.OpenB2BCode){
this.isShowBtn=false;
}
},
methods: {
gotoPay(){
gotoPay(path){
this.$router.push({
path:"/HotelPay"
path:path
})
}
}
......
......@@ -763,7 +763,6 @@ export default {
}
this.sureMsg.totalChargeableRateInfo=0;
this.sureMsg.totalPriceJapanese=0;
console.log(this.dataList,'datalist');
this.dataList.roomGroup.forEach(x=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
let arr = [];
......@@ -876,18 +875,21 @@ export default {
}
});
},
//点击支付
//点击下单
BuyHoTel(){
if(!localStorage.OpenB2BCode && !localStorage.userInfo){
return this.Error('请登录!')
}
//判断是否为登录状态
if(localStorage.userInfo){
sessionStorage.removeItem("UserId");
localStorage.removeItem("OpenB2BCode");
this.sureMsg.EmployeeIdStr='';
let userInfo = this.getLocalStorage();
this.sureMsg.CustomerId = userInfo.customerId;
}
//判断是否跳过来的
if(sessionStorage.getItem("UserId")){
this.sureMsg.EmployeeIdStr= sessionStorage.getItem("UserId");
if(localStorage.OpenB2BCode){
this.sureMsg.EmployeeIdStr= localStorage.getItem('OpenB2BCode');
}
this.sureMsg.hotelId = this.msg.hotelId;
......@@ -911,7 +913,6 @@ export default {
if(this.sureMsg.CustomerId==null||this.sureMsg.CustomerId==""){
this.sureMsg.CustomerId=0
}
this.apipost("dmc_post_Get_GetJAPAN_HotelBooking",this.sureMsg,res => {
if (res.data.resultCode == 1) {
this.Success('预订成功');
......
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