8
This commit is contained in:
@@ -295,7 +295,7 @@ class Crud extends Base
|
||||
$data = $this->inputFilter($request->post());
|
||||
$password_filed = 'password';
|
||||
if (isset($data[$password_filed])) {
|
||||
$data[$password_filed] = Util::passwordHash($data[$password_filed]);
|
||||
$data[$password_filed] = Util::passwordHash(md5($data[$password_filed]));
|
||||
}
|
||||
$password_filed = 'trade_password';
|
||||
if (isset($data[$password_filed])) {
|
||||
@@ -380,7 +380,7 @@ class Crud extends Base
|
||||
if ($data[$password_filed] === '') {
|
||||
unset($data[$password_filed]);
|
||||
} else {
|
||||
$data[$password_filed] = Util::passwordHash($data[$password_filed]);
|
||||
$data[$password_filed] = Util::passwordHash(md5($data[$password_filed]));
|
||||
}
|
||||
}
|
||||
$password_filed = 'trade_password';
|
||||
|
||||
@@ -65,6 +65,7 @@ class FilesController extends Crud
|
||||
try{
|
||||
$data = $this->base($request, $savePath);
|
||||
}catch(\Exception $e){
|
||||
return $this->fail( $e->getMessage());
|
||||
log_alert($e->getMessage());
|
||||
}
|
||||
return $this->success( '上传成功', $data);
|
||||
|
||||
@@ -8,7 +8,7 @@ use plugin\admin\app\model\User as UserModel;
|
||||
use support\exception\BusinessException;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
use Throwable;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
@@ -51,7 +51,7 @@ class UserController extends Crud
|
||||
/**
|
||||
* 浏览
|
||||
* @return Response
|
||||
* @throws Throwable
|
||||
* @throws Exception
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -62,7 +62,7 @@ class UserController extends Crud
|
||||
* 插入
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws BusinessException|Throwable
|
||||
* @throws BusinessException|Exception
|
||||
*/
|
||||
public function insert(Request $request): Response
|
||||
{
|
||||
@@ -79,7 +79,7 @@ class UserController extends Crud
|
||||
* 更新
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws BusinessException|Throwable
|
||||
* @throws BusinessException|Exception
|
||||
*/
|
||||
public function update(Request $request): Response
|
||||
{
|
||||
|
||||
@@ -39,5 +39,11 @@ class VersionController extends Crud
|
||||
$this->assign("statusList", $statusList);
|
||||
$this->assignconfig("statusList", $statusList);
|
||||
}
|
||||
function __before_insert__(){
|
||||
$this->assign("row", [
|
||||
'type' => 1,
|
||||
'force' => 1
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -144,6 +144,18 @@
|
||||
<input type="text" readonly disabled value="{$row.invite_code}" autocomplete="off" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">URL</label>
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<input type="text" readonly disabled value="{:config('site.website')}/register/{$row.invite_code}" autocomplete="off" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">二维码</label>
|
||||
<div class="col-xs-12 col-sm-8 col-md-6" id="qrcode" data-url="{:config('site.website')}/register/{$row.invite_code}">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
{php}
|
||||
/*
|
||||
<div class="form-group">
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">基座版本</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">WGT版本</label>
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<input type="text" name="version" value="{$row.version|null}" autocomplete="off" data-rule="required" class="form-control">
|
||||
<input type="text" id="version_wgt" name="version_wgt" value="{$row.version_wgt|null}" autocomplete="off" data-rule="required" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">WGT版本</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">基座版本</label>
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<input type="text" name="version_wgt" value="{$row.version_wgt|null}" autocomplete="off" data-rule="required" class="form-control">
|
||||
<input type="text" id="version" name="version" value="{$row.version|null}" autocomplete="off" data-rule="required" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
define(['table', 'upload','form','qrcode'], function (Table,Upload,Form) {
|
||||
var User = {
|
||||
//Do setup work hereAction
|
||||
index: function () {
|
||||
@@ -29,6 +29,10 @@ define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
filter: "number",
|
||||
sortable: true // 是否排序
|
||||
},
|
||||
{
|
||||
title: "上级",
|
||||
field: "referrer.username"
|
||||
},
|
||||
{
|
||||
title: "角色",
|
||||
field: "role_id",
|
||||
@@ -84,10 +88,10 @@ define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
};
|
||||
columns.push({
|
||||
title: "注册时间",
|
||||
field: "createTime",
|
||||
formatter:function(v,row){
|
||||
return Table.api.formatter.datetime(parseInt(v/1000));
|
||||
},
|
||||
field: "created_at",
|
||||
// formatter:function(v,row){
|
||||
// return Table.api.formatter.datetime(parseInt(v/1000));
|
||||
// },
|
||||
filter:'datetime'
|
||||
});
|
||||
columns.push({
|
||||
@@ -106,6 +110,7 @@ define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
name:"team",
|
||||
icon:"mdi mdi-account-group-outline",
|
||||
classname:"btn btn-xs btn-info btn-dialog",
|
||||
extend:' data-offset="r" data-area="80%,100%" data-anim="5" data-shade="0.3" data-move="false"',
|
||||
url:'user/team'
|
||||
}
|
||||
]
|
||||
@@ -128,6 +133,11 @@ define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
var form = $('form');
|
||||
Form.api.bindevent(form)
|
||||
this.getRole();
|
||||
|
||||
$('#qrcode div').qrcode({
|
||||
width: 128,height: 128,
|
||||
text: $('#qrcode').data("url")
|
||||
});
|
||||
},
|
||||
insert:function(){
|
||||
Config['upload_url'] = '/files/avatar';
|
||||
|
||||
@@ -97,12 +97,23 @@ define(['table', 'upload','form'], function (Table,Upload,Form) {
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
update:function(){
|
||||
var form = $('form');
|
||||
Form.api.bindevent(form);
|
||||
this.insert();
|
||||
},
|
||||
insert:function(){
|
||||
var form = $('form');
|
||||
Form.api.bindevent(form);
|
||||
var calc_version = function(v){
|
||||
var _v = v.split('');
|
||||
console.log(_v);
|
||||
$('#version').val(_v.join('.'));
|
||||
}
|
||||
$('#version_wgt').on('change',function(){
|
||||
var v = $(this).val();
|
||||
calc_version(v);
|
||||
}).on('input',function(){
|
||||
var v = $(this).val();
|
||||
calc_version(v);
|
||||
});
|
||||
}
|
||||
};
|
||||
return Version
|
||||
|
||||
@@ -511,7 +511,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||
values[name] = $field.val();
|
||||
}
|
||||
});
|
||||
console.log(values);
|
||||
//console.log(values);
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user