diff --git a/pages.json b/pages.json
index 26f6596..06f7c7c 100644
--- a/pages.json
+++ b/pages.json
@@ -138,6 +138,24 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "hotelHomestay/detail",
+ "style": {
+ "navigationBarTitleText": "酒店详情"
+ }
+ },
+ {
+ "path": "hotelHomestay/policy",
+ "style": {
+ "navigationBarTitleText": "设施/政策"
+ }
+ },
+ {
+ "path": "hotelHomestay/order",
+ "style": {
+ "navigationBarTitleText": "酒店民宿"
+ }
+ },
{
"path": "food/taocanDetail",
"style": {
diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js
index cb001e9..72df1a0 100644
--- a/static/js/CommonFunction.js
+++ b/static/js/CommonFunction.js
@@ -195,4 +195,13 @@ Date.prototype.Format = function(fmt)
if(new RegExp("("+ k +")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
return fmt;
+}
+
+// 获取最大优惠券 params:{money:100,sku_ids:1,2}
+Vue.prototype.getMaxCoupon = async function (param) {
+ let res = await this.Post(param, "/api/coupon/use_max_coupon_list")
+ if (res.code == 1 && res.data.id) {
+ this.$store.commit("choseCoupon",res.data);
+ }
+ return res.data
}
\ No newline at end of file
diff --git a/static/js/request.js b/static/js/request.js
index e71d867..77bb1d5 100644
--- a/static/js/request.js
+++ b/static/js/request.js
@@ -16,7 +16,7 @@ Vue.prototype.Post = (params, apiurl) => {
data: params || {},
header: params.header || {
'content-type': 'application/json',
- 'token': params.token || '2dd9b712-f118-41f6-b3a8-602e4fbb0ce3'
+ 'token': params.token || '75895d8b-1804-42e1-8be8-bfdaa9574a5f'
},
success: res => {
uni.hideLoading()
diff --git a/subPackages/hotelHomestay/detail.vue b/subPackages/hotelHomestay/detail.vue
new file mode 100644
index 0000000..94cb777
--- /dev/null
+++ b/subPackages/hotelHomestay/detail.vue
@@ -0,0 +1,761 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{swiperCurrent}}/{{info.list_images.split(',').length}}
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+
+
+
+ {{tag}}
+
+
+
+ 设施/政策
+
+
+
+
+
+
+ {{info.address}}
+
+
+
+ 地图
+
+
+
+
+ 电话
+
+
+
+
+
+
+
+
+ {{new Date(selectDate.startDay).Format('MM-dd')}}
+ {{ ShowDateDay(new Date(selectDate.startDay).getDay()) }}
+ 入住
+
+
+ 共{{selectDate.differDays}}晚
+
+
+ {{new Date(selectDate.endDay).Format('MM-dd')}}
+ {{ShowDateDay(new Date(selectDate.endDay).getDay()) }}
+ 离店
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+ {{item.showTag}}
+ {{item.lastShowTag}}
+
+
+
+ {{item.price/100}}
+ 预定
+
+
+
+
+
+
+ 查看剩余房型
+
+
+
+
+
+
+ 酒店介绍
+
+
+
+ 设施与政策
+
+
+ {{info.title}}
+
+
+ 联系电话:{{info.tel}}
+
+
+
+
+
+
+
+ 服务设施
+
+
+
+ 入住须知
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue
index e99754f..210c7a3 100644
--- a/subPackages/hotelHomestay/hotelHomestay.vue
+++ b/subPackages/hotelHomestay/hotelHomestay.vue
@@ -9,10 +9,10 @@
-
+
-
+
@@ -22,11 +22,12 @@
{{item.title}}
-
- 盐都精选
- 盐都精选
+
+
+ {{tag}}
+
-
+
{{showPrice(item.price)}}
@@ -39,7 +40,7 @@
- 没有更多数据了
+
@@ -59,20 +60,17 @@
headImg:null,
navList: [],
actNavIndex: 0,
- type_id: 9,//演出票务的景点分类id
+ type_id: 11,//酒店分类id
}
},
onShow() {
this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/8653c32761e01ee683505eddba1ae22b.png'
this.finished = false
- this.list = [
- {id:1, title:'景点名称景点名称景点名称 景点名称',
- address:'景点名称景点名称景点名称 景点名称景点名称景点名称景点名称 景点名称',price:10000,
- image:'https://tongli.sz-trip.com/uploads/20240826/a87488f6225789aa19dbb437671d388d.png',
- }
- ]
// this.getHeadImg('piaowu')
},
+ onReady() {
+ this.getList()
+ },
onLoad(options) {
let that = this
uni.getSystemInfo({
@@ -107,10 +105,11 @@
// 根据景点标签获取景点列表
getList(){
this.Post({
- tag_id: this.navList[this.actNavIndex].id,
- offset: this.list.length,
- limit: 10
- },'https://yjdtadmin.sz-trip.com/api/scenic/getScenicByTagId').then(res => {
+ scenic_type_id: this.type_id,offset: this.list.length,limit: 10,
+ lon: uni.getStorageSync('location').lon || '120',
+ lat: uni.getStorageSync('location').lat || '30',
+ },
+ '/api/Scenic/getScenicByType').then(res => {
this.list = [...this.list, ...res.data];
if (res.data.length < 10) {
this.finished = true
@@ -123,9 +122,9 @@
this.Post({
type: 4,
id: item.id
- }, 'https://yjdtadmin.sz-trip.com/api/scenic/collect').then(res => {
- if (res.code == 200) {
- uni.showToast({title: res.msg})
+ }, '/api/scenic/collect').then(res => {
+ if (res.code == 1) {
+ uni.showToast({title: res.msg,icon:'none'})
if (item.is_collect == 1) {
item.is_collect = 0
} else {
@@ -213,6 +212,8 @@
.tag-container{
display: flex;
+ flex-wrap: nowrap;
+ overflow-x: auto;
.tag{
background: rgba(205,233,209,0.3);
border-radius: 7rpx 5rpx 5rpx 7rpx;
@@ -224,11 +225,13 @@
color: #4E7956;
text-align: center;
margin-right: 12rpx;
+ flex-shrink: 0;
}
}
.priceBox{
+ width: 120rpx;
.price{
font-family: PingFang SC;
font-weight: bold;
diff --git a/subPackages/hotelHomestay/order.vue b/subPackages/hotelHomestay/order.vue
new file mode 100644
index 0000000..36c859d
--- /dev/null
+++ b/subPackages/hotelHomestay/order.vue
@@ -0,0 +1,600 @@
+
+
+
+
+
+ {{skuInfo.title}}
+
+ 房型信息
+
+
+
+
+
+ {{skuInfo.showTag}}
+ {{skuInfo.lastShowTag}}
+
+
+
+
+ {{new Date(selectDate.startDay).Format('MM-dd')}}
+ {{ ShowDateDay(new Date(selectDate.startDay).getDay()) }}
+ 入住
+
+
+ 共{{selectDate.differDays}}晚
+
+
+ {{new Date(selectDate.endDay).Format('MM-dd')}}
+ {{ShowDateDay(new Date(selectDate.endDay).getDay()) }}
+ 离店
+
+
+
+
+
+
+
+
+
+ 订单确认后,您在{{new Date(selectDate.startDay).Format('yyyy年MM月dd日')}}20:00前之免费取消或 变更订单,20:00后将收取30%房费作为违约费用。
+ 预期不可取消或/修改,扣取全额房费
+
+
+
+
+
+
+
+
+ 证件要求:大陆居民身份证登记入住
+
+
+
+
+
+
+
+
+
+ 预定信息
+ 姓名需与证件一致
+
+
+
+ 房间数
+
+
+ -
+
+ +
+
+
+
+
+ 房间{{index+1}}
+
+
+
+ 联系电话
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合计:
+ {{ total() }}
+
+
+ 立即预订
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/hotelHomestay/policy.vue b/subPackages/hotelHomestay/policy.vue
new file mode 100644
index 0000000..3c4dbb8
--- /dev/null
+++ b/subPackages/hotelHomestay/policy.vue
@@ -0,0 +1,110 @@
+
+
+
+
+ {{info.title}}
+
+
+ 联系电话:{{info.tel}}
+
+
+
+
+
+
+
+ 服务设施
+
+
+
+ 入住须知
+
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue
index 45f62e3..f6232d8 100644
--- a/subPackages/techan/detail.vue
+++ b/subPackages/techan/detail.vue
@@ -31,7 +31,7 @@
选择:
- {{sku[productIndex].title}}
+ {{sku[productIndex].title || '暂无可选规格'}}
@@ -181,7 +181,7 @@
'/api/goods/getSpecificationsByGoodsId'
).then(res => {
if (res) {
- this.sku = res.data;
+ this.sku = res.data || [];
}
});
},
@@ -218,6 +218,14 @@
this.$refs.popup.close()
},
openPop() {
+ if (!this.sku||this.sku.length<=0) {
+ uni.showToast({
+ title:'暂无可选规格',
+ icon:'none'
+ })
+ return
+ }
+
if (!this.popShow) {
this.$refs.popup.open()
} else {
@@ -227,8 +235,8 @@
order(item) {
let goods = this.sku[this.productIndex]
goods.buyNum = this.buyNum
- uni.setStorageSync('order', JSON.stringify(goods)); //规格
- uni.setStorageSync('info', JSON.stringify(this.info)); //商品
+ uni.setStorageSync('teChanOrder', JSON.stringify(goods)); //规格
+ uni.setStorageSync('teChanInfo', JSON.stringify(this.info)); //商品
uni.navigateTo({
url: '/subPackages/techan/order'
});
diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue
index 5967d60..04d00ae 100644
--- a/subPackages/techan/order.vue
+++ b/subPackages/techan/order.vue
@@ -117,7 +117,7 @@
-
+
优惠券
请选择
@@ -233,8 +233,8 @@ export default {
},
onLoad() {
this.$store.commit("choseCoupon", "");
- this.info = JSON.parse(uni.getStorageSync('order'));
- this.detail = JSON.parse(uni.getStorageSync('info'));
+ this.info = JSON.parse(uni.getStorageSync('teChanOrder'));
+ this.detail = JSON.parse(uni.getStorageSync('teChanInfo'));
if (!this.info) {
uni.navigateBack();
return
@@ -257,6 +257,15 @@ export default {
},
onUnload(){
uni.$off("updateDataByConnect",this.getDataByConnect)
+ },
+ onReady () {
+ this.$nextTick(()=>{
+ setTimeout(()=>{
+ this.getMaxCouponData()
+ },1000)
+ })
+
+
},
methods: {
getContacts() {
@@ -409,7 +418,7 @@ export default {
}
} else{
- price = ((this.info.money) * this.info.buyNum + postPrice) - (((this.info.money) * this.info.buyNum + postPrice) * this.coupon.percent)
+ price = ((this.info.money) * this.info.buyNum + postPrice) - (((this.info.money) * this.info.buyNum + postPrice) * this.coupon.percent/100)
}
} else {
price = (this.info.money) * this.info.buyNum + postPrice
@@ -441,7 +450,7 @@ export default {
});
return;
}
- if (!this.IsTel(this.pickupPerson)) {
+ if (!this.IsTel(this.pickupPerson.phone)) {
uni.showToast({
title: '请输入自提人手机号',
icon: 'none'
@@ -462,7 +471,6 @@ export default {
if (this.sendType == 2) {
goodsItem.extract_id = this.pickupAddress.id;
- goodsItem.contact_id = this.pickupPerson.id;
} else if (this.sendType == 1){
goodsItem.consignee_id = this.contacts.id
}
@@ -473,9 +481,8 @@ export default {
coupon: this.coupon ? this.coupon.id : "",
remark: this.remark,
is_post: this.info.is_post,
- reserve_name: this.reserve_name,
- reserve_phone: this.reserve_phone,
- reserve_idcard: this.reserve_idcard
+ reserve_name: this.pickupPerson.name,
+ reserve_phone: this.pickupPerson.phone,
};
this.Post(
{
@@ -484,6 +491,8 @@ export default {
},
'/api/order/place'
).then(res => {
+ uni.removeStorageSync('teChanOrder')
+ uni.removeStorageSync('teChanInfo')
if (res.code == 1) {
this.Post(
{
@@ -523,6 +532,15 @@ export default {
}
},
+ // 获取最大优惠券
+ async getMaxCouponData () {
+ let param = {money:this.allprice,sku_ids:this.info.id}
+ let res = await this.getMaxCoupon(param)
+ if (res.id) {
+ this.coupon = res
+ }
+ }
+
}
@@ -801,20 +819,20 @@ view {
}
}
.btn-list {
- width: 750rpx;
+ width: 100%;
height: 166rpx;
background: #ffffff;
box-shadow: 0rpx -3rpx 9rpx 1rpx rgba(227, 229, 232, 0.5);
display: flex;
position: fixed;
bottom: 0;
- padding: 20rpx 50rpx;
+ padding: 20rpx 20rpx;
align-items: center;
justify-content: space-between;
.btn {
width: 294rpx;
height: 88rpx;
- background: linear-gradient(90deg, #F84A56, #FF9834);
+ background: #F84A56;
border-radius: 43rpx;
text-align: center;
line-height: 88rpx;
@@ -829,14 +847,14 @@ view {
display: flex;
align-items: center;
.text {
- font-size: 28rpx;
+ font-size: 29rpx;
font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #393b3e;
+ font-weight: 500;
+ color: #333;
}
.price {
margin-left: 15rpx;
- font-size: 48rpx;
+ font-size: 36rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fc5109;
@@ -844,7 +862,7 @@ view {
content: '¥';
display: inline-block;
color: #fc5109;
- font-size: 24rpx;
+ font-size: 36rpx;
}
}
.post-text {
diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue
index dcb288e..8d01116 100644
--- a/subPackages/ticketBooking/detail.vue
+++ b/subPackages/ticketBooking/detail.vue
@@ -25,7 +25,7 @@
营业时间
- {{info.times_list_info.start}}-{{info.times_list_info.end}}
+ {{info.open_description}}
@@ -44,8 +44,8 @@
- 门票预定
-
+ 门票预定
+
{{ item.title }}
@@ -76,7 +76,7 @@
- 景点简介
+ 介绍
@@ -321,7 +321,12 @@
let orderSkuIndex = this.selectGoods.specifications.findIndex(v=>v.id == that.skuInfo.id)
let item = this.selectGoods.specifications.splice(orderSkuIndex, 1)[0]; // 将购买的数据放在第一位
item.buyNum = 1
- item.selPeople = [{}]
+ item.selPeople = [
+ {
+ id:null,id_number:null,name:null,
+ tel:null,user_id:null,age:null,
+ },
+ ]
this.selectGoods.specifications.unshift(item);
let param = {
diff --git a/subPackages/ticketBooking/order.vue b/subPackages/ticketBooking/order.vue
index f859be2..3c3b400 100644
--- a/subPackages/ticketBooking/order.vue
+++ b/subPackages/ticketBooking/order.vue
@@ -28,17 +28,30 @@
-
- {{skuItem.title}}
-
- 123
- 点击添加出行人信息
+
+
+
+
+ {{skuItem.title}}
+
+
+ 出行人1
+ {{person.name}}
+
+ 点击添加出行人信息
+
-
-
+
+
+ 合计:
+ {{ 10 }}
+
+
+ 立即购买
+
添加出行人
@@ -42,15 +47,17 @@
finished: false,
headImg:null,
- type_id: 10,//演出票务的景点分类id
+ type_id: 10,//景点分类id
}
},
onShow() {
this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/a87488f6225789aa19dbb437671d388d.png'
this.finished = false
- this.getList()
// this.getHeadImg('piaowu')
},
+ onReady() {
+ this.getList()
+ },
onLoad(options) {
let that = this
uni.getSystemInfo({
@@ -173,12 +180,12 @@
color: #F02A2A;
text-align: right;
}
- .price::before{
+ .price-money::before{
content: '¥';
color: #F02A2A;
font-size: 24rpx;
}
- .price::after{
+ .price-money::after{
content: '起';
color: #999;
font-size: 24rpx;