58 lines
1.9 KiB
PHP
58 lines
1.9 KiB
PHP
<?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);
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
}
|