修改搜索问题,优化签到页面

This commit is contained in:
lemon橪
2021-09-03 09:48:35 +08:00
parent 6ca01d2c71
commit 90d9fa9671
3 changed files with 64 additions and 57 deletions

View File

@@ -376,12 +376,7 @@ export default {
*/
keyword(val) {
if (val) {
let identical = this.hotKeywordList.some((item) => {
return item == val;
});
if (!identical) {
this.defaultKeyword = "请输入搜索商品";
} else {
if (val) {
this.defaultKeyword = val;
}
} else {
@@ -741,11 +736,12 @@ export default {
keyword = (this.hotKeywordList.length && this.hotKeywordList[0]) || "";
}
this.defaultKeyword == "请输入搜索商品" ? (keyword = "") : "";
this.keyword = keyword;
// this.keyword = keyword;
keyword ? (this.keyword = keyword) : "";
this.saveKeyword(keyword); //保存为历史
this.isShowSeachGoods = true;
this.$refs.mSearch.isShowSeachGoods = true;
this.params.keyword = keyword;
this.params.keyword = this.keyword;
this.params.pageNumber = 1;
this.$set(this.sortParams, "keyword", keyword);
this.loadData("refresh", 1);