提交 | 用户 | age
|
a6a76f
|
1 |
<%@ page language="java" contentType="text/html; charset=UTF-8" |
F |
2 |
pageEncoding="UTF-8"%> |
|
3 |
<%@page import="java.util.Map"%> |
|
4 |
<%@page import="com.yc.factory.FactoryBean"%> |
|
5 |
<%@page import="com.yc.service.personalized.PanelDataIfc"%> |
|
6 |
<%@page import="com.yc.utils.SessionKey"%> |
|
7 |
<%@page import="java.util.List"%> |
4a551f
|
8 |
<!DOCTYPE html > |
a6a76f
|
9 |
<html> |
F |
10 |
<head> |
|
11 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
12 |
<title>Insert title here</title> |
|
13 |
<link rel="stylesheet" type="text/css" href="/style/commons.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/commons.css")%>"> |
|
14 |
<link rel="stylesheet" type="text/css" href="/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>"> |
|
15 |
<link rel="stylesheet" type="text/css" href="/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>"> |
|
16 |
<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> |
|
17 |
<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> |
|
18 |
<script type="text/javascript" src="/js/shujuLogin.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/shujuLogin.js")%>"></script> |
|
19 |
</head> |
|
20 |
<% |
|
21 |
String userCode = (String)session.getAttribute(SessionKey.USERCODE); |
|
22 |
String pass = (String)session.getAttribute(SessionKey.USERCODE); |
|
23 |
String comp= (String) session.getAttribute(SessionKey.DATA_BASE_NAME); |
|
24 |
String tishi=request.getParameter("ti"); |
|
25 |
String spass=""; |
|
26 |
try{ |
|
27 |
PanelDataIfc panelDataIfc = (PanelDataIfc)FactoryBean.getBean("PanelDataImpl"); |
|
28 |
List<Map<String,Object>> panels = null; |
|
29 |
panels = panelDataIfc.getshujulogin(userCode); |
|
30 |
if(panels.size()<1){ |
|
31 |
panelDataIfc.getShujuAdd(comp,userCode,pass);//保存初始数据 |
|
32 |
}else{ |
|
33 |
spass=panels.get(0).get("spass").toString(); |
|
34 |
if(!userCode.equals(spass)){ |
|
35 |
spass=""; |
|
36 |
} |
|
37 |
} |
|
38 |
}catch(Exception e){ |
|
39 |
spass=""; |
|
40 |
tishi="2"; |
|
41 |
} |
|
42 |
|
|
43 |
%> |
|
44 |
<script type="text/javascript"> |
|
45 |
function windowopen(){ |
|
46 |
var appkey=document.getElementById("appkey").value; |
|
47 |
var appsecret=document.getElementById("appsecret").value; |
|
48 |
var tbtype=document.getElementById("tbtype").value; |
|
49 |
|
|
50 |
if(appsecret==""){ |
|
51 |
alert('缺少参数APPSecret'); |
|
52 |
return; |
|
53 |
} |
|
54 |
var urls=""; |
|
55 |
if(tbtype==1){ |
|
56 |
urls="http://container.open.taobao.com/container?appkey="+appkey+"&encode=utf-8"; |
|
57 |
} |
|
58 |
if(tbtype==2){ |
|
59 |
urls="http://container.api.tbsandbox.com/container?appkey="+appkey+"&encode=utf-8"; |
|
60 |
} |
|
61 |
$.ajax({url:"/tesst.do?app=appkey",data:{'appkey' :appkey,'appsecret' :appsecret,'tbtype':tbtype},type:"POST", |
|
62 |
async:false,dataType:'text',success:function(da) { |
|
63 |
if(da==1){ |
|
64 |
window.close(); |
|
65 |
window.open(urls); |
|
66 |
} |
|
67 |
}}); |
|
68 |
|
|
69 |
} |
|
70 |
</script> |
|
71 |
<body> |
|
72 |
<div class="easyui-layout" fit="true"> |
|
73 |
<div region="north" border="false" style="padding-top:15px;padding-bottom:15px;text-align:center;background:#fff;"> |
|
74 |
<span><font size="2" color="BBBOOO">APPKey和APPSecret是您在淘宝应用申请的证书钥匙和密钥</font></span> |
|
75 |
</div> |
|
76 |
<div region="center" border="true" style="text-align:center;padding-top:25px;background:#fff;border:1px solid #ccc;"> |
|
77 |
|
|
78 |
<form id="loginForm" method="post"> |
|
79 |
<table align="center" > |
|
80 |
<tr><td align="right"> |
|
81 |
<font size="2">APPKey:</font> |
|
82 |
</td><td> |
|
83 |
<input type="text" id="appkey" name="appkey" value="" maxlength="30" style="width:200px; height:20px;"></input> |
|
84 |
</td> |
|
85 |
</tr> |
|
86 |
<tr><td></td><td></td></tr> |
|
87 |
<tr> |
|
88 |
<td align="right"> |
|
89 |
<font size="2">APPSecret:</font> |
|
90 |
</td> |
|
91 |
<td> |
|
92 |
<input type="text" id="appsecret" name="appsecret" value="" style="width:200px; height:20px;"></input> |
|
93 |
|
|
94 |
</td> |
|
95 |
</tr> |
|
96 |
<tr><td></td><td></td></tr> |
|
97 |
<tr> |
|
98 |
<td align="right"> |
|
99 |
<font size="2">应用环境:</font> |
|
100 |
</td> |
|
101 |
<td align="left"> |
|
102 |
<select name="tbtype" id="tbtype" style="width:12s0px; height:30px;"> |
|
103 |
<option value="1">正式应用环境</option><option value="2">沙箱测试环境</option> |
|
104 |
</select> |
|
105 |
|
|
106 |
</td> |
|
107 |
</tr> |
|
108 |
<tr><td></td><td></td></tr> |
|
109 |
<tr><td></td><td></td></tr> |
|
110 |
<tr> |
|
111 |
<td colspan="2" align="center"> |
|
112 |
(注:”沙箱测试环境“需在中间表后面加“|2”) |
|
113 |
|
|
114 |
</td> |
|
115 |
</tr> |
|
116 |
</table> |
|
117 |
</form> |
|
118 |
</div> |
|
119 |
<div region="south" border="false" style="text-align:center;padding:5px 0;overflow: hidden;"> |
|
120 |
<a id="login" class="easyui-linkbutton" iconCls="icon-ok" onclick="windowopen()">确 定</a> |
|
121 |
</div> |
|
122 |
</div> |
|
123 |
</body> |
|
124 |
</html> |