Browse Source

多规格优化

master
Enzo 4 years ago
parent
commit
48af7b8833
  1. 4
      common/api.js
  2. 2
      pages/goodsDetail/index.vue
  3. 33
      pages/order/confirm_order.vue
  4. 16
      pages/order/order_details.vue

4
common/api.js

@ -1,7 +1,7 @@
// appId: 正式 null | 测试 wxeb58570b5e04d147
export const DEV = "dev"; // dev 测试 | prod 正式
export const DEV = "prod"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
export const DEVURL = 'https://yytx.eugyl.com'; // 测试服请求地址
export const DEVURL = 'https://hainan.lanzulive.com'; // 测试服请求地址
// export const DEVURL = 'http://hainan.com'; // 测试服请求地址
export const PRODURL = 'https://yytx.eugyl.com'; // 正式服请求地址

2
pages/goodsDetail/index.vue

@ -727,7 +727,7 @@
let enter_time = this.choose_date;
let spec_id = this.choose_date_specid;
let type_text = this.goods_detail.spec[this.type_index].name;
this.$url('/pages/order/confirm_order?goods_id='+ goods_id+ '&spec_id='+ spec_id +'&goods_type='+godds_type+'&enter_time='+enter_time+'&goods_typetext='+type_text);
this.$url('/pages/order/confirm_order?goods_id='+ goods_id+ '&spec_id='+ spec_id +'&goods_type='+godds_type+'&departure_time='+enter_time+'&goods_typetext='+type_text);
}else {
this.$msg('请选择正确的使用时间!');
}

33
pages/order/confirm_order.vue

@ -78,19 +78,8 @@
<text class="lf-font-28" style="color: #131315;">{{arrival_time}}</text>
</view>
</view>
<!-- 景区 -->
<view v-if="goods_type == 2">
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">套餐类型</text>
<text class="lf-font-28" style="color: #131315;">{{goods_typetext}}</text>
</view>
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">开始时间</text>
<text class="lf-font-28" style="color: #131315;">{{enter_time}}</text>
</view>
</view>
<!-- 旅游路线 -->
<view v-if="goods_type == 0 || goods_type == 4 || goods_type == 5">
<view v-if="goods_type == 0 || goods_type == 4 || goods_type == 5 || goods_type == 2">
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">套餐类型</text>
<text class="lf-font-28" style="color: #131315;">{{goods_typetext}}</text>
@ -201,21 +190,15 @@
this.goods_type = e.goods_type;
this.btn_type = e.btn_type;
this.order_id = e.order_id;
if(this.goods_type == 1) {
var arr = e.spec_id.split(",")
console.log(arr)
this.hotel_specid = arr
console.log('数组id',this.hotel_specid)
}else {
this.spec_id = e.spec_id;
}
var arr = e.spec_id.split(",")
console.log(arr)
this.hotel_specid = arr
console.log('数组id',this.hotel_specid)
this.enter_type = e.enter_type;
this.goods_typetext = e.goods_typetext;
if(this.goods_id) {
this.getGoodsData(this.pay_type);
if(this.goods_type == 2) {
this.enter_time = e.enter_time;
}else if(this.goods_type == 0 || this.goods_type == 4 || this.goods_type == 5) {
if(this.goods_type == 0 || this.goods_type == 4 || this.goods_type == 5 || this.goods_type == 2) {
this.departure_time = e.departure_time;
}else if(this.goods_type == 1) {
this.check_in_time = e.check_in_time;
@ -288,7 +271,7 @@
}
},
getGoodsData(type){
this.$http(this.API.API_CONFIRMDETAILS,{id: this.goods_id,num: 1,pay_type: type,spec_id: this.goods_type==1?this.hotel_specid:this.spec_id}).then(res => {
this.$http(this.API.API_CONFIRMDETAILS,{id: this.goods_id,num: 1,pay_type: type,spec_id: this.hotel_specid}).then(res => {
this.goods_details = res.data;
console.log('数据',res)
})
@ -329,7 +312,7 @@
pay_type: this.pay_type,
name:this.contact,
mobile:this.phone,
spec_id: this.spec_id,
spec_id: this.hotel_specid,
enter_time: this.enter_time,
sex: this.sex,
age: this.age,

16
pages/order/order_details.vue

@ -60,6 +60,14 @@
<text class="lf-color-555 lf-font-28">年龄</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.age}}</text>
</view>
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">性别</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.sex}}</text>
</view>
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">身份证号</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.id_card}}</text>
</view>
<view class="cu-bar padding-lr" v-if="orderDetails.info.arrival_time">
<text class="lf-color-555 lf-font-28">到店时间</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.arrival_time}}</text>
@ -76,14 +84,6 @@
<text class="lf-color-555 lf-font-28">离店时间</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.check_out_time}}</text>
</view>
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">身份证号</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.id_card}}</text>
</view>
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">性别</text>
<text class="lf-font-28 text-black1">{{orderDetails.info.sex}}</text>
</view>
</view>
<view>
<self-line />

Loading…
Cancel
Save