Commit 5c07ec66 authored by 吴冠's avatar 吴冠

处理数据缓存

parent f5025f75
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ul v-if="isshow"> <ul v-if="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-abortivedetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div> <div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js' import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue' import citySelect from '@/components/citySelect.vue'
import {getErrorList} from '@/common/list.js' import {getErrorList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default { export default {
components:{ components:{
citySelect citySelect
...@@ -78,6 +79,13 @@ import {getErrorList} from '@/common/list.js' ...@@ -78,6 +79,13 @@ import {getErrorList} from '@/common/list.js'
size:10, size:10,
noticeType:"ABORTIVE" noticeType:"ABORTIVE"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getErrorList(mes) const {data,total} = await getErrorList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -183,6 +191,7 @@ import {getErrorList} from '@/common/list.js' ...@@ -183,6 +191,7 @@ import {getErrorList} from '@/common/list.js'
let mess = {} let mess = {}
mess.noticeType = "ABORTIVE" mess.noticeType = "ABORTIVE"
mess.currentPage = val mess.currentPage = val
Cookies.set("currentPage",val)
this.getErrorList(mess); this.getErrorList(mess);
//获取当前页 //获取当前页
}, },
...@@ -192,7 +201,12 @@ import {getErrorList} from '@/common/list.js' ...@@ -192,7 +201,12 @@ import {getErrorList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000; let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
} },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`cadidatedetails?id=${id}`)
}
} }
} }
</script> </script>
......
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -74,6 +79,9 @@ export default { ...@@ -74,6 +79,9 @@ export default {
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
async getErrorDetails(id){ async getErrorDetails(id){
console.log(id+"-----------------") console.log(id+"-----------------")
const {data} = await getErrorDetails(id) const {data} = await getErrorDetails(id)
......
...@@ -85,6 +85,13 @@ import Cookies from 'js-cookie' ...@@ -85,6 +85,13 @@ import Cookies from 'js-cookie'
/* if(inputContent!=''){ /* if(inputContent!=''){
mes.title = inputContent mes.title = inputContent
} */ } */
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getAllList(mes) const {data,total} = await getAllList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -160,6 +167,7 @@ import Cookies from 'js-cookie' ...@@ -160,6 +167,7 @@ import Cookies from 'js-cookie'
if(noticeType=='WIN'){ if(noticeType=='WIN'){
url= `/notice/windetails?id=${noticeId}` url= `/notice/windetails?id=${noticeId}`
} }
Cookies.set("details",true)
this.$router.push(url) this.$router.push(url)
}, },
async queryStr() { async queryStr() {
...@@ -228,6 +236,7 @@ import Cookies from 'js-cookie' ...@@ -228,6 +236,7 @@ import Cookies from 'js-cookie'
handleCurrentChange(val) { handleCurrentChange(val) {
let mess = {} let mess = {}
mess.currentPage = val mess.currentPage = val
Cookies.set("currentPage",val)
this.getAllList(mess); this.getAllList(mess);
//获取当前页 //获取当前页
}, },
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<ul v-if ="isshow"> <ul v-if ="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-biddingdetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div> <div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
import {getBidingList} from '@/common/list.js' import {getBidingList} from '@/common/list.js'
import {industryList} from '@/api/common/list.js' import {industryList} from '@/api/common/list.js'
import citySelect from "@/components/citySelect.vue"; import citySelect from "@/components/citySelect.vue";
import Cookies from 'js-cookie'
export default { export default {
components:{ components:{
citySelect, citySelect,
...@@ -69,6 +70,13 @@ import citySelect from "@/components/citySelect.vue"; ...@@ -69,6 +70,13 @@ import citySelect from "@/components/citySelect.vue";
size:10, size:10,
noticeType:"BIDDING" noticeType:"BIDDING"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getBidingList(mes) const {data,total} = await getBidingList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -188,6 +196,7 @@ import citySelect from "@/components/citySelect.vue"; ...@@ -188,6 +196,7 @@ import citySelect from "@/components/citySelect.vue";
let mess = {} let mess = {}
mess.currentPage = val mess.currentPage = val
mess.noticeType = "BIDDING" mess.noticeType = "BIDDING"
Cookies.set("currentPage",val)
this.getBidingList(mess) this.getBidingList(mess)
//获取当前页 //获取当前页
}, },
...@@ -197,6 +206,11 @@ import citySelect from "@/components/citySelect.vue"; ...@@ -197,6 +206,11 @@ import citySelect from "@/components/citySelect.vue";
let day = 12 * 30 * 24 * 3600 * 1000; let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
},
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`biddingdetails?id=${id}`)
} }
} }
} }
......
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
</a> </a>
</div> </div>
<el-row> <el-row>
<el-button @click="prev"
>返回</el-button
>
<el-button type="primary" @click="signUp" v-if="isshow">我要报名</el-button> <el-button type="primary" @click="signUp" v-if="isshow">我要报名</el-button>
</el-row> </el-row>
</div> </div>
...@@ -167,6 +170,9 @@ export default { ...@@ -167,6 +170,9 @@ export default {
} }
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
signUp(){ signUp(){
let tokenStr = Cookies.get("token") let tokenStr = Cookies.get("token")
if(!tokenStr){ if(!tokenStr){
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<ul v-if="isshow"> <ul v-if="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<!-- 绑定中标详情页 --> <!-- 绑定中标详情页 -->
<nuxt-link :to="{name:'index-notice-windetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
import { getWinList } from "@/common/list.js"; import { getWinList } from "@/common/list.js";
import { industryList } from "@/api/common/list.js"; import { industryList } from "@/api/common/list.js";
import citySelect from "@/components/citySelect.vue"; import citySelect from "@/components/citySelect.vue";
import Cookies from 'js-cookie'
export default { export default {
components: { components: {
citySelect, citySelect,
...@@ -92,6 +93,13 @@ export default { ...@@ -92,6 +93,13 @@ export default {
size:10, size:10,
noticeType:"WIN" noticeType:"WIN"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getWinList(mes) const {data,total} = await getWinList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -242,6 +250,7 @@ export default { ...@@ -242,6 +250,7 @@ export default {
let mess = {} let mess = {}
mess.noticeType = "WIN" mess.noticeType = "WIN"
mess.currentPage = val mess.currentPage = val
Cookies.set("currentPage",val)
this.getWinList(mess); this.getWinList(mess);
//获取当前页 //获取当前页
}, },
...@@ -252,6 +261,11 @@ export default { ...@@ -252,6 +261,11 @@ export default {
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
}, },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`windetails?id=${id}`)
}
}, },
}; };
</script> </script>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ul v-if="isshow"> <ul v-if="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-cadidatedetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div> <div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js' import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue' import citySelect from '@/components/citySelect.vue'
import {getCadidateList} from '@/common/list.js' import {getCadidateList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default { export default {
components:{ components:{
citySelect citySelect
...@@ -78,6 +79,13 @@ import {getCadidateList} from '@/common/list.js' ...@@ -78,6 +79,13 @@ import {getCadidateList} from '@/common/list.js'
size:10, size:10,
noticeType:"CADIDATE" noticeType:"CADIDATE"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getCadidateList(mes) const {data,total} = await getCadidateList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -185,6 +193,7 @@ import {getCadidateList} from '@/common/list.js' ...@@ -185,6 +193,7 @@ import {getCadidateList} from '@/common/list.js'
let mess = {} let mess = {}
mess.noticeType = "CADIDATE" mess.noticeType = "CADIDATE"
mess.currentPage = val mess.currentPage = val
Cookies.set("currentPage",val)
this.getCadidateList(mess); this.getCadidateList(mess);
//获取当前页 //获取当前页
}, },
...@@ -194,7 +203,12 @@ import {getCadidateList} from '@/common/list.js' ...@@ -194,7 +203,12 @@ import {getCadidateList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000; let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
} },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`cadidatedetails?id=${id}`)
}
} }
} }
</script> </script>
......
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -72,6 +77,9 @@ export default { ...@@ -72,6 +77,9 @@ export default {
this.getCadidateDetails(id) this.getCadidateDetails(id)
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
async getCadidateDetails(id){ async getCadidateDetails(id){
const {data} = await getCadidateDetails(id) const {data} = await getCadidateDetails(id)
this.itemTitle = data.title this.itemTitle = data.title
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ul v-if="isshow"> <ul v-if="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-changedetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div> <div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js' import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue' import citySelect from '@/components/citySelect.vue'
import {getChangeList} from '@/common/list.js' import {getChangeList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default { export default {
components:{ components:{
citySelect citySelect
...@@ -78,6 +79,13 @@ import {getChangeList} from '@/common/list.js' ...@@ -78,6 +79,13 @@ import {getChangeList} from '@/common/list.js'
size:10, size:10,
noticeType:"CHANGE" noticeType:"CHANGE"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getChangeList(mes) const {data,total} = await getChangeList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -178,6 +186,7 @@ import {getChangeList} from '@/common/list.js' ...@@ -178,6 +186,7 @@ import {getChangeList} from '@/common/list.js'
let mess = {} let mess = {}
mess.size = val mess.size = val
mess.noticeType = "CHANGE" mess.noticeType = "CHANGE"
Cookies.set("currentPage",val)
this.getChangeList(mess) this.getChangeList(mess)
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -194,7 +203,12 @@ import {getChangeList} from '@/common/list.js' ...@@ -194,7 +203,12 @@ import {getChangeList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000; let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
} },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`changedetails?id=${id}`)
}
} }
} }
</script> </script>
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<h3>三、其他补充事宜</h3> <h3>三、其他补充事宜</h3>
<h3>四、凡对本次公告内容提出询问,请按以下方式联系</h3> <h3>四、凡对本次公告内容提出询问,请按以下方式联系</h3>
</div> </div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -44,6 +49,9 @@ export default { ...@@ -44,6 +49,9 @@ export default {
this.getChangeDetails(id) this.getChangeDetails(id)
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
async getChangeDetails(id){ async getChangeDetails(id){
const {data} = await getChangeDetails(id) const {data} = await getChangeDetails(id)
this.itemTitle = data.title this.itemTitle = data.title
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ul v-if="isshow"> <ul v-if="isshow">
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-clarifiesdetails',query:{id:(item.noticeId)}}"> <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div> <div>招标状态: <span class="state-red">{{item.projectStatus}}</span> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div class="pagination flex-center"> <div class="pagination flex-center">
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
import {industryList} from '@/api/common/list.js' import {industryList} from '@/api/common/list.js'
import citySelect from '@/components/citySelect.vue' import citySelect from '@/components/citySelect.vue'
import {getClerList} from '@/common/list.js' import {getClerList} from '@/common/list.js'
import Cookies from 'js-cookie'
export default { export default {
components:{ components:{
citySelect citySelect
...@@ -78,6 +79,13 @@ import {getClerList} from '@/common/list.js' ...@@ -78,6 +79,13 @@ import {getClerList} from '@/common/list.js'
size:10, size:10,
noticeType:"CLARIFIES" noticeType:"CLARIFIES"
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
const {data,total} = await getClerList(mes) const {data,total} = await getClerList(mes)
console.log(data+'------------') console.log(data+'------------')
...@@ -176,14 +184,15 @@ import {getClerList} from '@/common/list.js' ...@@ -176,14 +184,15 @@ import {getClerList} from '@/common/list.js'
let mess = {} let mess = {}
mess.size = val mess.size = val
mess.noticeType = "CLARIFIES" mess.noticeType = "CLARIFIES"
this.getErrorList(mess) this.getClerList(mess)
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
/* this.getData.currentPage = val */ /* this.getData.currentPage = val */
let mess = {} let mess = {}
mess.noticeType = "CLARIFIES" mess.noticeType = "CLARIFIES"
mess.currentPage = val mess.currentPage = val
this.getErrorList(mess); Cookies.set("currentPage",val)
this.getClerList(mess);
//获取当前页 //获取当前页
}, },
dealDisabledDate(time) { dealDisabledDate(time) {
...@@ -192,7 +201,12 @@ import {getClerList} from '@/common/list.js' ...@@ -192,7 +201,12 @@ import {getClerList} from '@/common/list.js'
let day = 12 * 30 * 24 * 3600 * 1000; let day = 12 * 30 * 24 * 3600 * 1000;
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
} },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`clarifiesdetails?id=${id}`)
}
} }
} }
</script> </script>
......
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -74,6 +79,9 @@ export default { ...@@ -74,6 +79,9 @@ export default {
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
async getClerDetailsList(id){ async getClerDetailsList(id){
console.log(id+"-----------------") console.log(id+"-----------------")
const {data} = await getClerDetailsList(id) const {data} = await getClerDetailsList(id)
......
...@@ -99,7 +99,10 @@ ...@@ -99,7 +99,10 @@
<p>只有报价后才能参与投标报名</p> <p>只有报价后才能参与投标报名</p>
</div> </div>
<div class="Tips">图使馆招标公告(2020-07-30)</div> <div class="Tips">图使馆招标公告(2020-07-30)</div>
<div class="button"> <div class="button flex">
<el-button @click="prev"
>返回</el-button
>
<el-button <el-button
type="primary" type="primary"
@click="putPrice" @click="putPrice"
...@@ -293,8 +296,8 @@ export default { ...@@ -293,8 +296,8 @@ export default {
} }
} }
}, },
Prev() { prev() {
this.$router.push("/notice/inquiry"); window.history.go(-1)
}, },
async getenquirydetails(params) { async getenquirydetails(params) {
const { data } = await getenquirydetails(params); const { data } = await getenquirydetails(params);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<ul v-if="isshow1"> <ul v-if="isshow1">
<li v-if = "!isshow1">暂无数据</li> <li v-if = "!isshow1">暂无数据</li>
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to="{name:'index-notice-enquirydetails',query:{id:(item.noticeId)}}" > <div @click="handleChageUrl(item.noticeId)">
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</div> </div>
</div> </div>
</div> </div>
</nuxt-link> </div>
</li> </li>
</ul> </ul>
<div v-show="isshow"> <div v-show="isshow">
...@@ -90,6 +90,7 @@ import dataTable from "@/components/dataTable.vue"; ...@@ -90,6 +90,7 @@ import dataTable from "@/components/dataTable.vue";
import { getInquiryList} from "@/common/list.js"; import { getInquiryList} from "@/common/list.js";
import { industryList} from "@/api/common/list.js"; import { industryList} from "@/api/common/list.js";
import citySelect from "@/components/citySelect.vue" import citySelect from "@/components/citySelect.vue"
import Cookies from 'js-cookie'
export default { export default {
components: { components: {
citySelect, citySelect,
...@@ -101,6 +102,13 @@ export default { ...@@ -101,6 +102,13 @@ export default {
size:10, size:10,
noticeType:'ENQUIRY' noticeType:'ENQUIRY'
} }
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
}else{
Cookies.remove("currentPage");
}
Cookies.remove("details")
Cookies.remove("currentPage")
const res = await industryList(); const res = await industryList();
console.log(res,"----------------------") console.log(res,"----------------------")
const {data,total} = await getInquiryList(mes) const {data,total} = await getInquiryList(mes)
...@@ -112,6 +120,7 @@ export default { ...@@ -112,6 +120,7 @@ export default {
}, },
data() { data() {
return { return {
cacheCurrentPage:'',
noticeT:'[询价公告]', noticeT:'[询价公告]',
isshow1:true, isshow1:true,
isshow: false, isshow: false,
...@@ -173,7 +182,9 @@ export default { ...@@ -173,7 +182,9 @@ export default {
value: "", value: "",
}; };
}, },
/* destroyed(){
Cookies.remove("details");
}, */
methods: { methods: {
//年月日 //年月日
getTimer(dateStr){ getTimer(dateStr){
...@@ -243,6 +254,7 @@ export default { ...@@ -243,6 +254,7 @@ export default {
mess.noticeType = "ENQUIRY" mess.noticeType = "ENQUIRY"
/* mess.size = this.getData.size */ /* mess.size = this.getData.size */
mess.currentPage = val mess.currentPage = val
Cookies.set("currentPage",val)
this.getInquiryList(mess); this.getInquiryList(mess);
/* this.getInquiryList(this.getData.size,val) */ /* this.getInquiryList(this.getData.size,val) */
}, },
...@@ -253,6 +265,11 @@ export default { ...@@ -253,6 +265,11 @@ export default {
let dateRegion = curDate - day; let dateRegion = curDate - day;
return time.getTime() > Date.now() || time.getTime() < dateRegion; return time.getTime() > Date.now() || time.getTime() < dateRegion;
}, },
handleChageUrl(id){
console.log(this.cacheCurrentPage+'1111111111111111112222')
Cookies.set("details",true)
return this.$router.push(`enquirydetails?id=${id}`)
}
}, },
}; };
</script> </script>
......
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-center">
<el-button @click="prev"
>返回</el-button
>
</div>
</div> </div>
</template> </template>
...@@ -74,6 +79,9 @@ export default { ...@@ -74,6 +79,9 @@ export default {
this.getWindetails(id) this.getWindetails(id)
}, },
methods:{ methods:{
prev() {
window.history.go(-1)
},
//年月日 //年月日
getTimer(dateStr){ getTimer(dateStr){
var date = new Date(dateStr); var date = new Date(dateStr);
......
...@@ -15,10 +15,10 @@ const service = axios.create({ ...@@ -15,10 +15,10 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
/* let token=Cookies.get("token") /* let token=Cookies.get("token")
if(token||token!=="undefined"){ if(token||token!=="undefined"){
config.headers['token']=token; config.headers['token']=token;
}*/ } */
// if (store.getters.token) { // if (store.getters.token) {
// let test = config.data; // let test = config.data;
// if(test){ // if(test){
......
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