function zjygajax(ygxm,ygsjhm,ygzw,yuangongFlag,office_id){ $.ajax({ url: "<?php echo Url::to(['wap/zjygajax'], true); ?> ", type:"GET", cache:false, dataType:"json", data: "ygxm="+ygxm+"&ygsjhm="+ygsjhm+"&ygzw="+ygzw+"&office_id="+office_id+"&yuangongFlag="+yuangongFlag, success: function(t){ if(t.code==0) { alert("员工已经成功加入。"); var url = "<?php echo \app\models\utils\BrowserHistory::current($wx_user->gh_id, $wx_user->openid); ?> "; location.href = url; } else { alert(t.errMsg); } }, error: function(){ alert('error!'); } }); return false;
public function actionWechatMessaging($gh_id, $openid, $reciever_id, $backwards = true, $pop = false) { if (!$backwards) { \app\models\utils\BrowserHistory::delete($gh_id, $openid); \app\models\utils\BrowserHistory::push($gh_id, $openid); } else { if ($pop) { \app\models\utils\BrowserHistory::pop($gh_id, $openid); } else { \app\models\utils\BrowserHistory::push($gh_id, $openid); } } $wx_user = \app\models\MUser::findOne(['gh_id' => $gh_id, 'openid' => $openid]); $reciever = \app\models\MUser::findOne(['id' => $reciever_id]); $this->layout = false; return $this->render('wechat-messaging', ['wx_user' => $wx_user, 'reciever' => $reciever, 'backwards' => $backwards]); }
{ $.ajax({ url: "<?php echo Url::to(['wap/ygglxiugaiajax'], true); ?> ", type: "GET", cache: false, dataType: "json", data: "is_agent=" + is_agent + "&outlet_id=" + outlet_id + "&entity_id=" + entity_id + "&mobile=" + mobile + "&position=" + position, success: function (t) { if (t.code == 0) { var url = "<?php echo \app\models\utils\BrowserHistory::previous($wx_user->gh_id, $wx_user->openid); ?> "; location.href = url; } else { alert('error'); } }, error: function () { alert('error!'); } });
public function actionQdxcjspbpm($backwards = true, $pop = false) { $this->layout = false; $gh_id = U::getSessionParam('gh_id'); $openid = U::getSessionParam('openid'); Yii::$app->wx->setGhId($gh_id); if (!$backwards) { \app\models\utils\BrowserHistory::delete($gh_id, $openid); \app\models\utils\BrowserHistory::push($gh_id, $openid); } else { if ($pop) { \app\models\utils\BrowserHistory::pop($gh_id, $openid); } else { \app\models\utils\BrowserHistory::push($gh_id, $openid); } } $wx_user = \app\models\MUser::findOne(['gh_id' => $gh_id, 'openid' => $openid]); //return $this->render('qdxcjspbpm', ['gh_id' => $gh_id, 'openid' => $openid]); return $this->render('qdxcjspbpm', ['wx_user' => $wx_user, 'backwards' => $backwards]); }