Commit e40e83ff by 王召彬

Merge branch 'master' into test

parents 458d109a 171c747c
# 2.0.29
- 添加分销代理者角色
# 2.0.28
- token里添加万人万店标识
# 2.0.27
- 公众号通知跳转url
# 2.0.26
- 添加新的支付来源常量
# 2.0.25 # 2.0.25
- 修改接口备注 - 修改接口备注
......
...@@ -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; //买家授权
......
...@@ -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)
{ {
......
...@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment