Merge branch 'zhengjie' of pplokijuhyg/falvpingtai into master

This commit is contained in:
asd 2019-11-29 11:20:13 +08:00
commit 271e6f333c
2 changed files with 38 additions and 8 deletions

View File

@ -3,13 +3,14 @@
<van-popup v-model="show" position="top" :style="{ height: '2.82rem' }"> <van-popup v-model="show" position="top" :style="{ height: '2.82rem' }">
<div style="height:0.88rem"></div> <div style="height:0.88rem"></div>
<div class="mnuelist"> <div class="mnuelist">
<div>首页</div> <div @click="tab(0)">首页</div>
<div>我的主页</div> <div @click="tab(1)">我的主页</div>
<div>退出登录</div> <div @click="tab(2)">退出登录</div>
</div> </div>
</van-popup> </van-popup>
<div class="head"> <div class="head">
<img class="logo" src alt srcset /> <img class="logo" src alt srcset />
<div class="search"> <div class="search">
<img src alt /> <img src alt />
<input type="text" placeholder="搜索" v-on:change="shuru" v-model="serch" /> <input type="text" placeholder="搜索" v-on:change="shuru" v-model="serch" />
@ -105,8 +106,27 @@ export default {
shuru() { shuru() {
window.console.log(this.serch); window.console.log(this.serch);
this.$router.push({ this.$router.push({
path: `/indexfind?word=`+this.serch path: `/indexfind?word=` + this.serch
}); });
},
tab(e) {
switch (e) {
case 0:
this.$router.push({
path: `/index`
});
break;
case 1:
this.$router.push({
path: `/PersonalHomepage`
});
break;
case 2:
this.$router.push({
path: `/login`
});
break;
}
} }
} }
}; };

View File

@ -2,15 +2,19 @@
<div class="box"> <div class="box">
<heads></heads> <heads></heads>
<div class="list"> <div class="list">
<list <div v-for="(item,index) in list" :key="index" @click="todetail(item.id)">
v-for="(item,index) in list" <list
:key="index"
:title="item.title" :title="item.title"
:id="item.id" :id="item.id"
:num="item.comment" :num="item.comment"
:img="item.img" :img="item.img"
:text="item.text" :text="item.text"
></list> ></list>
</div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
<!-- <list></list> <!-- <list></list>
<list></list>--> <list></list>-->
@ -63,6 +67,12 @@ export default {
} }
}) })
},
todetail(e){
window.console.log(e)
this.$router.push({
path: `/IndexArticleDetaill?id=`+e
});
} }
}, },
components: { components: {