mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 12:32:50 +00:00
调整模板消息发送工具类
This commit is contained in:
parent
0d8c4d7cb8
commit
ae4a0e23c7
@ -44,7 +44,7 @@ class Template
|
|||||||
* @var array 'defaultData'=>[[],'array'] 生成的方法为 setDefaultData(array $value)
|
* @var array 'defaultData'=>[[],'array'] 生成的方法为 setDefaultData(array $value)
|
||||||
*/
|
*/
|
||||||
protected $propsRule = [
|
protected $propsRule = [
|
||||||
'defaultData' => '',
|
'defaultData' => [null, 'string'],
|
||||||
'templateCode' => [null, 'string'],
|
'templateCode' => [null, 'string'],
|
||||||
'templateData' => [[], 'array'],
|
'templateData' => [[], 'array'],
|
||||||
'templateUrl' => [null, 'callable', 'postpositionUrl'],
|
'templateUrl' => [null, 'callable', 'postpositionUrl'],
|
||||||
@ -52,7 +52,6 @@ class Template
|
|||||||
'sendType' => [null, 'string'],
|
'sendType' => [null, 'string'],
|
||||||
'templateOpenId' => [null, 'string'],
|
'templateOpenId' => [null, 'string'],
|
||||||
'templateOpenId' => [null, 'string'],
|
'templateOpenId' => [null, 'string'],
|
||||||
'templateDefaultColor' => [null,'string'],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -117,9 +116,11 @@ class Template
|
|||||||
* @param string $suffix
|
* @param string $suffix
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function postpositionUrl(Url $url,string $suffix = '')
|
public function postpositionUrl($url, string $suffix = '')
|
||||||
{
|
{
|
||||||
return $url->suffix($suffix)->domain(true)->build();
|
if($url instanceof Url)
|
||||||
|
$url = $url->suffix($suffix)->domain(true)->build();
|
||||||
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user