Commit 8b1bed2e2cde2537de3d95472ae0afce661aeec4
Merge branch 'version_2.0.0_optimization_mall_update' of http://bj.gitlab.cnlive…
….com/w-front-end/select_good into version_2.0.0_optimization_mall_update
Showing
3 changed files
with
22 additions
and
5 deletions
src/components/darenListCom/darenListCom.vue
| @@ -71,10 +71,10 @@ | @@ -71,10 +71,10 @@ | ||
| 71 | </div> | 71 | </div> |
| 72 | 72 | ||
| 73 | <!-- 点赞 --> | 73 | <!-- 点赞 --> |
| 74 | - <div class="like-box" v-if="item.upper"> | 74 | + <!-- <div class="like-box" v-if="item.upper"> |
| 75 | <img src="static/img/icon_daren_list_like.png" class="icon-img" /> | 75 | <img src="static/img/icon_daren_list_like.png" class="icon-img" /> |
| 76 | <div class="number">{{item.upper}}</div> | 76 | <div class="number">{{item.upper}}</div> |
| 77 | - </div> | 77 | + </div> --> |
| 78 | </div> | 78 | </div> |
| 79 | <div class="right"> | 79 | <div class="right"> |
| 80 | 查看 | 80 | 查看 |
src/components/searchCom/searchCom.vue
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | </div> | 9 | </div> |
| 10 | <div class="line"></div> | 10 | <div class="line"></div> |
| 11 | <div class="input-box"> | 11 | <div class="input-box"> |
| 12 | - <input type="search" :placeholder="defaultSearchs.pl" :maxlength="defaultSearchs.maxlength" v-model="defaultSearchs.keyword" class="keyword" @keyup="confirm(defaultSearchs.keyword, $event)" @blur="onBlur" /> | 12 | + <input type="search" ref="searchInput" :placeholder="defaultSearchs.pl" :maxlength="defaultSearchs.maxlength" v-model="defaultSearchs.keyword" class="keyword" @keyup="confirm(defaultSearchs.keyword, $event)" @blur="onBlur" /> |
| 13 | </div> | 13 | </div> |
| 14 | </form> | 14 | </form> |
| 15 | </div> | 15 | </div> |
| @@ -67,7 +67,13 @@ | @@ -67,7 +67,13 @@ | ||
| 67 | 67 | ||
| 68 | // 判断按下的按键是不是回车(确认) | 68 | // 判断按下的按键是不是回车(确认) |
| 69 | if ((keyword && e.keyCode === 13) || (!keyword && e.keyCode === 8)) { | 69 | if ((keyword && e.keyCode === 13) || (!keyword && e.keyCode === 8)) { |
| 70 | - this.$emit("confirm", keyword); | 70 | + |
| 71 | + // 判断不是空格字符串 | ||
| 72 | + if (keyword.trim()) { | ||
| 73 | + this.$emit("confirm", keyword); | ||
| 74 | + } else { | ||
| 75 | + this.setKeyword(''); | ||
| 76 | + } | ||
| 71 | } | 77 | } |
| 72 | }, | 78 | }, |
| 73 | 79 | ||
| @@ -105,6 +111,17 @@ | @@ -105,6 +111,17 @@ | ||
| 105 | 111 | ||
| 106 | // 合并参数对象 | 112 | // 合并参数对象 |
| 107 | Object.assign(this.defaultSearchs, this.searchs); | 113 | Object.assign(this.defaultSearchs, this.searchs); |
| 114 | + | ||
| 115 | + // 延时执行 | ||
| 116 | + setTimeout(() => { | ||
| 117 | + | ||
| 118 | + this.$nextTick(() => { | ||
| 119 | + | ||
| 120 | + if (typeof this.$refs === 'object' && typeof this.$refs.searchInput === 'object') { | ||
| 121 | + this.$refs.searchInput.focus(); | ||
| 122 | + } | ||
| 123 | + }); | ||
| 124 | + }, 1000); | ||
| 108 | } | 125 | } |
| 109 | } | 126 | } |
| 110 | </script> | 127 | </script> |
src/pages/search/search.vue
| @@ -683,7 +683,7 @@ | @@ -683,7 +683,7 @@ | ||
| 683 | 683 | ||
| 684 | // 全部跳转H5达人相关页面,达人个人主页连接 | 684 | // 全部跳转H5达人相关页面,达人个人主页连接 |
| 685 | if (item.id) { | 685 | if (item.id) { |
| 686 | - window.location.href = (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.id + "&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.id + "&from=redirect"; | 686 | + window.location.href = (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.id + "&from=redirect" + (this.getStore("uid") ? "&uid=" + this.getStore("uid") : "") : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.id + "&from=redirect" + (this.getStore("uid") ? "&uid=" + this.getStore("uid") : ""); |
| 687 | } | 687 | } |
| 688 | 688 | ||
| 689 | // // 判断并调用通用跳转 | 689 | // // 判断并调用通用跳转 |