Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
仅定义结构
Browse files Browse the repository at this point in the history
  • Loading branch information
Joyboo committed Apr 22, 2022
1 parent 34dc083 commit 330b781
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 12 additions & 2 deletions src/WeChat/Message/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@
*/
abstract class Base extends SplBean implements MessageInterface
{
abstract public function getTmpId();
protected $templateId = '';

public function setTemplateId($templateId)
{
$this->templateId = $templateId;
}

public function getTemplateId()
{
return $this->templateId;
}

abstract public function struct();

public function fullData()
{
return [$this->getTmpId(), $this->struct()];
return [$this->getTemplateId(), $this->struct()];
}
}
5 changes: 0 additions & 5 deletions src/WeChat/Message/Notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ class Notice extends Base

protected $color = '#32CD32';

public function getTmpId()
{
return 'bzuNFewc_MxyTJzAnNzqOQHFzXvvfQ-dTqmKINQvbF8';
}

public function struct()
{
return [
Expand Down
5 changes: 0 additions & 5 deletions src/WeChat/Message/Warning.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ class Warning extends Base

protected $color = '#FF0000';

public function getTmpId()
{
return '4yLeX5lg1E1u8euzYwNx8IX8i5wtMY3cf-QRJ9HVyW4';
}

public function struct()
{
return [
Expand Down

0 comments on commit 330b781

Please sign in to comment.