Commit 6e62a4e3 authored by 吴冠's avatar 吴冠

跳转后台

parent 3b4fa668
......@@ -131,6 +131,22 @@ export function getListSite(params){
params:params
})
}
//主页法律法规
export function getListSite1(params){
return request({
url:"/news/list-content",
method:'get',
params:params
})
}
//主页新闻资讯
export function getListSite2(params){
return request({
url:"/news/list-content",
method:'get',
params:params
})
}
//分类列表
export function getCategoryList(){
return request({
......
......@@ -53,7 +53,9 @@
},
jump(){
let token=sessionStorage.getItem("token")
window.location.href=`http://192.168.200.201:8082/purchaser/Home?token=${token}`
if(token){
window.location.href="http://192.168.200.201:8082/#/purchaser/Home"
}
// window.location.href=`http://localhost:8080/purchaser/Home?token=${token}`
},
getUserName(){
......
......@@ -28,19 +28,44 @@
</div>
</div>
<div class="content flex-between">
<div v-for="(item,index) in dynamicList" :key="index" v-if="index<3" class="dynamic-item">
<div class="dynamic-item">
<div class="flex-between">
<div class="t3">{{item.title}}</div>
<div class="more t1 list-con" >更多 ></div>
<div class="t3 " @click="latformDynamics">平台动态</div>
<div class="more t1 list-con" @click="latformDynamics">更多></div>
</div>
<ul>
<li v-for="(item,index) in dynamic" :key="index" v-if="index<5" class="flex-between list-con">
<li v-for="(item,index) in dynamic1" :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.slice(0,10)}}</div>
</li>
</ul>
</div>
<div class="dynamic-item">
<div class="flex-between">
<div class="t3" @click="lawsRegulations">法律法规</div>
<div class="more t1 list-con" @click="lawsRegulations">更多></div>
</div>
<ul>
<li v-for="(item,index) in dynamic2" :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.slice(0,10)}}</div>
</li>
</ul>
</div>
<div class="dynamic-item">
<div class="flex-between">
<div class="t3" @click="newsInfo">新闻资讯</div>
<div class="more t1 list-con" @click="newsInfo">更多></div>
</div>
<ul>
<li v-for="(item,index) in dynamic3" :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.slice(0,10)}}</div>
</li>
</ul>
</div>
</div>
<!-- <div class="content cooperation">
<div class="cooperation-title t3">合作平台</div>
<div class="flex-between">
......@@ -54,31 +79,52 @@
<script>
import {getLoopPic} from '@/common/list.js'
import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
import {getSecond,getCategoryList,getListSite,getListSite1,getListSite2} from '@/common/list.js'
export default {
created(){
this.getLoopPic()
this.getSecond()
//文章列表
this.getCategoryList()
/* this.getCategoryList() */
this.getListSite()
this.getListSite1()
this.getListSite2()
},
methods:{
latformDynamics(){
this.$router.push("/message/news?id=124")
},
lawsRegulations(){
this.$router.push("/message/news?id=125")
},
newsInfo(){
this.$router.push("/message/news?id=123")
},
//平台动态跳转
Merchant(){
this.$router.push('/login/examine')
},
async getCategoryList(){
/* async getCategoryList(){
const {data} = await getCategoryList()
this.dynamicList = data
},
}, */
async getListSite(){
/* let message = {}
message.cateId = this.id */
const {data} = await getListSite()
console.log(data,'++++++++++++++++++++++++')
console.log('-------------------')
this.dynamic = data
console.log('--------------------')
let message = {}
message.cateId = 124
const {data,id} = await getListSite(message)
this.dynamic1 = data
},
async getListSite1(){
let message = {}
message.cateId = 125
const {data} = await getListSite1(message)
this.dynamic2 = data
},
async getListSite2(){
let message = {}
message.cateId = 123
const {data} = await getListSite2(message)
this.dynamic3 = data
},
//添加验证方法
async getSecond(){
......@@ -113,7 +159,9 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
data() {
return {
id:123,
dynamic:[],
dynamic1:[],
dynamic2:[],
dynamic3:[],
showDefault:true,
userName:'Hi~欢迎来到捷安彩',
userHeader: '',
......@@ -279,7 +327,7 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
.cooperation{
margin-bottom:1.21rem;
}
.list-con{
.list-con,.t3{
cursor: pointer;
}
</style>
......@@ -102,7 +102,7 @@ import {
},
// 文章列表
async getListContent(params){
const {data} = await getListContent(params)
const {data,total} = await getListContent(params)
console.log(data)
this.messageList = data
this.total = total
......
......@@ -67,8 +67,6 @@ import {getAllList,getNoticeType} from '@/common/list.js'
let message = {}
message.size = 10
message.currentPage = 1
let content = window.sessionStorage.getItem("content")
message.title = content
this.industryList()
this.getAllList(message)
this.getNoticeType()
......
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