當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonAction::push方法代碼示例

本文整理匯總了PHP中CommonAction::push方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonAction::push方法的具體用法?PHP CommonAction::push怎麽用?PHP CommonAction::push使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonAction的用法示例。


在下文中一共展示了CommonAction::push方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: opposition

 public function opposition()
 {
     $id = $_REQUEST['id'];
     $str = $_REQUEST['str'];
     $user_id = $_REQUEST['user_id'];
     if (!empty($str) && !empty($id)) {
         $user_bill = M('UserBill');
         $data['id'] = $id;
         $data['opposition_reason'] = $str;
         $re = $user_bill->save($data);
         if ($re) {
             //數據更新成功後,推送消息
             $user = M('User');
             $userInfo = $user->field('id,device_type,device_id')->where('id=' . $user_id)->find();
             //推送消息
             $title = "交易提醒";
             $type = 1;
             $description = "交易被拒絕,原因:" . $str;
             $user_id = $userInfo['device_id'];
             $device_type = $userInfo['device_type'];
             parent::push($user_id, $device_type, $title, $description, $type, 'customer');
         }
         $this->assign('jumpUrl', U("CustomersPayFor/"));
         $this->success('反對成功!');
     } else {
         $this->error('非法操作!');
     }
 }
開發者ID:ycltpe,項目名稱:sig,代碼行數:28,代碼來源:CustomersPayForAction.class.php

示例2: confirm

 public function confirm()
 {
     $id = $_REQUEST['id'];
     $footprints = M('Footprints');
     $footInfo = $footprints->field('id,user_id,rebate')->where('id=' . $id)->find();
     if (!empty($footInfo)) {
         //查詢用戶信息
         $user = M('User');
         $re = $user->setInc('cahsback', 'id=' . $footInfo['user_id'], $footInfo['rebate']);
         $log = new Log();
         $log->write($user->getLastSql());
         if ($re) {
             $data['id'] = $id;
             $data['status'] = 4;
             $data['type'] = 4;
             $data['update_time'] = time();
             $res = $footprints->save($data);
             if ($res) {
                 //推送給顧客
                 $user = M('User');
                 $userInfo = $user->field('id,device_type,device_id')->where('id=' . $footInfo['user_id'])->find();
                 //推送消息
                 $title = "回扣提醒";
                 $type = 3;
                 $description = "您的訂單已經回扣成功!";
                 $user_id = $userInfo['device_id'];
                 $device_type = $userInfo['device_type'];
                 parent::push($user_id, $device_type, $title, $description, $type, 'customer');
                 $this->assign('jumpUrl', U("WaitingForTheRebate/"));
                 $this->success('回扣成功!');
             } else {
                 $this->error('回扣失敗!');
             }
         } else {
             $this->error('回扣失敗!');
         }
     } else {
         $this->error('回扣失敗!');
     }
 }
開發者ID:ycltpe,項目名稱:sig,代碼行數:40,代碼來源:AllOrderAction.class.php

示例3: push_auth

 public function push_auth($user_id, $is_auth)
 {
     $user = M('User');
     $userInfo = $user->field('id,device_type,device_id')->where('id=' . $user_id)->find();
     //推送消息
     $title = "認證提醒";
     if ($is_auth) {
         $type = 4;
         $description = "恭喜!您的信息已被認證通過!";
     } else {
         $type = 5;
         $description = "抱歉!您的信息未通過認證!";
     }
     $user_id = $userInfo['device_id'];
     $device_type = $userInfo['device_type'];
     parent::push($user_id, $device_type, $title, $description, $type, 'customer');
 }
開發者ID:ycltpe,項目名稱:sig,代碼行數:17,代碼來源:AllUserAction.class.php


注:本文中的CommonAction::push方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。