This commit is contained in:
parent
cdbbc3a054
commit
aee4bbbc81
|
@ -113,5 +113,7 @@ const router = createRouter({
|
|||
history: createWebHistory(process.env.BASE_URL),
|
||||
routes
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
window.scrollTo(0,0);
|
||||
})
|
||||
export default router
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
},
|
||||
methods:{
|
||||
getData(id){
|
||||
this.$router.push({path:'/article',query:{id:id}})
|
||||
this.$http.post(`/door/getArt/${id}`).then(res=>{
|
||||
this.datObj = res.data.data
|
||||
this.datObj.content = this.datObj.content&&this.datObj.content.replace(/<img/g,'<img style="width:95%; height: auto;margin:0 auto"')
|
||||
|
@ -106,7 +107,6 @@
|
|||
})
|
||||
},
|
||||
goPage(){
|
||||
|
||||
if(this.menu.length!=0){
|
||||
let typeIndex = this.menu.findIndex(ele=>{
|
||||
return ele.name==this.datObj.category.categoryName
|
||||
|
|
Loading…
Reference in New Issue