202404 足球入场逻辑

This commit is contained in:
2024-05-19 20:02:16 +08:00
parent f5ff123c18
commit d30c0381ac
12 changed files with 383 additions and 48 deletions

View File

@@ -1,32 +1,37 @@
// pages/disclaimers/index.js
// pages/notice/index.js
const app = getApp();
let id = ''
Page({
/**
* 页面的初始数据
*/
data: {
us: {
},
announcement: {},
isGoHome: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
app.$api.aboutUs({}).then(res => {
onLoad: function(options) {
id = options.id;
app.$api.announcementDetail({
id: id
}).then(res => {
res.announcement.description = res.announcement.description.replace(/section/g, "div");
this.setData({
us: res.uss
announcement: res.announcement
})
}, err => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
let pages = getCurrentPages();
this.setData({
isGoHome: pages.length == 1
@@ -36,44 +41,44 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
return {
title: '智慧云馆'
}
}
})
})

View File

@@ -1,5 +1,6 @@
{
"navigationBarTitleText": "公告",
"usingComponents": {
"header": "/component/header/header"
}
}
}

View File

@@ -1,6 +1,11 @@
<!--pages/disclaimers/index.wxml-->
<header isGoHome="{{isGoHome}}"></header>
<view class='container' wx:if="{{us.description}}">
<image class='logo' src='{{us.image}}' mode='aspectFit'></image>
<rich-text class='info' nodes="{{us.description}}"></rich-text>
</view>
<!--pages/notice/index.wxml-->
<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='rich-box'>
<rich-text nodes="{{announcement.description}}"></rich-text>
</view>
</view>
</view>

View File

@@ -1,23 +1,38 @@
/* pages/disclaimers/index.wxss */
/* pages/notice/index.wxss */
.container {
display: flex;
align-items: center;
flex-direction: column;
padding: 180rpx 50rpx 50rpx;
min-height: calc(100vh - 240rpx);
}
.logo {
width: 400rpx;
height: 100rpx;
/* min-height: calc(1100 - 200rpx); */
background: #fff;
}
.info {
margin-top: 60rpx;
font-size: 24rpx;
color: #FFF;
line-height: 36rpx;
.body {
padding-bottom: 40rpx;
padding-left: 30rpx;
padding-right: 30rpx;
background: #fff;
}
.wscnph {
.title {
padding-top: 40rpx;
font-size: 32rpx;
font-weight: bold;
}
.date {
height: 20rpx;
margin-top: 36rpx;
font-size: 20rpx;
color: #cfcfcf;
line-height: 20rpx;
}
.rich-box {
margin-top: 40rpx;
font-size: 26rpx;
line-height: 40rpx;
}
.rich-box .wscnph {
width: 100%;
}
}