<%@ page language="java" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<%@page import="java.util.Map"%>
|
<%@page import="com.yc.factory.FactoryBean"%>
|
<%@page import="com.yc.service.personalized.PanelDataIfc"%>
|
<%@page import="com.yc.utils.SessionKey"%>
|
<%@page import="java.util.List"%>
|
<!DOCTYPE html >
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<title>Insert title here</title>
|
<link rel="stylesheet" type="text/css" href="/style/commons.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/commons.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>">
|
<script type="text/javascript" src="/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script>
|
<script type="text/javascript" src="/js/index/jquery.easyui.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/jquery.easyui.min.js")%>"></script>
|
<script type="text/javascript" src="/js/shujuLogin.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/shujuLogin.js")%>"></script>
|
</head>
|
<%
|
String userCode = (String)session.getAttribute(SessionKey.USERCODE);
|
String pass = (String)session.getAttribute(SessionKey.USERCODE);
|
String comp= (String) session.getAttribute(SessionKey.DATA_BASE_NAME);
|
String tishi=request.getParameter("ti");
|
String spass="";
|
try{
|
PanelDataIfc panelDataIfc = (PanelDataIfc)FactoryBean.getBean("PanelDataImpl");
|
List<Map<String,Object>> panels = null;
|
panels = panelDataIfc.getshujulogin(userCode);
|
if(panels.size()<1){
|
panelDataIfc.getShujuAdd(comp,userCode,pass);//保存初始数据
|
}else{
|
spass=panels.get(0).get("spass").toString();
|
if(!userCode.equals(spass)){
|
spass="";
|
}
|
}
|
}catch(Exception e){
|
spass="";
|
tishi="2";
|
}
|
|
%>
|
<script type="text/javascript">
|
function windowopen(){
|
var appkey=document.getElementById("appkey").value;
|
var appsecret=document.getElementById("appsecret").value;
|
var tbtype=document.getElementById("tbtype").value;
|
|
if(appsecret==""){
|
alert('缺少参数APPSecret');
|
return;
|
}
|
var urls="";
|
if(tbtype==1){
|
urls="http://container.open.taobao.com/container?appkey="+appkey+"&encode=utf-8";
|
}
|
if(tbtype==2){
|
urls="http://container.api.tbsandbox.com/container?appkey="+appkey+"&encode=utf-8";
|
}
|
$.ajax({url:"/tesst.do?app=appkey",data:{'appkey' :appkey,'appsecret' :appsecret,'tbtype':tbtype},type:"POST",
|
async:false,dataType:'text',success:function(da) {
|
if(da==1){
|
window.close();
|
window.open(urls);
|
}
|
}});
|
|
}
|
</script>
|
<body>
|
<div class="easyui-layout" fit="true">
|
<div region="north" border="false" style="padding-top:15px;padding-bottom:15px;text-align:center;background:#fff;">
|
<span><font size="2" color="BBBOOO">APPKey和APPSecret是您在淘宝应用申请的证书钥匙和密钥</font></span>
|
</div>
|
<div region="center" border="true" style="text-align:center;padding-top:25px;background:#fff;border:1px solid #ccc;">
|
|
<form id="loginForm" method="post">
|
<table align="center" >
|
<tr><td align="right">
|
<font size="2">APPKey:</font>
|
</td><td>
|
<input type="text" id="appkey" name="appkey" value="" maxlength="30" style="width:200px; height:20px;"></input>
|
</td>
|
</tr>
|
<tr><td></td><td></td></tr>
|
<tr>
|
<td align="right">
|
<font size="2">APPSecret:</font>
|
</td>
|
<td>
|
<input type="text" id="appsecret" name="appsecret" value="" style="width:200px; height:20px;"></input>
|
|
</td>
|
</tr>
|
<tr><td></td><td></td></tr>
|
<tr>
|
<td align="right">
|
<font size="2">应用环境:</font>
|
</td>
|
<td align="left">
|
<select name="tbtype" id="tbtype" style="width:12s0px; height:30px;">
|
<option value="1">正式应用环境</option><option value="2">沙箱测试环境</option>
|
</select>
|
|
</td>
|
</tr>
|
<tr><td></td><td></td></tr>
|
<tr><td></td><td></td></tr>
|
<tr>
|
<td colspan="2" align="center">
|
(注:”沙箱测试环境“需在中间表后面加“|2”)
|
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
<div region="south" border="false" style="text-align:center;padding:5px 0;overflow: hidden;">
|
<a id="login" class="easyui-linkbutton" iconCls="icon-ok" onclick="windowopen()">确 定</a>
|
</div>
|
</div>
|
</body>
|
</html>
|