|
@@ -82,6 +82,7 @@ class WechatTemplateService implements ProviderInterface
|
|
|
public static function sendTemplate($openid, $templateId, array $data, $url = null, $defaultColor = '')
|
|
public static function sendTemplate($openid, $templateId, array $data, $url = null, $defaultColor = '')
|
|
|
{
|
|
{
|
|
|
$tempid = WechatTemplateModel::vialdWhere()->where('tempkey', $templateId)->where('status', 1)->value('tempid');
|
|
$tempid = WechatTemplateModel::vialdWhere()->where('tempkey', $templateId)->where('status', 1)->value('tempid');
|
|
|
|
|
+ @file_put_contents('quanju.txt', json_encode($tempid)."-tempid\r\n", 8);
|
|
|
if (!$tempid) return false;
|
|
if (!$tempid) return false;
|
|
|
try {
|
|
try {
|
|
|
$res=WechatService::sendTemplate($openid, $tempid, $data, $url, $defaultColor);
|
|
$res=WechatService::sendTemplate($openid, $tempid, $data, $url, $defaultColor);
|