这是adp 中的方法:
create xmlate extendOne implement query for "guest"
(
@phone String,
@password String
)
is sql{.
select * from jxt_guardian where phone=@$phone and password = @$password
.}
create xmlate extendOneSys implement query for "guest"
(
@phone String,
@contact String
)
is sql{.
select id ,module,organ,username,password from sys_user where
status='s' and username=trim(@$phone) and password=trim(@$contact)
code{.
List result = queryList(sql.toString());
if(result!=null && result.size()>0)
{
session.setAttribute("loginInfo","");
DataModel dm=new DataModel();
dm.put("id",((HashMap) result.get(0)).get("id") );
dm.put("module",((HashMap) result.get(0)).get("module") );
dm.put("organ",((HashMap) result.get(0)).get("organ") );
dm.put("name",((HashMap) result.get(0)).get("username") );
dm.put("type",2);
session.setAttribute("loginInfo",dm);
}
.}
.}
这是页面 js 代码:
var table = dataset.addTable("car_group", "baby/guardian", false, true);
table.onquerysuccess = function() {
if(!table.isEmpty())
{
// dataset.debug();
//bind('car_group');
var paras = 'scrollbars=yes,resizable=yes,status=yes,left=0,top=0,height='+(screen.availHeight-60)+',width='+(screen.availWidth-10);
if(obj==null||obj=="undefined"||obj.closed){
obj = window.open('index2.jsp?type=0',"_self",paras);
}else{
obj.window.close();
obj = window.open('about:blank',"_pop",paras);
}
}
else
document.getElementById("div1").innerHTML="用户名或密码错误";
};
table.query({
_action :'extendOne',
phone: username.value,
password: password.value
});按道理 我只要改adp里面的sql语句 就能更改登录用户表啊 我要把以前登录的那个表不用 用另外一个表里面的数据去登录 。 求改怎么改跪求大神详解
create xmlate extendOne implement query for "guest"
(
@phone String,
@password String
)
is sql{.
select * from jxt_guardian where phone=@$phone and password = @$password
.}
create xmlate extendOneSys implement query for "guest"
(
@phone String,
@contact String
)
is sql{.
select id ,module,organ,username,password from sys_user where
status='s' and username=trim(@$phone) and password=trim(@$contact)
code{.
List result = queryList(sql.toString());
if(result!=null && result.size()>0)
{
session.setAttribute("loginInfo","");
DataModel dm=new DataModel();
dm.put("id",((HashMap) result.get(0)).get("id") );
dm.put("module",((HashMap) result.get(0)).get("module") );
dm.put("organ",((HashMap) result.get(0)).get("organ") );
dm.put("name",((HashMap) result.get(0)).get("username") );
dm.put("type",2);
session.setAttribute("loginInfo",dm);
}
.}
.}
这是页面 js 代码:
var table = dataset.addTable("car_group", "baby/guardian", false, true);
table.onquerysuccess = function() {
if(!table.isEmpty())
{
// dataset.debug();
//bind('car_group');
var paras = 'scrollbars=yes,resizable=yes,status=yes,left=0,top=0,height='+(screen.availHeight-60)+',width='+(screen.availWidth-10);
if(obj==null||obj=="undefined"||obj.closed){
obj = window.open('index2.jsp?type=0',"_self",paras);
}else{
obj.window.close();
obj = window.open('about:blank',"_pop",paras);
}
}
else
document.getElementById("div1").innerHTML="用户名或密码错误";
};
table.query({
_action :'extendOne',
phone: username.value,
password: password.value
});按道理 我只要改adp里面的sql语句 就能更改登录用户表啊 我要把以前登录的那个表不用 用另外一个表里面的数据去登录 。 求改怎么改跪求大神详解
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货