[关闭]
@njy 2016-06-21T10:04:34.000000Z 字数 23997 阅读 1279

新浪新版登录(pc端)

新浪彩通


原因:用户登录认证SSO_SDK升级

为了解决用户账号密码泄露问题,新版停用cookie里SUP字段的明文用户账号信息。改用SUBP字段取得

推荐使用方法二 如果时间来不及 可先按方法一修改
具体修改点击这个链接:https://www.zybuluo.com/njy/note/408335
测试线上地址: http://euro.sina.com.cn/lottery/niujianyin.html

方法一:最简单的修改方式

  1. //旧版获取uid
  2. var SUP = getSinaWbCookieVal('SUP');
  3. var wbId = '';
  4. var tmp = SUP.split('&');
  5. for (var i = 0; i < tmp.length; i++) {
  6. var arr = tmp[i].split('=');
  7. if ('uid' == arr[0]) {
  8. wbId = arr[1];
  9. util.wbId = wbId;
  10. break;
  11. }
  12. }

修改为

  1. var wbId = sinaSSOController &&sinaSSOController.getSinaCookie()&& sinaSSOController.getSinaCookie().uid
  2. var nick = sinaSSOController &&sinaSSOController.getSinaCookie()&& sinaSSOController.getSinaCookie().nick

去除掉前端的判断 只判断sinaSSOController && sinaSSOController.getSinaCookie().uid 是否存在

  1. var SUP = getSinaWbCookieVal('SUP');
  2. if (null == SUP || SUP == '') {
  3. util.alert("在购买前请先登录");
  4. return;
  5. }
  6. var wbId = '';
  7. var tmp = SUP.split('&');
  8. for (var i = 0; i < tmp.length; i++) {
  9. var arr = tmp[i].split('=');
  10. if ('uid' == arr[0]) {
  11. wbId = arr[1];
  12. util.wbId = wbId;
  13. break;
  14. }
  15. }
  16. if (wbId == '') {
  17. util.alert("在购买前请先登录");
  18. return;
  19. }
  20. var nickName = getSinaWbCookieVal('SINA_WB_LOCAL_NICKNAME');
  21. var uId = getSinaWbCookieVal('SINA_WB_LOCAL_NICKNAME_UID');
  22. if (wbId != uId) {
  23. util.alert("获取登录信息异常,请重新登录");
  24. return;
  25. }

方法二:和新浪体育保持一致的修改

新版登录前端代码引入(运营登录顶托)

  1. project(newlogin)
  2. ├─ c (样式)
  3. ├─ topbarlogin.css (登录样式)
  4. ├─ i (图片)
  5. ├─ topbarlogin
  6. └─more
  7. ├─ j (工程模块)
  8. ├─ lib (基础模块)
  9. └─ configLogin.js (登录回调 所有相关登录后的操作代码放入这个文件,需要修改)
  10. └─ topbarLogin.js (这个不需要改动 登录固定代码)
  11. └─ more (其他登录分拆代码,无用)
  12. ├─ index.html (新版登录页面)
  13. ...

