huwhois 4 maanden geleden
bovenliggende
commit
69c04d92f3

+ 4 - 4
app/api/controller/Index.php

@@ -3,15 +3,15 @@ declare (strict_types = 1);
 
 namespace app\api\controller;
 
+use app\BaseController;
 use think\App;
 use think\exception\HttpException;
 
 use app\model\Category;
 use app\model\Article;
-use app\model\ArticleTags;
-use app\model\ArticleDolikeLog;
+use app\utils\ParsedownUtils;
 
-class Index
+class Index extends BaseController
 {
     /**
      * 构造方法
@@ -79,7 +79,7 @@ class Index
         $prev_next = Article::getNextPrev($id, $data->cid);
 
         if ($data->content_type == 1) {
-            $parsedownExtension = new \ParsedownExtension();
+            $parsedownExtension = new ParsedownUtils();
             $parsedownExtension->setTocEnabled(true);
             $res = $parsedownExtension->text($data->content);
             $data->toc = $res['toc'];

+ 0 - 1
app/controller/sys/Index.php

@@ -12,7 +12,6 @@ use think\facade\View;
 use app\model\SysMenu as SysMenuModel;
 use app\utils\ReUtils;
 
-
 class Index  extends Base
 {
     public function index()

+ 1 - 1
app/controller/sys/Login.php

@@ -25,7 +25,7 @@ class Login
     {
         // 已登录自动跳转
         if (Session::has('adminuser')) {
-            return redirect((string)url('index/index'));
+            return redirect((string)url('/sys/index/index'));
         }
         $restore_url = Session::has('restore') ? Session::get('restore'): (string)url('index/index');
 

+ 0 - 27
app/model/ArticleBrowerHistory.php

@@ -1,27 +0,0 @@
-<?php
-declare (strict_types = 1);
-
-namespace app\model;
-
-use think\Model;
-
-/**
- * @mixin \think\Model
- */
-class ArticleBrowerHistory extends Model
-{
-    
-    protected $schema = [
-        "id" => "int",  // id
-        "ip" => "varchar",  // ip地址
-        "aid" => "int",  // 文章id
-        "create_time" => "int",  // 创建时间
-    ];
-
-    protected $autoWriteTimestamp = false;
-
-    public static function getByIpAid($ip, $aid)
-    {
-        return self::where('ip', $ip)->where('aid', $aid)->find();
-    }
-}

+ 0 - 6
app/model/Module.php

@@ -1,6 +0,0 @@
-<?php
-namespace app\model;
-
-class Module extends Base
-{
-}

+ 0 - 6
app/model/News.php

@@ -1,6 +0,0 @@
-<?php
-namespace app\model;
-
-class News extends \think\Model
-{
-}

+ 40 - 0
app/model/SysUser.php

@@ -14,6 +14,46 @@ class SysUser extends Base
 {
     protected $pk = 'userid';
 
+    protected $schema = [
+        "id"          => "int",
+        "cid"         => "int",
+        "title"       => "varchar",
+        "writer"      => "varchar",
+        "source"      => "varchar",
+        "titlepic"    => "varchar",
+        "keywords"    => "varchar",
+        "summary"     => "varchar",
+        "content"     => "varchar",
+        "discussed"   => "int",
+        "status"      => "int",
+        "top"         => "int",
+        "sort"       => "int",
+        "hits"        => "int",
+        "likes"       => "int",
+        "content_type"=> "int",
+        "userid"      => "int",
+        "userid"      => "int",
+        "username"    => "varchar",
+        "create_time" => "int",
+        
+        "userid"     => "int",
+        "roleid"     => "int",
+        "username"   => "varchar",
+        "password"   => "varchar",
+        "salt"       => "varchar",
+        "nickname"   => "varchar",
+        "truename"   => "varchar",
+        "email"      => "varchar",
+        "avatar"      => "varchar",
+        "remark"      => "varchar",
+        "status"      => "int",
+        "per_time"   => "datetime",
+        "per_ip"     => "int",
+        "login_num"  => "int",
+        "create_time"=> "int",
+        "update_time" => "int"
+    ];
+
     public function sysRole()
     {
         return $this->belongsTo('SysRole', 'roleid')->bind(['rolename' => 'name']);

+ 0 - 22
app/model/Template.php

@@ -1,22 +0,0 @@
-<?php
-declare (strict_types = 1);
-
-namespace app\model;
-
-class Template extends Base
-{
-    protected $schema = [
-        
-    ];
-
-    public function templateType()
-    {
-        $this->belongsTo('TemplateType', 'typeid', 'typeid')->bind(['typename'=>'typename']);
-    }
-
-    // 获取列表
-    public static function getList()
-    {
-        return self::with('templateType')->order(['id' => 'desc'])->select();
-    }
-}

+ 0 - 17
app/model/TemplateType.php

@@ -1,17 +0,0 @@
-<?php
-declare (strict_types = 1);
-
-namespace app\model;
-
-class TemplateType extends Base
-{
-    protected $schema = [
-        
-    ];
-
-    // 获取列表
-    public static function getList()
-    {
-        return self::order(['id' => 'desc'])->select();
-    }
-}

+ 1 - 0
public/static/plugins/.gitignore

@@ -4,3 +4,4 @@
 /Hui-iconfont
 /layer
 /laypage
+/Swiper

+ 0 - 84
view/sys/advertise/index.html

@@ -1,84 +0,0 @@
-<article class="cl pd-20">
-    <div class="cl pd-5 bg-1 bk-gray">
-        <span class="l">
-            <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
-                <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
-            <a href="javascript:layer_show('添加广告', '{:url('save?_layer=true&id=0')}');" class="btn btn-primary radius">
-                <i class="Hui-iconfont">&#xe600;</i> 添加广告</a>
-        </span>
-    </div>
-    <div class="mt-10" style="min-width:800px;">
-        <table class="table table-border table-bordered table-bg">
-            <thead>
-                <tr class="text-c">
-                    <th width="25">
-                        <input type="checkbox" name="allcheck">
-                    </th>
-                    <th width="50px">ID</th>
-                    <th>名称</th>
-                    <th>类别</th>
-                    <th>图片</th>
-                    <th>链接地址</th>
-                    <th>栏目ID</th>
-                    <th>文章ID</th>
-                    <th>状态</th>
-                    <th>排序</th>
-                    <th>添加时间</th>
-                    <th>更新时间</th>
-                    <th>操作</th>
-                </tr>
-            </thead>
-            <tbody>
-                {foreach $list as $val}
-                <tr class="text-c">
-                    <td>
-                        <input type="checkbox" value="{$val.id}" name="checkbox[]">
-                    </td>
-                    <td>{$val.id}</td>
-                    <td>{$val.name}</td>
-                    <td>{$val.advertiseType.name}</td>
-                    <td><a href="{$val.picture}" target="_blank" class="pictureview" style="text-decoration: none;">
-                            <img src="{$val.thumb}" title="{$val.name}" style="max-width: 100px; max-height: 38px;">
-                        </a></td>
-                    <td>{$val.url}</td>
-                    <td>{$val.cid}</td>
-                    <td>{$val.artid}</td>
-                    <td class="td-status">
-                        <a href="javascript:;" onclick="state(this,'{$val.id}')" style="text-decoration: none;" title="已{$val.status==1? '启用' : '停用'}">
-                            <span class="f-20 c-primary"><i class="Hui-iconfont">{$val.status==1?'&#xe601;' : '&#xe677;'}</i></span></a>
-                    </td>
-                    <td>{$val.sort}</td>
-                    <td>{$val.create_time|date='Y-m-d H:i:s'}</td>
-                    <td>{$val.update_time|date='Y-m-d H:i:s'}</td>
-                    <td class="td-manage">
-                        <a class="btn btn-primary radius" title="编辑" href="javascript:layer_show('修改广告', '{:url('save?_layer=true&id='.$val.id)}');">
-                            <i class="Hui-iconfont">&#xe6df;</i>修改
-                        </a>
-                        <a class="btn btn-danger radius" title="删除" href="javascript:;" onclick="del(this,'{$val.id}')" class="ml-5">
-                            <i class="Hui-iconfont">&#xe6e2;</i>删除
-                        </a>
-                    </td>
-                </tr>
-                {/foreach}
-            </tbody>
-        </table>
-    </div>
-    <div class="cl pd-5 bg-1 bk-gray mt-20 ">
-        <span class="r">{notempty name="data"}{$data->render()|raw}{/notempty}</span>
-    </div>
-</article>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript">
-    // 图片预览
-    $('.pictureview').hover(function(){
-        console.log($(this).children('img').attr('src'));
-        var url = $(this).children('img').attr('src');
-        var img = '<img class="thumbnail" id="thumbview" src="'+url+'">';
-        $(this).append(img);
-    },function(){
-        $('#thumbview').remove();
-    });
-
-</script>
-<!--/请在上方写此页面业务相关的脚本-->

+ 0 - 157
view/sys/advertise/save.html

@@ -1,157 +0,0 @@
-<article class="cl pd-20">
-    <form action="" method="post" class="form form-horizontal" id="form-save">
-        <input type="hidden" name="id" id="id" value="{$data.id}">
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>名称:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <input type="text" class="input-text" id="name" name="name" value="{$data.name}"
-                    autocomplete="new-password">
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>标题图:</label>
-                <div class="formControls col-xs-6 col-sm-4">
-                    <div style="width: 200px;height: 200px;">
-                     <a href="javascript:void(0);" onclick="uploadPicture()" >
-                        <img id="view-img" src="{$data.thumb ? $data.thumb : '/static/images/upload_picture.png'}" alt="标题图" title="{$data.title_pic ? '更换' : '添加'}标题图" style="max-width: 200px;max-height: 200px;">
-                     </a>
-                    </div>
-                    <input type="text" class="input-text" value="{$data.picture}" name="picture" id="picture" style="display: none;">
-                    <input type="text" class="input-text" value="{$data.thumb}" name="thumb" id="thumb" style="display: none;">
-                </div>
-                <label class="form-label col-xs-2 col-sm-2">
-                    <a class="btn btn-success radius" href="javascript:uploadPicture();">{$data.picture ? '更换' : '添加'}标题图</a></label>
-            <div class="col-3"> </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red"></span>url:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <input type="text" class="input-text" id="url" name="url" value="{$data.url}"
-                    placeholder="文章or网站访问连接">
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                文章栏目id:</label>
-            <div class="formControls col-xs-4 col-sm-4">
-                <input type="text" class="input-text" id="cid" name="cid" value="{$data.cid}">
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">文章id:</label>
-            <div class="formControls col-xs-4 col-sm-4">
-                <input type="text" class="input-text" id="artid" name="artid" value="{$data.artid}">
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>类别:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <span class="select-box">
-                    <select class="select" id="type_id" name="type_id">
-                        <option value="" >请选择类别</option>
-                        {foreach $listTypes as $k=>$op}
-                        <option value="{$k}" {eq name="data.type_id" value="$k" }selected{/eq}>{$op}</option>
-                        {/foreach}
-                    </select>
-                </span>
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red"></span>状态:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <div class="radio-box">
-                    <input type="radio" name="status" id="status-1" value="1" {$data==null || $data.status==1 ? 'checked' : ""}>
-                    <label for="typeId-1">启用</label>
-                </div>
-                <div class="radio-box">
-                    <input type="radio" name="status" id="status-2" value="2" {$data.status==2 ? 'checked' : ""}>
-                    <label for="status-2">禁用</label>
-                </div>
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red"></span>排序:</label>
-                <div class="formControls col-xs-4 col-sm-4">
-                    <input type="text" class="input-text" id="sort" name="sort"
-                        placeholder="数字越大, 越靠前">
-                </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">备注:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <textarea id="remark" name="remark" cols="" rows="" class="textarea" placeholder="备注...200个字符以内"
-                    dragonfly="true" onKeyUp="textarealength(this,200)">{$data.remark}</textarea>
-                <p class="textarea-numberbar">
-                    <em class="textarea-length">0</em>/200
-                </p>
-            </div>
-        </div>
-        <div class="row cl">
-            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
-                <input class="btn btn-success radius" type="button" id="form-save-button"
-                    value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
-                <input class="btn btn-default radius" type="button" value="&nbsp;&nbsp;取消&nbsp;&nbsp;"
-                    onClick="layer_close();">
-            </div>
-        </div>
-    </form>
-</article>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript">
-    // 图片上传
-    function uploadPicture() {
-        layer.open({
-            type: 2,
-            area: ['700px', '500px'],
-            fix: false, //不固定
-            maxmin: true,
-            shade: 0.4,
-            title: '添加缩略图',
-            content: '{:url("file_manager/uploadimg", ["_layer"=>true, "thumb"=>true, "width"=>400])}'
-        });
-    }
-
-    $(function () {
-        $("#form-save-button").click(function () {
-            if (getblen($("#remark").val()) > 200) {
-                layer.msg('备注过长', {
-                    icon: 5,
-                    time: 1000
-                });
-                return false;
-            }
-
-            var data = $("#form-save").serializeArray();
-            $.ajax({
-                type: 'POST',
-                url: '{:url("save")}',
-                data: data,
-                dataType: 'json',
-                success: function (res) {
-                    // console.log(res);
-                    if (res.code == 0) {
-                        layer.msg(data.msg, {
-                            icon: 5,
-                            time: 1000
-                        });
-                        return false;
-                    } else {
-                        layer.msg(res.msg, { icon: 1 }, function () {
-                            parent.location.reload(); // 父页面刷新
-                            var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
-                            parent.layer.close(index);
-                        });
-                    }
-                }
-            })
-        })
-    })
-</script>
-<!--请在上方写此页面业务相关的脚本-->

+ 0 - 72
view/sys/advertise_type/index.html

@@ -1,72 +0,0 @@
-<article class="cl pd-20">
-    <div class="cl pd-5 bg-1 bk-gray">
-        <span class="l">
-            <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
-                <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
-            <a href="javascript:layer_show('添加广告', '{:url('save?_layer=true&id=0')}');" class="btn btn-primary radius">
-                <i class="Hui-iconfont">&#xe600;</i> 添加广告</a>
-        </span>
-        <span class="r">
-            共有:<span class="f-18 c-red">{$list->count()}</span>条
-        </span>
-    </div>
-    <div class="mt-10" style="min-width:800px;">
-        <table class="table table-border table-bordered table-bg">
-            <thead>
-                <tr class="text-c">
-                    <th width="25">
-                        <input type="checkbox" name="allcheck">
-                    </th>
-                    <th width="50px">ID</th>
-                    <th>名称</th>
-                    <th>备注</th>
-                    <th>状态</th>
-                    <th>添加时间</th>
-                    <th>更新时间</th>
-                    <th>操作</th>
-                </tr>
-            </thead>
-            <tbody>
-                {foreach $list as $val}
-                <tr class="text-c">
-                    <td>
-                        <input type="checkbox" value="{$val.id}" name="checkbox[]">
-                    </td>
-                    <td>{$val.id}</td>
-                    <td>{$val.name}</td>
-                    <td>{$val.remark}</td>
-                    <td class="td-status">
-                        <a href="javascript:;" onclick="state(this,'{$val.id}')" style="text-decoration: none;" title="已{$val.status==1? '启用' : '停用'}">
-                            <span class="f-20 c-primary"><i class="Hui-iconfont">{$val.status==1?'&#xe601;' : '&#xe677;'}</i></span></a>
-                    </td>
-                    <td>{$val.create_time|date='Y-m-d H:i:s'}</td>
-                    <td>{$val.update_time|date='Y-m-d H:i:s'}</td>
-                    <td class="td-manage">
-                        <a class="btn btn-primary radius" title="编辑" href="javascript:layer_show('修改', '{:url('save?_layer=true&id='.$val.id)}');">
-                            <i class="Hui-iconfont">&#xe6df;</i>修改
-                        </a>
-                        <a class="btn btn-danger radius" title="删除" href="javascript:;" onclick="del(this,'{$val.id}')" class="ml-5">
-                            <i class="Hui-iconfont">&#xe6e2;</i>删除
-                        </a>
-                    </td>
-                </tr>
-                {/foreach}
-            </tbody>
-        </table>
-    </div>
-</article>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript">
-    // 图片预览
-    $('.pictureview').hover(function(){
-        console.log($(this).children('img').attr('src'));
-        var url = $(this).children('img').attr('src');
-        var img = '<img class="thumbnail" id="thumbview" src="'+url+'">';
-        $(this).append(img);
-    },function(){
-        $('#thumbview').remove();
-    });
-
-</script>
-<!--/请在上方写此页面业务相关的脚本-->

+ 0 - 73
view/sys/advertise_type/save.html

@@ -1,73 +0,0 @@
-<article class="cl pd-20">
-    <form action="" method="post" class="form form-horizontal" id="form-save">
-        <input type="hidden" name="id" id="id" value="{$data.id}">
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>名称:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <input type="text" class="input-text" id="name" name="name" value="{$data.name}"
-                    autocomplete="new-password">
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red"></span>状态:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <div class="radio-box">
-                    <input type="radio" name="status" id="status-1" value="1" {$data==null || $data.status==1 ? 'checked' : ""}>
-                    <label for="typeId-1">启用</label>
-                </div>
-                <div class="radio-box">
-                    <input type="radio" name="status" id="status-2" value="2" {$data.status==2 ? 'checked' : ""}>
-                    <label for="status-2">禁用</label>
-                </div>
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">备注:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" id="remark" name="remark" value="{$data.remark}">
-            </div>
-        </div>
-        <div class="row cl">
-            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
-                <input class="btn btn-success radius" type="button" id="form-save-button"
-                    value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
-                <input class="btn btn-default radius" type="button" value="&nbsp;&nbsp;取消&nbsp;&nbsp;"
-                    onClick="layer_close();">
-            </div>
-        </div>
-    </form>
-</article>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript">
-    $(function () {
-        $("#form-save-button").click(function () {
-            var data = $("#form-save").serializeArray();
-            $.ajax({
-                type: 'POST',
-                url: '{:url("save")}',
-                data: data,
-                dataType: 'json',
-                success: function (res) {
-                    // console.log(res);
-                    if (res.code = 0) {
-                        layer.msg(data.msg, {
-                            icon: 5,
-                            time: 1000
-                        });
-                        return false;
-                    } else {
-                        layer.msg(res.msg, { icon: 1 }, function () {
-                            parent.location.reload(); // 父页面刷新
-                            var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
-                            parent.layer.close(index);
-                        });
-                    }
-                }
-            })
-        })
-    })
-</script>
-<!--请在上方写此页面业务相关的脚本-->

+ 1 - 1
view/sys/article/savemd.html

@@ -62,7 +62,7 @@
 </style>
 
 <article class="cl pd-20">
-    <form action="{:url('save')}" method="post" class="form form-horizontal" id="form-save">
+    <form action="{:url('/sys/article/save')}" method="post" class="form form-horizontal" id="form-save">
         <input type="hidden" name="id" value="{$data['id']}">
         <input type="hidden" name="cjid" value="{$data['cjid']}">
         <input type="hidden" name="content_type" value="{$data['content_type']}">

+ 1 - 1
view/sys/category/index.html

@@ -119,7 +119,7 @@
             'id': parseInt(id)
         };
 
-        $.post('navStatus', data, function (res) {
+        $.post('/sys/category/navStatus', data, function (res) {
             if (res.code == 0) {
                 topalert({
                     type: 0,

+ 1 - 1
view/sys/category/save.html

@@ -163,7 +163,7 @@
             var data = $("#form-save").serializeArray();
             $.ajax({
                 type: 'POST',
-                url: '{:url("doSave")}',
+                url: '{:url("/sys/sys_category/doSave")}',
                 data: data,
                 dataType: 'json',
                 success: function (res) {

+ 0 - 138
view/sys/module/index.html

@@ -1,138 +0,0 @@
-<article class="cl pd-10" style="min-width: 900px;">
-    <div class="cl pd-5 bg-1 bk-gray mt-20">
-        <span class="l">
-            <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
-                <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
-            <a class="btn btn-primary radius" href="javascript:save(0);">
-                <i class="Hui-iconfont">&#xe600;</i> 添加模型</a>
-        </span>
-        <span class="r">共有数据:<strong id="total">{notempty name="list"}{$list->total()}{else/}0{/notempty}</strong>
-            条</span>
-    </div>
-    <div id="edatalist">
-        <table class="table table-border table-bordered table-bg">
-            <thead>
-                <tr class="text-c">
-                    <th width="25px;">
-                        <input type="checkbox" name="" value="">
-                    </th>
-                    <th width="80px;">ID</th>
-                    <th width="160px;">模块名称</th>
-                    <th width="160px;">表名称</th>
-                    <th width="160px;">模型名称</th>
-                    <th width="180px;">表描述</th>
-                    <th width="100px;">表类型</th>
-                    <th width="80px;">主键</th>
-                    <th width="80px;">排序</th>
-                    <th width="140px;">创建时间</th>
-                    <th>操作</th>
-                </tr>
-            </thead>
-            <tbody>
-                {foreach $list as $val}
-                <tr class="text-c va-m">
-                    <td>
-                        <input type="checkbox" value="{$val.id}" name="checkbox[]">
-                    </td>
-                    <td>{$val.id}</td>
-                    <td>{$val.module_name}</td>
-                    <td>{$val.table_name}</td>
-                    <td>{$val.model_name}</td>
-                    <td>{$val.remark}</td>
-                    <td>{$val.table_type}</td>
-                    <td>{$val.pk}</td>
-                    <td><input type="text" class="input-text input-sort" value="{$val.sort}" data-id="{$val.id}"
-                            style="text-align: center;"></td>
-                    <td>{$val.create_time|date="Y-m-d H:i:s"}</td>
-                    <td class="td-manage">
-                        <a class="btn btn-primary radius" href="javascript:save({$val.id});"
-                            title="编辑" style="text-decoration:none" class="ml-10">
-                            <i class="Hui-iconfont">&#xe6df;</i>编辑
-                        </a>
-                        <a class="btn btn-danger radius" href="javascript:;" title="删除" style="text-decoration:none"
-                            class="ml-10" onClick="del(this,'{$val.id}')">
-                            <i class="Hui-iconfont">&#xe6e2;</i>删除
-                        </a>
-                    </td>
-                </tr>
-                {/foreach}
-            </tbody>
-        </table>
-    </div>
-    <div class="cl pd-5 bg-1 bk-gray mt-20 ">
-        <span class="r">{notempty name="list"}{$list->render()|raw}{/notempty}</span>
-    </div>
-</article>
-<script>
-    function save(id) {
-        var title = id == 0 ? '添加模型' : '修改模型'
-        var url = "{:url('save')}" + "?_layer=true&id=" + id
-        layer_show(title, url, 800, 700);
-    }
-
-    // 排序
-    $(".input-sort").change(function () {
-        var sort = $(this).val();
-        var id = $(this).data('id');
-        // console.log(sort);
-        // console.log(id);
-        $.post('sort', {
-            'id': id,
-            'sort': sort
-        }, function (res) {
-            console.log(res);
-            if (res) {
-                layer.msg('排序成功', {
-                    icon: 1,
-                    time: 2000
-                });
-            } else {
-                layer.msg('排序失败', {
-                    icon: 5,
-                    time: 2000
-                });
-            }
-        }, 'json');
-    })
-    
-    // 产品上加/下架 or 文章上线.下线
-    function duty(action, obj, id) {
-        var duty = 2,
-            title = '上线',
-            button = 'default',
-            status = '下线';
-
-        if (action == 'up') {
-            duty = 1;
-            title = '下线';
-            status = '正常';
-            button = 'success';
-            action = 'down';
-        } else {
-            action = 'up';
-        }
-
-
-        var text = "<a href=\"javascript:void(0);\" title=" + title + " onClick=\"duty('" + action + "', this," + id + ")\" >";
-        text += '<span class="label label-' + button + ' radius">' + status + '</span></a>';
-
-        $.post("duty", {
-            'id': id,
-            'status': duty
-        }, function (data) {
-            if (data.code == 2) {
-                $(obj).after(text);
-                $(obj).remove();
-                layer.msg(data.msg, {
-                    icon: 6,
-                    time: 1000
-                });
-            } else {
-                layer.msg(data.msg, {
-                    icon: 5,
-                    time: 1000
-                });
-            }
-        }, 'json');
-    }
-</script>

+ 0 - 154
view/sys/module/save.html

@@ -1,154 +0,0 @@
-<article class="cl pd-20">
-    <form action="" method="post" class="form form-horizontal" id="form-save">
-        <input type="hidden" name="id" id="id" value="{$data.id}">
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>模块名称:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.module_name}" placeholder="请填写模块名称"
-                    id="module_name" name="module_name">
-            </div>
-            <span class="c-666"><i class="Hui-iconfont">&#xe6cd;</i> 填写中文名称,如:友情链接</span>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red">*</span>表名称:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.table_name}" placeholder="请填写表名称"
-                    id="table_name" name="table_name">
-            </div>
-            <span class="c-666"><i class="Hui-iconfont">&#xe6cd;</i> 除去表前缀的数据表名称,全部小写并以`_`分割,如:user_group</span>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                模型名称:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.model_name}" placeholder="请填写请填写模型名称" id="model_name" name="model_name">
-            </div>
-            <span class="c-666"><i class="Hui-iconfont">&#xe6cd;</i> 除去表前缀的数据表名称,驼峰法命名,且首字母大写,如:UserGroup</span>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                表描述:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.table_comment}" placeholder="请填写表描述" id="table_comment"
-                    name="table_comment">
-            </div>
-            <div class="col-3"> </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                表类型:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <span class="select-box">
-                    <select class="select" id="table_type" name="table_type">
-                        <option value="0" {eq name="data.table_type" value="0" }selected{/eq}>请选择</option>
-                        <option value="1" {eq name="data.table_type" value="1" }selected{/eq}>CMS</option>
-                        <option value="2" {eq name="data.table_type" value="2" }selected{/eq}>后台</option>
-                    </select>
-                </span>
-            </div>
-            <div class="col-3"> </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                主键:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.pk}" placeholder="请填写主键"
-                    id="pk" name="pk">
-            </div>
-            <div class="col-3"> </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                字段列表:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="text" class="input-text" value="{$data.list_fields}" placeholder="请填写详情模板"
-                    id="list_fields" name="list_fields">
-            </div>
-            <span class="c-666"><i class="Hui-iconfont">&#xe6cd;</i> 前台列表页可调用字段,默认为*,仅用作前台CMS调用时使用</span>
-            <div class="col-3"> </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">排序:</label>
-            <div class="formControls col-xs-4 col-sm-6">
-                <input type="number" min=0 max=100 class="input-text" value="{$data.sort}" name="sort"
-                    style="width:120px;">
-                </div>
-            <span class="c-666"><i class="Hui-iconfont">&#xe6cd;</i> 降序(数字越大, 越靠前)</span>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">
-                <span class="c-red"></span>单页模式:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <div class="radio-box">
-                    <input type="radio" name="is_single" id="is_single-1" value="1" {$data==null || $data.is_single==1
-                        ? 'checked' : "" }>
-                    <label for="is_single-1">是</label>
-                </div>
-                <div class="radio-box">
-                    <input type="radio" name="is_single" id="is_single-2" value="0" {$data.is_single==0 ? 'checked' : "" }>
-                    <label for="is_single-2">否</label>
-                </div>
-            </div>
-        </div>
-        <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-2">备注:</label>
-            <div class="formControls col-xs-8 col-sm-6">
-                <textarea name="remark" id="remark" cols="" rows="" class="textarea"
-                    placeholder="SEO描述...最多输入500个字符" dragonfly="true" nullmsg="备注不能为空!"
-                    onKeyUp="textarealength(this,500)">{$data.remark}</textarea>
-                <p class="textarea-numberbar">
-                    <em class="textarea-length">0</em>/500
-                </p>
-            </div>
-            <div class="col-3"> </div>
-        </div>
-    </form>
-    <div class="row cl">
-        <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
-            <button type="button" class="btn btn-success radius" id="form-save-button" name="">确&nbsp;定</button>
-            <button type="button" class="btn btn-default radius" onclick="layer_close();"
-                style="margin-left:20px;">取&nbsp;消</button>
-        </div>
-    </div>
-</article>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript">
-    $(function () {
-        $("#form-save-button").click(function () {
-            if (getblen($("#remark").val()) > 500) {
-                layer.msg('备注过长', {
-                    icon: 5,
-                    time: 1000
-                });
-                return false;
-            }
-
-            var data = $("#form-save").serializeArray();
-            $.ajax({
-                type: 'POST',
-                url: '{:url("save")}',
-                data: data,
-                dataType: 'json',
-                success: function (res) {
-                    if (res.code == 0) {
-                        layer.msg(res.msg, {
-                            icon: 5,
-                            time: 1000
-                        });
-                        return false;
-                    } else {
-                        layer.msg(res.msg, { icon: 1 }, function () {
-                            parent.location.reload(); // 父页面刷新
-                            var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
-                            parent.layer.close(index);
-                        });
-                    }
-                }
-            })
-        })
-    })
-
-</script>

+ 2 - 2
view/sys/public/header.html

@@ -2,7 +2,7 @@
 <header class="navbar-wrapper">
     <div class="navbar navbar-fixed-top">
         <div class="container-fluid cl">
-            <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/admin">后台管理</a>
+            <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/sys/index/index.html">后台管理</a>
             <span class="logo navbar-slogan f-l mr-10 hidden-xs">v{$sys_version}</span>
             <nav class="nav navbar-nav">
                 <ul class="cl">
@@ -19,7 +19,7 @@
                         <span id="top_time"></span>
                     </li>
                     <li>
-                        <a aria-hidden="false" class="logo navbar-logo f-l mr-10 hidden-xs" href="/sys/index.html">
+                        <a aria-hidden="false" class="logo navbar-logo f-l mr-10 hidden-xs" href="/sys/index/index.html">
                             <i class="Hui-iconfont">&#xe625;</i>系统首页</a>
                         <a aria-hidden="false" class="logo navbar-logo f-l mr-10 hidden-xs" href="/index.html"
                             target="_blank">

+ 21 - 21
view/sys/sys_log/index.html

@@ -57,26 +57,26 @@
 <!--请在下方写此页面业务相关的脚本-->
 <script type="text/javascript">
     // 删除条目
-    function del(obj, id) {
-        layer.confirm('确认要删除吗?', function (index) {
-            $.post('delete', {
-                'id': id
-            }, function (data) {
-                if (data.code == 1) {
-                    $(obj).parents("tr").remove();
-                    layer.msg(data.msg, {
-                        icon: 1,
-                        time: 1000
-                    });
-                } else {
-                    layer.msg(data.msg, {
-                        icon: 5,
-                        time: 2000
-                    });
-                    return false;
-                }
-            }, 'json');
-        });
-    }
+    // function del(obj, id) {
+    //     layer.confirm('确认要删除吗?', function (index) {
+    //         $.post('delete', {
+    //             'id': id
+    //         }, function (data) {
+    //             if (data.code == 1) {
+    //                 $(obj).parents("tr").remove();
+    //                 layer.msg(data.msg, {
+    //                     icon: 1,
+    //                     time: 1000
+    //                 });
+    //             } else {
+    //                 layer.msg(data.msg, {
+    //                     icon: 5,
+    //                     time: 2000
+    //                 });
+    //                 return false;
+    //             }
+    //         }, 'json');
+    //     });
+    // }
 </script>
 <!--请在上方写此页面业务相关的脚本-->

+ 1 - 1
view/sys/sys_menu/save.html

@@ -78,7 +78,7 @@
             var data = $("#form-admin-menu").serializeArray();
             $.ajax({
                 type: 'POST',
-                url: '{:url("save")}',
+                url: '{:url("/sys/sys_user/save")}',
                 data: data,
                 dataType: 'json',
                 success: function(res) {

+ 1 - 1
view/sys/sys_role/save.html

@@ -91,7 +91,7 @@
             var data = $("#form-save").serializeArray();
             $.ajax({
                 type: 'POST',
-                url: '{:url("save")}',
+                url: '{:url("/sys/sys_role/save")}',
                 data: data,
                 dataType: 'json',
                 success: function (res) {

+ 1 - 1
view/sys/sys_user/password.html

@@ -67,7 +67,7 @@
 
         $.ajax({
                 type: 'POST',
-                url: '{:url("password")}',
+                url: '{:url("/sys/sys_user/password")}',
                 data: {
                     oldpassword: oldpassword,
                     newpassword: newpassword,

+ 1 - 1
view/sys/sys_user/save.html

@@ -215,7 +215,7 @@
             var data = $("#form-save").serializeArray();
             $.ajax({
                 type: 'POST',
-                url: '{:url("save")}',
+                url: '{:url("/sys/sys_user/save")}',
                 data: data,
                 dataType: 'json',
                 success: function (res) {