Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
bc6168f7
Commit
bc6168f7
authored
Jun 17, 2020
by
王召彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ft-region'
parents
e8edccb8
24b00f8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
src/Common/Entity/User.php
+10
-0
src/Common/Lib/Xcrypt.php
+6
-3
No files found.
src/Common/Entity/User.php
View file @
bc6168f7
...
@@ -140,6 +140,11 @@ class User
...
@@ -140,6 +140,11 @@ class User
$this
->
setValue
(
'subStoreId'
,
$value
);
$this
->
setValue
(
'subStoreId'
,
$value
);
}
}
public
function
setRgId
(
$value
)
{
return
$this
->
setValue
(
'rgId'
,
$value
);
}
public
function
getSubStoreId
()
public
function
getSubStoreId
()
{
{
return
$this
->
getValue
(
'subStoreId'
)
??
0
;
return
$this
->
getValue
(
'subStoreId'
)
??
0
;
...
@@ -193,6 +198,11 @@ class User
...
@@ -193,6 +198,11 @@ class User
return
$this
->
getValue
(
'scope'
);
return
$this
->
getValue
(
'scope'
);
}
}
public
function
getRgId
()
{
return
$this
->
getValue
(
'rgId'
);
}
/**
/**
* 是否是通过托管的小程序授权
* 是否是通过托管的小程序授权
*
*
...
...
src/Common/Lib/Xcrypt.php
View file @
bc6168f7
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
namespace
Hdll\Services\Common\Lib
;
namespace
Hdll\Services\Common\Lib
;
use
Hdll\Services\Common\Config\CfgCenter
;
use
Hdll\Services\Common\Config\CfgCenter
;
use
Swoft\App
;
use
Hdll\Services\V2\Common\Config\CfgCenter
as
CfgCenter2
;
use
Swoft\Redis\Redis
;
class
Xcrypt
class
Xcrypt
{
{
...
@@ -39,7 +38,11 @@ class Xcrypt
...
@@ -39,7 +38,11 @@ class Xcrypt
}
}
private
static
function
getKey
(){
private
static
function
getKey
(){
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
if
(
class_exists
(
'\Swoft\App'
))
{
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
else
{
$key
=
CfgCenter2
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
if
(
empty
(
$key
)){
if
(
empty
(
$key
)){
throw
new
\Exception
(
'加密密钥获取失败!'
);
throw
new
\Exception
(
'加密密钥获取失败!'
);
}
}
...
...
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