|
@@ -110,4 +110,43 @@ class Apply extends Model
|
|
|
$url = $url_type == 1?'/h5/#/pages/xiaoxi/look-me':'/h5/#/pages/xiaoxi/like-me';
|
|
|
(new \app\api\controller\Common())->sendWechatMessage($user_info['open_id'],'VJNwruW2tQp4bG0K1gg_-HJ4vaougj6fELLED2OYcrI',$data,'http://'.$_SERVER['HTTP_HOST'].$url);
|
|
|
}
|
|
|
+
|
|
|
+ * 微信模板消息通知(申请通过、被拒、过期)
|
|
|
+ */
|
|
|
+ public static function wxApplyMessage($uid,$nid,$time,$appeal){
|
|
|
+ $user_name = User::get(['id'=>$uid])['username'];
|
|
|
+ $user_info = User::get(['id'=>$nid]);
|
|
|
+ $data = [
|
|
|
+ 'thing7'=>[
|
|
|
+ 'value'=>$user_name
|
|
|
+ ],
|
|
|
+ 'time4'=>[
|
|
|
+ 'value'=>$time
|
|
|
+ ],
|
|
|
+ 'thing3'=>[
|
|
|
+ 'value'=>$appeal
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ (new \app\api\controller\Common())->sendWechatMessage($user_info['open_id'],'VJNwruW2tQp4bG0K1gg_-HJ4vaougj6fELLED2OYcrI',$data,'http://'.$_SERVER['HTTP_HOST'].'/h5/#/pages/xiaoxi/my-shenqing');
|
|
|
+ }
|
|
|
+
|
|
|
+ * 微信模板消息通知(申请认识)
|
|
|
+ */
|
|
|
+ public static function wxKnowMessage($uid,$nid,$time,$appeal,$url_type){
|
|
|
+ $user_name = User::get(['id'=>$uid])['username'];
|
|
|
+ $user_info = User::get(['id'=>$nid]);
|
|
|
+ $data = [
|
|
|
+ 'thing2'=>[
|
|
|
+ 'value'=>$user_name
|
|
|
+ ],
|
|
|
+ 'time8'=>[
|
|
|
+ 'value'=>$time
|
|
|
+ ],
|
|
|
+ 'phrase10'=>[
|
|
|
+ 'value'=>$appeal
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ $url = $url_type == 1?'/h5/#/pages/xiaoxi/look-me':'/h5/#/pages/xiaoxi/like-me';
|
|
|
+ (new \app\api\controller\Common())->sendWechatMessage($user_info['open_id'],'VJNwruW2tQp4bG0K1gg_-HJ4vaougj6fELLED2OYcrI',$data,'http://'.$_SERVER['HTTP_HOST'].$url);
|
|
|
+ }
|
|
|
}
|