chore: 代码保存

This commit is contained in:
2025-12-17 16:48:13 +08:00
parent 21b338ff17
commit 7e0ca0a8e7
7 changed files with 302 additions and 220 deletions

12
docs/Login.md Normal file
View File

@@ -0,0 +1,12 @@
# 用户登录
## 普通用户登录
http://localhost:9108/index.php?m=user&c=Users&a=login
## 管理员登录
http://localhost:9108/index.php?m=admin&c=Admin&a=login

24
docs/Project.md Normal file
View File

@@ -0,0 +1,24 @@
# 原生应用/项目查询
## 前端查询用户
### API 接口
src\application\api\controller\Ajax.php line:1130
### 页面
src\template\pc\lists_guestbook_project.htm
## 后端管理用户
### 页面
- src\application\admin\template\project\users_index.htm
- src\application\admin\template\project\level_index.htm

0
docs/README.md Normal file
View File

View File

@@ -11,7 +11,7 @@
<div class="member-nav-group">
{eq name="'Project@users_index'|is_check_access" value="1"}
<label class="member-nav-item">
<input type="button" class="btn {if condition="!in_array($Request.action, ['users_index','users_add','users_edit'])"}current{else/}selected{/if}" value="项目管理" onclick="window.location.href='{:url("Project/users_index")}';">
<input type="button" class="btn {if condition="!in_array($Request.action, ['users_index','users_add','users_edit'])"}current{else/}selected{/if}" value="应用管理" onclick="window.location.href='{:url("Project/users_index")}';">
</label>
{/eq}
{eq name="'Project@level_index'|is_check_access" value="1"}

View File

@@ -11,7 +11,7 @@
<div class="member-nav-group">
{eq name="'Project@users_index'|is_check_access" value="1"}
<label class="member-nav-item">
<input type="button" class="btn {if condition="!in_array($Request.action, ['users_index','users_add','users_edit'])"}current{else/}selected{/if}" value="项目管理" onclick="window.location.href='{:url("Project/users_index")}';">
<input type="button" class="btn {if condition="!in_array($Request.action, ['users_index','users_add','users_edit'])"}current{else/}selected{/if}" value="应用登记管理" onclick="window.location.href='{:url("Project/users_index")}';">
</label>
{/eq}
{eq name="'Project@level_index'|is_check_access" value="1"}
@@ -36,9 +36,9 @@
</div>
<div class="ftitle">
<div class="fbutton">
<a href="javascript:void(0);" data-href="{:url('Project/add')}" onclick="openFullframe(this, '新增项目', '100%', '100%');">
<a href="javascript:void(0);" data-href="{:url('Project/add')}" onclick="openFullframe(this, '新增应用记录', '100%', '100%');">
<div class="add">
<span><i class="layui-icon layui-icon-addition"></i>新增项目</span>
<span><i class="layui-icon layui-icon-addition"></i>新增应用记录</span>
</div>
</a>
</div>

View File

