e преди 8 години
родител
ревизия
c2cdc628af
променени са 1 файла, в които са добавени 14 реда и са изтрити 1 реда
  1. 14 1
      www/protected/modules/o2o/controllers/RechargeController.php

+ 14 - 1
www/protected/modules/o2o/controllers/RechargeController.php

@@ -7,8 +7,21 @@ class  RechargeController extends O2oBaseController{
 
 
     public function actionTest(){
     public function actionTest(){
 
 
+        //$user = RUser::model()->get(new MongoId('57e238929f5160d6048b456d'));
+       // var_dump($user);exit;
+        $num = intval(ceil((rand(100000,999999)))/10000);
 
 
+        $data ='{
+                    "touser": "oTreyv4-5la34sYWyHTZ331wi6J8",
+                    "msgtype": "text",
+                    "text": {
+                    "content": "'.'恭喜您获得参与本次活动的权利,'.$num.'为您参加本活动的号码,'.'"
+                    }
+                }';
+
+        $result = CommonFn::sendWxMessage($data);
 
 
+        CommonFn::requestAjax(true,'success',json_decode($result),200,array());
     }
     }
 
 
 
 
@@ -50,7 +63,7 @@ class  RechargeController extends O2oBaseController{
                     }
                     }
                 }';
                 }';
 
 
-                CommonFn::sendWxMessage($data);
+                $res = CommonFn::sendWxMessage($data);
                 CommonFn::requestAjax(true,'success',json_decode($result),200,array());
                 CommonFn::requestAjax(true,'success',json_decode($result),200,array());
             }
             }
             //end
             //end