|
@@ -8,13 +8,24 @@
|
|
|
<link rel="stylesheet" type="text/css" href="css/bind_weixin.css">
|
|
|
<script>
|
|
|
$(function(){
|
|
|
- login();
|
|
|
+ var openid = '${requestScope.openid}';
|
|
|
+ if (openid == '') {
|
|
|
+ login();
|
|
|
+ }
|
|
|
+
|
|
|
$(".confirm").click(function(){
|
|
|
+ $.post('bindAccount.do',{'openid':openid, 'account':$(".account").val(), 'pwd':$(".password").val()}, function(resp) {
|
|
|
+ if (resp.code == 'ok') {
|
|
|
+ alert("绑定成功!");
|
|
|
+ } else {
|
|
|
+ alert(resp.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
|
|
|
function login(){
|
|
|
- var url = "http://wx.yunsu.cn/JSKBT/getWeiXinOpenid.do";
|
|
|
+ var url = "http://wx.ttkuaiban.com/yscloud/getWeiXinOpenid.do";
|
|
|
var appId = "wx42c0f9d19a4756a7";
|
|
|
var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
|
|
|
console.log(weixinUrl);
|
|
@@ -32,7 +43,7 @@
|
|
|
<p class="text3">账号</p>
|
|
|
<input class="textbox account" type="text" placeholder="请输入账号">
|
|
|
<p class="text3">密码</p>
|
|
|
- <input class="textbox password" type="text" placeholder="请输入密码">
|
|
|
+ <input class="textbox password" type="password" placeholder="请输入密码">
|
|
|
<div class="confirm">确认绑定</div>
|
|
|
</div>
|
|
|
</body>
|