1.index.html (顶托包括logo,登录小人,我的订单)

  1. //本地未编译版本 看结构 使用下边编译版本
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>欧洲杯智能平台_新浪彩通</title>
  6. <link rel="import" href="h/commonHead.html?__inline">
  7. </head>
  8. <body>
  9. <!-- 头部 html start -->
  10. <link rel="stylesheet" href="l/topbarlogin.less" type="text/css" media="screen" />
  11. <link rel="import" href="h/header.html?__inline">
  12. <!-- 登录组件js -->
  13. <script src="./j/lib/jquery-1.11.1.min.js"></script>
  14. <script type="text/javascript" src="./j/lib/configLogin.js"></script>
  15. <script type="text/javascript" src="./j/lib/topbarLogin.js"></script>
  16. <!-- 头部 html end -->
  17. </body>
  18. </html>
  1. //编译版本
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>欧洲杯智能平台_新浪彩通</title>
  6. <meta charset="utf-8">
  7. <meta name="keywords" content="欧洲杯,体育彩票,体彩,欧洲杯预测,欧洲杯分析,预测,分析。" />
  8. <meta name="description" content="新浪彩通欧洲杯智能结果预测采用大数据和模型算法,对今天进行的欧洲杯赛事的胜负进行分析,提供基于基本面、赔率面和数据面的全面参考。" />
  9. <meta name="robots" content="all">
  10. <meta name="applicable-device" content="pc">
  11. <meta name="renderer" content="webkit">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  13. <meta name="viewport" content="width=1024,maximum-scale=2.0" />
  14. <script>
  15. // ie绕过同源策略
  16. try{
  17. document.domain="sina.com.cn";
  18. }catch(e){}
  19. </script>
  20. </head>
  21. <body>
  22. <!-- 头部 html start -->
  23. <link rel="stylesheet" href="c/topbarlogin.css" type="text/css" media="screen" />
  24. <!-- 顶通 html start -->
  25. <div class="nav-b" id="j_nav" data-sudaclick="blk_topnav_div">
  26. <div class="layout-wrap-a layout-relative clearfix" layer-type="layer-wrap">
  27. <a href="http://lottery.sina.com.cn/" target="_blank" class="sina-top-bar-logo"></a>
  28. <div id="layout-wrap-order">
  29. <a href="http://ai.lottery.sina.com.cn/uc/order/index/" target="_blank">我的订单</a>
  30. </div>
  31. <div class="extra" node-type="extra">
  32. <div node-type="user" class="TAP14">
  33. <div class="ac-rgst">
  34. <a href="https://login.sina.com.cn/signup/signup?entry=sports" class="msg-link" target="_blank">注册</a>
  35. </div>
  36. <div class="ac-login">
  37. <div class="ac-login-cnt ">
  38. <a href="#" class="">
  39. <span class="thumb">
  40. <img src="http://i.sso.sina.com.cn/images/login/thumb_default.png"></span>
  41. <span class="log-links">登录</span>
  42. </a>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. <!-- 顶通 html end -->
  50. <!-- 登录组件js -->
  51. <script src="j/lib/jquery-1.11.1.min.js"></script>
  52. <script type="text/javascript" src="j/lib/configLogin.js"></script>
  53. <script type="text/javascript" src="j/lib/topbarLogin.js"></script>
  54. <!-- 头部 html end -->
  55. </body>
  56. </html>

1.引入c/topbarlogin.css
2.引入顶通html
3.引入jquery 如:j/lib/jquery-1.11.1.min.js
4.引入j/lib/configLogin.js 登录回调 所有相关登录后的操作代码放入这个文件,需要修改
5.引入j/lib/topbarLogin.js 这个不需要改动 登录代码
现实测试地址: http://euro.sina.com.cn/lottery/niujianyin.html

configLogin.js 具体修改详情:

  1. /**
  2. *全局变量caitong 固定名称,登录后回调caitong方法
  3. *loginSuccess 登录成功回调
  4. *logoutSuccess 退出成功回调
  5. *sinaSSOController.getSinaCookie() 获取新浪账号信息 没有返回null
  6. *Object { status: "0", flag: "00", evid: "", uid: "1834456825", nick: "余荫漫步" }
  7. *SINA_OUTLOGIN_LAYER.isLogin() //是否登录
  8. */
  9. // ssologin.js是注入的 所以先定义一下
  10. window.sinaSSOController = null;
  11. // caitong 名称固定 如果想用其他回调对象名 请到topbarLogin.js Navb模块中修改
  12. window.caitong = {
  13. // 登录成功回调
  14. loginSuccess: function(info){
  15. },
  16. // 退出成功回调
  17. logoutSuccess: function(info){
  18. },
  19. // 获取微博id 从cookie里的SUBP
  20. getWbId: function(){
  21. return (sinaSSOController && sinaSSOController.getSinaCookie().uid) || '';
  22. },
  23. // 获取微博昵称 从cookie里的SUBP
  24. getWbNick: function(){
  25. return (sinaSSOController && sinaSSOController.getSinaCookie().nick) || '';
  26. },
  27. // 新版方法获取微博头像图片
  28. getWeiboInfo: function(){
  29. },
  30. // 老版方法获取微博头像图片
  31. getWeiboInfoByUrl: function(){
  32. },
  33. // 是否登录
  34. isLogin: function(){
  35. return (SINA_OUTLOGIN_LAYER && SINA_OUTLOGIN_LAYER.isLogin())|| false;
  36. },
  37. // 显示浮层
  38. showLogin: function(){
  39. (SINA_OUTLOGIN_LAYER && SINA_OUTLOGIN_LAYER.show());
  40. },
  41. // 关闭浮层
  42. hideLogin: function(){
  43. (SINA_OUTLOGIN_LAYER && SINA_OUTLOGIN_LAYER.hide());
  44. }
  45. }
  46. /**
  47. *将微博昵称和wbId放cookie中 不建议使用 写入新浪域 有可能被清掉
  48. *发送新浪特定接口请求返回会执行新浪域的白名单 delete掉自己写入新浪域的cookie
  49. *建议使用cookie里的SUBP
  50. 解密方法:
  51. var getCookie = function(name) {
  52. var Res = (new RegExp(name + "=([^;]+)")).exec(document.cookie);
  53. return Res == null ? null : Res[1]
  54. }
  55. var subp = getCookie("SUBP");
  56. if (!subp) {
  57. return null
  58. }
  59. //sinaSSOEncoder 来源于ssologin.js(自动引入) sinaSSOEncoder目前是全局全局方法ååååå
  60. var arrSubp = sinaSSOEncoder.getSUBPCookie.decode(subp);
  61. try {
  62. arrSubp.uid = arrSubp.uid.replace(/(^\s*)|(\s*$)/g, "");
  63. arrSubp.nick = decodeURIComponent(arrSubp.nick.replace(/(^\s*)|(\s*$)/g, ""))
  64. } catch (err) {
  65. return null
  66. }
  67. console.log(arrSubp);
  68. return arrSubp
  69. */

