Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
74f6c883
Commit
74f6c883
authored
Jul 15, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
托管用户列表
parent
d4613dce
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
87 additions
and
576 deletions
+87
-576
LoginStatusAuthInterceptor.php
common/behaviors/LoginStatusAuthInterceptor.php
+1
-1
UserAuthInterceptor.php
common/behaviors/UserAuthInterceptor.php
+18
-12
TrusteeShipService.php
common/service/trusteeship/TrusteeShipService.php
+58
-0
AppAsset.php
wallet/assets/AppAsset.php
+0
-54
CoreAsset.php
wallet/assets/CoreAsset.php
+0
-32
IeAsset.php
wallet/assets/IeAsset.php
+0
-28
JqueryAsset.php
wallet/assets/JqueryAsset.php
+0
-29
LayoutAsset.php
wallet/assets/LayoutAsset.php
+0
-34
LoginAsset.php
wallet/assets/LoginAsset.php
+0
-32
TableAsset.php
wallet/assets/TableAsset.php
+0
-29
TableZhAsset.php
wallet/assets/TableZhAsset.php
+0
-23
TreeAsset.php
wallet/assets/TreeAsset.php
+0
-22
IndexAsset.php
wallet/assets/app/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/applicateRank/IndexAsset.php
+0
-24
IndexAsset.php
wallet/assets/coin/IndexAsset.php
+0
-25
IndexAsset.php
wallet/assets/coinPublish/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/coinPublishRule/IndexAsset.php
+0
-23
ListAsset.php
wallet/assets/coinPublishRule/ListAsset.php
+0
-23
IndexAsset.php
wallet/assets/coinReleaseCheck/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/coinReleaseMember/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/coinTransfer/IndexAsset.php
+0
-17
IndexAsset.php
wallet/assets/investment/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/investmentType/IndexAsset.php
+0
-23
IndexAsset.php
wallet/assets/site/IndexAsset.php
+0
-27
UserController.php
wallet/controllers/UserController.php
+10
-3
No files found.
common/behaviors/LoginStatusAuthInterceptor.php
View file @
74f6c883
...
...
@@ -20,7 +20,7 @@ class LoginStatusAuthInterceptor extends ActionFilter
{
$request_class
=
get_class
(
$action
->
controller
);
$request_action
=
$action
->
id
;
if
(
strpos
(
$request_class
,
'UserController'
)){
if
(
strpos
(
$request_class
,
'UserController'
)
&&
'login'
==
$request_action
){
return
true
;
}
$token_string
=
Yii
::
$app
->
request
->
headers
->
get
(
'Token'
);
...
...
common/behaviors/UserAuthInterceptor.php
View file @
74f6c883
...
...
@@ -17,57 +17,63 @@ class UserAuthInterceptor extends ActionFilter
{
public
function
beforeAction
(
$action
)
{
if
(
!
parent
::
beforeAction
(
$action
)){
if
(
!
parent
::
beforeAction
(
$action
))
{
return
false
;
}
$request_class
=
get_class
(
$action
->
controller
);
$request_action
=
$action
->
id
;
if
(
strpos
(
$request_class
,
'UserController'
)
!==
false
){
if
(
strpos
(
$request_class
,
'UserController'
)
&&
'login'
==
$request_action
){
return
true
;
}
$token_string
=
Yii
::
$app
->
request
->
headers
->
get
(
'Token'
);
$model
=
new
Admin
();
$user
=
$model
->
loginByAccessToken
(
$token_string
,
''
);
$user
=
$model
->
loginByAccessToken
(
$token_string
,
''
);
if
(
empty
(
$user
))
{
$code
=
'40001'
;
$msg
=
'user auth error'
;
goto
doEnd
;
}
$user_id
=
$user
->
uid
;
$platform_id
=
$user
->
platform_id
;
#var_dump($user_id,$platform_id);exit;
$user_auth
=
Yii
::
$app
->
params
[
'user_auth'
][
'user_auth'
];
$user_auth_map
=
$user_auth
[
$platform_id
]
??
null
;
if
(
empty
(
$user_auth_map
))
{
if
(
empty
(
$user_auth_map
))
{
$code
=
'40001'
;
$msg
=
'platform auth error'
;
goto
doEnd
;
}
$user_auth_map
=
$user_auth_map
[
$user_id
]
??
null
;
if
(
empty
(
$user_auth_map
))
{
if
(
empty
(
$user_auth_map
))
{
$code
=
'40001'
;
$msg
=
'user auth error'
;
goto
doEnd
;
}
$auth_type_map
=
Yii
::
$app
->
params
[
'user_auth'
][
$user_auth_map
];
$auth_type_map
=
array_unique
(
$auth_type_map
,
SORT_REGULAR
);
$switch
=
false
;
foreach
(
$auth_type_map
as
$key
=>
$auth_type
){
if
(
empty
(
$auth_type
))
continue
;
if
(
$request_class
==
$auth_type
[
'class'
])
{
foreach
(
$auth_type_map
as
$key
=>
$auth_type
)
{
if
(
empty
(
$auth_type
))
continue
;
if
(
$request_class
==
$auth_type
[
'class'
])
{
$action_map
=
$auth_type
[
'actions'
];
$switch
=
true
;
break
;
}
}
if
(
false
==
$switch
)
{
if
(
false
==
$switch
)
{
$code
=
'40003'
;
$msg
=
'controller auth error'
;
goto
doEnd
;
}
if
(
empty
(
$action_map
))
{
if
(
empty
(
$action_map
))
{
return
true
;
}
if
(
in_array
(
$request_action
,
$action_map
))
{
if
(
in_array
(
$request_action
,
$action_map
))
{
return
true
;
}
else
{
}
else
{
$code
=
'40004'
;
$msg
=
'action auth error'
;
goto
doEnd
;
...
...
common/service/trusteeship/TrusteeShipService.php
0 → 100644
View file @
74f6c883
<?php
namespace
common\service\trusteeship
;
use
Yii
;
use
common\helpers\Curl
;
class
TrusteeShipService
{
private
$node_params
;
public
function
__construct
(
$parameter
=
[])
{
if
(
empty
(
$parameter
))
{
$this
->
node_params
=
Yii
::
$app
->
params
[
'trusteeship'
];
}
else
{
$this
->
node_params
=
$parameter
;
}
}
public
function
urlBuild
(
$uri
=
''
)
{
$config
=
$this
->
node_params
;
$scheme
=
$config
[
'scheme'
]
??
'http'
;
$host
=
$config
[
'host'
]
??
'127.0.0.1'
;
$port
=
(
string
)
$config
[
'port'
]
??
''
;
if
(
$port
)
{
return
$scheme
.
'://'
.
$host
.
':'
.
$port
.
'/'
.
$uri
;
}
else
{
return
$scheme
.
'://'
.
$host
.
'/'
.
$uri
;
}
}
public
function
send
(
$method
=
'GET'
,
$uri
,
$params
=
[])
{
$ch
=
new
Curl
();
if
(
!
empty
(
$params
))
{
$ch
->
setGetParams
(
$params
);
}
$result
=
$ch
->
$method
(
$this
->
urlBuild
(
$uri
),
false
);
if
(
!
$result
)
{
return
[
'code'
=>
-
1
,
'msg'
=>
$ch
->
errorText
];
}
if
(
200
==
$result
[
'code'
]
&&
isset
(
$result
[
'data'
]))
{
return
$result
[
'data'
];
}
else
{
return
[
'code'
=>
-
1
,
'msg'
=>
$result
[
'error'
]];
}
}
public
function
getUserList
(
$params
=
[])
{
$uri
=
'backend/user/user-list'
;
return
$this
->
send
(
"GET"
,
$uri
,
$params
);
}
}
wallet/assets/AppAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Main backend application asset bundle.
*/
class
AppAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[];
public
$js
=
[];
public
$depends
=
[
'backend\assets\IeAsset'
,
'backend\assets\CoreAsset'
,
'backend\assets\LayoutAsset'
,
];
/**
* 定义按需加载JS方法,注意加载顺序在最后
* @param $view \yii\web\View
* @param $jsFile string
*/
public
static
function
addScript
(
$view
,
$jsFile
)
{
$view
->
registerJsFile
(
$jsFile
,
[
AppAsset
::
className
(),
'depends'
=>
'backend\assets\AppAsset'
]
);
}
/**
* 定义按需加载css方法,注意加载顺序在最后
* @param $view \yii\web\View
* @param $cssFile string
*/
public
static
function
addCss
(
$view
,
$cssFile
)
{
$view
->
registerCssFile
(
$cssFile
,
[
AppAsset
::
className
(),
'depends'
=>
'backend\assets\AppAsset'
]
);
}
}
wallet/assets/CoreAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class CoreAsset
* @package backend\assets
*/
class
CoreAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
'global/plugins/font-awesome/css/font-awesome.min.css'
,
'global/plugins/simple-line-icons/simple-line-icons.min.css'
,
'global/plugins/bootstrap/css/bootstrap.min.css'
,
'other/css/style.css?2018.0510'
,
];
public
$js
=
[
// 'global/plugins/bootstrap/js/bootstrap.min.js',
//'global/plugins/js.cookie.min.js',
// 'global/scripts/app.min.js',
];
public
$depends
=
[
'backend\assets\JqueryAsset'
,
//'yii\web\YiiAsset',
//'yii\grid\GridViewAsset'
];
}
wallet/assets/IeAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class IeAsset
* @package backend\assets
*/
class
IeAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
];
public
$js
=
[
'global/plugins/respond.min.js'
,
'global/plugins/excanvas.min.js'
,
];
public
$jsOptions
=
[
'condition'
=>
'lt IE9'
];
public
$depends
=
[
//'yii\web\YiiAsset',
//'yii\grid\GridViewAsset'
];
}
wallet/assets/JqueryAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class JqueryAsset
* @package backend\assets
*/
class
JqueryAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
'global/plugins/layui/css/layui.css'
,
];
public
$js
=
[
'global/plugins/jquery.min.js'
,
'global/plugins/layui/layui.all.js'
,
];
public
$depends
=
[];
public
$jsOptions
=
[
'position'
=>
\yii\web\View
::
POS_HEAD
,
];
}
wallet/assets/LayoutAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class LayoutAsset
* @package backend\assets
*/
class
LayoutAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
'global/css/components-md.min.css'
,
//'global/css/components-rounded.min.css',
//'global/css/plugins-md.min.css',
'global/css/plugins.min.css'
,
'layouts/layout3/css/layout.min.css'
,
'layouts/layout3/css/themes/blue-hoki.min.css'
];
public
$js
=
[
// 'layouts/layout3/scripts/layout.min.js',
// 'other/js/common.js?01101'
];
public
$jsOptions
=
[
'position'
=>
\yii\web\View
::
POS_END
,
];
}
wallet/assets/LoginAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class LoginAsset
* @package backend\assets
*/
class
LoginAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
'global/plugins/uniform/css/uniform.default.css'
,
'global/css/components-rounded.min.css'
,
'global/css/plugins.min.css'
,
'pages/css/login-4.min.css'
,
];
public
$js
=
[
'global/plugins/jquery-validation/js/jquery.validate.min.js'
,
'global/plugins/jquery-validation/js/additional-methods.min.js'
,
'global/plugins/backstretch/jquery.backstretch.min.js'
,
'global/plugins/uniform/jquery.uniform.min.js'
,
'pages/scripts/login-4.js'
,
];
public
$depends
=
[
'backend\assets\CoreAsset'
,
];
}
wallet/assets/TableAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* Class TableAsset
* @package backend\assets
*/
class
TableAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
];
public
$js
=
[
'global/plugins/bootstrap-table/bootstrap-table.min.js'
,
// 'global/plugins/bootstrap-table/bootstrap-table-fixed-columns.js',
];
public
$depends
=
[
'backend\assets\JqueryAsset'
];
public
$jsOptions
=
[
'position'
=>
\yii\web\View
::
POS_END
,
];
}
wallet/assets/TableZhAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @author rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
TableZhAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js'
;
public
$js
=
[
'bootstrap-table-zh-CN.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/TreeAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets
;
use
yii\web\AssetBundle
;
/**
* 树形插件
* Class TreeAsset
* @package backend\assets
*/
class
TreeAsset
extends
AssetBundle
{
public
$sourcePath
=
'@common/metronic'
;
public
$css
=
[
'global/plugins/jstree/dist/themes/default/style.min.css'
,
];
public
$js
=
[
'global/plugins/jstree/dist/jstree.min.js'
,
];
}
wallet/assets/app/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\app
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/app'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/applicateRank/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created by PhpStorm.
* User: ZCY
* Date: 2018/11/1
* Time: 17:31
*/
namespace
backend\assets\applicateRank
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/applicate-rank'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
\ No newline at end of file
wallet/assets/coin/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @authors rlgy <rlgyzhcn@qq.com>
* @date 2018-09-07 17:41:04
*/
namespace
backend\assets\coin
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
\ No newline at end of file
wallet/assets/coinPublish/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\coinPublish
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-publish'
;
public
$js
=
[
'list.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/coinPublishRule/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\coinPublishRule
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-publish-rule'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/coinPublishRule/ListAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\coinPublishRule
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
ListAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-publish-rule'
;
public
$js
=
[
'list.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/coinReleaseCheck/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\coinReleaseCheck
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-release-check'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/coinReleaseMember/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\coinReleaseMember
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-release-member'
;
public
$js
=
[
'list.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/coinTransfer/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
namespace
backend\assets\coinTransfer
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/coin-transfer'
;
public
$js
=
[
'list.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/investment/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\investment
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/investment'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/investmentType/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\investmentType
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/investment-type'
;
public
$js
=
[
'index.js'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/assets/site/IndexAsset.php
deleted
100644 → 0
View file @
d4613dce
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 17:31:23
* @authors rlgy <rlgyzhcn@qq.com>
*/
namespace
backend\assets\site
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
IndexAsset
extends
AssetBundle
{
public
$sourcePath
=
'@backend/web/js/site'
;
public
$js
=
[
'index.js'
,
];
public
$depends
=
[
'backend\assets\TableAsset'
,
'backend\assets\TableZhAsset'
,
];
public
$jsOptions
=
[
'position'
=>
View
::
POS_END
,
];
}
wallet/controllers/UserController.php
View file @
74f6c883
...
...
@@ -7,6 +7,7 @@ use Yii;
use
common\models\Admin
;
use
common\models\LoginForm
;
use
wallet\base\BaseController
;
use
common\service\trusteeship\TrusteeShipService
;
class
UserController
extends
BaseController
{
...
...
@@ -103,11 +104,17 @@ class UserController extends BaseController
/**
* 用户
注册
* 用户
列表
*/
public
function
action
Create
()
public
function
action
UserList
()
{
$page
=
Yii
::
$app
->
request
->
get
(
'page'
,
1
);
$params
=
[
'page'
=>
$page
];
$service
=
new
TrusteeShipService
();
$result
=
$service
->
getUserList
(
$params
);
return
[
'code'
=>
1
,
'data'
=>
$result
,
'msg'
=>
'success'
];
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment