first commit

This commit is contained in:
2020-08-06 15:26:41 +08:00
commit 8c0aa3edc1
1416 changed files with 238374 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\common\model;
class Logs extends _Init
{
/**
* 关闭更新时间写入
*/
protected $updateTime = false;
/**
* 转换datas数据
* @param [type] $value 数据内容
*/
protected function setDatasAttr($value)
{
return !empty($value) ? json_encode($value, JSON_UNESCAPED_UNICODE) : '';
}
/**
* 获取昵称
*/
protected function getUidTextAttr($value, $data)
{
return MemberInfo::where('uid', $data['uid'])->value('nickname');
}
/**
* 格式化datas数据
* @param [type] $value datas数据
* @param [type] $data 数据集合
*/
protected function getDatasTextAttr($value, $data)
{
$content = $data['datas'];
if (!empty($content)) {
$content = json_decode($content);
$string = '';
if (is_object($content) && !empty($content)) {
foreach ($content as $key => $value) {
$string .= $key . ' : ' . json_encode($value, JSON_UNESCAPED_UNICODE) . '<br/>';
}
} else {
$string = $content;
}
return $string;
} else {
return '';
}
}
}