Commit 8bad8498 authored by Damon's avatar Damon

Merge branch 'dev-v1.0.0' into test

parents 03b3a3c6 c7ec3b79
...@@ -125,6 +125,7 @@ export default { ...@@ -125,6 +125,7 @@ export default {
.bottom { .bottom {
width: 600rpx; width: 600rpx;
height: 104rpx; height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
background-color: #2953ff !important; background-color: #2953ff !important;
} }
......
...@@ -176,13 +176,15 @@ export default { ...@@ -176,13 +176,15 @@ export default {
this.arrIndex = e.show ? e.index : null this.arrIndex = e.show ? e.index : null
}, },
search(val) { search(val) {
this.keyword = val if (val){
let history = this.searchHistory this.keyword = val
history.unshift(val) let history = this.searchHistory
if (history.length > 9) { history.unshift(val)
history.splice(9, 1) if (history.length > 9) {
history.splice(9, 1)
}
this.$u.vuex('searchHistory', history)
} }
this.$u.vuex('searchHistory', history)
}, },
collection(item) { collection(item) {
const action = item.collectionFlag ? 'removeCollection' : 'joinCollection' const action = item.collectionFlag ? 'removeCollection' : 'joinCollection'
......
...@@ -62,13 +62,15 @@ export default { ...@@ -62,13 +62,15 @@ export default {
}, },
methods: { methods: {
search(val) { search(val) {
this.keyword = val if (val){
this.history.unshift(val) this.keyword = val
if(this.history.length > 9){ this.history.unshift(val)
this.history.splice(9, 1) if(this.history.length > 9){
this.history.splice(9, 1)
}
this.$u.vuex('searchHistory', this.history)
this.toSearchDetail(val)
} }
this.$u.vuex('searchHistory', this.history)
this.toSearchDetail(val)
}, },
toSearchDetail(keyword) { toSearchDetail(keyword) {
this.$u.route({ this.$u.route({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment