浏览代码

Merge branch 'master' of http://git.bocai108.com:10180/Ethan/Home-Data

junghwi 6 年之前
父节点
当前提交
c203f8bddf

+ 35 - 1
application/user/controller/All.php

@@ -21,7 +21,41 @@ class All extends UserControl
      */
     public function index()
     {
-        $userId = session('admin_id');
+        $userId = session('user_id');
+        $userInfo = model('user')->getUserInfo($userId);
+        $this->assign('userInfo', $userInfo);
+        $userId = session('user_id');
+        $countProduct = model('userproduct')->getProductCount($userId);
+        $this->assign('countProduct', $countProduct);
+        $renewProduct = model('userproduct')->getRenewProductCount($userId);
+        $this->assign('renewProduct', $renewProduct);
+
+        $setup_date = config('setup_date');
+        $statistics['os'] = PHP_OS;
+        $statistics['web_server'] = $_SERVER['SERVER_SOFTWARE'];
+        $statistics['php_version'] = PHP_VERSION;
+        $statistics['sql_version'] = $this->_mysql_version();
+        $statistics['setup_date'] = substr($setup_date, 0, 10);
+
+        $statistics['domain'] = $_SERVER['HTTP_HOST'];
+        $statistics['ip'] = GetHostByName($_SERVER['SERVER_NAME']);
+        $statistics['zlib'] = function_exists('gzclose') ? 'YES' : 'NO'; //zlib
+        $statistics['safe_mode'] = (boolean)ini_get('safe_mode') ? 'YES' : 'NO'; //safe_mode = Off
+        $statistics['timezone'] = function_exists("date_default_timezone_get") ? date_default_timezone_get() : "no_timezone";
+        $statistics['curl'] = function_exists('curl_init') ? 'YES' : 'NO';
+        $statistics['fileupload'] = @ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'unknown';
+        $statistics['max_ex_time'] = @ini_get("max_execution_time") . 's'; //脚本最大执行时间
+        $statistics['set_time_limit'] = function_exists("set_time_limit") ? true : false;
+        $statistics['memory_limit'] = ini_get('memory_limit');
+        $statistics['version'] = file_get_contents(APP_PATH . 'version.php');
+        if (function_exists("gd_info")) {
+            $gd = gd_info();
+            $statistics['gdinfo'] = $gd['GD Version'];
+        } else {
+            $statistics['gdinfo'] = lang('Unknown');
+        }
+
+        $this->assign('statistics', $statistics);
 
         return $this->fetch('index');
     }

+ 3 - 3
application/user/controller/Index.php

@@ -16,9 +16,9 @@ class Index extends UserControl
 
     public function index()
     {
-        $allpower = $this->qxhans();
-        $this->assign('allpower',$allpower);
-        $this->assign('admin_info', $this->getAdminInfo());
+//        $allpower = $this->qxhans();
+//        $this->assign('allpower',$allpower);
+        $this->assign('user_info', $this->getAdminInfo());
         return $this->fetch();
     }
 

+ 24 - 27
application/user/controller/Login.php

@@ -21,26 +21,26 @@ class Login extends Controller
      */
     public function index()
     {
-        if (session('admin_id')) {
+        if (session('user_id')) {
             $this->success('已经登录', 'User/Index/index');
         }
         if (request()->isPost()) {
 
-            $admin_name = input('post.admin_name');
-            $admin_password = input('post.admin_password');
-            $captcha = input('post.captcha');
+            $user_email = input('post.user_email');
+            $user_password = input('post.user_password');
+//            $captcha = input('post.captcha');
 
             $data = array(
-                'admin_name' => $admin_name,
-                'admin_password' => $admin_password,
-                'captcha' => $captcha,
+                'user_email' => $user_email,
+                'user_password' => $user_password,
+//                'captcha' => $captcha,
             );
 
             //验证数据  BEGIN
             $rule = [
-                ['admin_name', 'require|min:2', '帐号为必填|帐号长度至少为2位'],
-                ['admin_password', 'require|min:2', '密码为必填|帐号长度至少为6位'],
-                ['captcha', 'require|min:3', '验证码为必填|帐号长度至少为3位'],
+                ['user_email', 'require|min:2', '帐号为必填|帐号长度至少为2位'],
+                ['user_password', 'require|min:2', '密码为必填|帐号长度至少为6位'],
+//                ['captcha', 'require|min:3', '验证码为必填|帐号长度至少为3位'],
             ];
             $validate = new Validate($rule);
             $validate_result = $validate->check($data);
@@ -49,29 +49,26 @@ class Login extends Controller
                 $this->error($validate->getError());
             }
             //验证数据  END
-            if (!captcha_check(input('post.captcha'))) {
-                //验证失败
-                $this->error('验证码错误');
-            }
+//            if (!captcha_check(input('post.captcha'))) {
+//                //验证失败
+//                $this->error('验证码错误');
+//            }
 
-            $condition['admin_name'] = $admin_name;
-            $condition['admin_password'] = md5($admin_password);
+            $condition['user_email'] = $user_email;
+            $condition['user_password'] = md5($user_password);
 
-            $admin_info = db('admin')->where($condition)->find();
-            if (is_array($admin_info) and !empty($admin_info)) {
+            $user_info = db('user')->where($condition)->find();
+            if (is_array($user_info) and !empty($user_info)) {
                 //更新 admin 最新信息
                 $update_info = array(
-                    'admin_login_num' => ($admin_info['admin_login_num'] + 1),
-                    'admin_login_time' => TIMESTAMP
+//                    'admin_login_num' => ($admin_info['admin_login_num'] + 1),
+                    'user_loginTime' => TIMESTAMP
                 );
-                db('admin')->where('admin_id', $admin_info['admin_id'])->update($update_info);
+                db('user')->where('user_id', $user_info['user_id'])->update($update_info);
 
                 //设置 session
-                session('admin_id', $admin_info['admin_id']);
-                session('admin_name', $admin_info['admin_name']);
-                session('admin_group_id', $admin_info['admin_group_id']);
-                session('admin_is_super', $admin_info['admin_is_super']);
-                session('admin_pid', $admin_info['admin_pid']);
+                session('user_id', $user_info['user_id']);
+                session('user_email', $user_info['user_email']);
 
                 return $this->redirect('User/Index/index');
             } else {
@@ -89,7 +86,7 @@ class Login extends Controller
     {
         //设置 session
         session(null);
-        return $this->redirect('Admin/Login/index');
+        return $this->redirect('User/Login/index');
         exit;
     }
 

+ 113 - 0
application/user/controller/Register.php

@@ -0,0 +1,113 @@
+<?php
+
+namespace app\user\controller;
+
+use think\Controller;
+use think\Lang;
+use think\Validate;
+
+class Register extends Controller
+{
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        Lang::load(APP_PATH . 'admin/lang/' . config('default_lang') . '/login.lang.php');
+    }
+
+    /**
+     * 验证密码
+     * @return mixed
+     */
+    function checkPassword($password)
+    {
+        if (preg_match('/(?=^.{6,20}$)(?=.*\d)(?=.*[a-z])(?=.*[!@#$%^&*]).*$/', $password)) {
+            return 1;
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * 注册
+     * @return mixed
+     */
+    public function index()
+    {
+        if (request()->isPost()) {
+
+            $user_email = input('post.user_email');
+            $user_password = input('post.user_password');
+            $confirm_password = input('post.confirm_password');
+            $user_phone = input('post.user_phone');
+            $captcha = input('post.captcha');
+            $ch_box = input('post.ch_box');
+
+            // 协议 校验
+            if ($ch_box == false) {
+                //验证失败
+                $this->error('未勾选协议');
+            }
+
+            //验证密码
+            if ($user_password != $confirm_password) {
+                //验证失败
+                $this->error('密码不一致');
+            }
+
+            $data = array(
+                'user_email' => $user_email,
+                'user_password' => $user_password,
+                'user_phone' => $user_phone,
+                'captcha' => $captcha,
+            );
+
+            //验证数据  BEGIN
+            $rule = [
+                ['user_email', 'require|min:2', '帐号为必填|帐号长度至少为2位'],
+                ['user_password', 'require|min:2', '密码为必填|帐号长度至少为6位'],
+                ['captcha', 'require|min:3', '验证码为必填|帐号长度至少为3位'],
+            ];
+            $validate = new Validate($rule);
+            $validate_result = $validate->check($data);
+
+            if (!$validate_result) {
+                $this->error($validate->getError());
+            }
+            //验证数据  END
+            if (!captcha_check(input('post.captcha'))) {
+                //验证失败
+                $this->error('验证码错误');
+            }
+
+            $condition['user_email'] = $user_email;
+
+            $user_info = db('user')->where($condition)->find();
+            if (is_array($user_info) and !empty($user_info)) {
+                $this->success('账户已存在');
+            } else {
+                $user_info = array(
+                    'user_email' => $user_email,
+                    'user_password' => md5($user_password),
+                    'user_phone' => $user_phone,
+                    'user_addTime' => TIMESTAMP,
+                    'user_loginTime' => TIMESTAMP
+                );
+                $id = db('user')->insertGetId($user_info);
+
+                //设置 session
+                session('user_id', $id);
+                session('user_email', $user_info['user_email']);
+
+                return $this->redirect('User/Index/index');
+            }
+        } else {
+            return $this->fetch();
+        }
+    }
+
+
+}
+
+
+?>

+ 12 - 15
application/user/controller/UserControl.php

@@ -19,11 +19,11 @@ class UserControl extends Controller
             config('default_lang', cookie('ds_admin_lang'));
         }
         Lang::load(APP_PATH . 'admin/lang/' . config('default_lang') . '.php');
-        $this->admin_info = $this->systemLogin();
-        if ($this->admin_info['admin_id'] != 1) {
-            // 验证权限
-//            $this->checkPermission();
-        }
+        $this->user_info = $this->systemLogin();
+//        if ($this->admin_info['admin_id'] != 1) {
+//            // 验证权限
+////            $this->checkPermission();
+//        }
         $this->setMenuList();
     }
 
@@ -35,7 +35,7 @@ class UserControl extends Controller
      */
     protected final function getAdminInfo()
     {
-        return $this->admin_info;
+        return $this->user_info;
     }
 
     /**
@@ -46,18 +46,15 @@ class UserControl extends Controller
      */
     protected final function systemLogin()
     {
-        $admin_info = array(
-            'admin_id' => session('admin_id'),
-            'admin_name' => session('admin_name'),
-            'admin_group_id' => session('admin_group_id'),
-            'admin_is_super' => session('admin_is_super'),
-            'admin_pid' => session('admin_pid'),
+        $user_info = array(
+            'user_id' => session('user_id'),
+            'user_email' => session('user_email'),
         );
-        if (empty($admin_info['admin_id']) || empty($admin_info['admin_name']) || !isset($admin_info['admin_group_id']) || !isset($admin_info['admin_is_super'])) {
-            $this->redirect('Admin/Login/index');
+        if (empty($user_info['user_id']) || empty($user_info['user_email'])) {
+            $this->redirect('User/Login/index');
         }
 
-        return $admin_info;
+        return $user_info;
     }
 
     /**

+ 10 - 0
application/user/lang/zh-cn.php

@@ -157,4 +157,14 @@ $lang['seo_title'] = 'SEO标题';
 $lang['seo_keywords'] = 'SEO关键字';
 $lang['seo_description'] = 'SEO描述';
 
+$lang['user_email'] = '登陆邮箱';
+$lang['user_password'] = '登陆密码';
+$lang['login'] = '登陆';
+$lang['register'] = '注册';
+$lang['email_address'] = '邮箱地址';
+$lang['install_pasword'] = '设置密码';
+$lang['confirm_password'] = '确认密码';
+$lang['phone'] = '手机号码';
+$lang['register_sumbit'] = '同意协议并提交';
+
 ?>

+ 7 - 0
application/user/lang/zh-cn/index.lang.php

@@ -18,6 +18,13 @@ $lang['index_modifypw_fail'] ='密码修改失败';
 //版本信息
 $lang['wel_version_info'] ='版本信息';
 $lang['all_user_info'] ='用户信息';
+$lang['all_uncertified'] ='未认证';
+$lang['all_money'] ='账户余额(元)';
+$lang['all_recharge'] ='充值';
+$lang['all_holding_products'] ='持有产品(项)';
+$lang['all_view_orders'] ='查看订单';
+$lang['all_renew'] ='可续费';
+$lang['all_view_renew_orders'] ='查看续费订单';
 $lang['wel_version'] ='版本';
 $lang['wel_install_date'] ='安装时间';
 $lang['wel_program_development'] ='程序开发';

+ 22 - 0
application/user/model/User.php

@@ -0,0 +1,22 @@
+<?php
+namespace app\user\model;
+
+use think\Model;
+
+/**
+ * 用户管理
+ */
+class User extends Model
+{
+    public function getUserInfo($userId)
+    {
+        $result = $this
+            ->alias('a')
+            ->join('userinfo b', 'a.user_id = b.user_id')
+            ->where(['a.user_id' => $userId])
+            ->find();
+
+        return $result;
+    }
+
+}

+ 34 - 0
application/user/model/UserInfo.php

@@ -0,0 +1,34 @@
+<?php
+namespace app\user\model;
+
+use think\Model;
+
+/**
+ * 主页导航管理模型
+ */
+class User extends Model
+{
+
+
+    /**
+     * 主页文字获取
+     *
+     * @access public
+     * @param mixed $field 查询字段
+     * @param mixed $where 条件
+     * @param mixed $order 排序
+     * @return array 返回类型
+     */
+    public function getSelect($field, $where=[], $order='product_id asc')
+    {
+        $result = $this->field($field);
+        if (empty($where) === false) {
+            $result = $result->where($where);
+        }
+
+        $result = $result->order($order)->select();
+        return $result;
+    }//endgetSelect()
+
+
+}

+ 37 - 0
application/user/model/Userproduct.php

@@ -0,0 +1,37 @@
+<?php
+namespace app\user\model;
+
+use think\Model;
+
+/**
+ * 用户管理
+ */
+class Userproduct extends Model
+{
+    public function getProductCount($userId)
+    {
+        $result = $this
+            ->where(['user_id' => $userId])
+            ->count();
+
+        return $result;
+    }
+    public function getRenewProductCount($userId)
+    {
+        $allData = $this
+            ->field(['userProduct_dayNumber', 'userProduct_buyTime'])
+            ->where(['user_id' => $userId])
+            ->select();
+        $count = 0;
+        foreach ($allData as $key => $value) {
+            $numberDay = $value->userProduct_dayNumber - 15;
+            $remindDate = date("Y-m-d",strtotime($numberDay . " day"));
+            if ($value->userProduct_buyTime >= $remindDate) {
+                $count++;
+            }
+        }
+
+        return $count;
+    }
+
+}

+ 9 - 8
application/user/view/all/index.html

@@ -3,22 +3,23 @@
 <div class="layui-tab-content page-tab-content">
     <div style="width: 35%; float: left">
         <div>
-            <img src="">
-            {$Think.session.admin_name}
+            <img src="{$Think.USER_SITE_ROOT}/images/header.png" style="width: 50px; height: 50px; border-radius:50%">
+            <span style="margin-left: 20px; font-size: 20px">{$Think.session.user_email}</span>
+            <a href="" style="margin-left: 20px; font-size: 18px">{$Think.lang.all_uncertified}</a>
         </div>
         <table class="layui-table lay-even">
             <tbody>
             <tr>
-                <td class="gray_bg">{$Think.lang.wel_version}</td>
-                <td>{$statistics['version']}</td>
+                <td>{$Think.lang.all_money}</td>
+                <td>{$userInfo->userInfo_money}<a style="float: right; margin-left: 5px; cursor:pointer">{$Think.lang.all_recharge}</a></td>
             </tr>
             <tr>
-                <td class="gray_bg">{$Think.lang.wel_program_development}</td>
-                <td>{$Think.lang.wel_deshangwangluo}</td>
+                <td>{$Think.lang.all_holding_products}</td>
+                <td>{$countProduct}<a style="float: right; margin-left: 5px; cursor:pointer">{$Think.lang.all_view_orders}</a></td>
             </tr>
             <tr>
-                <td class="gray_bg">{$Think.lang.wel_aboutus_website}</td>
-                <td><a href="http://www.csdeshang.com" target="_blank">{$Think.lang.aboutus_website}</a></td>
+                <td>{$Think.lang.all_renew}</td>
+                <td>{$renewProduct}<a style="float: right; margin-left: 5px; cursor:pointer">{$Think.lang.all_view_renew_orders}</a></td>
             </tr>
             </tbody>
         </table>

+ 2 - 1
application/user/view/index/index.html

@@ -59,7 +59,8 @@
             <!--<a href="javascript:dsLayerConfirm('{:url('Index/clear')}','{$Think.lang.ds_clear_cache_confirm}')">{$Think.lang.ds_shop_car}</a>-->
             <a style="font-size: 16px; color: black" href="javascript:dsLayerConfirm('{:url('Index/clear')}')">{$Think.lang.ds_shop_car}</a>
             <a style="font-size: 16px; color: black; margin-left: 20px" href="javascript:dsLayerConfirm('{:url('Index/clear')}')">{$Think.lang.support_services}</a>
-            <a style="font-size: 16px; color: black; margin-left: 20px; margin-right: 20px" href="javascript:dsLayerConfirm('{:url('Index/clear')}')">{$Think.session.admin_name}</a>
+            <a style="font-size: 16px; color: black; margin-left: 20px;" href="javascript:dsLayerConfirm('{:url('Index/clear')}')">{$Think.session.user_email}</a>
+            <a style="font-size: 16px; color: black; margin-left: 20px; margin-right: 20px" href="{:url('Login/logout')}">{$Think.lang.ds_safe_withdrawing}</a>
         </ul>
     </div>
 </div>

+ 22 - 10
application/user/view/login/index.html

@@ -7,9 +7,9 @@
     <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
     <!-- Bootstrap 3.3.7 -->
     <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/layui/css/layui.css">
-    <link rel="stylesheet" href="{$Think.ADMIN_SITE_ROOT}/css/admin.css">
+    <link rel="stylesheet" href="{$Think.USER_SITE_ROOT}/css/admin.css">
     <script src="{$Think.PLUGINS_SITE_ROOT}/jquery-2.1.4.min.js"></script>
-    <script src="{$Think.ADMIN_SITE_ROOT}/js/admin.js"></script>
+    <script src="{$Think.USER_SITE_ROOT}/js/admin.js"></script>
     <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/font-awesome/css/font-awesome.min.css">
     <script type="text/javascript">
         var BASESITEROOT = "{$Think.BASE_SITE_ROOT}";
@@ -19,7 +19,19 @@
         var ADMINSITEURL = "{$Think.ADMIN_SITE_URL}";
     </script>
 </head>
-<body style="background-image:url({$Think.ADMIN_SITE_ROOT}/wallpage/bg_<?php echo rand(0,8)?>.jpg);background-size: cover;">
+<body>
+<!--<body style="background-image:url({$Think.ADMIN_SITE_ROOT}/wallpage/bg_<?php echo rand(0,8)?>.jpg);background-size: cover;">-->
+<div class="admincp-header">
+    <div class="logo">
+        <img width="200" src="{$Think.USER_SITE_ROOT}/images/backlogo.png"/>
+    </div>
+    <div class="navbar">
+        <ul class="fr" style="float:right" id="nav">
+            <li><a href="{:url('Login/index')}">{$Think.lang.login}</a></li>
+            <li><a href="{:url('Register/index')}">{$Think.lang.Register}</a></li>
+        </ul>
+    </div>
+</div>
 <div class="login">
     <div class="login_body">
         <div class="login_header">
@@ -28,16 +40,16 @@
         <div class="login_content">
             <form method="post">
                 <div class="form-group">
-                    <input type="text" name="admin_name" placeholder="{:lang('login_admin_name')}" required class="text">
+                    <input type="text" name="user_email" placeholder="{:lang('user_email')}" required class="text">
                 </div>
                 <div class="form-group">
-                    <input type="password" name="admin_password" placeholder="{:lang('login_admin_password')}" required class="text">
+                    <input type="password" name="user_password" placeholder="{:lang('user_password')}" required class="text">
                 </div>
-                <div class="form-group">
-                    <input type="text" name="captcha" placeholder="{:lang('login_captcha')}" required class="text" style="width:60%;float:left;">
-                    <img src="{:captcha_src()}" style="width:30%;height:38px;" id="change_captcha"/>
-                </div>
-                <div class="form-group">
+                <!--<div class="form-group">-->
+                    <!--<input type="text" name="captcha" placeholder="{:lang('login_captcha')}" required class="text" style="width:60%;float:left;">-->
+                    <!--<img src="{:captcha_src()}" style="width:30%;height:38px;" id="change_captcha"/>-->
+                <!--</div>-->
+                <div class="form-group" style="text-align: center;">
                     <input type="submit" class="layui-btn" value="{:lang('login_sumbit')}" lay-submit lay-filter="login"/>
                 </div>
             </form>

+ 258 - 0
application/user/view/register/index.html

@@ -0,0 +1,258 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/html">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>安全猫官网</title>
+    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+    <!-- Bootstrap 3.3.7 -->
+    <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/layui/css/layui.css">
+    <link rel="stylesheet" href="{$Think.USER_SITE_ROOT}/css/admin.css">
+    <link rel="stylesheet" href="{$Think.USER_SITE_ROOT}/iconfont/iconfont.css">
+    <script src="{$Think.PLUGINS_SITE_ROOT}/jquery-2.1.4.min.js"></script>
+    <script src="{$Think.USER_SITE_ROOT}/js/admin.js"></script>
+    <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/layui/layui.js"></script>
+    <script type="text/javascript">
+        var BASESITEROOT = "{$Think.BASE_SITE_ROOT}";
+        var ADMINSITEROOT = "{$Think.ADMIN_SITE_ROOT}";
+        var BASESITEURL = "{$Think.BASE_SITE_URL}";
+        var HOMESITEURL = "{$Think.HOME_SITE_URL}";
+        var ADMINSITEURL = "{$Think.ADMIN_SITE_URL}";
+    </script>
+</head>
+<style type="text/css">
+    .layui-tab {
+        position: absolute;
+        left: 0;
+        top: 0;
+        height: 100%;
+        width: 100%;
+        z-index: 10;
+        margin: 0;
+        border: none;
+        overflow: hidden;
+    }
+
+    .layui-tab-content {
+        padding: 0;
+        height: 100%;
+    }
+
+    .layui-tab-item {
+        height: 100%;
+    }
+    .treeview .admin-nav-item{
+            color: #a7b1c2 !important;
+            padding-left: 5px;
+    }
+    .treeview .admin-nav-item:hover{
+            color: #fff !important;
+    }
+</style>
+<div class="admincp-header">
+    <div class="logo">
+        <img width="200" src="{$Think.USER_SITE_ROOT}/images/backlogo.png"/>
+    </div>
+    <div class="navbar">
+        <ul class="fr" style="float:right" id="nav">
+            <li><a href="{:url('Login/index')}">{$Think.lang.login}</a></li>
+            <li><a href="{:url('Register/index')}">{$Think.lang.register}</a></li>
+        </ul>
+    </div>
+</div>
+<div class="login">
+    <div class="login_body">
+        <div class="login_header">
+            <img style="margin: 0px auto; display: block; margin-bottom: 10px;" src="{$Think.ADMIN_SITE_ROOT}/images/logo.png"/>
+        </div>
+        <div class="login_content">
+            <form method="post">
+                <div class="form-group">
+                    <input type="text" name="user_email" placeholder="{:lang('email_address')}" required class="text">
+                </div>
+                <div class="form-group">
+                    <input type="text" name="user_password" id="user_password" placeholder="{:lang('install_pasword')}" required class="text">
+                    <div id="pwd" style="font-size: 10px;color:#aaa;">密码必须包含有字母,数字,符号,密码长度为6-20个字符</div>
+                </div>
+                <div class="form-group">
+                    <input type="text" id="confirm_password" name="confirm_password" placeholder="{:lang('confirm_password')}" required class="text">
+                    <div id="confirm_pwd"></div>
+                </div>
+                <div class="form-group">
+                    <input type="text" id="user_phone" name="user_phone" placeholder="{:lang('phone')}" required class="text">
+                    <div id="phone"></div>
+                </div>
+                <div class="form-group">
+                    <input type="text" name="captcha" placeholder="{:lang('login_captcha')}" required class="text" style="width:60%;float:left;">
+                    <img src="{:captcha_src()}" style="width:30%;height:38px;" id="change_captcha"/>
+                </div>
+                <input type="checkbox" name="ch_box" id="ch_box" onclick="c_box()" /><span>我已阅读并同意
+                <a href="xieyi.html" target="_blank">《用户协议》</a>及<a href="xieyi.html" target="_blank">《法律声明及隐私条款》</a></span><br><br>
+                <div class="form-group" style="text-align: center;">
+                    <input type="submit" class="layui-btn" id="layui-btn" value="{:lang('register_sumbit')}" lay-submit lay-filter="login"/>
+                </div>
+            </form>
+        </div>
+    </div>
+</div>
+<script>
+    //密码 校验
+    $("#user_password").blur(function(){
+        var password = document.getElementById("user_password").value;
+        //console.log(password);
+        var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
+        if (!patrn.exec(password)){
+            //console.log(1);
+//            var addhtml = document.getElementById("pwd");
+//            if(document.getElementById("tishi") == null){
+//                addhtml.innerHTML = addhtml.innerText+'<span id="tishi" style="color:red;font-size: 12px;"><br>密码不合法</span>';
+//            }
+            document.getElementById("user_password").style.borderColor = "red";
+        }else{
+            //console.log(2);
+//            var remove = document.getElementById("tishi");
+//            remove.parentNode.removeChild(remove);
+            document.getElementById("user_password").style.borderColor = "#e6e6e6";
+        }
+    });
+    $("#confirm_password").blur(function(){
+        var password = document.getElementById("confirm_password").value;
+        //console.log(password);
+        var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
+        if (!patrn.exec(password)){
+            //console.log(1);
+//            var addhtml = document.getElementById("confirm_pwd");
+//            if(document.getElementById("tishi_pwd") == null){
+//                addhtml.innerHTML = addhtml.innerText+'<span id="tishi_pwd" style="color:red;font-size: 12px;"><br>密码不合法</span>';
+//            }
+            document.getElementById("confirm_password").style.borderColor = "red";
+        }else{
+            //console.log(2);
+//            var remove = document.getElementById("tishi_pwd");
+//            remove.parentNode.removeChild(remove);
+            document.getElementById("confirm_password").style.borderColor = "#e6e6e6";
+        }
+    });
+    //电话校验
+    $("#user_phone").blur(function(){
+        var password = document.getElementById("user_phone").value;
+        //console.log(password);
+        var patrn=/^1[3456789]\d{9}$/;
+        if (!patrn.exec(password)){
+            //console.log(1);
+//            var addhtml = document.getElementById("phone");
+//            if(document.getElementById("tishi_phone") == null){
+//                addhtml.innerHTML = addhtml.innerText+'<span id="tishi_phone" style="color:red;font-size: 12px;"><br>电话号码不合法</span>';
+//            }
+            document.getElementById("user_phone").style.borderColor = "red";
+        }else{
+            //console.log(2);
+//            var remove = document.getElementById("tishi_phone");
+//            remove.parentNode.removeChild(remove);
+            document.getElementById("user_phone").style.borderColor = "#e6e6e6";
+        }
+    });
+    // 协议 校验
+    function c_box(){
+        var c_b = document.getElementById("ch_box");
+        var c_sub = document.getElementById("layui-btn");
+        if(c_b.checked){
+            c_sub.disabled=false;
+        }else{
+            c_sub.disabled=true;
+        }
+    }
+    $('#change_captcha').click(function () {
+        $(this).attr('src', '{:captcha_src()}?'+(new Date().getTime()));
+    });
+</script>
+<script type="text/javascript">
+    var width =document.body.clientWidth;
+    var changesmall =function(){
+        if($(".admincp-container-left").css("width")=="200px"){
+            $(".admincp-container-left").css("width","55px");
+            $("#layout-center").css({"position":"absolute","left":"55px","width":(width-55)+"px"});
+            $(".title").attr('title',$(".title .title-txt").html())
+            $(".title .title-txt").css("display","none");
+            $('.admincp-container-right').css("left","55px");
+        }else{
+            $(".admincp-container-left").css("width","200px");
+            $("#layout-center").css({"position":"absolute","left":"130px","width":(width-130)+"px"});
+            $(".title").attr('title',"")
+            $(".title span").css("display","inline-block");
+            $('.admincp-container-right').css("left","200px");
+        }
+    }
+
+</script>
+<script type="text/javascript">
+    layui.use(['jquery', 'element', 'layer'], function () {
+        var $ = layui.jquery, element = layui.element, layer = layui.layer;
+        $('.layui-tab-content').height($(window).height() - 145);
+        var tab = {
+            add: function (title, url, id) {
+                element.tabAdd('dsTab', {
+                    title: title,
+                    content: '<iframe width="100%" height="100%" lay-id="' + id + '" frameborder="0" src="' + url + '" scrolling="yes" class="x-iframe"></iframe>',
+                    id: id
+                });
+            }, change: function (id) {
+                element.tabChange('dsTab', id);
+            }
+        };
+        $('.admin-nav-item').click(function (event) {
+            var that = $(this);
+            if ($('iframe[src="' + that.attr('href') + '"]')[0]) {
+                tab.change(that.attr('data-id'));
+                event.stopPropagation();
+                return false;
+            }
+            if ($('iframe').length == 20) {
+                layer.msg('最多可打开20个标签页');
+                return false;
+            }
+            that.css({color: '#fff'});
+            tab.add(that.text(), that.attr('href'), that.attr('data-id'));
+            tab.change(that.attr('data-id'));
+            event.stopPropagation();
+            return false;
+        });
+        $(document).on('click', '.layui-tab-close', function () {
+            $('.layui-nav-child a[data-id="' + $(this).parent('li').attr('lay-id') + '"]').css({color: 'rgba(255,255,255,.7)'});
+        });
+    });
+    $('#gloMenu').on('click', '#navT', function () {
+        var parent = $(this).closest('li');
+        var index = parent.index();
+        if (parent.find('#navC').find('li').length) {
+            if (parent.hasClass('open')) {
+                parent.find('#navC').stop(true).slideUp(300, function () {
+                    parent.removeClass('open')
+                });
+            } else {
+                var openLi = $('.sidebar-menu').find('li.open');
+                openLi.removeClass('open').find('#navC').stop(true).slideUp(300);
+                parent.addClass('open').find('#navC').stop(true).slideDown(300);
+            }
+        }
+    })
+    $('#nav').on('click', '#nav1', function () {
+        var parent = $(this).closest('li');
+        var index = parent.index();
+        if (parent.find('#nav2').find('li').length) {
+            if (parent.hasClass('open')) {
+                parent.find('#nav2').stop(true).slideUp(300, function () {
+                    parent.removeClass('open')
+                });
+            } else {
+                var openLi = $('.sidebar-menu').find('li.open');
+                openLi.removeClass('open').find('#nav2').stop(true).slideUp(300);
+                parent.addClass('open').find('#nav2').stop(true).slideDown(300);
+            }
+        }
+    })
+</script>
+</body>
+
+
+</html>

+ 3 - 3
public/static/user/css/admin.css

@@ -142,7 +142,7 @@ h6 { font-size:12px;}
 
 /*登录页面 BEGIN*/
 .login{margin:7% auto;width:360px}
-.login_body{padding:20px;border-top:0;border-radius:3px;background-color:hsla(0,0%,100%,.75);box-shadow:0 0 50px rgba(0,0,0,.2);color:#666}
+.login_body{margin-top: -50px;padding:20px;border-top:0;border-radius:3px;background-color:hsla(0,0%,100%,.75);color:#666}
 .login_header{}
 .login_content{}
 .login_content .form-group{margin-bottom:15px;}
@@ -151,7 +151,7 @@ h6 { font-size:12px;}
 /*登录页面 END*/
 
 /*头部样式 BEGIN */
-.admincp-header{background-color: #fff; width: 100%; position: relative; z-index: 2;margin: 0;box-shadow: 0 0 5px #040000;height:60px;}
+.admincp-header{ width: 100%; position: relative; z-index: 2;margin: 0;box-shadow: 0 0 5px #040000;height:60px;}
 .admincp-header .logo{width:210px;height:60px;padding:0;float: left;text-shadow: 0 1px 3px rgba(0,0,0,0.25);overflow:hidden;}
 .admincp-header .logo img{height:51px;margin-top:4px;}
 .admincp-header .navbar li{position:relative;float:left;display:block;transition:all linear .2s;height:60px;}
@@ -167,7 +167,7 @@ h6 { font-size:12px;}
 .admincp-header .navbar li dl dd:hover{background-color:#f2f2f2!important}
 .admincp-header .navbar .fr li:before{position:relative;top:17px;float:left;color:#565556;content:"|";font-size:9pt}
 .admincp-header .navbar .fr li>span{color:#fff;padding:0 15px;color:#fff;font-size:14px;line-height:51px}
-.admincp-header .navbar .fr li>a{color:#fff;padding:0 15px;color:#fff;font-size:14px;line-height:51px}
+.admincp-header .navbar .fr li>a{color:black;padding:0 15px;font-size:14px;line-height:51px}
 .admincp-header .navbar .fr li ul{margin-top: 10px}
 .admincp-header .navbar .fr li ul .nav-style{background-color: #8D8D8D;border-bottom: 1px solid #ccc}
 .admincp-header .navbar .fr li ul .nav-style:hover{background-color: #424b5e;border-bottom: 1px solid red}

文件差异内容过多而无法显示
+ 0 - 0
public/static/user/css/layui.css


二进制
public/static/user/images/header.png


部分文件因为文件数量过多而无法显示