Browse Source

提交

master
jiazhipeng 1 year ago
parent
commit
b6336ef76d
  1. 13
      subPackages/hotelHomestay/order.vue
  2. 124
      subPackages/ticketBooking/detail.vue
  3. 2
      subPackages/travelGuide/detail.vue
  4. 25
      subPackages/travelGuide/travelGuide.vue

13
subPackages/hotelHomestay/order.vue

@ -183,10 +183,17 @@
},1000) },1000)
} }
this.skuInfo = data.skuInfo this.skuInfo = data.skuInfo
this.selectDate = data.selectDate this.selectDate = data.selectDate
this.buyNum = 1 this.buyNum = 1
this.roomUser = [{name: ''}] this.roomUser = [{name: ''}]
try {
this.phone = JSON.parse(uni.getStorageSync('userInfo')).mobile
} catch(e) {
this.phone = ''
}
}, },
// //
@ -213,9 +220,9 @@
order () { order () {
this.roomUser.forEach(v=>v.name = v.name.trim()) this.roomUser.forEach(v=>v.name = v.name.trim())
// //
if (!this.isTel(this.phone)){ if (!this.IsTel(this.phone)){
uni.showToast({ uni.showToast({
title: '请输入自提人手机号', title: '手机号格式校验失败',
icon: 'none' icon: 'none'
}); });
return; return;
@ -241,7 +248,7 @@
specifications_id: this.skuInfo.id, specifications_id: this.skuInfo.id,
start_date: this.selectDate.startDay, start_date: this.selectDate.startDay,
end_date: this.selectDate.endDay, end_date: this.selectDate.endDay,
customer_name: this.roomUser.map(v=>v.name).join(''), customer_name: this.roomUser.map(v=>v.name).join(','),
// reserve_mobile: this.phone, // reserve_mobile: this.phone,
} }
goods.push(goodsItem) goods.push(goodsItem)

124
subPackages/ticketBooking/detail.vue

@ -38,33 +38,34 @@
{{info.address}} {{info.address}}
</view> </view>
</view> </view>
<view> <view @click="goMap">
<img style="width: 30rpx;height: 30rpx;" :src="showImg('/uploads/20240827/5b19517f2a630f3a766ea03ac621a3be.png')"> <img style="width: 30rpx;height: 30rpx;" :src="showImg('/uploads/20240827/5b19517f2a630f3a766ea03ac621a3be.png')">
</view> </view>
</view> </view>
</view> </view>
<view class="box-title" v-if="sku.length>0">门票预定</view> <view class="box-title" v-if="sku.length>0">门票预定</view>
<view class="common-container" v-if="sku.length>0"> <view class="w-full" v-if="sku.length>0">
<view class="scenic-list" v-for="(item, index) in sku" :key="index"> <view class="scenic-list" v-for="(item, index) in sku" :key="index">
<view class="list-title text-overflow">{{ item.title }}</view> <view class="scenic-item " v-for="(itemSku, indexSku) in item.specifications" :key="indexSku">
<view class="scenic-item com-flex-tao" v-for="(itemSku, indexSku) in item.specifications" :key="indexSku"> <view class="w-1rpx flex-1 item-left">
<view class="w-1rpx flex-1">
<view class="title text-overflow">{{ itemSku.title }}</view> <view class="title text-overflow">{{ itemSku.title }}</view>
<view class="tags-box"> <view>
<view class="tags text-overflow" v-if="itemSku.specifications_new_tag"> <view class="tags-box">
<view v-for="(tagSku,tagSkuIndex) in itemSku.specifications_new_tag.split(',').slice(0, 2)" <view class="tags text-overflow" v-if="itemSku.specifications_new_tag">
:key="tagSkuIndex">{{ tagSku }}</view> <view v-for="(tagSku,tagSkuIndex) in itemSku.specifications_new_tag.split(',').slice(0, 2)"
:key="tagSkuIndex">{{ tagSku }}</view>
</view>
</view> </view>
</view>
<view class="bottom com-flex-tao ">
<view class="notice" @click="showSkuInfo(item, itemSku)"> <view class="notice" @click="showSkuInfo(item, itemSku)">
预订须知 > 预订须知 >
</view> </view>
<view></view>
</view> </view>
</view> </view>
<view class="item-right com-flex-tao flex-shrink-0"> <view class="item-right flex-shrink-0">
<view class="price"> <view class="price">
{{showNoPriceNew(itemSku.price)}} {{showNoPriceNew(itemSku.price)}}
</view> </view>
@ -84,16 +85,16 @@
<!-- 预订须知的弹窗 --> <!-- 预订须知的弹窗 -->
<uni-popup ref="popupRule" type="bottom" :safe-area="false"> <uni-popup ref="popupRule" type="bottom" :safe-area="false">
<view class="popup-content-date" > <view class="popup-content-date flex-column flex" >
<view class="popup-content-title flex"> <view class="popup-content-title flex flex-shrink-0">
<view class="flex-1 w-1rpx text-overflow"> <view class="flex-1 w-1rpx text-overflow">
{{skuInfo.title}} {{skuInfo.title}}
</view> </view>
<img src="https://static.ticket.sz-trip.com/taizhou/images/cha.png" @click="closePopupRule" <img src="https://static.ticket.sz-trip.com/taizhou/images/cha.png" @click="closePopupRule"
style="width: 31rpx;height: 31rpx;" class="flex-shrink-0"> style="width: 31rpx;height: 31rpx;" class="flex-shrink-0">
</view> </view>
<view class="content"> <view class="content flex-1 h-1rpx no-scrollbar">
<view class="detail-content" v-html="skuInfo.info"></view> <view class="detail-content" v-html="formateRichText(skuInfo.reserve_content)"></view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -227,6 +228,17 @@
}); });
}, },
goMap () {
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lon),
name: this.info.title,
address: this.info.address,
success: function () {
console.log('success');
}
});
},
showSkuInfo (itemSku,goods) { showSkuInfo (itemSku,goods) {
this.skuInfo = itemSku this.skuInfo = itemSku
@ -509,11 +521,11 @@
} }
.box-title { .box-title {
margin: 52rpx 0 26rpx 12rpx; margin: 60rpx 12rpx 28rpx;
font-family: PingFang;
font-weight: bold;
font-size: 37rpx; font-size: 37rpx;
color: #000000; color: #000000;
font-family: PingFang SC;
font-weight: bold;
} }
.address-icon{ .address-icon{
@ -523,31 +535,40 @@
} }
.scenic-list{ .scenic-list{
.list-title {
padding-bottom: 20rpx;
}
.scenic-item { .scenic-item {
/* border-top: 1px solid #d9d9d9; */ width: 100%;
padding: 20rpx; height: 187rpx;
text-align: left; background: #FFFFFF;
background: rgba(11, 137, 142, .06); border-radius: 13rpx;
border-radius: 20rpx; margin-bottom: 20rpx;
margin-bottom: 20rpx; padding: 26rpx;
display: flex; display: flex;
font-family: PingFang SC;
font-weight: 500;
font-size: 23rpx;
color: #666666;
.item-left{
display: flex;
flex-direction: column;
justify-content: space-between;
padding-left: 20rpx;
}
.title { .title {
font-weight: bold;
color: #333333;
width: 100%; width: 100%;
font-family: PingFang SC;
font-weight: bold;
font-size: 31rpx;
color: #000000;
} }
.tags-box { .tags-box {
overflow: hidden; overflow: hidden;
padding-bottom: 6rpx;
.tags { .tags {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex: 1; flex: 1;
font-weight: 400;
color: #666666;
} }
.tags view::after { .tags view::after {
content: '丨' content: '丨'
@ -557,36 +578,39 @@
} }
} }
.item-right { .item-right {
width: 100rpx; width: 133rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: flex-end;
} }
.price { .price {
font-size: 30rpx; font-family: PingFangSC;
font-weight: 400;
color: #8d8d8d;
font-weight: 500; font-weight: 500;
color: #d62828; font-size: 36rpx;
color: #EE3E3B;
} }
.price::before { .price::before {
display: inline-block; display: inline-block;
content: "¥"; content: "¥";
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 500;
color: #d62828; color: #EE3E3B;
} }
.btn { .btn {
width: 100rpx; margin-top: 20rpx;
height: 60rpx; width: 133rpx;
background: #0B898E; height: 53rpx;
border-radius: 20rpx; background: linear-gradient(270deg, #FD6F34, #F4A61F);
border-radius: 27rpx;
text-align: center; text-align: center;
line-height: 58rpx; line-height: 53rpx;
font-weight: 500; font-weight: 500;
color: #FFFFFF; font-family: PingFang SC;
font-weight: bold;
font-size: 31rpx;
color: #FFFFFF;
} }
} }
} }
@ -601,11 +625,15 @@
.popup-content-date { .popup-content-date {
background-color: white; background-color: white;
padding: 0rpx 39rpx 51rpx 39rpx; padding: 0rpx 39rpx 51rpx 39rpx;
height: auto; height: 70vh;
border-radius: 20rpx 20rpx 0 0 ; border-radius: 20rpx 20rpx 0 0 ;
.popup-content-title{ .popup-content-title{
padding: 20rpx 0; padding: 20rpx 0;
} }
//
.content{
overflow-y: auto;
}
.dateMore{ .dateMore{
width: 120rpx; width: 120rpx;

2
subPackages/travelGuide/detail.vue

@ -35,7 +35,7 @@
<!-- <view class="text-overflow" v-if="info.start_time && info.end_time">时间{{info.start_time}} - {{info.end_time}}</view> --> <!-- <view class="text-overflow" v-if="info.start_time && info.end_time">时间{{info.start_time}} - {{info.end_time}}</view> -->
</view> </view>
<view class="common-container detail-container"> <view class="common-container detail-container">
<view class="" id="cpts" v-html="formateRichText(info.detail)"></view> <view class="" id="cpts" v-html="formateRichText(info.content)"></view>
</view> </view>

25
subPackages/travelGuide/travelGuide.vue

@ -8,8 +8,8 @@
</view> </view>
<view class="tag-container no-scrollbar"> <view class="tag-container no-scrollbar">
<view :class="['tag', type_id==0?'active':'']" @click="setTag(0)">全部</view> <view :class="['tag', type_id==42?'active':'']" @click="setTag({id: 42})">全部</view>
<view :class="['tag', type_id==1?'active':'']" v-for="(item,i) in 10" :key="i" @click="setTag(i)">景点</view> <view :class="['tag', type_id==item.id?'active':'']" v-for="(item,i) in types" :key="item.id" @click="setTag(item)">{{item.name}}</view>
</view> </view>
<view class="strategy-box box"> <view class="strategy-box box">
@ -50,16 +50,19 @@
}, },
list: [], list: [],
types: [],
showMore: true, showMore: true,
headImg:"https://tongli.sz-trip.com/uploads/20240902/55c5cbe137790323cc719b5c83d5e2e9.png", headImg:"https://tongli.sz-trip.com/uploads/20240902/55c5cbe137790323cc719b5c83d5e2e9.png",
type_id: 0,//id type_id: 42,//id
} }
}, },
onShow() { onShow() {
this.showMore = true this.showMore = true
}, },
onReady() { onReady() {
this.type_id = 42
this.getArticleType()
this.getArticleByType() this.getArticleByType()
}, },
onLoad(options) { onLoad(options) {
@ -79,19 +82,27 @@
methods: { methods: {
setTag (item) { setTag (item) {
this.type_id = item this.type_id = item.id
// this.getArticleByType() this.list = []
this.getArticleByType()
},
//
getArticleType () {
this.Post({
type_id: this.type_id,
},'/api/article/getType').then(res => {
this.types = res.data || []
})
}, },
// //
getArticleByType() { getArticleByType() {
this.Post({ this.Post({
type_id: 41, type_id: this.type_id,
offset: this.list.length, offset: this.list.length,
limit: 10 limit: 10
},'/api/Article/getArticleByType').then(res => { },'/api/Article/getArticleByType').then(res => {
this.list = [...this.list, ...res.data] this.list = [...this.list, ...res.data]
if(res.data.length < 10) this.showMore = false if(res.data.length < 10) this.showMore = false
}) })
}, },

Loading…
Cancel
Save