建议

1.微博uid 和nick 都从cookie中的SUBP中获取 获取方法为:sinaSSOController.getSinaCookie() sinaSSOController 为全局变量
2.假如自己写入的cookie 加逻辑判断,下面是之前写入了微博uid,nick,微博头像图片地址。 加逻辑判断为 假如没有在新浪域取到自己写入cookie的SINA_WB_LOCAL_NICKNAME_UID 去取cookie中的SUBP里的uid

  1. var ckName = 'SINA_WB_LOCAL_NICKNAME';
  2. var ckNameId = 'SINA_WB_LOCAL_NICKNAME_UID';
  3. var ckLogoUrl = 'SINA_WB_LOCAL_LOGO_URL';
  4. var ckDomain = 'sina.com.cn';
  5. // setSinaWbCookie 和 getSinaWbCookieVal 方法依然保留 可以直接使用 如setSinaWbCookie(ckNameId, util.wbId, ckDomain, 0);
  6. util.setSinaWbCookie(ckNameId, util.wbId, ckDomain, 0);
  7. util.setSinaWbCookie(ckName, util.nick, ckDomain, 0);
  8. util.setSinaWbCookie(ckLogoUrl, util.wbImg, ckDomain, 0);

注意

  1. //上线之前把util.debug 设置为false 关闭控制台debugger 信息
  2. util.debug = false;

注意:把之前引入的旧版顶通旧版登录样式删除掉。
euro.com.cn/lottery 是common.css 中的
@import url('./top.less');
@import url('./top_account.less');
具体删除代码见底部附录(c1)

ai.lottery.sina.com.cn/uc/order/index 是删除

  1. <!-- 登录组件 -->
  2. <link rel="stylesheet" type="text/css" href="http://i.sso.sina.com.cn/css/userpanel/v1/top_account_v2.css"/>
  3. <!--登录皮肤css-->
  4. <link rel="stylesheet" type="text/css" href="http://tech.sina.com.cn/css/717/20140821/index2014/comment.css"/>
  5. <script type="text/javascript" src="http://tech.sina.com.cn/js/717/20140827/index2014/top.js"></script>
  6. <script type="text/javascript" src="http://i.sso.sina.com.cn/js/outlogin_layer.js" charset="utf-8"></script>
  7. <script type="text/javascript" src="http://i.sso.sina.com.cn/js/user_panel_new_version_v2.js" charset="utf-8"></script>

