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

gai

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