我想建立一个多日志系统使用Sencha触摸2,用户必须选择,如果他是代理或追随者。到目前为止,我已经能够想出一个简单的登录形式。没有功能。我的代码仅仅是这样的:建设Sencha触摸2登录系统
Ext.define("ikhlas.view.login", {
extend: 'Ext.Panel',
xtype: 'loginpanel',
config:{
title: 'Login',
iconCls: 'more',
styleHtmlContent: true,
layout:{
type: 'vbox',
},
items: [
{
xtype: 'fieldset',
iconCls: 'add',
items: [
{
xtype: 'emailfield',
name: 'email',
placeHolder: 'Username'
},
{
xtype: 'passwordfield',
name: 'password',
placeHolder: 'Password'
},
{
xtype: 'selectfield',
label: 'User Type',
options: [
{text: 'Agent', value: '0'},
{text: 'Follower', value: '1'}
]
}
]},
{
xtype: 'button',
text: 'LogIn',
ui: 'confirm',
width: '40%',
height: '7%',
flex: 1,
left: '55%',
action: 'submitContact'
},
{
xtype: 'button',
text: 'Forgot Username',
ui: 'confirm',
width: '41%',
height: '4%',
top: '90%',
flex: 1,
action: 'ForgotUsername'
},
{
xtype: 'button',
text: 'Forgot Password',
ui: 'confirm',
width: '40%',
height: '4%',
top: '90%',
flex: 1,
left: '47%',
action: 'ForgotPassword'
},
]}
});
现在我想知道我如何从一个API(网址将被给予)验证用户信息(用户名和密码),以确认登录的用户名和密码是正确的,才能被允许访问应用程序。其次,如果用户名或密码不正确,我想抛出一条错误消息。
你打算使用哪种服务器端语言? – fuzzyLikeSheep