Commit e3cbd55e authored by 吴冠's avatar 吴冠

主页下侧

parent 0354d579
......@@ -34,9 +34,9 @@
<div class="more t1 list-con" >更多 ></div>
</div>
<ul>
<li v-for="(item,index) in dynamicList" :key="index" v-if="index<5" class="flex-between list-con">
<li v-for="(item,index) in dynamic" :key="index" v-if="index<5" class="flex-between list-con">
<nuxt-link tag="div" to="#">{{item.title}}</nuxt-link>
<div class="time">{{item.createTime}}</div>
<div class="time">{{item.createTime.slice(0,10)}}</div>
</li>
</ul>
</div>
......@@ -61,6 +61,7 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
this.getSecond()
//文章列表
this.getCategoryList()
this.getListSite()
},
methods:{
async getCategoryList(){
......@@ -68,11 +69,13 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
this.dynamicList = data
},
async getListSite(){
let message = {}
message.cateId = this.id
/* let message = {}
message.cateId = this.id */
const {data} = await getListSite()
console.log(data,'++++++++++++++++++++++++')
/* this.dynamicList.list = data.list */
console.log('-------------------')
this.dynamic = data
console.log('--------------------')
},
//添加验证方法
async getSecond(){
......@@ -80,8 +83,7 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
if(tokenStr){
this.showDefault = false
sessionStorage.setItem("websiteenRequestTokenRequest",10)
const {data,code} = await getSecond()
const {data} = await getSecond()
window.sessionStorage.setItem("companyName",data.companyName)
this.userName = window.sessionStorage.getItem("companyName")
}
......@@ -107,8 +109,8 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
},
data() {
return {
id:0,
dyname:[],
id:123,
dynamic:[],
showDefault:true,
userName:'Hi~欢迎来到捷安彩',
userHeader: '',
......
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