Files
tuiguangzhushou/application/common/Sendtplmsg.php
2020-08-06 15:26:41 +08:00

58 lines
1.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\common\service;
use app\common\service\WechatTpl as WechatTplService;
/**
* 信息
*/
class Sendtplmsg extends _Init
{
//开通7天vip试用-模版消息推送
public static function opened_7days($member)
{
if($member->openid){
$tpl_user = [
'openid' => $member->openid,
'first' => '恭喜您获得推广先锋7天试用特权',
'title' => '推广先锋7天试用',
'end_time' => $member->info->vip_time,
'remark' => '感谢您的使用。',
'url' => url('center/index')
];
WechatTplService::send_vip7days_opened($tpl_user);
}
}
//7天试用到/推广先锋/推广代理商期提醒-模版消息推送
public static function services_ending($member,$type = 1)
{
if($member->openid){
$tpl_user = [
'openid' => $member->openid,
'first' => '您的服务即将到期。',
'title' => $type == 1 ? $member->info->is_vip == 1 ? '推广先锋' : '推广先锋7天试用' : '推广代理商',
'end_time' => $type == 1 ? $member->info->vip_time : $member->info->agent_time,
'remark' => '避免影响试用,请您及时续费。',
'url' => url('center/index')
];
WechatTplService::send_ending($tpl_user);
}
}
}