Skip to content

Commit

Permalink
Fix shuffle search detail
Browse files Browse the repository at this point in the history
  • Loading branch information
kinglisky committed Dec 27, 2017
1 parent b439721 commit bf49cbc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Binary file modified extension.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion manifest/dev.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "AIDOU",
"version": "1.6",
"version": "1.8",
"description": "方便搜索表情包并生成图片链接进行斗图",
"background": {
"scripts": [
Expand Down
2 changes: 1 addition & 1 deletion manifest/prod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "AIDOU",
"version": "1.7",
"version": "1.8",
"description": "方便搜索表情包并生成图片链接进行斗图",
"background": {
"scripts": [
Expand Down
9 changes: 5 additions & 4 deletions src/content/components/app-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export default {
},
btnList () {
const { shuffleSeach, shwoCollect, showConfig, tipText } = this
const { shuffleSearch, shwoCollect, showConfig, tipText } = this
return [
{
icon: 'icon-shuffle',
text: '随便看看',
handler: shuffleSeach
handler: shuffleSearch
},
{
icon: 'icon-favorite_border',
Expand Down Expand Up @@ -102,13 +102,14 @@ export default {
})
},
shuffleSeach () {
shuffleSearch () {
const { hotWords } = this
const keyword = hotWords[(Math.random() * hotWords.length | 0)]
if (!keyword) return
if (this.hotWord === keyword) {
this.shuffleSeach()
this.shuffleSearch()
}
this.syncView = 'search'
this.hotWord = keyword
this.$emit('fetch-exp', `${keyword}&statref=home_hotword`)
},
Expand Down

0 comments on commit bf49cbc

Please sign in to comment.