Commit 83ad9cf9 authored by 吴冠's avatar 吴冠

更新功能

parent 3af00e40
This diff is collapsed.
...@@ -105,6 +105,8 @@ import {getSecond} from '@/common/list.js' ...@@ -105,6 +105,8 @@ import {getSecond} from '@/common/list.js'
left:1000px; left:1000px;
cursor:pointer; cursor:pointer;
font-size: 10px; font-size: 10px;
color:blue;
background: none;
} }
.header-line { .header-line {
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
methods:{ methods:{
toSearch(){ toSearch(){
sessionStorage.setItem("content",this.input) sessionStorage.setItem("content",this.input)
sessionStorage.setItem("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() */ location.reload()
console.log("请在下面进行查询") console.log("请在下面进行查询")
this.input = null this.input = null
} }
...@@ -51,7 +52,7 @@ ...@@ -51,7 +52,7 @@
.images{ .images{
width:100px; width:100px;
height:20px; height:20px;
margin-left:20px; margin-left:0px;
margin-top:-20px margin-top:-20px
} }
.images>img{ .images>img{
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
} }
.head-input-title{ .head-input-title{
margin-top: 0px; margin-top: 0px;
margin-left: -580px; margin-left: -610px;
font-size:.28rem; font-size:.28rem;
color:rgba(0,0,0,1); color:rgba(0,0,0,1);
font-weight: bold; font-weight: bold;
......
...@@ -47,9 +47,34 @@ import inDex from '@/pages/index.vue' ...@@ -47,9 +47,34 @@ import inDex from '@/pages/index.vue'
}, },
mounted(){ mounted(){
console.log("1") console.log("1")
/* if(window.location.pathname =="/notice/all"){ let path = this.$route.path;
this.nav = "4" /* if(path=="/"){
this.nav = "0";
}else if(path.indexOf("/message")==0){
this.nav = "5";
}else if(path.indexOf("/notice")==0){
this.nav = "4";
} */ } */
switch (path) {
case '/':
this.nav = "0";
break;
case '/notice/inquiry':
this.nav = "1";
break;
case "/notice/bid":
this.nav = "2";
break;
case "/notice/biding":
this.nav = "3";
break;
case "/notice/all":
this.nav = "4";
break;
case "/message/news":
this.nav = "5";
break;
}
}, },
methods: { methods: {
change(index, path) { change(index, path) {
......
...@@ -3,37 +3,72 @@ ...@@ -3,37 +3,72 @@
<Head></Head> <Head></Head>
<Homeinput></Homeinput> <Homeinput></Homeinput>
<Nav></Nav> <Nav></Nav>
<nuxt ></nuxt> <nuxt></nuxt>
<Footer></Footer> <Footer></Footer>
<div class="imagesList" >
<img src="../assets/images/phone.png" alt="电话">
<img src="../assets/images/QQ.png" alt="QQ">
<img src="../assets/images/email.png" alt="邮箱">
<img src="../assets/images/weixin.png" alt="微信" class="weixin" @mouseover="enter" @mouseout="leave">
<div>
<img src="../assets/images/qrcode.png" alt="二维码" class="qrcode" v-if="isshowqrcode">
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Head from '~/components/header' import Head from "~/components/header";
import Nav from '~/components/nav' import Nav from "~/components/nav";
import Footer from '~/components/footer' import Footer from "~/components/footer";
import Homeinput from '~/components/homeinput' import Homeinput from "~/components/homeinput";
export default { export default {
name: "homePage", name: "homePage",
data () { data() {
return { return {
isshowqrcode:false
} };
}, },
components: { components: {
Head, Head,
Nav, Nav,
Footer Footer,
}, },
methods:{
enter(){
this.isshowqrcode = true
},
leave(){
this.isshowqrcode = false
}
} }
};
</script> </script>
<style scoped> <style scoped>
.home{
width : 100%; .home {
width: 100%;
min-width: 810px; min-width: 810px;
height: 100%; height: 100%;
min-height: 600px; min-height: 600px;
} }
.imagesList{
position: fixed;
/* flex-direction: column; */
width:30px;
right:10px;
top:35%;
}
.imagesList>img{
margin-top:5px;
margin-bottom: 5px;
width:30px;
}
.qrcode{
width:100px;
height:100px;
position: absolute;
right:40px;
top:58px;
}
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="login" @mouseover="changeOver" > <div class="login" @mouseover="changeOver" >
<div class="author" > <div class="author" >
<img src="~/assets/css/7.png" v-show="!showDefault"> <img src="~/assets/css/7.png">
</div> </div>
<div class="login-title">{{userName}}</div> <div class="login-title">{{userName}}</div>
<div class="login-button" @click="loginuser" v-show="showDefault">用户登录</div> <div class="login-button" @click="loginuser" v-show="showDefault">用户登录</div>
...@@ -90,9 +90,6 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js' ...@@ -90,9 +90,6 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js'
this.getListSite() this.getListSite()
this.getListSite1() this.getListSite1()
this.getListSite2() this.getListSite2()
/* if(window.location.pathname =="/notice/all"){
this.nav = "4"
} */
}, },
methods:{ methods:{
latformDynamics(){ latformDynamics(){
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<ul v-if="isshow"> <ul >
<li v-for="item in priceList" :key="item.id"> <li v-for="item in priceList" :key="item.id">
<nuxt-link :to='`/notice/${item.noticeType}details?id=${item.noticeId}`'> <nuxt-link :to='`/notice/${item.noticeType}details?id=${item.noticeId}`'>
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
</div> </div>
</nuxt-link> </nuxt-link>
</li> </li>
</ul> <div class="pagination flex-center" >
<div class="pagination flex-center">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="getData.currentPage" :page-size ="getData.size" :page-sizes="[10, 20, 30, 40]" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="getData.currentPage" :page-size ="getData.size" :page-sizes="[10, 20, 30, 40]"
layout="total, sizes,prev, pager, next, jumper" :total="total"> layout="total, sizes,prev, pager, next, jumper" :total="total">
</el-pagination > </el-pagination >
</div> </div>
</ul>
</div> </div>
</template> </template>
...@@ -76,7 +76,6 @@ import {getAllList,getNoticeType} from '@/common/list.js' ...@@ -76,7 +76,6 @@ import {getAllList,getNoticeType} from '@/common/list.js'
}, },
data() { data() {
return { return {
isshow:true,
allList:[], allList:[],
total:0, total:0,
getData:{ getData:{
...@@ -143,10 +142,17 @@ import {getAllList,getNoticeType} from '@/common/list.js' ...@@ -143,10 +142,17 @@ import {getAllList,getNoticeType} from '@/common/list.js'
async getAllList(params){ async getAllList(params){
const {data,total} = await getAllList(params) const {data,total} = await getAllList(params)
this.priceList = data this.priceList = data
if(total ===null||0){
this.isshow = false
}
this.total = total this.total = total
let contentStatus = sessionStorage.getItem("contentStatus")
if(contentStatus =='1'){
if(this.total!==0){
this.$message.success("查询成功!")
}else{
this.$message.error("请输入正确的公告名称!")
this.getAllList(this.getData)
}
sessionStorage.removeItem("contentStatus")
}
}, },
async getNoticeType(){ async getNoticeType(){
const {data} = await getNoticeType() const {data} = await 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