linshi
This commit is contained in:
parent
80ef5bbfcc
commit
71fb824b9c
@ -29,7 +29,7 @@
|
||||
<follow v-if="item.status == 3 " :operation="type[item.type] + '了该' + status[item.status]" :day="item.time + '前'" :title="item.title" :nickname="item.nickname" :userimg="'http://lawpro.earnest.pro' + item.img" :num="item.islike" :img="'http://lawpro.earnest.pro' + item.avatar" :text="item.text" :comment="item.comment"></follow>
|
||||
<answer v-if="item.status == 1 || item.status == 2" :operation="type[item.type] + '了该' + status[item.status]" :day="item.time + '前'" :title="item.title" :types="item.status" :id="item.id"></answer>
|
||||
<follow v-if="types == 3" operation="发布了该回答" :day="item.time" :title="item.title" :nickname="item.nickname" :userimg="'http://lawpro.earnest.pro' + userimg" :num="item.islike" :img="'http://lawpro.earnest.pro' + item.avatar" :text="item.text" :comment="item.comment"></follow>
|
||||
<answer v-if="types==1" operation="发布了该文章" :day="item.time" :title="item.title" types="1" :id="item.id"></answer>
|
||||
<answer @wz="wzs" v-if="types==1" operation="发布了该文章" :day="item.time" :title="item.title" types="1" :id="item.id"></answer>
|
||||
<answer v-if="types==2" operation="发布了该问题" :day="item.time" :title="item.title" types="2" :id="item.id"></answer>
|
||||
|
||||
</div>
|
||||
@ -117,6 +117,7 @@
|
||||
import follow from "./components/PersonafFollow"
|
||||
// import follows from "./components/PersonafFollows"
|
||||
import answer from "./components/PersonalAnswer"
|
||||
// import { log } from 'util';
|
||||
export default {
|
||||
name: "Personal-homepage",
|
||||
data() {
|
||||
@ -138,6 +139,14 @@ export default {
|
||||
answer
|
||||
},
|
||||
methods:{
|
||||
wzs(){
|
||||
// console.log(a,b,12)
|
||||
// this.$router.replace('/')
|
||||
|
||||
this.$router.push({
|
||||
path:'/articledetail'
|
||||
})
|
||||
},
|
||||
getlist(){
|
||||
if(this.lock){
|
||||
return ;
|
||||
|
@ -37,13 +37,10 @@ export default {
|
||||
methods:{
|
||||
tab(){
|
||||
window.console.log(this.types,"llk")
|
||||
if(this.types=="1"){
|
||||
this.$router.push({
|
||||
path: '/sign'
|
||||
});
|
||||
this.$emit("wz",this.types,this.id)
|
||||
window.console.log( this.$router)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
@ -124,17 +124,17 @@ export default {
|
||||
switch (e) {
|
||||
case 0:
|
||||
this.$router.push({
|
||||
path: `/index`
|
||||
path: '/'
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
this.$router.push({
|
||||
path: `/PersonalHomepage`
|
||||
path: '/PersonalHomepage'
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
this.$router.push({
|
||||
path: `/login`
|
||||
path: '/login'
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import Vue from 'vue'
|
||||
//1.导入路由组件vue-router
|
||||
import Router from 'vue-router'
|
||||
//2.调用vue-router
|
||||
Vue.use(Router)
|
||||
import PersonalHomepage from "./PersonalHomepage"
|
||||
import index from "./index"
|
||||
// import PersonalHomepage from "./PersonalHomepage"
|
||||
@ -16,8 +15,10 @@ import IndexReport1 from "./IndexReport1"
|
||||
import IndexReport2 from "./IndexReport2"
|
||||
import Answer from "./Answer"
|
||||
import sign from "./sign"
|
||||
import ArticleDetail from "./articledetail"
|
||||
import ArticleDetail from "./articledetail.vue"
|
||||
Vue.use(Router)
|
||||
const router=new Router({
|
||||
mode:'history',
|
||||
routes: [
|
||||
{
|
||||
path: '/articledetail',
|
||||
@ -52,7 +53,7 @@ const router=new Router({
|
||||
component: login
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
path: '/',
|
||||
component: index
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user