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

跳转后台

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