|
@@ -52,7 +52,7 @@
|
|
'http://www.duowan.com/s/test_login.html'
|
|
'http://www.duowan.com/s/test_login.html'
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- setNickName:{
|
|
|
|
|
|
+ showTips:{
|
|
domainExcludeMap: [
|
|
domainExcludeMap: [
|
|
'wan.duowan.com'
|
|
'wan.duowan.com'
|
|
]
|
|
]
|
|
@@ -78,11 +78,9 @@
|
|
setDefaultSuccCb: function () {
|
|
setDefaultSuccCb: function () {
|
|
//1.登录成功后,校验论坛信息
|
|
//1.登录成功后,校验论坛信息
|
|
this.loginSuccCallbacks.add(function (user) {
|
|
this.loginSuccCallbacks.add(function (user) {
|
|
- var domainExcludeMap = Config.setNickName.domainExcludeMap
|
|
|
|
- for(var i = 0; i < domainExcludeMap.length; i++){
|
|
|
|
- var domainExclude = domainExcludeMap[i];
|
|
|
|
- if(location.hostname.indexOf(domainExclude) >= 0 ) return
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ if(Util.allowShowTips() === false) return
|
|
|
|
+
|
|
$.ajax({
|
|
$.ajax({
|
|
url: Util.toDecorateURL('//bbs.duowan.com/api/uinfo4dw.php?op=isregister'),
|
|
url: Util.toDecorateURL('//bbs.duowan.com/api/uinfo4dw.php?op=isregister'),
|
|
dataType: 'jsonp',
|
|
dataType: 'jsonp',
|
|
@@ -360,6 +358,18 @@
|
|
|
|
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ allowShowTips:function(){
|
|
|
|
+ var domainExcludeMap = Config.showTips.domainExcludeMap
|
|
|
|
+
|
|
|
|
+ for(var i = 0; i < domainExcludeMap.length; i++){
|
|
|
|
+ var domainExclude = domainExcludeMap[i];
|
|
|
|
+ if(location.hostname.indexOf(domainExclude) >= 0 ) return false
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return true
|
|
|
|
+ },
|
|
|
|
+
|
|
checkLogin: function () {
|
|
checkLogin: function () {
|
|
if (this.isLogin()) {
|
|
if (this.isLogin()) {
|
|
this.loginSuccCallbacks.fire(this.getUserInfo())
|
|
this.loginSuccCallbacks.fire(this.getUserInfo())
|
|
@@ -920,6 +930,7 @@
|
|
/**提示弹窗 */
|
|
/**提示弹窗 */
|
|
showTip: function () {
|
|
showTip: function () {
|
|
if (Util.isWap) return
|
|
if (Util.isWap) return
|
|
|
|
+ if( Util.allowShowTips() === false) return
|
|
var self = this
|
|
var self = this
|
|
this.getUser(function (ret) {
|
|
this.getUser(function (ret) {
|
|
if (ret.bindList.length == 0) {
|
|
if (ret.bindList.length == 0) {
|