删除js里原来的顶通调用

  1. window.__SinaTopBar__.user.init(document.getElementById('SI_User'), {
  2. entry: 'caitong',
  3. login_success: function() {
  4. var sinaURL = 'http://api.sina.com.cn/weibo/wb/users_show.json?uid=';
  5. var SUP = getSinaWbCookieVal('SUP');
  6. var wbId = '';
  7. var tmp = SUP.split('&');
  8. for (var i = 0; i < tmp.length; i++) {
  9. var arr = tmp[i].split('=');
  10. if ('uid' == arr[0]) {
  11. wbId = arr[1];
  12. util.wbId = wbId;
  13. break;
  14. }
  15. }
  16. $.ajax({
  17. url: sinaURL + wbId,
  18. type: "GET",
  19. dataType: "jsonp",
  20. async: false,
  21. success: function(jsonMsg) {
  22. //console.log(jsonMsg);
  23. var sts = jsonMsg.result.status.msg;
  24. if ('success' == sts) {
  25. var _uid = jsonMsg.result.data.id;
  26. if (_uid != wbId) {
  27. // util.alert('读取新浪接口返回的微博id不一不致');
  28. return null;
  29. }
  30. var nickName = jsonMsg.result.data.name;
  31. var wbImg = jsonMsg.result.data.avatar_large;
  32. //将微博昵称和wbId放cookie中
  33. var ckName = 'SINA_WB_LOCAL_NICKNAME';
  34. var ckNameId = 'SINA_WB_LOCAL_NICKNAME_UID';
  35. var ckLogoUrl = 'SINA_WB_LOCAL_LOGO_URL';
  36. var ckDomain = 'sina.com.cn';
  37. setSinaWbCookie(ckName, nickName, ckDomain, 0);
  38. setSinaWbCookie(ckNameId, _uid, ckDomain, 0);
  39. setSinaWbCookie(ckLogoUrl, wbImg, ckDomain, 0);
  40. util.wbId = wbId;
  41. $('#sina-top-bar-right').show();
  42. // 登录成功之后 验证是否已经购买过比赛。 需要测试
  43. if(window.switchGame){
  44. for(var i=0; i<4; i++){
  45. window.switchGame(i);
  46. }
  47. }
  48. if(window.mdinfo && mdinfo.livecast_id){
  49. var matchId= mdinfo.livecast_id;
  50. getMdData(matchId);
  51. }
  52. } else {
  53. // util.alert('读取新浪接口获取微博信息失败');
  54. return null;
  55. }
  56. }
  57. });
  58. },
  59. logout_success: function() {
  60. $('#sina-top-bar-right').hide();
  61. location.href = logoutUrl;
  62. }
  63. });
  64. sinaLoginLayer.set('plugin',   { 
  65. qqLogin :  false
  66. });
  67. sinaLoginLayer.set('styles',   {
  68. marginLeft: '0px'
  69. });
  70. function middleLogin(msg) {
  71. var UserPanel = SINA_USER_PANEL;
  72. UserPanel.setOutLoginMiddle();
  73. UserPanel.getOutLogin().show();
  74. // 可添加提示
  75. __SinaTopBar__.user.showTip(msg);
  76. }
  77. function checkLogin() {
  78. if (sinaLoginLayer) {
  79. return sinaLoginLayer.isLogin();
  80. }
  81. return false;
  82. }
  83. function setSinaWbCookie(name, value, domain, expires) {
  84. domain = domain || document.domain;
  85. if (typeof(expires) == 'undefiend' || expires == null || expires == '') {
  86. document.cookie = name + "=" + encodeURIComponent(value) + "; path=" + "/" + "; domain=" + domain;
  87. } else {
  88. var expTimes = expires * 1000;
  89. var expDate = new Date();
  90. expDate.setTime(expDate.getTime() + expTimes);
  91. document.cookie = name + "=" + encodeURIComponent(value) + ";expires=" + expDate.toGMTString() + "; path=" + "/" + "; domain=" + domain;
  92. }
  93. }
  94. function getSinaWbCookieVal(name) {
  95. var cookieArr = document.cookie.replace(/\s/g, "").split(';');
  96. for (var i = 0; i < cookieArr.length; i++) {
  97. var tempObj = cookieArr[i].split('=');
  98. if (tempObj[0] == name)
  99. return decodeURIComponent(tempObj[1]);
  100. }
  101. return null;
  102. }

附录

c1:
在topbarlogin.css 后增加以下样式修改logo

  1. .sina-top-bar-logo{
  2. float: left;
  3. height: 36px;
  4. width: 105px;
  5. background: url(../i/logo.png) no-repeat;
  6. }

