bootstrap.js 1.1 KB

12345678910111213
  1. if (Config.modulename === 'index' && Config.controllername === 'user' && ['login', 'register'].indexOf(Config.actionname) > -1 && $("#register-form,#login-form").size() > 0) {
  2. $('<style>.social-login{display:flex}.social-login a{flex:1;margin:0 2px;}.social-login a:first-child{margin-left:0;}.social-login a:last-child{margin-right:0;}</style>').appendTo("head");
  3. $("#register-form,#login-form").append('<div class="form-group social-login"></div>');
  4. if (Config.third.status.indexOf("wechat") > -1) {
  5. $('<a class="btn btn-success" href="' + Fast.api.fixurl('/third/connect/wechat') + '"><i class="fa fa-wechat"></i> 微信登录</a>').appendTo(".social-login");
  6. }
  7. if (Config.third.status.indexOf("qq") > -1) {
  8. $('<a class="btn btn-info" href="' + Fast.api.fixurl('/third/connect/qq') + '"><i class="fa fa-qq"></i> QQ登录</a>').appendTo(".social-login");
  9. }
  10. if (Config.third.status.indexOf("weibo") > -1) {
  11. $('<a class="btn btn-danger" href="' + Fast.api.fixurl('/third/connect/weibo') + '"><i class="fa fa-weibo"></i> 微博登录</a>').appendTo(".social-login");
  12. }
  13. }