Commit d6a7c74a authored by xishifeng's avatar xishifeng

商学院暂存3

parent 3203e9a9
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
userid: '', userid: '',
initTabNumMain: 0, initTabNumMain: 0,
mainData: [{ mainData: [{
'titlet': '人员排行1',
'title': '人员排行', 'title': '人员排行',
'isLoad': false, 'isLoad': false,
'topLineNum': 5, 'topLineNum': 5,
...@@ -69,8 +67,6 @@ ...@@ -69,8 +67,6 @@
'index_': 4 'index_': 4
} }
}, { }, {
'titlet': '人员排行2',
'title': '门店排行', 'title': '门店排行',
'isLoad': false, 'isLoad': false,
'topLineNum': 5, 'topLineNum': 5,
...@@ -79,8 +75,6 @@ ...@@ -79,8 +75,6 @@
'index_': 4 'index_': 4
} }
}, { }, {
'titlet': '人员排行3',
'title': '部门排行', 'title': '部门排行',
'isLoad': false, 'isLoad': false,
'topLineNum': Number.POSITIVE_INFINITY, 'topLineNum': Number.POSITIVE_INFINITY,
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<header-pulic :data="headerData"></header-pulic> <header-pulic :data="headerData"></header-pulic>
<nav> <nav>
<div class="nav-main"> <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>
<div class="nav-seat"></div> <div class="nav-seat"></div>
</nav> </nav>
...@@ -50,49 +52,81 @@ ...@@ -50,49 +52,81 @@
'noborder': true, 'noborder': true,
'isBack': false 'isBack': false
}, },
ulWid: 6.9,
initTabNumMain: 0, initTabNumMain: 0,
isStop: false, isStop: false,
isLoading: false, isLoading: false,
noDataFlag: false, noDataFlag: false,
mainData: [{ 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': []
}]
}), }),
created() { created() {
let _this = this; let _this = this;
_this.getLabel(()=>{
console.log(99);
_this.getPageList();
})
}, },
mounted() { mounted() {
let _this = this; let _this = this;
}, },
methods: { 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() { tabMain() {
}, },
...@@ -107,11 +141,13 @@ ...@@ -107,11 +141,13 @@
</script> </script>
<style scoped> <style scoped>
nav{
width: 7.5rem;
}
nav>.nav-main { nav>.nav-main {
display: flex;
box-sizing: border-box; box-sizing: border-box;
background-color: white; background-color: white;
width: 100%; width: 7.5rem;
height: .9rem; height: .9rem;
line-height: .9rem; line-height: .9rem;
padding: 0 .3rem; padding: 0 .3rem;
...@@ -119,23 +155,28 @@ ...@@ -119,23 +155,28 @@
position: fixed; position: fixed;
left: 0; left: 0;
top: .88rem; top: .88rem;
overflow-x: scroll;
}
nav>.nav-main>ul{
/*width: 10rem;*/
} }
nav>.nav-seat { nav>.nav-seat {
height: .9rem; height: .9rem;
} }
nav>.nav-main>div { nav>.nav-main>ul>li {
float: left;
font-size: .28rem; font-size: .28rem;
flex: 1;
text-align: center; text-align: center;
color: #4c4c4c; color: #4c4c4c;
width: 1.6rem;
} }
nav>.nav-main>div.active { nav>.nav-main>ul>li.active {
color: rgb(255, 148, 25); color: rgb(255, 148, 25);
position: relative; position: relative;
} }
nav>.nav-main>div.active::after { nav>.nav-main>ul>li.active::after {
content: ''; content: '';
position: absolute; position: absolute;
left: 50%; left: 50%;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<script> <script>
let _token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzQyLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1Mjg5NDIzNTh9.-HlJUkvPCCrfhacC9WKcWEiNzUHhL0PujDGONcwPtA0'; let _token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzQyLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1Mjg5NDIzNTh9.-HlJUkvPCCrfhacC9WKcWEiNzUHhL0PujDGONcwPtA0';
let _token2 = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1NzM5LCJuYW1lIjoiXHU2MDNiXHU2ZDRiXHU4YmQ1MSIsInBob25lIjoiMTU2MDE2NTIzNTMiLCJsZXZlbCI6MzB9LCJ0aW1lU3RhbXBfIjoxNTMwNjA2ODU4fQ.8jL49CjtBMV6BqmaKdJfd4pkGBazrAgQQrutb53Z3mY';
export default { export default {
name: '', name: '',
data() { data() {
...@@ -23,7 +24,10 @@ ...@@ -23,7 +24,10 @@
}, },
{ {
'path': '/businessCollege', 'path': '/businessCollege',
'nameCustom': '商学院' 'nameCustom': '商学院',
'query': {
'token': _token2
}
}, },
{ {
'path': '/feeds', '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