Authored by 陶雨

tab控件现在可以设置默认进入的标签了

... ... @@ -29,8 +29,8 @@ tab.prototype = {
index = tab.split('=')[1];
}
g.index = index;
this.render(data);
g.active = index;
this.render(data);
p._init && p._init(g.active);
this.bind(p.click);
return this;
... ... @@ -57,13 +57,19 @@ tab.prototype = {
p = this.options;
var lis = [];
var hasActive = false;
$(p.columns).each(function(i, column) {
var li = $("<li></li>");
var a = $("<a href='javascript:void(0);'></a>");
if (g.index && i == g.index) {
li = $('<li class="active"></li>');
} else if (!g.index && column.name == 'all') {
}else if(!g.index && column.active) {
li = $('<li class="active"></li>');
g.index = i;
g.active = i;
hasActive = true;
}else if (!g.index && !hasActive && column.name == 'all') {
li = $('<li class="active"></li>');
}
if (column.name) a.attr({
... ...
... ... @@ -16,7 +16,7 @@ var t = new common.tab({
},
columns:[
{name:"0",display:"待审核({0})"},
{name:"1",display:"审核通过({1})"},
{name:"1",display:"审核通过({1})",active:true},
{name:"2",display:"驳回({2})"},
{name:"3",display:"过期({3})"},
{name:"4",display:"作废({4})"},
... ...
... ... @@ -182,6 +182,8 @@ var Bll = {
+ (min < 10 ? "0" + min : min) + ":" + (second < 10 ? "0" + second : second);
}
};
//初始化时间
var statusArr = ["已过期", "进行中", "未发布"];
for(var i = 0; i < resources.length; i++) {
//status 0:已过期;1:进行中;2:未发布
... ...
... ... @@ -5,7 +5,9 @@
//接口主域
//exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.246:8081/platform/";
exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
//路由配置
exports.res = [
{
... ...
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.240:8088/platform';
//exports.domain = 'http://172.16.6.162:8088/platform';
exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
//营销管理路由配置
exports.res = [
... ...