top.less

  1. /* top.less*/
  2. /* [2,717,211] published at 2014-09-02 15:53:31 */
  3. html,body{padding: 0;margin: 0;}
  4. .sina-top-bar-wrap a:link,.sina-top-bar-wrap a:visited{color:#333;text-decoration: none;}
  5. .sina-top-bar-wrap a:hover,.sina-top-bar-wrap a:active{color:#FA8200;text-decoration: none;}
  6. .sina-top-bar-wrap ul{list-style: none;padding: 0;margin: 0;}
  7. .sina-top-bar-ico{font-size: 0;display: inline;float: left;margin:10px 0 0 10px;position: relative;overflow: hidden;background: url(http://i1.sinaimg.cn/dy/deco/2014/0718/top.png) 0 0 no-repeat;}
  8. .sina-top-bar-ico-list{width:15px;height:13px;margin:6px 8px 0 0;background-position: 0 0;}
  9. .sina-top-bar-ico-down{width:8px;height:4px;background-position: -40px 0;}
  10. .sina-top-bar-wrap{/*background:#FBFBFB;border-bottom: 1px solid #C7C7C7;border-top: 3px solid #FA8200;position: fixed;left:0;top:0;width:100%;*/ min-width: 1000px; z-index: 9; position:relative;}
  11. .sina-top-bar-inner{width:1000px;height:36px;margin:0 auto;position: relative;}
  12. .sina-top-bar-nav{font:14px/24px "Microsoft Yahei","微软雅黑","SimSun","宋体","Arial Narrow",serif;color:#333;}
  13. .sina-top-bar-nav-list{position: absolute;}
  14. .sina-top-bar-nav-list li{float: left;display: inline;}
  15. .sina-top-bar-nav-list li a{float:left;height:24px; padding: 17px 15px 16px;overflow: hidden;}
  16. .sina-top-bar-nav-txt{float: left;display: inline;}
  17. .sina-top-bar-nav-list .sina-top-bar-nav-first a{padding-left: 0;}
  18. .sina-top-bar-nav-other{border:1px solid #C7C7C7;border-top:0;display: block;width:998px;position: absolute;right:0;top:58px;display: none;background: #fff;}
  19. .sina-top-bar-nav-other li{float: left;display: inline;}
  20. .sina-top-bar-nav-other li a{display: block;padding: 13px 15px 12px;}
  21. .sina-top-bar-nav-more,.sina-top-bar-nav-guide{padding: 0 1px;zoom:1;}
  22. .sina-top-bar-nav-list .sina-top-bar-nav-guide{margin-right: 15px;display:none;}
  23. .sina-top-bar-tip{float: right;display: inline;width:87px;height:37px;margin: 6px 5px 0 0; background: url(http://i1.sinaimg.cn/dy/deco/2014/0725/toptip.png) no-repeat 0 0;}
  24. .sina-top-bar-tip:hover{filter:alpha(opacity=80);opacity:0.8;}
  25. .sina-top-bar-nav-other .sina-top-bar-nav-mlnk{display: none;}
  26. /*dropdown*/
  27. .sina-top-bar-nav-show .sina-top-bar-nav-more,.sina-top-bar-nav-show .sina-top-bar-nav-guide{padding:0;border:1px solid #CACACA; border-top:0;border-bottom:2px solid #fff;background: #fff;}
  28. .sina-top-bar-nav-show .sina-top-bar-nav-other{display: block;}
  29. .sina-top-bar-nav-show .sina-top-bar-ico-list,a:hover .sina-top-bar-ico-list{ background-position: -20px 0;}
  30. .sina-top-bar-nav-show .sina-top-bar-ico-down{background-position: -40px -10px;}
  31. .sina-top-bar-nav-show .sina-top-bar-nav-guide a:link,.sina-top-bar-nav-show .sina-top-bar-nav-guide a:visited{color:#FA8200;}
  32. .sina-top-bar-nav-show .sina-top-bar-nav-guide a:hover,.sina-top-bar-nav-show .sina-top-bar-nav-guide a:active{color:#FA8200;}
  33. .sina-top-bar-nav-show .sina-top-bar-nav-more a:link,.sina-top-bar-nav-show .sina-top-bar-nav-more a:visited{color:#FA8200;}
  34. .sina-top-bar-nav-show .sina-top-bar-nav-more a:hover,.sina-top-bar-nav-show .sina-top-bar-nav-more a:active{color:#FA8200;}
  35. /*fixed*/
  36. .sina-top-bar-wrap-fixed .sina-top-bar-nav-list li{display: none;}
  37. .sina-top-bar-wrap-fixed .sina-top-bar-nav-list .sina-top-bar-nav-guide,.sina-top-bar-wrap-fixed .sina-top-bar-nav-list .sina-top-bar-nav-first{display: block;}
  38. .sina-top-bar-wrap-fixed .sina-top-bar-nav-mlnk{display: inline;}
  39. .sina-top-bar-wrap-fixed .sina-top-bar-nav-slnk{display: none;}
  40. /*login*/
  41. .sina-top-bar-user img{border: 0;}
  42. .outlogin_layerbox_bylx .sina-top-bar-user-tip{width:452px;line-height: 36px !important; font-size: 16px !important;padding: 10px 0 0 25px;position: absolute;background: white;left: 0;right: 25px;overflow: hidden;}
  43. .outlogin_layerbox_bylx .sina-top-bar-user-tip span{color: #a87a2c;}
  44. /*ie6*/
  45. /*html,body{_background-image:url(about:blank);_background-attachment:fixed}
  46. .sina-top-bar-wrap{_position:absolute;_top:expression(documentElement.scrollTop);}*/
  47. /*skin*/
  48. .sina-top-bar-red .sina-top-bar-ico{background-image: url(http://i2.sinaimg.cn/dy/deco/2014/0730/top_red.png);}
  49. .sina-top-bar-red{border-top-color:#CC0000;}
  50. .sina-top-bar-red a:hover,
  51. .sina-top-bar-red a:active,
  52. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-guide a:link,
  53. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-guide a:visited,
  54. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-guide a:hover,
  55. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-guide a:active,
  56. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-more a:link,
  57. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-more a:visited,
  58. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-more a:hover,
  59. .sina-top-bar-red .sina-top-bar-nav-show .sina-top-bar-nav-more a:active,
  60. .sina-top-bar-red .TAP14 a:hover{color:#CC0000;}
  61. .sina-top-bar-blue .sina-top-bar-ico{background-image: url(http://i2.sinaimg.cn/dy/deco/2014/0730/top_red.png);}
  62. .sina-top-bar-blue{border-top-color:#1f90e0;}
  63. .sina-top-bar-blue a:hover,
  64. .sina-top-bar-blue a:active,
  65. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-guide a:link,
  66. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-guide a:visited,
  67. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-guide a:hover,
  68. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-guide a:active,
  69. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-more a:link,
  70. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-more a:visited,
  71. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-more a:hover,
  72. .sina-top-bar-blue .sina-top-bar-nav-show .sina-top-bar-nav-more a:active,
  73. .sina-top-bar-blue .TAP14 a:hover{color:#CC0000;}
  74. .sina-top-bar-blue .TAP14 .msg-tab li a.cur:link,
  75. .sina-top-bar-blue .TAP14 .msg-tab li a.cur:hover,
  76. .sina-top-bar-blue .TAP14 .msg-tab li a.cur:visited,
  77. .sina-top-bar-blue .TAP14 a.list-link:link, .sina-top-bar-blue .TAP14 a.list-link:visited,.sina-top-bar-blue .TAP14 a.list-link:hover{color:#cc0000 !important;}

top_account.less

  1. /*top_account.less*/
  2. /* CSS Document */
  3. .TAP14{float:right!important;position:relative!important;width:270px!important;height:36px!important;font:normal 16px 'Microsoft Yahei';}
  4. .TAP14-logined{width:198px!important;}
  5. .TAP14 .ac-icon{background-repeat:no-repeat!important;display:inline-block!important;*display:inline!important;*zoom:1!important; vertical-align:text-bottom!important;overflow:hidden!important;}
  6. .TAP14 .ac-icon-message{width:14px!important;height:14px!important;background-position:0 0!important;}
  7. /*.TAP14 .ac-icon-slash{width:4px!important;height:14px!important;background-position:-21px 1px!important;}*/
  8. .TAP14 .ac-icon-at{width:16px!important;height:16px!important;background-position:0 -20px!important;}
  9. .TAP14 .ac-icon-dot{width:16px!important;height:16px!important;background-position:0 -40px!important;}
  10. .TAP14 .ac-icon-bbs{width:16px!important;height:16px!important;background-position:0 -60px!important;}
  11. .TAP14 .ac-icon-mail{width:23px!important;height:16px!important;background-position:-20px -20px!important;}
  12. .TAP14 .ac-icon-mvip{width:23px!important;height:16px!important;background-position:-20px -40px!important;}
  13. .TAP14 .ac-icon-ment{width:23px!important;height:16px!important;background-position:-20px -60px!important;}
  14. .TAP14 .ac-icon-aru{width:10px!important;height:6px!important;background-position:0 -80px!important;}
  15. .TAP14 .ac-icon-ard{width:10px!important;height:6px!important;background-position:-20px -80px!important;}
  16. .TAP14 .ac-login{position:relative!important;float:right!important;width:120px!important;height:36px!important;z-index:10;}
  17. .TAP14 .ac-login-cnt{float:left!important;height:36!important;}
  18. .TAP14 .ac-login-cnt a{display:block!important;width:120px!important;height:36!important;zoom:1!important; cursor:pointer!important;}
  19. .TAP14 .ac-login-cnt a:hover,
  20. .TAP14 .ac-login-cnt a:active,
  21. .TAP14 .ac-login a.active{position:relative!important;border-width:0 1px!important;border-style:solid!important;width:118px!important;height:36px!important;_height:36!important;_bottom:-1px!important;}
  22. .TAP14 .ac-login .thumb{float:left!important;margin:4px 0 0 13px!important;width:30px!important;height:30px!important;overflow:hidden!important;border-radius:15px!important;border:none!important;_display:inline!important;_zoom:1!important;}
  23. /*.TAP14 .ac-login .thumb:hover{width:36px!important;height:36px!important;overflow:hidden!important;border:none!important;}*/
  24. .TAP14 .ac-login-cnt .thumb{float:left!important;width:30px!important;overflow:hidden!important;border:none!important;_zoom:1!important;outline:none!important;}
  25. .TAP14 .ac-logined .thumb{margin:0px 0 0 13px!important;}
  26. .TAP14 .ac-logined a.thumb,
  27. .TAP14 .ac-logined a.thumb:link,
  28. .TAP14 .ac-logined a.thumb:visited,
  29. .TAP14 .ac-logined a.thumb:hover,
  30. .TAP14 .ac-logined a.thumb:active{margin-left:0!important;border:none!important;width:36px!important;height:36px!important;overflow:hidden;}
  31. .TAP14 .thumb img{float:left;border:none!important;outline:none!important; width: 30px; height: 30px;}
  32. .TAP14 .ac-login .log-links{float:left!important;height:36px!important;line-height:39px!important;padding-left:14px!important;_height:38px!important;_padding-top:0!important;}
  33. /*.TAP14 .ac-login .log-links a{padding-left:14px!important;}
  34. .TAP14 .ac-login .ac-icon-slash{margin:0 8px!important;}*/
  35. .TAP14 .ac-nl{ font-family:'Arial';}
  36. /*登录*/
  37. .TAP14 .ac-logined{width:100px!important;}
  38. /*.TAP14 .ac-logined .thumb{margin-left:26px!important;_display:inline!important;width:36px!important;height:36px!important;overflow:hidden!important;}*/
  39. .TAP14 .ac-logined .ac-login-cnt{width:75px!important;padding-left:25px!important;overflow:hidden!important;}
  40. .TAP14 .ac-logined .active{width:74px!important;padding-left:24px!important;border-width:0 1px!important;border-style:solid!important;}
  41. /*.TAP14 .ac-logined .active .thumb,
  42. .TAP14 .ac-logined .ac-login-cnt:link .thumb,
  43. .TAP14 .ac-logined .ac-login-cnt:visited .thumb,
  44. .TAP14 .ac-logined .ac-login-cnt:hover .thumb,
  45. .TAP14 .ac-logined .ac-login-cnt:active .thumb{margin-left:25px!important;border:none!important;width:36px!important;height:36px!important;outline:none!important;overflow:hidden!important;}*/
  46. .TAP14 .ac-logined .thumb img{width:36px!important;height:36px!important;outline:none!important;border:none!important;}
  47. .TAP14 .ac-logined .ac-icon-aru,
  48. .TAP14 .ac-logined .ac-icon-ard{position:absolute!important;right:14px!important;top:17px!important;}
  49. /*下拉菜单*/
  50. .TAP14 .ac-dropdown{position:absolute!important;top:36px!important;left:0!important;border-width:0 1px!important;border-style:solid!important;width:98px!important;z-index:1000!important;}
  51. .TAP14 .ac-dropdown li{border-width:0 0 1px!important;border-style:solid!important;vertical-align:top!important;text-align:center!important;}
  52. .TAP14 .ac-dropdown a,
  53. .TAP14 .ac-dropdown span{display:block!important;height:35px!important;line-height:35px!important; word-break:break-all!important;overflow:hidden!important;font-size:14px!important;}
  54. .TAP14 .ac-dropdown span{cursor:default;}
  55. .TAP14 .ac-dropdown a:hover{ text-decoration:none!important;}
  56. /*消息*/
  57. .TAP14 .message,
  58. .TAP14 .ac-rgst{position:relative!important;float:right!important;width:90px!important;z-index:3}
  59. .TAP14 .ac-rgst{width:60px!important;}
  60. .TAP14 .message .msg-link,
  61. .TAP14 .ac-rgst .msg-link {position:relative!important;display:block!important;width:90px!important;height:36px!important;text-align:center!important;line-height:39px!important; text-decoration:none!important;}
  62. .TAP14 .ac-rgst .msg-link{width:60px!important;}
  63. .TAP14 .msg-link .ac-icon-message{position:absolute!important;right:14px!important;top:14px!important;}
  64. .TAP14 .msg-link:hover .ac-icon-message{right:13px!important;}
  65. .TAP14 .message .msg-link:hover,
  66. .TAP14 .message .active{position:relative!important;border-width:0 1px!important;border-style:solid!important;width:88px!important;height:58px!important;z-index:10;_height:36px!important;_bottom:-1px!important;}
  67. /*消息下拉菜单*/
  68. .TAP14 .msg-dropdown{position:absolute!important;top:36px!important;right:0!important;width:268px!important;border-width:1px!important;border-style:solid!important;overflow:hidden!important;z-index:1000!important;}
  69. .TAP14 .msg-dropdown .msg-tab{height:47px!important;width:275px!important;}
  70. .TAP14 .msg-tab li{float:left!important;width:90px!important;border-width:0 0 1px!important;border-style:solid!important;}
  71. .TAP14 .msg-tab li a{display:block!important;height:34px!important;*padding-bottom:14px!important;margin:0 4px!important;text-align:center!important;position:relative!important;}
  72. .TAP14 .msg-tab li a.cur{position:relative!important;border-width:0 0 3px!important;border-style:solid!important;height:31px!important;}
  73. .TAP14 .msg-tab .ac-icon-message{position:absolute!important;top:-7px!important;right:12px!important;*top:7px!important;}
  74. .TAP14 .msg-tab span{display:block!important;margin:14px -3px 0 0!important;height:14px!important;border-width:0 1px 0 0!important;border-style:solid!important;padding-right:3px!important;line-height:16px!important;}
  75. .TAP14 .msg-lst{overflow:hidden!important;clear:both!important;}
  76. .TAP14 .msg-lst li{margin-top:-1px!important;height:28px!important;border-width:1px 0 0!important;border-style:solid!important;padding:14px 14px 0!important;vertical-align:top!important;font-size:14px!important;line-height:1!important; cursor:pointer;}
  77. .TAP14 .msg-lst .ac-icon{margin-right:6px!important;}
  78. .TAP14 .msg-lst li a{float:right!important;*line-height:20px!important;}
  79. .TAP14 .needlogin{padding:54px 0!important;text-align:center!important;font-size:14px!important;}
  80. .TAP14 .needlogin a{padding-left:6px!important;text-decoration:underline!important;}
  81. /*判断css是否加载完毕*/
  82. .TAP14 .css_check{visibility: hidden;height:0px;width:120px;}
  83. /*可定制内容*/
  84. /*icon*/
  85. .TAP14 .ac-icon{background-image:url(http://i.sso.sina.com.cn/images/login/top_account_icon.png);_background-image:url(http://i.sso.sina.com.cn/images/login/top_account_icon_ie6.png);}
  86. /*边框颜色*/
  87. .TAP14 .ac-login .active,
  88. .TAP14 .ac-login-cnt a:hover,
  89. .TAP14 .ac-dropdown,
  90. .TAP14 .ac-dropdown li,
  91. .TAP14 .message .msg-link:hover,
  92. .TAP14 .message .active,
  93. .TAP14 .msg-dropdown,
  94. .TAP14 .msg-tab li,
  95. .TAP14 .msg-tab li a,
  96. .TAP14 .msg-tab span{border-color:#c7c7c7;}
  97. .TAP14 .msg-lst li{border-color:#f4f4f4;}
  98. .TAP14 .msg-tab li a.cur{border-color:#fa8200;}
  99. /*背景色*/
  100. .TAP14 .msg-dropdown,
  101. .TAP14 .ac-dropdown,
  102. .TAP14 .ac-login .active,
  103. .TAP14 .ac-login-cnt:hover,
  104. .TAP14 .message .msg-link:hover,
  105. .TAP14 .message .active{background:#fff;}
  106. .TAP14 .msg-lst li:hover,
  107. .TAP14 .ac-dropdown li a:hover{background:#f4f4f4;}
  108. /*链接色*/
  109. .TAP14{color:#333;}
  110. .TAP14 a:link,
  111. .TAP14 a:visited{color:#333;text-decoration:none;}
  112. .TAP14 a:hover{color:#fa8200;text-decoration:none;}
  113. .TAP14 .msg-tab li a.cur{color:#fa8200;}
  114. .TAP14 a.list-link:link,
  115. .TAP14 a.list-link:visited,
  116. .TAP14 a.list-link:hover{color:#fa8200;}
  117. .TAP14 .ac-login .log-links a:link,
  118. .TAP14 .ac-login .log-links a:visited,
  119. .TAP14 .ac-login a.msg-link:link,
  120. .TAP14 .ac-login a.msg-link:visited{color:#333}
  121. /*
  122. .TAP14 .ac-login .log-links a:hover,
  123. .TAP14 .ac-login .active,
  124. .TAP14 .message .active,
  125. .TAP14 .ac-login a.msg-link:hover{color:#fa8200}*/
  126. .sina-top-bar-wrap *,.outlogin_layerbox_bylx *,.outlogin_layerbox_bylx_anrrow *{
  127. -webkit-box-sizing: content-box;
  128. -moz-box-sizing: content-box;
  129. -ms-box-sizing: content-box;
  130. -o-box-sizing: content-box;
  131. box-sizing: content-box
  132. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注