完善功能

This commit is contained in:
wangxiaowei
2025-12-10 21:30:49 +08:00
parent 5709317af2
commit 6cba10eb94
7 changed files with 621 additions and 384 deletions

View File

@ -7,11 +7,15 @@
</view>
</view>
<view :style="'background: url(https://xh.stnav.com/uploads/sport/ground2.png) no-repeat; background-size:100% auto;'">
<view v-if="thisindex == 0"><diy style="position: relative;" :diyItems="items"></diy></view>
<!-- <view v-if="thisindex == 0"><diy style="position: relative;" :diyItems="items"></diy></view> -->
<view class="banner">
<banner :itemData="bannerData"></banner>
</view>
<view class="notice">
<view class="notice" v-if="setting.notice">
<image style="width: 40rpx;height: 40rpx;" src="@/static/icon/notice.png" mode=""></image>
<view class="notice-txt">{{ notice.notice_title }}</view>
<view class="notice-txt">{{ setting.notice }}</view>
</view>
<!-- 预约球馆 -->
@ -65,12 +69,12 @@
<view class="">
<view class="d-f">
<image style="width: 24rpx;height: 24rpx;margin-top: 4rpx;" src="@/static/icon/address.png" mode=""></image>
<view class="address-time">{{ company.name }}</view>
<view class="address-time">{{ setting.company.address }}</view>
</view>
<view class="d-f" style="margin-top: 8rpx;">
<image style="width: 24rpx;height: 24rpx;margin-top: 2rpx" src="@/static/icon/time.png" mode=""></image>
<view class="address-time" style="height: 32rpx;">营业时间{{ company.start_time }}-{{ company.end_time }}</view>
<view class="address-time" style="height: 32rpx;">营业时间{{ setting.company.day_time }}</view>
</view>
</view>
<view class="d-f">
@ -126,6 +130,8 @@ import navBar from '@/components/navBar/navBar.vue';
import uniLoadMore from '@/components/uni-load-more.vue';
import searchProduct from '@/components/searchProduct.vue';
import { BallType } from '@/common/ball.js';
import banner from '@/components/diy/banner/banner.vue';
export default {
components: {
diy,
@ -133,7 +139,8 @@ export default {
navBar,
uniLoadMore,
searchProduct,
Popup
Popup,
banner
},
data() {
return {
@ -184,7 +191,15 @@ export default {
tipsPopup: false,
venueList: [], // 场馆列表
notice: '',
company: {}
company: {},
setting: {
carousel: {},
company: {}
},
bannerData: {
data: [],
style: {btnColor: "#ffffff", background: "#ffffff", btnShape: "round", imgShape: "round", height: "330"}
},
};
},
watch: {
@ -265,6 +280,23 @@ export default {
},
})
}
// 获取配置
self._post(
'ground.ground/groundSetting',
{
app_id: self.getAppId()
},
function(res) {
if (res.code) {
self.setting = res.data.lists;
res.data.lists.carousel.map(items => {
console.log("🚀 ~ items:", items)
self.bannerData.data.push({imgUrl: items.file_path, height: '400px'})
})
}
}
)
},
onPullDownRefresh() {
if (this.thisindex == 0) {
@ -587,19 +619,21 @@ export default {
// 处理导航
handleLocation() {
console.log(123)
console.log(this.setting.company)
uni.openLocation({
latitude: this.company.latitude,
longitude: this.company.longitude,
name: this.company.name,
address: this.company.address,
scale: 18
});
latitude: Number(this.setting.company.latitude),
longitude: Number(this.setting.company.longitude),
name: this.setting.company.address,
address: this.setting.company.address,
scale: 18,
})
},
// 处理拨打电话
handleCall() {
uni.makePhoneCall({
phoneNumber: this.company.phone
phoneNumber: this.setting.company.contact
});
},

View File

@ -527,8 +527,8 @@
// 导航
location() {
uni.openLocation({
latitude: this.venue.latitude, // 纬度,范围为-90~90负数表示南纬
longitude: this.venue.longitude, // 经度,范围为-180~180负数表示西经
latitude: Number(this.venue.latitude), // 纬度,范围为-90~90负数表示南纬
longitude: Number(this.venue.longitude), // 经度,范围为-180~180负数表示西经
scale: 18, // 缩放比例
name: this.venue.name,
address: this.venue.address
@ -792,188 +792,188 @@ page {
}
.time-popup {
position: relative;
position: relative;
.title {
font-size: 36rpx;
color: #121212;
line-height: 50rpx;
}
.pt42 {
padding-top: 42rpx;
}
.notice {
margin-top: 30rpx;
width: 100%;
height: 56rpx;
background: #FFFBE5;
padding: 10rpx 30rpx;
font-weight: 500;
font-size: 26rpx;
color: #E2950F;
line-height: 48rpx;
text-align: left;
}
.time-item {
margin-right: 32rpx;
font-weight: 400;
font-size: 32rpx;
color: #303133;
line-height: 44rpx;
height: 62rpx;
}
.time-item-line {
width: 60rpx;
height: 10px;
background-color: #365A9A;
border-radius: 6rpx;
}
.active {
color: #365A9A;
font-size: 32rpx;
line-height: 44rpx;
}
.active:after {
content: '';
display: block;
width: 60rpx;
height: 10rpx;
background-color: #365A9A;
border-radius: 6rpx;
margin: 8rpx auto 0 auto;
}
/* 日期网格:一行四个,间距 20rpx */
.date-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 20rpx 20rpx; /* 行间距和列间距均为 20rpx */
padding: 0 30rpx; /* 保持与上方时间切换区域一致的左右内边距 */
}
.date-item {
background-color: #F7F7F7;
border-radius: 10rpx;
height: 72rpx; /* 可按需调整高度 */
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #303133;
box-sizing: border-box;
}
/* 可选:选中样式 */
.date-item.active {
border-color: #365A9A;
color: #365A9A;
box-shadow: 0 4rpx 10rpx rgba(54,90,154,0.08);
}
.price {
margin-top: 100rpx;
.line {
height: 2rpx;
background: #E5E5E5;
width: 100%;
}
.price-block {
margin: 42rpx 22rpx;
}
.price-detail {
color: #365A9A;
font-size: 24rpx;
line-height: 34rpx;
}
.price-btn {
width: 368rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #365A9A;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFF;
}
}
}
.bill-info {
border-radius: 16rpx;
margin: 32rpx 30rpx 22rpx;
padding: 48rpx 30rpx 30rpx;
.title1 {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
}
.title2 {
margin-top: 12rpx;
font-weight: 400;
font-size: 24rpx;
color: #909399;
line-height: 34rpx;
}
.line {
border: 2rpx solid #F6F7F9;
margin: 34rpx 0 30rpx;
}
.title3 {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
}
}
.face {
width: 692rpx;
height: 80rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FAEED9;
color: #E2950F;
padding: 0 30rpx;
margin: 18rpx 30rpx 0;
box-sizing: border-box;
.face-title {
}
.title {
font-size: 36rpx;
color: #121212;
line-height: 50rpx;
}
/* 日期网格:一行三个,间距 20rpx */
.date-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 20rpx 20rpx; /* 行间距和列间距均为 20rpx */
}
.pt42 {
padding-top: 42rpx;
}
.date-time-btn {
width: 100%;
height: 60rpx;
line-height: 60rpx;
background: #365A9A;
color: #fff;
font-size: 26rpx;
border-radius: 10rpx;
text-align: center;
}
.notice {
margin-top: 30rpx;
width: 100%;
height: 56rpx;
background: #FFFBE5;
padding: 10rpx 30rpx;
font-weight: 500;
font-size: 26rpx;
color: #E2950F;
line-height: 48rpx;
text-align: left;
}
.notice-popup {
.time-item {
margin-right: 32rpx;
font-weight: 400;
font-size: 32rpx;
color: #303133;
line-height: 44rpx;
height: 62rpx;
}
.time-item-line {
width: 60rpx;
height: 10px;
background-color: #365A9A;
border-radius: 6rpx;
}
.active {
color: #365A9A;
font-size: 32rpx;
line-height: 44rpx;
}
.active:after {
content: '';
display: block;
width: 60rpx;
height: 10rpx;
background-color: #365A9A;
border-radius: 6rpx;
margin: 8rpx auto 0 auto;
}
/* 日期网格:一行四个,间距 20rpx */
.date-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 20rpx 20rpx; /* 行间距和列间距均为 20rpx */
padding: 0 30rpx; /* 保持与上方时间切换区域一致的左右内边距 */
}
.date-item {
background-color: #F7F7F7;
border-radius: 10rpx;
height: 72rpx; /* 可按需调整高度 */
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #303133;
box-sizing: border-box;
}
/* 可选:选中样式 */
.date-item.active {
border-color: #365A9A;
color: #365A9A;
box-shadow: 0 4rpx 10rpx rgba(54,90,154,0.08);
}
.price {
margin-top: 100rpx;
.line {
height: 2rpx;
background: #E5E5E5;
width: 100%;
}
.price-block {
margin: 42rpx 22rpx;
}
.price-detail {
color: #365A9A;
font-size: 24rpx;
line-height: 34rpx;
}
.price-btn {
width: 368rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #365A9A;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFF;
}
}
}
.bill-info {
border-radius: 16rpx;
margin: 32rpx 30rpx 22rpx;
padding: 48rpx 30rpx 30rpx;
.title1 {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
}
.title2 {
margin-top: 12rpx;
font-weight: 400;
font-size: 24rpx;
color: #909399;
line-height: 34rpx;
}
.line {
border: 2rpx solid #F6F7F9;
margin: 34rpx 0 30rpx;
}
.title3 {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
}
}
.face {
width: 692rpx;
height: 80rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FAEED9;
color: #E2950F;
padding: 0 30rpx;
margin: 18rpx 30rpx 0;
box-sizing: border-box;
.face-title {
}
}
/* 日期网格:一行三个,间距 20rpx */
.date-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 20rpx 20rpx; /* 行间距和列间距均为 20rpx */
}
.date-time-btn {
width: 100%;
height: 60rpx;
line-height: 60rpx;
background: #365A9A;
color: #fff;
font-size: 26rpx;
border-radius: 10rpx;
text-align: center;
}
.notice-popup {
padding: 20rpx 0;
width: 100%;
@ -1007,32 +1007,32 @@ page {
margin-bottom: 10rpx;
}
.btn {
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 44rpx;
.btn {
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 44rpx;
.btn1 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #F6F7F8;
border-radius: 8rpx;
margin-right: 30rpx;
}
.btn1 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #F6F7F8;
border-radius: 8rpx;
margin-right: 30rpx;
}
.btn2 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #365A9A;
color: #FFFFFF;
border-radius: 8rpx;
}
.btn2 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #365A9A;
color: #FFFFFF;
border-radius: 8rpx;
}
}
}
</style>