We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protected function mtReturn($status,$info,$navTabId="",$closeCurrent=true) {
$udata['id']=session('uid'); $udata['update_time']=time(); $Rs=M("user")->save($udata); $dat['username'] = session('username'); $dat['content'] = $info; $dat['os']=$_SERVER['HTTP_USER_AGENT']; $dat['url'] = U(); $dat['addtime'] = date("Y-m-d H:i:s",time()); $dat['ip'] = get_client_ip(); M("log")->add($dat); $result = array(); $result['statusCode'] = $status; $result['message'] = $info; $result['closeCurrent'] =$closeCurrent; if($navTabId!==''){ $result['tabid'] = strtolower($navTabId).'/index'; }else{ $result['tabid'] = ''; } $result['forward'] = ''; $result['forwardConfirm']=''; if (empty($type)) $type = C('DEFAULT_AJAX_RETURN'); if (strtoupper($type) == 'JSON') { // 返回JSON数据格式到客户端 包含状态信息 header("Content-Type:text/html; charset=utf-8"); exit(json_encode($result,true)); } elseif (strtoupper($type) == 'XML') { // 返回xml格式数据 header("Content-Type:text/xml; charset=utf-8"); exit(xml_encode($result)); } elseif (strtoupper($type) == 'EVAL') { // 返回可执行的js脚本 header("Content-Type:text/html; charset=utf-8"); exit($data); } else { // TODO 增加其它格式 } }
原版本操作成功直接关闭标签页。 当发送"closeCurrent" = true时关闭标签页,不起作用。
The text was updated successfully, but these errors were encountered:
能否提供具体的情景与返回的json数据?
Sorry, something went wrong.
我的EMALI:254281818@qq.com 我给你发源码。你应该会PHP吧.
可以发送 至 2509642078@qq.com 这个邮箱,或者方便提供线上地址也可以,主要是确定你的使用情景和回调代码,因为这一套系统我也是用于生产环境的,暂时没有出现过上述问题
No branches or pull requests
protected function mtReturn($status,$info,$navTabId="",$closeCurrent=true) {
原版本操作成功直接关闭标签页。
当发送"closeCurrent" = true时关闭标签页,不起作用。
The text was updated successfully, but these errors were encountered: