[更新]修改项目注释

This commit is contained in:
Anyon 2019-04-04 10:13:36 +08:00
parent a2c36ffc63
commit f33d8b0886
23 changed files with 82 additions and 523 deletions

View File

@ -18,7 +18,7 @@ use library\Controller;
use think\Db;
/**
* 权限管理
* 系统权限管理
* Class Auth
* @package app\admin\controller
*/
@ -31,7 +31,7 @@ class Auth extends Controller
public $table = 'SystemAuth';
/**
* 权限列表
* 系统权限管理
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
@ -45,7 +45,7 @@ class Auth extends Controller
}
/**
* 权限授权节点
* 权限配置节点
* @return mixed
* @throws \ReflectionException
* @throws \think\Exception
@ -53,7 +53,7 @@ class Auth extends Controller
*/
public function apply()
{
$this->title = '权限授权配置';
$this->title = '权限配置节点';
$auth = $this->request->post('id', '0');
switch (strtolower($this->request->post('action'))) {
case 'get': // 获取权限配置
@ -88,7 +88,7 @@ class Auth extends Controller
}
/**
* 权限添加
* 添加系统权限
* @return array|string
*/
public function add()
@ -98,7 +98,7 @@ class Auth extends Controller
}
/**
* 权限编辑
* 编辑系统权限
* @return array|string
*/
public function edit()
@ -108,7 +108,7 @@ class Auth extends Controller
}
/**
* 权限禁用
* 禁用系统权限
*/
public function forbid()
{
@ -117,7 +117,7 @@ class Auth extends Controller
}
/**
* 权限恢复
* 启用系统权限
*/
public function resume()
{
@ -126,7 +126,7 @@ class Auth extends Controller
}
/**
* 权限删除
* 删除系统权限
*/
public function del()
{

View File

@ -17,7 +17,7 @@ namespace app\admin\controller;
use library\Controller;
/**
* 系统配置
* 系统参数配置
* Class Config
* @package app\admin\controller
*/

View File

@ -31,7 +31,7 @@ class Log extends Controller
public $table = 'SystemLog';
/**
* 日志列表
* 系统操作日志
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
@ -59,7 +59,7 @@ class Log extends Controller
}
/**
* 日志删除操作
* 删除系统日志
*/
public function del()
{

View File

@ -63,7 +63,7 @@ class Login extends Controller
if (empty($user)) $this->error('登录账号或密码错误,请重新输入!');
if (empty($user['status'])) $this->error('账号已经被禁用,请联系管理!');
// 账号锁定消息
$cache = cache('user_login_' . $user['username']);
$cache = cache("user_login_{$user['username']}");
if (is_array($cache) && !empty($cache['number']) && !empty($cache['time'])) {
if ($cache['number'] >= 10 && ($diff = $cache['time'] + 3600 - time()) > 0) {
list($m, $s, $info) = [floor($diff / 60), floor($diff % 60), ''];
@ -77,7 +77,7 @@ class Login extends Controller
} elseif ($cache['number'] + 1 <= 10) {
$cache = ['time' => time(), 'number' => $cache['number'] + 1, 'geoip' => $this->request->ip()];
}
cache('user_login_' . $user['username'], $cache);
cache("user_login_{$user['username']}", $cache);
if (($diff = 10 - $cache['number']) > 0) {
$this->error("<strong class='color-red'>登录账号或密码错误!</strong><p class='nowrap'>还有 {$diff} 次尝试机会,将锁定一小时内禁止登录!</p>");
} else {
@ -86,7 +86,7 @@ class Login extends Controller
}
}
// 登录成功并更新账号
cache('user_login_' . $user['username'], null);
cache("user_login_{$user['username']}", null);
Db::name('SystemUser')->where(['id' => $user['id']])->update([
'login_at' => Db::raw('now()'),
'login_ip' => $this->request->ip(),
@ -94,7 +94,7 @@ class Login extends Controller
]);
session('user', $user);
session('loginskey', null);
empty($user['authorize']) || \app\admin\service\Auth::applyNode();
if (!empty($user['authorize'])) \app\admin\service\Auth::applyNode();
_syslog('系统管理', '用户登录系统成功');
$this->success('登录成功,正在进入系统...', url('@admin'));
}

View File

@ -33,7 +33,7 @@ class Menu extends Controller
protected $table = 'SystemMenu';
/**
* 系统菜单显示
* 系统菜单管理
*/
public function index()
{
@ -57,18 +57,18 @@ class Menu extends Controller
}
/**
* 编辑菜单
* 添加系统菜单
*/
public function edit()
public function add()
{
$this->applyCsrfToken();
$this->_form($this->table, 'form');
}
/**
* 添加菜单
* 编辑系统菜单
*/
public function add()
public function edit()
{
$this->applyCsrfToken();
$this->_form($this->table, 'form');
@ -105,7 +105,7 @@ class Menu extends Controller
}
/**
* 启用菜单
* 启用系统菜单
*/
public function resume()
{
@ -114,7 +114,7 @@ class Menu extends Controller
}
/**
* 禁用菜单
* 禁用系统菜单
*/
public function forbid()
{
@ -123,7 +123,7 @@ class Menu extends Controller
}
/**
* 删除菜单
* 删除系统菜单
*/
public function del()
{

View File

@ -31,7 +31,7 @@ class Message extends Controller
protected $table = 'SystemMessage';
/***
* 获取消息列表
* 系统消息管理
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
@ -45,7 +45,7 @@ class Message extends Controller
}
/**
* 消息状态
* 设置消息状态
*/
public function state()
{
@ -53,7 +53,7 @@ class Message extends Controller
}
/**
* 删除消息
* 删除系统消息
*/
public function del()
{
@ -75,7 +75,7 @@ class Message extends Controller
}
/**
* 系统消息开关处理
* 设置消息开关
* @throws \think\Exception
* @throws \think\exception\PDOException
*/

View File

@ -32,7 +32,7 @@ class Node extends Controller
protected $table = 'SystemNode';
/**
* 显示节点列表
* 系统节点管理
* @throws \ReflectionException
*/
public function index()
@ -50,7 +50,7 @@ class Node extends Controller
}
/**
* 清理无效的节点数据
* 清理无效的节点
* @throws \ReflectionException
* @throws \think\Exception
* @throws \think\exception\PDOException
@ -65,7 +65,7 @@ class Node extends Controller
}
/**
* 更新数据记录
* 更新节点数据
* @throws \think\Exception
* @throws \think\exception\PDOException
*/

View File

@ -19,7 +19,7 @@ use think\Console;
use think\Db;
/**
* 系统消息任务管理
* 系统消息任务
* Class Queue
* @package app\admin\controller
*/
@ -32,7 +32,7 @@ class Queue extends Controller
protected $table = 'SystemJobsLog';
/**
* 任务列表
* 系统消息任务
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException

View File

@ -19,7 +19,7 @@ use library\tools\Data;
use think\Db;
/**
* 系统用户管理控制器
* 系统用户管理
* Class User
* @package app\admin\controller
* @author Anyon <zoujingli@qq.com>
@ -35,7 +35,7 @@ class User extends Controller
public $table = 'SystemUser';
/**
* 用户列表
* 系统用户管理
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
@ -49,7 +49,7 @@ class User extends Controller
}
/**
* 授权管理
* 用户授权管理
* @return mixed
*/
public function auth()
@ -59,7 +59,7 @@ class User extends Controller
}
/**
* 用户添加
* 添加系统用户
* @return mixed
*/
public function add()
@ -69,7 +69,7 @@ class User extends Controller
}
/**
* 用户编辑
* 编辑系统用户
* @return mixed
*/
public function edit()
@ -79,7 +79,7 @@ class User extends Controller
}
/**
* 用户密码修改
* 修改用户密码
* @return mixed
* @throws \think\Exception
* @throws \think\exception\PDOException
@ -107,7 +107,7 @@ class User extends Controller
}
/**
* 表单数据默认处理
* 表单数据处理
* @param array $data
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
@ -128,7 +128,7 @@ class User extends Controller
}
/**
* 删除用户
* 删除系统用户
*/
public function del()
{
@ -140,7 +140,7 @@ class User extends Controller
}
/**
* 用户禁用
* 禁用系统用户
*/
public function forbid()
{
@ -152,7 +152,7 @@ class User extends Controller
}
/**
* 用户禁用
* 启用系统用户
*/
public function resume()
{

View File

@ -22,12 +22,10 @@
<td>framework</td>
</tr>
<tr>
<td>ThinkAdmin 版本</td>
<td>ThinkPHP版本</td>
<td>{$think_ver}</td>
<td>在线体验</td>
<td>
<a target="_blank" href="http://framework.thinkadmin.top">http://framework.thinkadmin.top</a>
</td>
<td><a target="_blank" href="http://framework.thinkadmin.top">http://framework.thinkadmin.top</a></td>
</tr>
<tr>
<td>服务器操作系统</td>
@ -43,21 +41,13 @@
<td>WEB运行环境</td>
<td>{:php_sapi_name()}</td>
<td>项目地址</td>
<td>
<a target="_blank" href="https://github.com/zoujingli/framework">
https://github.com/zoujingli/framework
</a>
</td>
<td><a target="_blank" href="https://github.com/zoujingli/framework">https://github.com/zoujingli/framework</a></td>
</tr>
<tr>
<td>MySQL数据库版本</td>
<td>{$mysql_ver}</td>
<td>BUG反馈</td>
<td>
<a target="_blank" href="https://github.com/zoujingli/framework/issues">
https://github.com/zoujingli/framework/issues
</a>
</td>
<td><a target="_blank" href="https://github.com/zoujingli/framework/issues">https://github.com/zoujingli/framework/issues</a></td>
</tr>
<tr>
<td>运行PHP版本</td>

View File

@ -33,8 +33,7 @@ class Config extends Controller
public $table = 'WechatServiceConfig';
/**
* 微信基础参数配置
* @return array|string
* 开放平台参数配置
* @throws \think\Exception
* @throws \think\exception\PDOException
*/

View File

@ -27,13 +27,13 @@ class Index extends Controller
{
/**
* 定义当前操作表名
* 绑定数据表
* @var string
*/
public $table = 'WechatServiceConfig';
/**
* 微信基础参数配置
* 授权公众号管理
* @return string
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
@ -52,7 +52,7 @@ class Index extends Controller
}
/**
* 清理接口调用测试
* 清理调用次数
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
@ -70,7 +70,7 @@ class Index extends Controller
}
/**
* 同步获取权限
* 同步指定授权公众号
*/
public function sync()
{
@ -92,7 +92,7 @@ class Index extends Controller
}
/**
* 同步获取所有授权公众号记录
* 同步所有授权公众号
*/
public function syncall()
{
@ -118,7 +118,7 @@ class Index extends Controller
}
/**
* 删除微信
* 删除公众号授权
*/
public function del()
{
@ -127,7 +127,7 @@ class Index extends Controller
}
/**
* 微信禁用
* 禁用公众号授权
*/
public function forbid()
{
@ -136,7 +136,7 @@ class Index extends Controller
}
/**
* 微信启用
* 启用公众号授权
*/
public function resume()
{

View File

@ -1,136 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | framework
// +----------------------------------------------------------------------
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://framework.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------
namespace app\store\controller;
use library\Controller;
use think\Db;
/**
* 页面管理
* Class Page
* @package app\store\controller
*/
class Page extends Controller
{
/**
* 绑定数据表
* @var string
*/
protected $table = 'StorePage';
/**
* 页面管理
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function index()
{
$this->title = '商城页面管理';
$this->_query($this->table)->order('sort asc,id desc')->page();
}
/**
* 数据列表处理
* @param array $data
*/
protected function _page_filter(&$data)
{
foreach ($data as &$vo) {
$vo['one'] = json_decode($vo['one'], true);
$vo['mul'] = json_decode($vo['mul'], true);
}
}
/**
* 添加页面
*/
public function add()
{
$this->title = '添加商城页面';
$this->_form($this->table, 'form');
}
/**
* 编辑页面
*/
public function edit()
{
$this->title = '编辑商城页面';
$this->_form($this->table, 'form');
}
/**
* 表单数据处理
* @param array $post
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
protected function _form_filter(&$post = [])
{
if ($this->request->isGet()) {
$where = ['is_deleted' => '0', 'status' => '1'];
$this->goodsList = Db::name('StoreGoods')->where($where)->order('sort asc,id desc')->select();
$maps = ['普通商品', '临时礼包', '会员礼包'];
foreach ($this->goodsList as &$vo) {
$vo['title'] = (isset($maps[$vo['vip_mod']]) ? "{$maps[$vo['vip_mod']]}" : '【类型异常】') . $vo['title'];
}
if (isset($post['one'])) $post['one'] = json_decode($post['one'], true);
if (isset($post['mul'])) $post['mul'] = json_decode($post['mul'], true);
} else foreach (['one', 'mul'] as $type) {
if (empty($post[$type])) $post[$type] = [];
$post[$type] = json_encode($post[$type], JSON_UNESCAPED_UNICODE);
}
}
/**
* 表单数据结果处理
* @param boolean $result
*/
protected function _form_result($result)
{
if ($result) {
$this->success('页面更新成功!', url('@admin') . '#' . url('@store/page/index'));
}
}
/**
* 禁用页面
*/
public function forbid()
{
$this->_save($this->table, ['status' => '0']);
}
/**
* 启用页面
*/
public function resume()
{
$this->_save($this->table, ['status' => '1']);
}
/**
* 删除页面
*/
public function del()
{
$this->_delete($this->table);
}
}

View File

@ -1,72 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | framework
// +----------------------------------------------------------------------
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://framework.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------
namespace app\store\controller\api;
use library\Controller;
use think\Db;
/**
* 页面接口管理
* Class Page
* @package app\store\controller\api
*/
class Page extends Controller
{
/**
* 获取微信商品首页
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function gets()
{
$list = Db::name('StorePage')->field('title,type,one,mul')->where(['status' => '1'])->order('sort asc,id desc')->select();
foreach ($list as &$vo) {
$vo['one'] = json_decode($vo['one'], true);
$vo['mul'] = json_decode($vo['mul'], true);
if ($vo['type'] === 'one') unset($vo['mul']);
if ($vo['type'] === 'mul') unset($vo['one']);
}
$this->success('获取页面列表成功!', ['list' => $this->build($list)]);
}
/**
* 数据列表处理
* @param array $data
* @param array $goodsId
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
protected function build($data = [], $goodsId = [])
{
foreach ($data as $vo) if (isset($vo['mul'])) {
$goodsId = array_unique(array_merge($goodsId, $vo['mul']['goods']));
}
$goodsList = Db::name('StoreGoods')->field('id,title,logo')->whereIn('id', $goodsId)->select();
$field = 'goods_id,goods_spec,price_market,price_selling,number_sales,number_stock,number_virtual';
$goodsLists = Db::name('StoreGoodsList')->field($field)->where(['status' => '1'])->whereIn('goods_id', $goodsId)->select();
foreach ($goodsList as &$vo) {
$vo['list'] = [];
foreach ($goodsLists as $v) if ($vo['id'] === $v['goods_id']) $vo['list'][] = $v;
}
foreach ($data as &$vo) if (isset($vo['mul'])) {
foreach ($vo['mul']['goods'] as &$g) foreach ($goodsList as $v) if ($g == $v['id']) $g = $v;
}
return $data;
}
}

View File

@ -1,158 +0,0 @@
{extend name='admin@main'}
{block name="content"}
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body">
<div style="padding-left:45px;">
<fieldset>
<legend>页面信息</legend>
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>页面标题</h3>
<input name="title" required class="layui-input" placeholder="请输入页面标题" value="{$vo.title|default=''}">
</div>
<div class="layui-form-item block relative">
<span class="color-green margin-right-10">页面类型</span>
{foreach ['one'=>'单页模式','mul'=>'多页模式'] as $k => $v}
<label class="think-radio">
{if isset($vo.type) and $vo.type eq $k}
<input name="type" checked lay-ignore type="radio" value="{$k}"> {$v}
{else}
<input name="type" lay-ignore type="radio" value="{$k}"> {$v}
{/if}
</label>
{/foreach}
</div>
</fieldset>
<fieldset data-type-box="one">
<legend>单页模式</legend>
<div>
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>展示图片</h3>
<input name="one[image]" required class="layui-input" placeholder="请上传展示图片" value="{$vo.one.image|default=''}">
<button class="layui-btn layui-btn-sm" data-file="btn" data-field="one[image]" data-type="png,jpg,gif">上传图片</button>
</div>
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>绑定商品</h3>
<select name="one[goods]" class="layui-select" lay-search>
{foreach $goodsList as $v}
{if isset($vo.one.goods) and $vo.one.goods eq $v.id}
<option selected value="{$v.id}">{$v.title|default=''}</option>
{else}
<option value="{$v.id}">{$v.title|default=''}</option>
{/if}
{/foreach}
</select>
</div>
</div>
</fieldset>
<fieldset data-type-box="mul" class="padding-bottom-15">
<legend>多页模式</legend>
<div id="item-list-box">
{notempty name='vo.mul.goods'}
{foreach $vo.mul.goods as $g}
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>绑定商品</h3>
<div class="layui-row">
<div class="layui-col-xs8">
<select name="mul[goods][]" class="layui-select" lay-search>
{foreach $goodsList as $v}
{if $g eq $v.id}
<option selected value="{$v.id}">{$v.title|default=''}</option>
{else}
<option value="{$v.id}">{$v.title|default=''}</option>
{/if}
{/foreach}
</select>
</div>
<div class="layui-col-xs4 padding-top-5 padding-left-10">
<a onclick="moveUp(this)" class="layui-btn layui-btn-sm">上移</a>
<a onclick="moveDn(this)" class="layui-btn layui-btn-sm">下移</a>
<a onclick="moveRm(this)" class="layui-btn layui-btn-sm layui-btn-danger">移除</a>
</div>
</div>
</div>
{/foreach}
{/notempty}
</div>
<button onclick="addItem()" type="button" class="layui-btn layui-btn-sm">增加商品</button>
</fieldset>
</div>
<div class="layui-form-item text-center margin-top-20">
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
<button class="layui-btn layui-btn-danger" onclick="history.back()" type="button">取消编辑</button>
<button class="layui-btn" type="submit">保存页面</button>
</div>
</div>
</form>
{/block}
{block name='script''}
<div id="page-template-id" class="layui-hide">
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>绑定商品</h3>
<div class="layui-row">
<div class="layui-col-xs8">
<select name="mul[goods][]" class="layui-select" lay-search>
{foreach $goodsList as $v}
{if isset($data.goods) and $data.goods eq $v.id}
<option selected value="{$v.id}">{$v.title|default=''}</option>
{else}
<option value="{$v.id}">{$v.title|default=''}</option>
{/if}
{/foreach}
</select>
</div>
<div class="layui-col-xs4 padding-top-5 padding-left-10">
<a onclick="moveUp(this)" class="layui-btn layui-btn-sm">上移</a>
<a onclick="moveDn(this)" class="layui-btn layui-btn-sm">下移</a>
<a onclick="moveRm(this)" class="layui-btn layui-btn-sm layui-btn-danger">移除</a>
</div>
</div>
</div>
</div>
<script>
$(function () {
// 页面模式处理
window.form.render();
// 页面模式切换处理
$('input[name="type"]').on('click', function () {
$('[data-type-box]').not($('[data-type-box="' + this.value + '"]').show()).hide();
console.log(this.value)
});
// 自动切换页面模式
var $radio = $('input[name="type"]:checked');
if ($radio.size() < 1) $radio = $('input[name="type"]:first');
$radio.trigger('click');
});
function addItem() {
$('#item-list-box').append($('#page-template-id').html());
window.form.render();
}
// 移除选项
function moveRm(that) {
$.msg.confirm('确定要移除这个选项吗?', function (index) {
$(that).parents('.layui-form-item').remove(), $.msg.close(index);
});
}
// 上移选项
function moveUp(that) {
var $item = $(that).parents(".layui-form-item");
if ($item.index() > 0) $item.prev().before($item);
}
// 下移选项
function moveDn(that) {
var $item = $(that).parents(".layui-form-item");
if ($item.index() < $item.siblings('.layui-form-item').size()) $item.next().after($item);
}
</script>
{/block}

View File

@ -1,64 +0,0 @@
{extend name='admin@main'}
{block name="button"}
<!--{if auth("store/page/add")}-->
<button data-open='{:url("add")}' data-title="添加页面" class='layui-btn layui-btn-sm layui-btn-primary'>添加页面</button>
<!--{/if}-->
<!--{if auth("store/page/del")}-->
<button data-action='{:url("del")}' data-rule="id#{key}" data-confirm="确定要删除页面吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除页面</button>
<!--{/if}-->
{/block}
{block name="content"}
<table class="layui-table" lay-skin="line">
<!--{notempty name='list'}-->
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
</th>
<th class='list-table-sort-td'>
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
</th>
<th class='text-left nowrap'>页面名称</th>
<th class='text-left nowrap'>页面类型</th>
<th>创建时间</th>
<th>显示状态</th>
<th></th>
</tr>
</thead>
<!--{/notempty}-->
<tbody>
<!--{foreach $list as $key=>$vo}-->
<tr>
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
<td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
<td class='text-left nowrap'>{$vo.title}</td>
<td class='text-left nowrap'>{$vo.type==='mul'?'多页模式':'单页模式'}</td>
<td>{$vo.create_at|default='--'}</td>
<td class='text-left nowrap'>{eq name='vo.status' value='0'}<span class="layui-badge">已禁用</span>{else}<span class="layui-badge layui-bg-green">使用中</span>{/eq}</td>
<td class='text-left nowrap'>
{if auth("store/page/edit")}
<a class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
{/if}
{if $vo.status eq 1 and auth("store/page/forbid")}
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0">禁 用</a>
{elseif auth("store/page/resume")}
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>
{/if}
{if auth("store/page/del")}
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
{/if}
</td>
</tr>
<!--{/foreach}-->
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
{/block}

View File

@ -50,7 +50,7 @@ class Fans extends Controller
}
/**
* 微信粉丝列表处理
* 列表数据处理
* @param array $data
*/
protected function _index_page_filter(array &$data)
@ -87,7 +87,7 @@ class Fans extends Controller
}
/**
*批量取消拉黑粉丝
* 取消拉黑粉丝
*/
public function delBlack()
{
@ -121,7 +121,7 @@ class Fans extends Controller
}
/**
* 删除粉丝
* 删除粉丝信息
*/
public function del()
{

View File

@ -42,7 +42,7 @@ class Keys extends Controller
];
/**
* 显示关键字列表
* 回复规则管理
* @return array|string
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException

View File

@ -14,7 +14,6 @@
namespace app\wechat\controller;
use app\admin\service\Log;
use app\wechat\service\Wechat;
use library\Controller;
use think\Db;
@ -44,7 +43,7 @@ class Menu extends Controller
];
/**
* 显示菜单列表
* 微信菜单管理
* @return array
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
@ -65,7 +64,7 @@ class Menu extends Controller
}
/**
* 微信菜单编辑
* 编辑微信菜单
*/
public function edit()
{
@ -91,6 +90,7 @@ class Menu extends Controller
}
/**
* 菜单数据处理
* @param array $list
* @return mixed
*/
@ -113,7 +113,7 @@ class Menu extends Controller
}
/**
* 单个微信菜单数据过滤处理
* 单个微信菜单数据处理
* @param array $item
* @return array
*/
@ -140,7 +140,7 @@ class Menu extends Controller
}
/**
* 取消菜单
* 取消微信菜单
*/
public function cancel()
{

View File

@ -33,7 +33,7 @@ class News extends Controller
protected $table = 'WechatNews';
/**
* 图文列表
* 微信图文管理
* @return array|string
*/
public function index()
@ -77,7 +77,7 @@ class News extends Controller
}
/**
* 添加图文
* 添加微信图文
* @return string
* @throws \think\Exception
* @throws \think\exception\PDOException
@ -99,7 +99,7 @@ class News extends Controller
}
/**
* 编辑图文
* 编辑微信图文
* @return string
* @throws \think\Exception
* @throws \think\exception\PDOException
@ -150,7 +150,7 @@ class News extends Controller
}
/**
* 删除用户
* 删除微信图文
*/
public function del()
{

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a::getLoader();
return ComposerAutoloaderInitdd4cd514a6f8c3f392f6ee5b28563c79::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a
class ComposerAutoloaderInitdd4cd514a6f8c3f392f6ee5b28563c79
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitdd4cd514a6f8c3f392f6ee5b28563c79', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitdd4cd514a6f8c3f392f6ee5b28563c79', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInita2a5ca7b097a9d41d2230b028e215f7a
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirea2a5ca7b097a9d41d2230b028e215f7a($fileIdentifier, $file);
composerRequiredd4cd514a6f8c3f392f6ee5b28563c79($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequirea2a5ca7b097a9d41d2230b028e215f7a($fileIdentifier, $file)
function composerRequiredd4cd514a6f8c3f392f6ee5b28563c79($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a
class ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79
{
public static $files = array (
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
@ -346,9 +346,9 @@ class ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita2a5ca7b097a9d41d2230b028e215f7a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitdd4cd514a6f8c3f392f6ee5b28563c79::$classMap;
}, null, ClassLoader::class);
}