Skip to content

Commit 4077ee4

Browse files
committed
Fixed home
2 parents 13b6084 + 99748e3 commit 4077ee4

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

database/seeds/UserTableSeeder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function run()
1414
DB::table('users')->insert([
1515
'name' => 'zhaohehe',
1616
'account' => 'zhaohehe',
17-
'password' => bcrypt('zhaoheheDola'),
17+
'password' => bcrypt('zhaohehe'),
1818
]);
1919
}
2020
}

public/js/app.js

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/assets/js/components/blog/home.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
33
<header class="header">
4-
<a>{{ title }}</a>
4+
<a class="blog-title" v-on:click="toHome">{{ title }}</a>
55
<div style="clear: both"></div>
66
<input class="search-bar" placeholder="Search.."
77
ref="searchBar" v-model="keyword"
@@ -63,6 +63,10 @@
6363
this.$refs.searchBar.select()
6464
},
6565
66+
toHome () {
67+
location.href = '/'
68+
},
69+
6670
list () {
6771
axios.get(apis.getPostApi).then(response => {
6872
console.log(response.data.data)

resources/assets/js/components/blog/post.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
33
<header class="header">
4-
<a>{{ blogTitle }}</a>
4+
<a class="blog-title" v-on:click="toHome">{{ blogTitle }}</a>
55
<div style="clear: both"></div>
66
<input class="search-bar" placeholder="Search.."
77
ref="searchBar"
@@ -64,7 +64,10 @@
6464
},
6565
selectSearchText () {
6666
this.$refs.searchBar.select()
67-
}
67+
},
68+
toHome () {
69+
location.href = '/'
70+
},
6871
}
6972
}
7073
</script>

resources/assets/js/components/blog/style/index.styl

+5
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,8 @@ edit
164164
a:hover
165165
border-bottom 1px dashed linkColor
166166
cursor pointer
167+
168+
.blog-title
169+
a:hover
170+
border-bottom 1px dashed linkColor
171+
cursor pointer

0 commit comments

Comments
 (0)