Commit 4fd10e89 authored by 吴冠's avatar 吴冠

数据渲染

parent b05aef25
......@@ -78,6 +78,32 @@ import {
sessionStorage.removeItem("detailsId")
}
},
/* async asyncData({params}){
let message = {}
message.currentPage = 1
message.size = 10
let type = location.href.split("?id=")[1]
if(type){
activeName = type
message.cateId = activeName
}else{
message.cateId = activeName
}
const res = await getCategoryList()
const {data,total} = await getListContent(message)
return {
messageList : data,
total : total,
artList:res
}
let detailsType = sessionStorage.getItem("detailsType")
let detailsId = sessionStorage.getItem("detailsId")
if(detailsType =="1"){
isClick(detailsId)
sessionStorage.removeItem("detailsType")
sessionStorage.removeItem("detailsId")
}
}, */
data() {
return {
detailList:{
......
......@@ -64,13 +64,28 @@ import {getErrorList} from '@/common/list.js'
components:{
citySelect
},
mounted(){
/* mounted(){
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType = "ABORTIVE"
this.industryList()
this.getErrorList(message)
}, */
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"ABORTIVE"
}
const res = await industryList();
const {data,total} = await getErrorList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -63,7 +63,7 @@ import {getAllList,getNoticeType} from '@/common/list.js'
components:{
citySelect
},
mounted(){
/* mounted(){
let inputContent = sessionStorage.getItem("content")
let message = {}
message.size = 10
......@@ -71,7 +71,23 @@ import {getAllList,getNoticeType} from '@/common/list.js'
message.title = inputContent
this.industryList()
this.getAllList(message)
this.getNoticeType()
sessionStorage.removeItem("content")
}, */
async asyncData({params}){
let inputContent = sessionStorage.getItem("content")
let mes ={
currentPage:1,
size:10,
title:inputContent
}
const res = await industryList();
const {data,total} = await getAllList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
sessionStorage.removeItem("content")
},
data() {
......@@ -182,11 +198,6 @@ import {getAllList,getNoticeType} from '@/common/list.js'
}
sessionStorage.removeItem("contentStatus")
}
},
async getNoticeType(){
const {data} = await getNoticeType()
/* console.log(data) */
this.allList = data
},
receiveP(value) {
this.getData.provinceId = value;
......
......@@ -63,13 +63,20 @@ import citySelect from "@/components/citySelect.vue";
components:{
citySelect,
},
mounted(){
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType = 'BIDDING'
this.getBidingList(message)
this.industryList()
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"BIDDING"
}
const res = await industryList();
const {data,total} = await getBidingList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -86,13 +86,20 @@ export default {
components: {
citySelect,
},
mounted() {
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType = "WIN"
this.getWinList(message);
this.industryList();
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"WIN"
}
const res = await industryList();
const {data,total} = await getWinList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -64,13 +64,28 @@ import {getCadidateList} from '@/common/list.js'
components:{
citySelect
},
mounted(){
/* mounted(){
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType="CADIDATE"
this.industryList()
this.getCadidateList(message)
}, */
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"CADIDATE"
}
const res = await industryList();
const {data,total} = await getCadidateList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -64,13 +64,28 @@ import {getChangeList} from '@/common/list.js'
components:{
citySelect
},
mounted(){
/* mounted(){
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType = "CHANGE"
this.industryList()
this.getChangeList(message)
}, */
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"CHANGE"
}
const res = await industryList();
const {data,total} = await getChangeList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -64,13 +64,28 @@ import {getClerList} from '@/common/list.js'
components:{
citySelect
},
mounted(){
/* mounted(){
let message = {}
message.size = 10
message.currentPage = 1
message.noticeType = "CLARIFIES"
this.industryList()
this.getClerList(message)
}, */
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:"CLARIFIES"
}
const res = await industryList();
const {data,total} = await getClerList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
},
data() {
return {
......
......@@ -95,36 +95,20 @@ export default {
citySelect,
dataTable
},
/* async mounted(){
let message={};
message.size=10
message.currentPage=1
getInquiryList(message);
industryList();
}, */
/* async asyncData({params,route,error}){
console.log(route)
let message = {}
message.size =10
message.currentPage = 1
const res =await industryList();
const [data,total] = await getInquiryList(message)
async asyncData({params}){
let mes ={
currentPage:1,
size:10,
noticeType:'ENQUIRY'
}
const res = await industryList();
const {data,total} = await getInquiryList(mes)
console.log(data+'------------')
return {
priceList : data,
total : total,
industryOptions:res
}
console.log(11111111111111)
}, */
mounted(){
let message={};
message.size=10
message.currentPage=1
message.noticeType = "enquiry"
this.getInquiryList(message);
this.industryList();
},
data() {
return {
......
......@@ -14,11 +14,10 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
let token=sessionStorage.getItem("token")
/* let token=sessionStorage.getItem("token")
if(token||token!=="undefined"){
config.headers['token']=token;
}
} */
// if (store.getters.token) {
// let test = config.data;
// if(test){
......@@ -90,25 +89,13 @@ service.interceptors.response.use(
error => {
console.log(error+'--------------------------------')
//如果不在首页 不验证token信息
if(error.response.code == 401){
/* console.log(error+'++++++++++++++++++++++++')
console.log(error.response.status+'--------------------')
//获取首页token验证时传递的特殊参数值
const websiteenRequestTokenRequest = sessionStorage.getItem('websiteenRequestTokenRequest')
//判断值是不是存在,存在说明是首页token接口
if(websiteenRequestTokenRequest){
//如果是首页验证问题,则不处理任何逻辑,同时清除掉缓存token信息
sessionStorage.removeItem('token');
sessionStorage.removeItem('websiteenRequestTokenRequest');
sessionStorage.removeItem('companyName');
return ;
} */
/* if(error.response.code == 401){
sessionStorage.removeItem('token')
Message.error("登录失效,请重新登录")
setTimeout(function(){
console.log(requestUrl+'/login/user/')
},2000)
}
} */
// Message({
// message: error.message,
// type: 'error',
......
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