Commit d6a7c74a authored by xishifeng's avatar xishifeng

商学院暂存3

parent 3203e9a9
......@@ -59,8 +59,6 @@
userid: '',
initTabNumMain: 0,
mainData: [{
'titlet': '人员排行1',
'title': '人员排行',
'isLoad': false,
'topLineNum': 5,
......@@ -69,8 +67,6 @@
'index_': 4
}
}, {
'titlet': '人员排行2',
'title': '门店排行',
'isLoad': false,
'topLineNum': 5,
......@@ -79,8 +75,6 @@
'index_': 4
}
}, {
'titlet': '人员排行3',
'title': '部门排行',
'isLoad': false,
'topLineNum': Number.POSITIVE_INFINITY,
......
......@@ -3,7 +3,9 @@
<header-pulic :data="headerData"></header-pulic>
<nav>
<div class="nav-main">
<div v-for="(item, index) in mainData" :key="item.title" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.title}}</div>
<ul :style="'width: '+ulWid+'rem'">
<li v-for="(item, index) in mainData" :key="item.labelName" :data-id="item.id" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.labelName}}</li>
</ul>
</div>
<div class="nav-seat"></div>
</nav>
......@@ -50,49 +52,81 @@
'noborder': true,
'isBack': false
},
ulWid: 6.9,
initTabNumMain: 0,
isStop: false,
isLoading: false,
noDataFlag: false,
mainData: [{
'title': '全部',
'type': 0,
'dataList': [{
'content': '企业八星级价值观,企业八星级价值观,企业八星级价值观',
'time': '2018-05-06 17:06:12',
'img': ''
},{
'content': '企业八星级价值观,企业八星级价值观,企业八星级价值观',
'time': '2018-05-06 17:06:12',
'img': ''
}]
},{
'title': '企业文化',
'type': 0,
'dataList': []
},{
'title': '团队绩效',
'type': 0,
'dataList': []
},{
'title': '团队建设',
'type': 0,
'dataList': []
},{
'title': '业务技巧',
'type': 0,
'dataList': []
}]
mainData: []
}),
created() {
let _this = this;
_this.getLabel(()=>{
console.log(99);
_this.getPageList();
})
},
mounted() {
let _this = this;
},
methods: {
getLabel(fn) {
let _this = this;
_this.axios({
method: 'get',
url: '/broker/getNewsLabel',
responseType: 'json',
data: {
'AuthToken': _this.$route.query.token,
}
})
.then(function(response) {
if(response.data.code == 200) {
let _data = response.data.data;
let _len = _data.length;
for(let i = 0;i<_len;i++){
_this.mainData.push({
'dataList': [],
'id': _data[i].id,
'labelName': _data[i].label_name
});
};
_this.ulWid = (_len*1.6>_this.ulWid)?(_len*1.6):_this.ulWid;
fn && fn();
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
getPageList() {
let _this = this;
_this.axios({
method: 'get',
//url: '/broker/business_school',
url: 'http://c.tonglianjituan.com/broker/business_school',
responseType: 'json',
data: {
'AuthToken': _this.$route.query.token,
'pageNo': 1,
'pageSize': 1000
}
})
.then(function(response) {
if(response.data.code == 200) {
let _data = response.data.data;
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
tabMain() {
},
......@@ -107,11 +141,13 @@
</script>
<style scoped>
nav{
width: 7.5rem;
}
nav>.nav-main {
display: flex;
box-sizing: border-box;
background-color: white;
width: 100%;
width: 7.5rem;
height: .9rem;
line-height: .9rem;
padding: 0 .3rem;
......@@ -119,23 +155,28 @@
position: fixed;
left: 0;
top: .88rem;
overflow-x: scroll;
}
nav>.nav-main>ul{
/*width: 10rem;*/
}
nav>.nav-seat {
height: .9rem;
}
nav>.nav-main>div {
nav>.nav-main>ul>li {
float: left;
font-size: .28rem;
flex: 1;
text-align: center;
color: #4c4c4c;
width: 1.6rem;
}
nav>.nav-main>div.active {
nav>.nav-main>ul>li.active {
color: rgb(255, 148, 25);
position: relative;
}
nav>.nav-main>div.active::after {
nav>.nav-main>ul>li.active::after {
content: '';
position: absolute;
left: 50%;
......
......@@ -10,6 +10,7 @@
<script>
let _token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzQyLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1Mjg5NDIzNTh9.-HlJUkvPCCrfhacC9WKcWEiNzUHhL0PujDGONcwPtA0';
let _token2 = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzM5LCJuYW1lIjoiXHU2MDNiXHU2ZDRiXHU4YmQ1MSIsInBob25lIjoiMTU2MDE2NTIzNTMiLCJsZXZlbCI6MzB9LCJ0aW1lU3RhbXBfIjoxNTMwNjA2ODU4fQ.8jL49CjtBMV6BqmaKdJfd4pkGBazrAgQQrutb53Z3mY';
export default {
name: '',
data() {
......@@ -23,7 +24,10 @@
},
{
'path': '/businessCollege',
'nameCustom': '商学院'
'nameCustom': '商学院',
'query': {
'token': _token2
}
},
{
'path': '/feeds',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment