Commit 33b7fdd0 authored by zhengke's avatar zhengke

修改酒店

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