202404 入场需要查看免责声明

This commit is contained in:
2024-05-26 20:25:06 +08:00
parent 8b1c94b806
commit 298a18e933
7 changed files with 100 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
// pages/basketballGym/index.js
// import QRCode from './qrcode';
import drawQrcode from './weapp.qrcode.js';
import {getTimeoutStorage} from "../../utils/util";
const app = getApp();
import {
getCurrentPageUrl
@@ -291,21 +292,28 @@ Page({
// 我要进场
enter() {
app.$api.venueJoin({
venueId: id
}).then(res => {
this.setData({
flg: res.join.flg,
msg: res.join.msg,
payMoney: res.join.money
let isRead = getTimeoutStorage('isReaded');
console.log('isRead======' + isRead)
if (isRead == 'ojbk') {
app.$api.venueJoin({
venueId: id
}).then(res => {
this.setData({
flg: res.join.flg,
msg: res.join.msg,
payMoney: res.join.money
})
if (res.join.flg == 0) {
this.showBarcode('000')
}
}, err => {
console.log(err);
})
if (res.join.flg == 0) {
this.showBarcode('000')
}
}, err => {
console.log(err);
})
}else {
wx.navigateTo({
url: '/pages/disclaimers/index'
})
}
},
// 我要出场

View File

@@ -1,13 +1,14 @@
// pages/notice/index.js
const app = getApp();
let id = ''
import {setTimeOutStorage} from "../../utils/util";
Page({
/**
* 页面的初始数据
*/
data: {
announcement: {},
disclaimers: {},
isGoHome: false,
},
@@ -15,13 +16,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
id = options.id;
app.$api.announcementDetail({
id: id
app.$api.disclaimersDetail({
}).then(res => {
res.announcement.description = res.announcement.description.replace(/section/g, "div");
res.disclaimers.description = res.disclaimers.description.replace(/section/g, "div");
this.setData({
announcement: res.announcement
disclaimers: res.disclaimers
})
}, err => {
@@ -80,5 +79,13 @@ Page({
return {
title: '智慧云馆'
}
},
backToOpen () {
wx.navigateBack({
success (res){
setTimeOutStorage('isReaded','ojbk',1200000)
}
})
}
})

View File

@@ -1,11 +1,13 @@
<!--pages/notice/index.wxml-->
<header title="公告" isGoHome="{{isGoHome}}"></header>
<header title="免责声明" isGoHome="{{isGoHome}}"></header>
<view class='container'>
<view class='body'>
<view class='title'>{{announcement.title}}</view>
<view class='date'>{{announcement.time}}</view>
<!-- <view class='title'>免责声明</view>-->
<view class='rich-box'>
<rich-text nodes="{{announcement.description}}"></rich-text>
<rich-text nodes="{{disclaimers.description}}"></rich-text>
</view>
</view>
<view class='footer-box'>
<view class='footer-btn' bindtap='backToOpen'>同意</view>
</view>
</view>

View File

@@ -2,14 +2,13 @@
.container {
/* min-height: calc(1100 - 200rpx); */
background: #fff;
}
.body {
padding-bottom: 40rpx;
padding-left: 30rpx;
padding-right: 30rpx;
background: #fff;
color: aliceblue;
}
.title {
@@ -18,14 +17,6 @@
font-weight: bold;
}
.date {
height: 20rpx;
margin-top: 36rpx;
font-size: 20rpx;
color: #cfcfcf;
line-height: 20rpx;
}
.rich-box {
margin-top: 40rpx;
@@ -36,3 +27,12 @@
.rich-box .wscnph {
width: 100%;
}
.footer-btn {
flex: 1;
background: #ffda2e;
color: #1a191e;
font-size: 32rpx;
text-align: center;
line-height: 100rpx;
}

View File

@@ -1,5 +1,6 @@
// pages/myBookings/index.js
const app = getApp();
import {getTimeoutStorage} from "../../utils/util";
let ticketId = 0;
Page({
@@ -76,10 +77,18 @@ Page({
},
openDoor(){
wx.showToast({
title:'开门成功',
icon : "success"
})
let isRead = getTimeoutStorage('isReaded');
console.log('isRead======' + isRead)
if (isRead == 'ojbk') {
wx.showToast({
title:'足球场开门成功',
icon : "success"
})
}else {
wx.navigateTo({
url: '/pages/disclaimers/index'
})
}
},
// 获取数据