`
tangduDream
  • 浏览: 29219 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

smartClient isomorphic 登录(一)

阅读更多

/**
 *---------------------------------------------------------------------
 *  Function     : 登录功能
 *	Version	     : 1.0
 *  Date         : 2012-4-9
 *  Descriptions : 登录
 *---------------------------------------------------------------------	 
 */

isc.SearchForm.create({
	ID:'loginForm',
	width:200,
	numCols:2,
	autoFocus:true,
	requiredTitlePrefix:'<font color="red">*</font><b>',
	fields:[
	   {name:'account',title:'账号',length:80,height:25},
	   {name:'password',title:'密码',length:80,type:'password',height:25},	
	   {name:'checkCode',title:'验证码',length:4,icons:[{src:'../check/checkCode.do',click:function(){
		   loginForm.getField("checkCode").setValueIcons("../check/checkCode.do");
	   },height:25}],iconWidth:55,height:25}
	]
});
isc.Dialog.create({
	ID:'loginDlog',
	title:'登录',
	width:200,
	autoSize:true,
	showCloseButton:false,
	canDragReposition:false,
	items:[
	    loginForm
	],
	buttons:[
	   isc.Button.create({title:'登录'})
	],
	buttonClick:function(btn,index){
		var data=loginForm.getValues();
		RPCManager.sendRequest({ 
	    	 evalResult:true,
	    	 //data:data,
	    	 //paramsOnly:true,
	    	 params:data,
	    	 //data:{'account':credentials.username,'password':credentials.password},
	    	 actionURL: "user/login.do",
	    	 callback:function(data){
	    		 if(data.status==isc.RPCResponse.STATUS_SUCCESS){
	    			var data=data.data;
	 	    		if(data.success){
	 	    			window.location.href="index.jsp";
	 	    		}else{
	 	    			if(data.msg!=null){
	 	    				isc.say(data.msg);
	 	    			}
	 	    		}
	    		 }else{
	    			 isc.say('无法检索账户信息',window.location='login.jsp');
	    		 }
	     }});
	}
});

isc.Page.setEvent("load", "loginDlog.show()");

/*isc.LoginDialog.create({
	title:'登录系统',
 	loginButtonTitle:'登录',
 	usernameItemTitle:'账号',
 	passwordItemTitle:'密码',
 	numCols:2,
 	loginFunc:function (credentials, dialogCallback) {
	     if (credentials == null) return; // dismissed
	     var data={'account':credentials.username,'password':credentials.password};
	     
	     RPCManager.sendRequest({ 
	    	 evalResult:true,
	    	 //data:data,
	    	 //paramsOnly:true,
	    	 params:{'account':credentials.username,'password':credentials.password},
	    	 //data:{'account':credentials.username,'password':credentials.password},
	    	 actionURL: "user/login.do",
	    	 callback:function(data){
	    		 if(data.status==isc.RPCResponse.STATUS_SUCCESS){
	    			var data=data.data;
	 	    		if(data.success){
	 	    			window.location.href="index.jsp";
	 	    		}else{
	 	    			if(data.msg!=null){
	 	    				isc.say(data.msg);
	 	    			}
	 	    		}
	    		 }else{
	    			 isc.say('无法检索账户信息',window.location='login.jsp');
	    		 }
	     }});
    }
 });*/
 
分享到:
评论

相关推荐

    Isomorphic Go_Code 源码

    Isomorphic Go_Code 源码 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

    Isomorphic Web Applications Universal Development With React

    The book is to teach you to think in a way that will make you successful when working with isomorphic architecture. Given React’s presence in the web community and the support React provides for ...

    Building Isomorphic JavaScript Apps

    Isomorphic JavaScript, often described as the holy grail of web application development, refers to running JavaScript code on both the browser client and web application server. This application ...

    Isomorphic JavaScript Web Development epub

    Isomorphic JavaScript Web Development 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

    前端开源库-isomorphic-loader

    前端开源库-isomorphic-loader同构加载器,Webpack同构加载器工具,使节点需要处理像服务器端渲染(SSR)的图像这样的文件。

    前端项目-isomorphic-git.zip

    前端项目-isomorphic-git,一个针对节点和浏览器的Git纯JavaScript实现!

    前端开源库-isomorphic-unfetch

    前端开源库-isomorphic-unfetch同构取消蚀刻,在客户端和服务器的取消蚀刻和节点提取之间切换。

    isomorphic-webpack, 使用 web service抽象应用程序代码库的通用消耗.zip

    isomorphic-webpack, 使用 web service抽象应用程序代码库的通用消耗 同构 web pack isomorphic-webpack 是运行服务器端并允许呈现相同代码基client-和服务器端的程序。换句话说,它是一个用于呈现 web service应用...

    Isomorphic Go mobi

    Isomorphic Go 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

    Isomorphic Application Development with JavaScript azw3

    Isomorphic Application Development with JavaScript 英文azw3 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    react-isomorphic-boilerplate, 在提供一个同构的React App 时,我的尝试.zip

    react-isomorphic-boilerplate, 在提供一个同构的React App 时,我的尝试 具有同构的演示应用这个项目提供了非常简单的样板boilerplate在 React.js 中构建同构应用程序,或者作为一个例子,它可以通过一个简单的例子...

    Isomorphic Go epub

    Isomorphic Go 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

    Isomorphic+JavaScript+Web+Development-Packt+Publishing(2017).pdf

    Chapter 1, Getting Started with Isomorphic Web Apps, describes what isomorphic apps are and how they differ from the conventional SPAs that are around. They will understand the main challenges that ...

    Isomorphic Application Development with JavaScript 无水印原版pdf

    Isomorphic Application Development with JavaScript 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn...

    isomorphic-go

    Isomorphic Go is the methodology to create isomorphic web applications using the Go programming language. Isomorphic web applications have the capability to reuse code across environments, increasing ...

    ISOmorphic.exe

    chenk point cp gaia 镜像 ,适用于做虚拟机实验。

    前端开源库-react-isomorphic-render

    前端开源库-react-isomorphic-renderReact同构渲染,使用React、Redux、React Router和Redux Router进行同构渲染。包括对Webpack的支持

    Isomorphic JavaScript Web Development 无水印pdf转化版

    Isomorphic JavaScript Web Development 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请...

    前端开源库-isomorphic-style-loader

    前端开源库-isomorphic-style-loader同构样式加载程序,用于Webpack的CSS样式加载程序,针对关键路径CSS呈现和同构Web应用程序进行了优化

    Android代码-kxhtml-isomorphic

    kxhtml-isomorphic This sample demonstrates using Kotlin to create an application with isomorphic HTML rendering, with the same code used to render ...

Global site tag (gtag.js) - Google Analytics