mirror of https://gitee.com/karson/fastadmin.git
parent
cd9d2e6516
commit
d1cdc51798
|
|
@ -63,7 +63,7 @@ CREATE TABLE `fa_area` (
|
||||||
`shortname` varchar(100) DEFAULT NULL COMMENT '简称',
|
`shortname` varchar(100) DEFAULT NULL COMMENT '简称',
|
||||||
`name` varchar(100) DEFAULT NULL COMMENT '名称',
|
`name` varchar(100) DEFAULT NULL COMMENT '名称',
|
||||||
`mergename` varchar(255) DEFAULT NULL COMMENT '全称',
|
`mergename` varchar(255) DEFAULT NULL COMMENT '全称',
|
||||||
`level` tinyint(4) DEFAULT NULL COMMENT '层级 0 1 2 省市区县',
|
`level` tinyint(4) DEFAULT NULL COMMENT '层级:1=省,2=市,3=区/县',
|
||||||
`pinyin` varchar(100) DEFAULT NULL COMMENT '拼音',
|
`pinyin` varchar(100) DEFAULT NULL COMMENT '拼音',
|
||||||
`code` varchar(100) DEFAULT NULL COMMENT '长途区号',
|
`code` varchar(100) DEFAULT NULL COMMENT '长途区号',
|
||||||
`zip` varchar(100) DEFAULT NULL COMMENT '邮编',
|
`zip` varchar(100) DEFAULT NULL COMMENT '邮编',
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,10 @@ class User extends Model
|
||||||
self::beforeUpdate(function ($row) {
|
self::beforeUpdate(function ($row) {
|
||||||
$changedata = $row->getChangedData();
|
$changedata = $row->getChangedData();
|
||||||
$origin = $row->getOriginData();
|
$origin = $row->getOriginData();
|
||||||
if (isset($changedata['money']) && (function_exists('bccomp') ? bccomp($changedata['money'], $origin['money'], 2) !== 0 : (double) $changedata['money'] !== (double) $origin['money'])) {
|
if (isset($changedata['money']) && (function_exists('bccomp') ? bccomp($changedata['money'], $origin['money'], 2) !== 0 : (double)$changedata['money'] !== (double)$origin['money'])) {
|
||||||
MoneyLog::create(['user_id' => $row['id'], 'money' => $changedata['money'] - $origin['money'], 'before' => $origin['money'], 'after' => $changedata['money'], 'memo' => '管理员变更金额']);
|
MoneyLog::create(['user_id' => $row['id'], 'money' => $changedata['money'] - $origin['money'], 'before' => $origin['money'], 'after' => $changedata['money'], 'memo' => '管理员变更金额']);
|
||||||
}
|
}
|
||||||
if (isset($changedata['score']) && (int) $changedata['score'] !== (int) $origin['score']) {
|
if (isset($changedata['score']) && (int)$changedata['score'] !== (int)$origin['score']) {
|
||||||
ScoreLog::create(['user_id' => $row['id'], 'score' => $changedata['score'] - $origin['score'], 'before' => $origin['score'], 'after' => $changedata['score'], 'memo' => '管理员变更积分']);
|
ScoreLog::create(['user_id' => $row['id'], 'score' => $changedata['score'] - $origin['score'], 'before' => $origin['score'], 'after' => $changedata['score'], 'memo' => '管理员变更积分']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -67,21 +67,22 @@ class User extends Model
|
||||||
return ['normal' => __('Normal'), 'hidden' => __('Hidden')];
|
return ['normal' => __('Normal'), 'hidden' => __('Hidden')];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPrevtimeTextAttr($value, $data)
|
public function getPrevtimeTextAttr($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : $data['prevtime'];
|
$value = $value ? $value : ($data['prevtime'] ?? "");
|
||||||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLogintimeTextAttr($value, $data)
|
public function getLogintimeTextAttr($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : $data['logintime'];
|
$value = $value ? $value : ($data['logintime'] ?? "");
|
||||||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getJointimeTextAttr($value, $data)
|
public function getJointimeTextAttr($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : $data['jointime'];
|
$value = $value ? $value : ($data['jointime'] ?? "");
|
||||||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- 加载样式及META信息 -->
|
<!-- 加载样式及META信息 -->
|
||||||
{include file="common/meta" /}
|
{include file="common/meta" /}
|
||||||
</head>
|
</head>
|
||||||
<body class="hold-transition {$Think.config.fastadmin.adminskin|default='skin-black-green'} sidebar-mini {:$Think.cookie.sidebar_collapse?'sidebar-collapse':''} fixed {:$Think.config.fastadmin.multipletab?'multipletab':''} {:$Think.config.fastadmin.multiplenav?'multiplenav':''}" id="tabs">
|
<body class="hold-transition {$Think.config.fastadmin.adminskin|default='skin-black-blue'} sidebar-mini {:$Think.cookie.sidebar_collapse?'sidebar-collapse':''} fixed {:$Think.config.fastadmin.multipletab?'multipletab':''} {:$Think.config.fastadmin.multiplenav?'multiplenav':''}" id="tabs">
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
|
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,10 @@
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"])) {
|
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
$_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
|
||||||
|
|
||||||
require __DIR__ . "/index.php";
|
require __DIR__ . "/index.php";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue