完善功能
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<view :data-theme="theme()" :class="theme() || ''" style="padding-bottom: 44rpx;">
|
||||
<view class="top_head pr" :style="'background-image: url(../../static/bg.png); background-size:100% auto;background-color:#F6F7F9;'">
|
||||
<view class="top_head pr" :style="'background-image: url(https://xh.stnav.com/uploads/sport/ground2.png); background-size:100% auto;background-color:#F6F7F9;'">
|
||||
<view class="head_top" :style="'height:' + topBarTop() + 'px;'"></view>
|
||||
<view class="title" :style="topBarHeight() == 0 ? '' : 'height:' + topBarHeight() + 'px;'">
|
||||
秀湖网球中心
|
||||
</view>
|
||||
</view>
|
||||
<view :style="'background: url(../../static/bg.png) no-repeat; background-size:100% auto;'">
|
||||
<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 class="notice">
|
||||
<image style="width: 40rpx;height: 40rpx;" src="@/static/icon/notice.png" mode=""></image>
|
||||
<view class="notice-txt">目前仅开放1-2号场地预约,3-6号场地预约敬请期待</view>
|
||||
<view class="notice-txt">{{ notice.notice_title }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 预约球馆 -->
|
||||
@ -20,40 +20,21 @@
|
||||
<image style="width: 126rpx;height: 36rpx;" src="@/static/yycg.png" mode=""></image>
|
||||
<view class="title-txt">更多场馆信息立即预约</view>
|
||||
</view>
|
||||
<view class="ball">
|
||||
<view class="ball" v-for="(item, index) in venueList" :key="index">
|
||||
<view class="ball-info">
|
||||
<image style="width: 690rpx;height: 320rpx;" src="@/static/wqzx.png" mode="aspectFit"></image>
|
||||
<view class="ball-title">
|
||||
<image style="width: 690rpx;height: 320rpx;" :src="item.image" mode="aspectFit"></image>
|
||||
<!-- <view class="ball-title">
|
||||
<image style="width: 108rpx;height: 160rpx;" src="@/static/wq.png" mode="aspectFill"></image>
|
||||
<view style="background-image: url(../../static/wqbg.png);">
|
||||
<image style="width: 160rpx;height: 44rpx;" src="@/static/wqyd_txt.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="ball-time">
|
||||
<view class="ball-center-title">秀湖网球中心</view>
|
||||
<view class="ball-center-title">{{ item.name }}</view>
|
||||
<view class="d-b-c">
|
||||
<view class="reserve-time">营业时间:06:00-22:00</view>
|
||||
<view class="reserve-btn" @tap="handleToReserve(BallType.Tennis)">立即预约</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ball">
|
||||
<view class="ball-info">
|
||||
<image style="width: 690rpx;height: 320rpx;" src="@/static/lqzx.png" mode="aspectFit"></image>
|
||||
<view class="ball-title" style="bottom: 24rpx; left: 28rpx;">
|
||||
<image style="width: 64rpx;height: 64rpx;" src="@/static/lq.png" mode="aspectFill"></image>
|
||||
<view style="background-image: url(../../static/wqbg.png); bottom: 0; left: 20rpx;" >
|
||||
<image style="width: 160rpx;height: 44rpx;" src="@/static/lqyd_txt.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ball-time">
|
||||
<view class="ball-center-title">秀湖蓝球中心</view>
|
||||
<view class="d-b-c ">
|
||||
<view class="reserve-time">营业时间:06:00-22:00</view>
|
||||
<view class="reserve-btn" @tap="handleToReserve(BallType.Basketball)">立即预约</view>
|
||||
<view class="reserve-time">营业时间:{{ item.start_time }}-{{ item.end_time }}</view>
|
||||
<view class="reserve-btn" @tap="handleToReserve(item.id, item.type_id)">立即预约</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -67,7 +48,7 @@
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<image style="width: 690rpx;height: 292rpx; margin-top: 20rpx;" src="@/static/jcss.png" mode=""></image>
|
||||
<image style="width: 690rpx;height: 292rpx; margin-top: 20rpx;" src="https://xh.stnav.com/uploads/sport/ground3.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -79,17 +60,17 @@
|
||||
</view>
|
||||
<view class="d-b-c" style="margin-top: 34rpx;">
|
||||
<view>
|
||||
<image style="width: 116rpx;height: 134rpx;" src="@/static/kf.png" mode=""></image>
|
||||
<image style="width: 116rpx;height: 134rpx;" src="https://xh.stnav.com/uploads/sport/ground4.png" mode=""></image>
|
||||
</view>
|
||||
<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">嘉兴市秀洲区秀园路秀湖公园(西南角)</view>
|
||||
<view class="address-time">{{ company.name }}</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;">营业时间:08:00-20:00</view>
|
||||
<view class="address-time" style="height: 32rpx;">营业时间:{{ company.start_time }}-{{ company.end_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-f">
|
||||
@ -200,7 +181,10 @@ export default {
|
||||
open: 0
|
||||
},
|
||||
noticePopup: false,
|
||||
tipsPopup: false
|
||||
tipsPopup: false,
|
||||
venueList: [], // 场馆列表
|
||||
notice: '',
|
||||
company: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -263,6 +247,24 @@ export default {
|
||||
this.getData();
|
||||
this.getList();
|
||||
this.getTabbar();
|
||||
|
||||
// 获取经纬度
|
||||
if (!uni.getStorageSync('longitude') || !uni.getStorageSync('latitude')) {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success(res) {
|
||||
uni.setStorageSync('longitude', res.longitude);
|
||||
uni.setStorageSync('latitude', res.latitude);
|
||||
},
|
||||
fail() {
|
||||
uni.showToast({
|
||||
title: '获取定位失败,请点击右下角按钮打开定位权限',
|
||||
duration: 2000,
|
||||
icon:"none"
|
||||
});
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if (this.thisindex == 0) {
|
||||
@ -301,6 +303,47 @@ export default {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
||||
// 获取场馆列表
|
||||
self._post(
|
||||
'ground.ground/groundLists',
|
||||
{
|
||||
app_id: self.getAppId()
|
||||
},
|
||||
function(res) {
|
||||
if (res.code) {
|
||||
self.venueList = res.data.lists
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// 获取公告
|
||||
self._post(
|
||||
'home.notice/noticeLists',
|
||||
{
|
||||
app_id: self.getAppId()
|
||||
},
|
||||
function(res) {
|
||||
if (res.code) {
|
||||
self.notice = res.data.lists[0]
|
||||
console.log("🚀 ~ self.notice :", self.notice )
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// 公司信息
|
||||
self._post(
|
||||
'home.index/company',
|
||||
{
|
||||
app_id: self.getAppId()
|
||||
},
|
||||
function(res) {
|
||||
if (res.code) {
|
||||
self.company = res.data.lists
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
self._get(
|
||||
'index/index',
|
||||
{
|
||||
@ -544,10 +587,10 @@ export default {
|
||||
// 处理导航
|
||||
handleLocation() {
|
||||
uni.openLocation({
|
||||
latitude: 30.74621,
|
||||
longitude: 120.76055,
|
||||
name: '秀湖网球中心',
|
||||
address: '嘉兴市秀洲区秀园路秀湖公园(西南角)',
|
||||
latitude: this.company.latitude,
|
||||
longitude: this.company.longitude,
|
||||
name: this.company.name,
|
||||
address: this.company.address,
|
||||
scale: 18
|
||||
});
|
||||
},
|
||||
@ -555,14 +598,14 @@ export default {
|
||||
// 处理拨打电话
|
||||
handleCall() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: '0573-82069999'
|
||||
phoneNumber: this.company.phone
|
||||
});
|
||||
},
|
||||
|
||||
// 场馆预约
|
||||
handleToReserve(type) {
|
||||
handleToReserve(id, typeId) {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/reserve/details?type=' + type
|
||||
url: `/bundle/reserve/details?id=${id}&typeId=${typeId}`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user