Commit 90eccc44 authored by 吴冠's avatar 吴冠

gai

parent ef349947
...@@ -25,14 +25,24 @@ ...@@ -25,14 +25,24 @@
import Cookies from "js-cookie" import Cookies from "js-cookie"
export default { export default {
methods:{ methods:{
toSearch(){ /* toSearch(){
Cookies.set("inputContent",this.input) Cookies.set("inputContent",this.input)
Cookies.set("contentStatus",1) Cookies.set("contentStatus",1)
if(window.location.pathname !=="/notice/all"){ if(window.location.pathname !=="/notice/all"){
this.$router.push('/notice/all') this.$router.push('/notice/all')
this.input = null this.input = null
}else{ }else{
/* location.reload() */ this.$message.error("请在下面查询!")
this.input = null
}
} */
toSearch(){
sessionStorage.setItem("inputContent",this.input)
sessionStorage.setItem("contentStatus",1)
if(window.location.pathname !=="/notice/all"){
this.$router.push('/notice/all')
this.input = null
}else{
this.$message.error("请在下面查询!") this.$message.error("请在下面查询!")
this.input = null this.input = null
} }
......
...@@ -64,17 +64,17 @@ import Cookies from 'js-cookie' ...@@ -64,17 +64,17 @@ import Cookies from 'js-cookie'
components:{ components:{
citySelect citySelect
}, },
/* mounted(){ mounted(){
let inputContent = Cookies.get("content") let inputContent = sessionStorage.getItem("inputContent")
let message = {} let message = {}
message.size = 10 message.size = 10
message.currentPage = 1 message.currentPage = 1
message.title = inputContent message.title = inputContent
this.industryList() this.industryList()
this.getAllList(message) this.getAllList(message)
Cookies.remove("content") sessionStorage.removeItem("inputContent")
}, */ },
async asyncData({params}){ /* async asyncData({params}){
let inputContent = Cookies.get("inputContent") let inputContent = Cookies.get("inputContent")
console.log(inputContent+'-----------------+++++++++++++++++') console.log(inputContent+'-----------------+++++++++++++++++')
let mes ={ let mes ={
...@@ -82,26 +82,33 @@ import Cookies from 'js-cookie' ...@@ -82,26 +82,33 @@ import Cookies from 'js-cookie'
size:10, size:10,
title:inputContent title:inputContent
} }
/* if(inputContent!=''){ const res = await industryList();
mes.title = inputContent const {data,total} = await getAllList(mes)
} */ console.log(data+'------------')
/* if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage") return {
}else{ priceList : data,
Cookies.remove("currentPage"); total : total,
industryOptions:res
}
}, */
/* async asyncData({params}){
let inputContent = sessionStorage.getItem("inputContent")
console.log(inputContent+'-----------------+++++++++++++++++')
let mes ={
currentPage:1,
size:10,
title:inputContent
} }
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+'------------')
/* Cookies.remove("inputContent") */
return { return {
priceList : data, priceList : data,
total : total, total : total,
industryOptions:res industryOptions:res
} }
}, }, */
data() { data() {
return { return {
allList:[], allList:[],
...@@ -201,17 +208,16 @@ import Cookies from 'js-cookie' ...@@ -201,17 +208,16 @@ import Cookies from 'js-cookie'
const {data,total} = await getAllList(params) const {data,total} = await getAllList(params)
this.priceList = data this.priceList = data
this.total = total this.total = total
let contentStatus = Cookies.get("contentStatus") let contentStatus = sessionStorage.getItem("contentStatus")
if(contentStatus =='1'){ if(contentStatus =='1'){
if(total!='0'){ if(total!='0'){
console.log(111111111111111) console.log(111111111111111)
/* this.$message.success */
}else{ }else{
console.log(111111111111111111111) console.log(111111111111111111111)
this.$message.error("请输入正确的公告名称!") this.$message.error("请输入正确的公告名称!")
this.getAllList(this.getData) this.getAllList(this.getData)
} }
Cookies.remove("contentStatus") sessionStorage.removeItem("contentStatus")
} }
}, },
receiveP(value) { receiveP(value) {
......
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