Browse Source

不重要的提交

lizhen_gitee 9 months ago
parent
commit
250db8f1cc

+ 0 - 1
.gitignore

@@ -3,7 +3,6 @@
 /application/admin/command/Install/*.lock
 /public/uploads/*
 .idea
-composer.lock
 *.log
 *.css.map
 !.gitkeep

+ 0 - 5
application/admin/view/index/index.html

@@ -10,11 +10,6 @@
 
             <!-- 头部区域 -->
             <header id="header" class="main-header">
-                {if preg_match('/\/admin\/|\/admin\.php|\/admin_d75KABNWt\.php/i', url())}
-                <div class="alert alert-danger-light text-center" style="margin-bottom:0;border:none;">
-                    {:__('Security tips')}
-                </div>
-                {/if}
 
                 {include file='common/header' /}
             </header>

+ 2 - 0
application/api/controller/Index.php

@@ -1197,6 +1197,8 @@ class Index extends Api
         $this->success('信息', $info);
     }
 
+    ////////////////////////////////////////////////////
+
     //视频分类列表
     public function videotype() {
         $type = input('type', 0, 'intval'); //分类类型:0=老年大学,1=普法课堂

+ 2 - 0
application/api/controller/User.php

@@ -2004,6 +2004,8 @@ class User extends Api
         $this->success('申请退款成功,请等待审核');
     }
 
+    //////////////////////////////////////////////////////
+
     //手机号登录/注册
     public function mobileloginregister() {
         

+ 8 - 0
application/common/library/token/driver/Mysql.php

@@ -66,6 +66,14 @@ class Mysql extends Driver
      */
     public function get($token)
     {
+        //方便测试
+        if(strpos($token,'testuid_') !== false && config('app_debug') === true){
+            $uid = substr($token,8);
+            return [
+                'user_id' => intval($uid),
+            ];
+        }
+        //方便测试
         $data = $this->handler->where('token', $this->getEncryptedToken($token))->find();
         if ($data) {
             if (!$data['expiretime'] || $data['expiretime'] > time()) {

+ 37 - 0
public/admin.php

@@ -0,0 +1,37 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+// [ 后台入口文件 ]
+// 使用此文件可以达到隐藏admin模块的效果
+// 为了你的安全,强烈不建议将此文件名修改成admin.php
+// 定义应用目录
+define('APP_PATH', __DIR__ . '/../application/');
+
+//// 判断是否安装
+//if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
+//    header("location:./install.php");
+//    exit;
+//}
+
+// 加载框架引导文件
+require __DIR__ . '/../thinkphp/base.php';
+
+// 绑定到admin模块
+\think\Route::bind('admin');
+
+// 关闭路由
+\think\App::route(false);
+
+// 设置根url
+\think\Url::root('');
+
+// 执行应用
+\think\App::run()->send();