mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-13 20:02:49 +00:00
调整模板消息发送工具类
This commit is contained in:
parent
0d8c4d7cb8
commit
ae4a0e23c7
@ -44,7 +44,7 @@ class Template
|
||||
* @var array 'defaultData'=>[[],'array'] 生成的方法为 setDefaultData(array $value)
|
||||
*/
|
||||
protected $propsRule = [
|
||||
'defaultData' => '',
|
||||
'defaultData' => [null, 'string'],
|
||||
'templateCode' => [null, 'string'],
|
||||
'templateData' => [[], 'array'],
|
||||
'templateUrl' => [null, 'callable', 'postpositionUrl'],
|
||||
@ -52,7 +52,6 @@ class Template
|
||||
'sendType' => [null, 'string'],
|
||||
'templateOpenId' => [null, 'string'],
|
||||
'templateOpenId' => [null, 'string'],
|
||||
'templateDefaultColor' => [null,'string'],
|
||||
];
|
||||
|
||||
/**
|
||||
@ -117,9 +116,11 @@ class Template
|
||||
* @param string $suffix
|
||||
* @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