/**
  * 
  * @return string
  */
 public static function getPRepay($object, Users $weixinuser)
 {
     $count = Pic::model()->count("user_id=:user_id", array(":user_id" => $weixinuser->user_id));
     if ($count < 20) {
         Yii::app()->cache->set("qys_pic_save_" . $weixinuser->user_id, $count);
         $content = "亲爱的用户,已经为你开启保存图片服务,当前已经保存了" . $count . "张,还能保存" . (20 - $count) . "张。";
     } else {
         $content = "亲爱的用户,您已经保存了20张图片,将不再给予保存。";
     }
     WechatCheck::_transmitText($object, $content);
 }
Beispiel #2
0
 /**
  * 
  * @return string
  */
 public static function getDefaultClick($object, User $weixinuser)
 {
     $content = "亲爱的赚赚乐平台用户:该功能还没有实现呢。";
     WechatCheck::_transmitText($object, $content);
 }
Beispiel #3
0
 public static function toBigPicArctileShow($object, User $weixinuser, Activity $activity, Activity $re_activity)
 {
     $strPicurl = "https://mmbiz.qlogo.cn/mmbiz/3Nsx3YNMeOv6rg4at4Txeak4b9Wkiaq9ibIw7z3V0jFgoXRnCoAfs06y6VRYdzbsSicMRia4nIAyDzkzcjMxzdA3aw/0?wx_fmt=jpeg";
     $strUrl = "http://mp.weixin.qq.com/s?__biz=MzAwNDU3NjAwMw==&mid=402239047&idx=1&sn=96477c6d8807242d4bd75ecf021fbde0#rd";
     $result = $activity->toRollActivity($weixinuser, $activity->id);
     #增加提醒记录
     $activityRemind = new ActivityRemind();
     $activityRemind->setAttributes(['activity_id' => $re_activity->id, 'user_id' => $weixinuser->user_id, 'remind_name' => $re_activity->ac_name, 'remind_mark' => $re_activity->ac_cname, 'remind_type' => 0, 'addtime' => time()]);
     $activityRemind->save();
     if ($result['status'] != 2) {
         User::updateAll(['purview' => time()], 'user_id=:user_id', [':user_id' => $weixinuser->user_id]);
     }
     if ($result['status'] == 1) {
         $strPicurl = "https://mmbiz.qlogo.cn/mmbiz/3Nsx3YNMeOv6rg4at4Txeak4b9Wkiaq9ibIw7z3V0jFgoXRnCoAfs06y6VRYdzbsSicMRia4nIAyDzkzcjMxzdA3aw/0?wx_fmt=jpeg";
         $strUrl = "http://mp.weixin.qq.com/s?__biz=MzAwNDU3NjAwMw==&mid=402239047&idx=1&sn=96477c6d8807242d4bd75ecf021fbde0#rd";
     }
     $strTitle = $result['remark'];
     $strDes = $result['remark'];
     $content = [0 => ['title' => $strTitle, 'des' => $strDes, 'picurl' => $strPicurl, 'url' => $strUrl], 1 => ['title' => '春节初一至初十五天天抽奖。抽完为止。', 'des' => 'ooo', 'picurl' => 'https://mmbiz.qlogo.cn/mmbiz/3Nsx3YNMeOv6rg4at4Txeak4b9Wkiaq9ib9tjFrJOGZQmfeAC4WapMdKMA7ZkfBLjicel4rwxdicOxhCHN3Z1y1rTQ/0?wx_fmt=jpeg', 'url' => 'http://mp.weixin.qq.com/s?__biz=MzAwNDU3NjAwMw==&mid=402303743&idx=1&sn=e9f6232ec4b8cf5e0b6faa8f89b28cbe#rd'], 2 => ['title' => '免费获取各种商品打折券,春节就要省省省。', 'des' => 'xxx', 'picurl' => 'https://mmbiz.qlogo.cn/mmbiz/3Nsx3YNMeOv6rg4at4Txeak4b9Wkiaq9ibuiamOrlB3usT9VuzibYFdAn0EFAANbic6C94U969Iy9oIqIUJa80N15cg/0?wx_fmt=jpeg', 'url' => 'http://mp.weixin.qq.com/s?__biz=MzAwNDU3NjAwMw==&mid=402303933&idx=1&sn=9f1b157a47d14c2dee8da2c14fc6abb4#rd']];
     WechatCheck::_transmitArticleAndPic($object, $content);
 }