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
e40e83ff
Commit
e40e83ff
authored
Oct 14, 2019
by
王召彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into test
parents
458d109a
171c747c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
6 deletions
+43
-6
UPGRADE_2.x.md
+12
-0
src/Auth/Enum/AuthEnum.php
+4
-0
src/Common/Entity/User.php
+13
-0
src/Notice/Extensions/Notice/MpSender.php
+14
-6
No files found.
UPGRADE_2.x.md
View file @
e40e83ff
# 2.0.29
-
添加分销代理者角色
# 2.0.28
-
token里添加万人万店标识
# 2.0.27
-
公众号通知跳转url
# 2.0.26
-
添加新的支付来源常量
# 2.0.25
# 2.0.25
-
修改接口备注
-
修改接口备注
...
...
src/Auth/Enum/AuthEnum.php
View file @
e40e83ff
...
@@ -12,6 +12,7 @@ class AuthEnum
...
@@ -12,6 +12,7 @@ class AuthEnum
const
SCOPE_BUYER
=
1
;
//买家
const
SCOPE_BUYER
=
1
;
//买家
const
SCOPE_EMPLOYEE
=
2
;
//手艺人
const
SCOPE_EMPLOYEE
=
2
;
//手艺人
const
SCOPE_AGENT
=
2
;
// 店铺分销代理者
const
SCOPE_SELLER
=
3
;
//卖家
const
SCOPE_SELLER
=
3
;
//卖家
...
@@ -19,11 +20,14 @@ class AuthEnum
...
@@ -19,11 +20,14 @@ class AuthEnum
const
SCOPE_SUPER_ADMIN
=
5
;
//超级管理员
const
SCOPE_SUPER_ADMIN
=
5
;
//超级管理员
const
AUTH_BACKEND
=
100
;
const
AUTH_BACKEND
=
100
;
const
AUTH_FRONTEND
=
101
;
const
AUTH_FRONTEND
=
101
;
const
AUTH_TYPE_SELLER
=
200
;
//卖家授权
const
AUTH_TYPE_SELLER
=
200
;
//卖家授权
const
AUTH_TYPE_EMPLOYEE
=
201
;
//员工授权
const
AUTH_TYPE_EMPLOYEE
=
201
;
//员工授权
const
AUTH_TYPE_AGENT
=
201
;
//店铺分销代理者授权
const
AUTH_TYPE_E_AND_S
=
203
;
//选择授权(用户自己选择进行员工授权还是卖家授权)
const
AUTH_TYPE_E_AND_S
=
203
;
//选择授权(用户自己选择进行员工授权还是卖家授权)
const
AUTH_TYPE_BUYER
=
204
;
//买家授权
const
AUTH_TYPE_BUYER
=
204
;
//买家授权
...
...
src/Common/Entity/User.php
View file @
e40e83ff
...
@@ -197,6 +197,19 @@ class User
...
@@ -197,6 +197,19 @@ class User
return
false
;
return
false
;
}
}
/**
* 是否是通过“万人万店”的小程序授权
*
* @return boolean 如果是 返回true
*/
public
function
isWrwd
()
{
$wrwd
=
$this
->
getValue
(
'isWrwd'
);
if
(
$wrwd
==
1
)
{
return
true
;
}
return
false
;
}
public
function
initUser
(
$token
)
public
function
initUser
(
$token
)
{
{
...
...
src/Notice/Extensions/Notice/MpSender.php
View file @
e40e83ff
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
* Date: 2018/10/9
* Date: 2018/10/9
* Time: 10:50
* Time: 10:50
*/
*/
namespace
Hdll\Services\Notice\Extensions\Notice
;
namespace
Hdll\Services\Notice\Extensions\Notice
;
use
Hdll\Services\Notice\Common\WxMiniNotice
;
use
Hdll\Services\Notice\Common\WxMiniNotice
;
...
@@ -24,7 +25,7 @@ class MpSender implements SenderInterface
...
@@ -24,7 +25,7 @@ class MpSender implements SenderInterface
private
$template
;
private
$template
;
public
function
__construct
(
string
$unionId
,
array
$miniprogram
,
array
$sendData
,
string
$template
)
public
function
__construct
(
string
$unionId
,
array
$miniprogram
,
array
$sendData
,
string
$template
)
{
{
$this
->
unionId
=
$unionId
;
$this
->
unionId
=
$unionId
;
$this
->
miniprogram
=
$miniprogram
;
$this
->
miniprogram
=
$miniprogram
;
...
@@ -39,18 +40,25 @@ class MpSender implements SenderInterface
...
@@ -39,18 +40,25 @@ class MpSender implements SenderInterface
'template_id'
=>
$this
->
template
,
'template_id'
=>
$this
->
template
,
'miniprogram'
=>
[
'miniprogram'
=>
[
'appid'
=>
$this
->
miniprogram
[
'appId'
],
//小程序appid
'appid'
=>
$this
->
miniprogram
[
'appId'
],
//小程序appid
'pagepath'
=>
WxMiniNotice
::
generatePage
(
$this
->
miniprogram
[
'page'
],
$this
->
miniprogram
[
'param'
]
)
//小程序页面
],
],
'data'
=>
$this
->
sendData
'data'
=>
$this
->
sendData
];
];
//小程序跳转(优先)
if
(
isset
(
$this
->
miniprogram
[
'page'
]))
{
$this
->
data
[
$this
->
sendType
][
'pagepath'
]
=
WxMiniNotice
::
generatePage
(
$this
->
miniprogram
[
'page'
],
$this
->
miniprogram
[
'param'
]
);
}
//url跳转
if
(
isset
(
$this
->
miniprogram
[
'url'
]))
{
$this
->
data
[
$this
->
sendType
][
'url'
]
=
$this
->
miniprogram
[
'url'
];
}
}
}
public
function
getData
()
public
function
getData
()
{
{
return
$this
->
data
===
null
?
[]
:
$this
->
data
;
return
$this
->
data
===
null
?
[]
:
$this
->
data
;
}
}
public
function
getSendType
()
public
function
getSendType
()
...
...
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