|
@@ -0,0 +1,211 @@
|
|
|
+<!doctype html>
|
|
|
+<html>
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
|
+ <title>登录演示</title>
|
|
|
+ <!-- <script src="./js/dwudbproxy-wan.js"></script> -->
|
|
|
+ <!-- <script src="../../../pub/common/js/dwudbproxy.js"></script> -->
|
|
|
+
|
|
|
+
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <!--<link href="./dwUDBProxy/css/login.css" rel="stylesheet" type="text/css">-->
|
|
|
+ <div style="height:40px;">
|
|
|
+ 服务器时间[用来查看页面是否有刷新]:
|
|
|
+ <strong style="color:red">2017-11-06 13:55:34</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="udb_login_yes">
|
|
|
+
|
|
|
+ <p>
|
|
|
+ UDB登录:
|
|
|
+ <button id="udb_login">udb登录[刷新页面]</button>
|
|
|
+ <button id="udb_login_callback">udb登录[不刷新页面]</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ 多玩网第三方登录:
|
|
|
+ <button id="duowan_third_login">第三方登录[刷新页面]</button>
|
|
|
+ <button id="duowan_third_login_callback">第三方登录[不刷新页面]</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ 手机UDB登录:
|
|
|
+ <button id="udb_mobile_login">第三方登录[刷新当前页面]</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ 多玩网第三方注册:
|
|
|
+ <button id="udb_mobile_register">第三方注册[不刷新当前页面]</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ 多玩特权登录:
|
|
|
+ <button id="udb_ka_login">读完特权登录</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ H5微信登录定制:
|
|
|
+ <button id="udb_wechat_login">H5微信登录定制</button>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="udb_login_no">
|
|
|
+ <span id="username"></span>
|
|
|
+ <button id="udb_logout">退出登录</button>
|
|
|
+ <a href="/auth" target="_blank">查看后端验证</a>
|
|
|
+
|
|
|
+ <div class="btn-wrap">
|
|
|
+ <button class="btn-bind" data-type="qq">绑定账号QQ</button>
|
|
|
+ <button class="btn-bind" data-type="weixin">绑定账号WX</button>
|
|
|
+ <button class="btn-unbind" data-type="weibo">绑定账号WEIBO</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--<div class="dw-account-login-pop" style="display: block;">
|
|
|
+ <div class="dw-login-wrap">
|
|
|
+ <div class="dw-login-inner">
|
|
|
+ <h3>请选择您的登录方式</h3>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="login-btn-yy" title="YY登录"></div>
|
|
|
+ <p>YY登录</p>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div class="login-btn-qq" title="QQ登录"></div>
|
|
|
+ <p>QQ登录</p>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div class="login-btn-wechat" title="微信登录"></div>
|
|
|
+ <p>微信登录</p>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ <p class="dw-account-other-login">
|
|
|
+ <button type="button" class="login-btn-old" title="旧版第三方登录">旧版第三方登录</button>
|
|
|
+ 其它登录方式:<button type="button" class="login-btn-weibo" title="新浪微博登录">新浪微博</button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a class="close" title="关闭">退出</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="account-login-mask" style="display:block;"></div>-->
|
|
|
+
|
|
|
+<script src="http://pub.dwstatic.com/common/js/jquery.js"></script>
|
|
|
+<script src="http://pub.ouj.com/common//js/dwudbproxy-wan.js"></script>
|
|
|
+<script>
|
|
|
+ var plainFunction = function () { }
|
|
|
+ $(function () {
|
|
|
+ init()
|
|
|
+ function init() {
|
|
|
+ if (dwUDBProxy.isLogin()) {
|
|
|
+ $('#username').html(dwUDBProxy.getCookie('username'));
|
|
|
+ $('#udb_login_yes').hide();
|
|
|
+ $('#udb_login_no').show();
|
|
|
+ } else {
|
|
|
+ $('#udb_login_yes').show();
|
|
|
+ $('#udb_login_no').hide();
|
|
|
+ $('#username').html('');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#udb_login').click(function () {
|
|
|
+ dwUDBProxy.login(''); //为空,登录成功后则跳转到当前页面
|
|
|
+ });
|
|
|
+ dwUDBProxy.add(function (user) {
|
|
|
+ $('#username').html(user.username);
|
|
|
+ $('#udb_login_yes').hide();
|
|
|
+ $('#udb_login_no').show();
|
|
|
+ })
|
|
|
+ $('#udb_login_callback').click(function () {
|
|
|
+ dwUDBProxy.login(plainFunction);
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#vhuya_third_login').click(function () {
|
|
|
+ dwUDBProxy.multiLogin('/demo'); //为空,登录成功后则跳转到当前页面
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#vhuya_third_login_callback').click(function () {
|
|
|
+ dwUDBProxy.multiLogin(function () { //回调函数,登录成功后执行
|
|
|
+ init();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#duowan_third_login').click(function () {
|
|
|
+ dwUDBProxy.multiLogin('/demo'); //为空,登录成功后则跳转到当前页面
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#duowan_third_login_callback').click(function () {
|
|
|
+ dwUDBProxy.login(function () { //回调函数,登录成功后执行
|
|
|
+ init();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#udb_wechat_login').click(function () {
|
|
|
+ dwUDBProxy.login({
|
|
|
+ defaultCallbck: function () {
|
|
|
+
|
|
|
+ },
|
|
|
+ wechatClickCallback: function (thirdLogin) {
|
|
|
+ thirdLogin.closeLoginPopup()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ $('#udb_ka_login').click(function () {
|
|
|
+ dwUDBProxy.kaLogin()
|
|
|
+ })
|
|
|
+
|
|
|
+ $('#udb_mobile_register').click(function () {
|
|
|
+ dwUDBProxy.register(function () {
|
|
|
+ // alert(11111)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ $('#udb_mobile_login').click(function () {
|
|
|
+ dwUDBProxy.login(function () {
|
|
|
+
|
|
|
+ }); //为空,登录成功后则跳转到当前页面
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#udb_logout').click(function () {
|
|
|
+ dwUDBProxy.logout(plainFunction); //为空,退出成功后则跳转到当前页面
|
|
|
+ });
|
|
|
+ dwUDBProxy.addLogout(function(){
|
|
|
+ init()
|
|
|
+ })
|
|
|
+ dwUDBProxy.addBind(function () {
|
|
|
+ console.log('绑定成功')
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.btn-bind').on('click', function () {
|
|
|
+ var $this = $(this),
|
|
|
+ type = $this.data('type')
|
|
|
+
|
|
|
+ dwUDBProxy.bind(type, function () { })
|
|
|
+ })
|
|
|
+
|
|
|
+ dwUDBProxy.getUser(function (ret) {
|
|
|
+ // console.log(ret)
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.btn-unbind').on('click', function () {
|
|
|
+ var $this = $(this),
|
|
|
+ type = $this.data('type')
|
|
|
+
|
|
|
+ dwUDBProxy.unBind(type, function (ret) {
|
|
|
+ console.log(ret)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+<script src="./dwNavBar2017/navbar2017.js"></script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|