@@ -13,10 +13,9 @@
header("Content-type:text/html;charset=utf-8");
// [ 应用入口文件 ]
if (extension_loaded('zlib')){
try{
ob_end_clean();
} catch(Exception $e) {
// 清除所有现有的输出缓冲区
while (ob_get_level() > 0) {
@ob_end_clean();
}
ob_start('ob_gzhandler');
}

View File

@@ -19,93 +19,199 @@
{eyou:static file="users/skin/js/global.js" /}
</head>
<style>
.header_title{
margin-bottom: 50px;
font-size: 24px;
font-weight: 600;
color: #bd2a15;
}
.sys_header{
margin-top: 60px;
text-align: center;
}
.header_search{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-bottom: 30px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.header_search span{
display: block;
margin-right: 20px;
width: 100px;
height: 50px;
line-height: 50px;
text-align: right;
font-size: 17px;
color: #bd2a15;
font-weight: 600;
}
.header_search input{
width: 400px;
height: 50px;
padding-left: 15px;
font-size: 17px;
font-weight: 600;
color: #bd2a15;
}
.searchContainer{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-top: 40px;
margin-left: 120px;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.searchContainer .searchBtn{
width: 400px;
height: 50px;
line-height: 50px;
font-size: 17px;
background: #bd2a15;
color: #fff;
cursor: pointer;
/* 美化后的样式 */
.container-wrapper {
max-width: 600px;
margin: 60px auto 0;
}
.sys_content{
width: 100%;
margin-top: 50px;
margin-left: 20px;
.search-container {
padding: 40px;
background: #fff;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
text-align: center;
margin-bottom: 30px;
}
.sys_content .advertInfo{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin: 0 auto;
width: 710px;
}
.adTitle {
margin-bottom: 12px;
margin-right: 10px;
width: 150px;
text-align: right;
font-size: 17px;
.header_title {
margin-bottom: 30px;
font-size: 28px;
font-weight: 600;
color: #333;
position: relative;
padding-bottom: 15px;
}
.content{
.header_title:after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background: #bd2a15;
border-radius: 3px;
}
.form-group {
margin-bottom: 25px;
text-align: left;
}
.form-label {
display: block;
margin-bottom: 8px;
font-size: 16px;
font-weight: 500;
color: #555;
}
.form-control {
width: 100%;
padding: 14px 15px;
font-size: 16px;
color: #333;
border: 1px solid #ddd;
border-radius: 6px;
transition: all 0.3s;
box-sizing: border-box;
}
.content-inner{
background:url(../template/pc/skin/images/map.png) no-repeat center 20px;
.form-control:focus {
border-color: #bd2a15;
box-shadow: 0 0 0 3px rgba(189, 42, 21, 0.1);
outline: none;
}
.search-btn {
width: 100%;
padding: 14px;
font-size: 18px;
font-weight: 600;
color: #fff;
background: #bd2a15;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s;
margin-top: 10px;
}
.search-btn:hover {
background: #a52513;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(189, 42, 21, 0.3);
}
.result-container {
padding: 30px;
background: #fff;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
display: none;
margin-bottom: 30px;
}
.result-title {
font-size: 22px;
font-weight: 600;
color: #333;
margin-bottom: 25px;
text-align: center;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.result-item {
display: flex;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #f5f5f5;
}
.result-item:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.result-label {
width: 120px;
font-weight: 600;
color: #555;
}
.result-value {
flex: 1;
color: #333;
}
.qrcode-container {
max-width: 800px;
margin: 0 auto 40px;
padding: 30px;
background: #fff;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
text-align: center;
display: none;
}
.qrcode-img {
max-width: 100%;
height: auto;
margin-bottom: 20px;
border: 1px solid #eee;
border-radius: 8px;
}
.close-btn {
display: inline-block;
padding: 10px 25px;
font-size: 16px;
font-weight: 600;
color: #bd2a15;
background: #fff;
border: 2px solid #bd2a15;
border-radius: 30px;
cursor: pointer;
transition: all 0.3s;
}
.close-btn:hover {
background: #bd2a15;
color: #fff;
}
.content-wrap {
background: none;
padding: 20px 0;
}
.content-inner {
background: none;
min-height: 600px;
}
@media (max-width: 768px) {
.container-wrapper {
margin: 30px 15px;
}
.search-container, .result-container, .qrcode-container {
padding: 25px 20px;
}
.form-control {
padding: 12px 12px;
}
.search-btn {
padding: 12px;
font-size: 16px;
}
}
</style>
<body>
@@ -116,167 +222,108 @@
{eyou:include file="layui.htm" /}
<!---layui--->
<div class="content-wrap">
<div class="content-inner" style="height: 970px;">
<div class="content-inner">
<div class="content">
<form class="layui-form sys_header" action="" name='theForm' id="theForm" method="post" style="margin-left: -120px;padding-top: 80px;" >
<div class="header_title" style="margin-left: 100px">项目查询</div>
<div class="header_search"><span >关键词:</span>
<input name="username" placeholder=""></div>
<div class="header_search"><span >密码:</span>
<input name="password" type="password" placeholder=""></div>
<div class="searchContainer">
<!-- <button class="searchBtn" lay-submit="" lay-filter="demo1">搜索</button> -->
<input type="button" name="submit" class="searchBtn" value="登录"/>
<div class="container-wrapper">
<div class="search-container">
<h2 class="header_title">原生应用查询</h2>
<form class="layui-form" name='theForm' id="theForm" method="post">
<div class="form-group">
<label class="form-label">关键词:</label>
<input type="text" name="username" class="form-control" placeholder="请输入关键词">
</div>
<div class="form-group">
<label class="form-label">查询密码:</label>
<input type="password" name="password" class="form-control" placeholder="请输入查询密码">
</div>
<input type="button" name="submit" class="search-btn" value="搜索"/>
</form>
</div>
</form>
<div class="sys_content" style="display: none" id="show">
<div class="advertInfo">
<div class="adTitle">名称:</div>
<div class="adItem" id="name"></div>
</div>
<!--<div class="advertInfo">
<div class="adTitle">可用云顶通:</div>
<div class="adItem">1个</div>
</div>
<div class="advertInfo">
<div class="adTitle">已使用:</div>
<div class="adItem">0个</div>
</div>-->
<div class="advertInfo">
<div class="adTitle">申请状态:</div>
<div class="adItem">可申请</div>
<div class="result-container" id="show">
<h3 class="result-title">查询结果</h3>
<div class="result-item">
<div class="result-label">名称:</div>
<div class="result-value" id="name"></div>
</div>
<div class="result-item">
<div class="result-label">申请状态:</div>
<div class="result-value">可申请</div>
</div>
</div>
</div>
<div style="width:100%;height:100%;display: none;" id="showqrcode">
<div style="text-align: center;width: 100%;">
<img src="" id="imgs" style="width: 1000px;">
<div style="font-size: 50px;width: 100%;text-align: center;margin-top: 30px;">
<span style="border-radius: 50px;border: solid 2px #fff;width: 60px;padding: 4px 20px;color:#fff" id="close">x</span>
</div>
</div>
<div class="qrcode-container" id="showqrcode">
<h3 class="result-title">二维码</h3>
<img src="" id="imgs" class="qrcode-img">
<button type="button" class="close-btn" id="close">关闭</button>
</div>
</div>
</div>
</div>
<!-- -->
<script>
$('#close').click(function(){
$('#showqrcode').hide();
$('#theForm').show();
$('.search-container').show();
})
$(function(){
$('input[name=submit]').on('click',function(){
var username = $('input[name=username]');
var password = $('input[name=password]');
$('input[name=submit]').on('click',function(){
var username = $('input[name=username]');
var password = $('input[name=password]');
if(username.val() == ''){
layer.msg('关键词不能为空!', {time: 1500, icon: 5});
username.focus();
return false;
}
if(password.val() == ''){
layer.msg('密码不能为空!', {time: 1500, icon: 5});
password.focus();
return false;
}
var data = {
username:username.val(),
password:password.val(),
type:0
}
var url = "{eyou:url link='api/Ajax/projectsearch' /}";
// layer_loading('正在处理');
$('#show').hide()
$.ajax({
// async:false,
url : url,
data:data,
type:'post',
dataType:'json',
success:function(res){
console.log(res)
if( res.code<=0){
if(res.code == -1){
layer.msg(res.msg, {time: 1500, icon: 5});
}else{
$('#show').show()
$('#name').html(res.name)
}
}else{
//layer.msg('项目存在', {time: 1500, icon: 5});
$('#imgs').attr('src',res.img)
$('#showqrcode').show();
$('#theForm').hide();
}
},
error:function(e) {
layer.closeAll();
showErrorAlert(e.responseText);
if(username.val() == ''){
layer.msg('关键词不能为空!', {time: 1500, icon: 5});
username.focus();
return false;
}
if(password.val() == ''){
layer.msg('密码不能为空!', {time: 1500, icon: 5});
password.focus();
return false;
}
var data = {
username:username.val(),
password:password.val(),
type:0
}
var url = "{eyou:url link='api/Ajax/projectsearch' /}";
$('#show').hide();
$.ajax({
url : url,
data:data,
type:'post',
dataType:'json',
success:function(res){
console.log(res);
if( res.code<=0){
if(res.code == -1){
layer.msg(res.msg, {time: 1500, icon: 5});
}else{
$('#show').show();
$('#name').html(res.name);
}
}else{
$('.search-container').hide();
$('#imgs').attr('src',res.img);
$('#showqrcode').show();
}
},
error:function(e) {
layer.closeAll();
showErrorAlert(e.responseText);
}
});
});
});
});
/* layui.use(['table','form','upload','util','laydate','laypage',], function() {
var table = layui.table,form = layui.form,laydate = layui.laydate, $ = layui.jquery,upload = layui.upload,util = layui.util;
var laypage = layui.laypage
//监听搜索
form.on('submit(demo1)', function(data){
var field = data.field;
layer.alert(JSON.stringify(data.field), {
title: '最终的提交信息'
})
//return false;
var url = "{eyou:url link='api/Ajax/projectsearch' /}";
console.log(url)
// return false;
$.ajax({
// async:false,
url : url,
data: {},
type:'post',
dataType:'json',
success:function(res){
if (1 == res.code) {
if (5 == res.data.status) {
layer.alert(res.msg, {icon: 5, title: false, closeBtn: false},function(){
window.location.href = res.url;
});
}else{
window.location.href = res.url;
}
} else {
layer.closeAll();
if ('vertify' == res.data.status) {
fleshVerify();
}
if (2 == res.data.status) {
showErrorAlert(res.msg, 4);
} else {
layer.msg(res.msg, {icon: 5,time: 1500});
}
}
},
error:function(e) {
layer.closeAll();
showErrorAlert(e.responseText);
}
});
});
});*/
</script>
<!--底部-star-->
{eyou:include file="footer.htm" /}
<!--底部--end-->