更新代码
This commit is contained in:
parent
58f330a0c9
commit
3a54244afb
@ -112,7 +112,7 @@
|
||||
.wechat-login {
|
||||
text-align: center;
|
||||
padding: 30px 0;
|
||||
padding-bottom: 60px;
|
||||
/* padding-bottom: 60px; */
|
||||
}
|
||||
|
||||
.wechat-login img {
|
||||
@ -394,6 +394,15 @@
|
||||
checkLoginTimer = null;
|
||||
}
|
||||
|
||||
// 恢复二维码和状态文本的样式
|
||||
$('#qrcode').css('opacity', '1');
|
||||
$('#status').css({
|
||||
'position': 'static',
|
||||
'top': 'auto',
|
||||
'font-size': '14px',
|
||||
'font-weight': 'normal'
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/index/wechat/reGenerateQrcode',
|
||||
type: 'POST',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1749181124;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1749172174;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;}*/ ?>
|
||||
<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1749258723;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1749281834;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@ -17,6 +17,23 @@
|
||||
|
||||
<body>
|
||||
<?php
|
||||
/**
|
||||
* 商业使用授权协议
|
||||
*
|
||||
* Copyright (c) 2025 [云泽网]. 保留所有权利.
|
||||
*
|
||||
* 本软件仅供评估使用。任何商业用途必须获得书面授权许可。
|
||||
* 未经授权商业使用本软件属于侵权行为,将承担法律责任。
|
||||
*
|
||||
* 授权购买请联系: 357099073@qq.com
|
||||
* 官方网站: https://www.yunzer.cn
|
||||
*
|
||||
* 评估用户须知:
|
||||
* 1. 禁止移除版权声明
|
||||
* 2. 禁止用于生产环境
|
||||
* 3. 禁止转售或分发
|
||||
*/
|
||||
|
||||
// 获取当前登录状态
|
||||
$isLoggedIn = false;
|
||||
$userInfo = [
|
||||
@ -1199,17 +1216,17 @@ $loginStatus = [
|
||||
function bindTabEvents(moduleId) {
|
||||
const tabItems = document.querySelectorAll(`#${moduleId} .tab-item`);
|
||||
tabItems.forEach(tab => {
|
||||
tab.addEventListener('click', function() {
|
||||
tab.addEventListener('click', function () {
|
||||
// 移除所有active类
|
||||
tabItems.forEach(item => item.classList.remove('active'));
|
||||
// 添加active类到当前点击的tab
|
||||
this.classList.add('active');
|
||||
|
||||
|
||||
// 获取选中的分类ID
|
||||
const selectedCategoryId = this.getAttribute('data-tab');
|
||||
|
||||
|
||||
// 根据不同模块加载对应数据
|
||||
switch(moduleId) {
|
||||
switch (moduleId) {
|
||||
case 'opencourse':
|
||||
loadCategoryArticles(selectedCategoryId, 'webArticlesList');
|
||||
break;
|
||||
@ -1296,7 +1313,7 @@ $loginStatus = [
|
||||
// 创建文章HTML
|
||||
function createArticleHtml(article) {
|
||||
if (!article) return '';
|
||||
|
||||
|
||||
// 格式化日期
|
||||
const publishDate = new Date(article.publishdate * 1000);
|
||||
const formattedDate = publishDate.toLocaleDateString('zh-CN', {
|
||||
@ -1304,7 +1321,7 @@ $loginStatus = [
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
|
||||
|
||||
return `
|
||||
<div class="opencourse product-item" onclick="window.open('/index/articles/detail?id=${article.id || ''}', '_blank')">
|
||||
<div class="video">
|
||||
@ -1340,7 +1357,7 @@ $loginStatus = [
|
||||
// 创建资源HTML
|
||||
function createResourceHtml(resource) {
|
||||
if (!resource) return '';
|
||||
|
||||
|
||||
// 格式化日期
|
||||
const uploadDate = new Date(resource.uploaddate * 1000);
|
||||
const formattedDate = uploadDate.toLocaleDateString('zh-CN', {
|
||||
@ -1348,7 +1365,7 @@ $loginStatus = [
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
|
||||
|
||||
// 格式化文件大小
|
||||
const formatFileSize = (bytes) => {
|
||||
if (bytes === 0) return '0 B';
|
||||
@ -1395,7 +1412,7 @@ $loginStatus = [
|
||||
// 创建程序HTML
|
||||
function createProgramHtml(program) {
|
||||
if (!program) return '';
|
||||
|
||||
|
||||
// 格式化日期
|
||||
const createDate = new Date(program.create_time * 1000);
|
||||
const formattedDate = createDate.toLocaleDateString('zh-CN', {
|
||||
@ -1403,11 +1420,11 @@ $loginStatus = [
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
|
||||
|
||||
return `
|
||||
<div class="opencourse product-item" onclick="window.open('/index/program/detail?id=${program.id || ''}', '_blank')">
|
||||
<div class="video">
|
||||
<img src="${program.icon || '/static/images/default-program.png'}" alt="" class="cover">
|
||||
<img src="${program.icon || ''}" alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">${program.title || '无标题'}</div>
|
||||
@ -1483,7 +1500,7 @@ $loginStatus = [
|
||||
// 创建游戏HTML
|
||||
function createGameHtml(game) {
|
||||
if (!game) return '';
|
||||
|
||||
|
||||
return `
|
||||
<div class="opencourse product-item" onclick="window.open('/index/game/detail?id=${game.id || ''}', '_blank')">
|
||||
<div class="video">
|
||||
@ -1523,89 +1540,8 @@ $loginStatus = [
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索功能相关代码
|
||||
layui.use(['layer'], function () {
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 搜索功能相关变量
|
||||
var searchMask = $('#searchMask');
|
||||
var searchInput = $('#searchInput');
|
||||
var searchBtn = $('#searchBtn');
|
||||
var searchIcons = $('#mainSearchIcon, #stickySearchIcon');
|
||||
|
||||
// 显示搜索框
|
||||
function showSearch() {
|
||||
searchMask.addClass('show');
|
||||
searchInput.focus();
|
||||
}
|
||||
|
||||
// 隐藏搜索框
|
||||
function hideSearch() {
|
||||
searchMask.removeClass('show');
|
||||
searchInput.val('').blur();
|
||||
}
|
||||
|
||||
// 执行搜索
|
||||
function doSearch() {
|
||||
var keyword = searchInput.val().trim();
|
||||
if (keyword) {
|
||||
window.location.href = '/search?keyword=' + encodeURIComponent(keyword);
|
||||
} else {
|
||||
layer.msg('请输入搜索关键词', { icon: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
// 事件绑定
|
||||
function bindEvents() {
|
||||
// 点击搜索图标显示搜索框
|
||||
searchIcons.on('click', showSearch);
|
||||
|
||||
// 点击蒙版背景隐藏搜索框
|
||||
searchMask.on('click', function (e) {
|
||||
if ($(e.target).hasClass('search-mask')) {
|
||||
hideSearch();
|
||||
}
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
searchBtn.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
doSearch();
|
||||
});
|
||||
|
||||
// 回车键触发搜索
|
||||
searchInput.on('keypress', function (e) {
|
||||
if (e.which === 13) {
|
||||
e.preventDefault();
|
||||
doSearch();
|
||||
}
|
||||
});
|
||||
|
||||
// ESC键关闭搜索框
|
||||
$(document).on('keydown', function (e) {
|
||||
if (e.keyCode === 27 && searchMask.hasClass('show')) {
|
||||
hideSearch();
|
||||
}
|
||||
});
|
||||
|
||||
// 输入框获得焦点时全选文本
|
||||
searchInput.on('focus', function () {
|
||||
this.select();
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化
|
||||
function init() {
|
||||
bindEvents();
|
||||
}
|
||||
|
||||
// 启动
|
||||
init();
|
||||
});
|
||||
|
||||
// 页面加载完成后执行
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
loadWebArticles();
|
||||
loadTechArticles();
|
||||
loadResources();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user