Commit 8b1bed2e2cde2537de3d95472ae0afce661aeec4

Authored by zhiyangdu
2 parents c286c531 dd14f73e

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
src/components/darenListCom/darenListCom.vue
... ... @@ -71,10 +71,10 @@
71 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 75 <img src="static/img/icon_daren_list_like.png" class="icon-img" />
76 76 <div class="number">{{item.upper}}</div>
77   - </div>
  77 + </div> -->
78 78 </div>
79 79 <div class="right">
80 80 查看
... ...
src/components/searchCom/searchCom.vue
... ... @@ -9,7 +9,7 @@
9 9 </div>
10 10 <div class="line"></div>
11 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 13 </div>
14 14 </form>
15 15 </div>
... ... @@ -67,7 +67,13 @@
67 67  
68 68 // 判断按下的按键是不是回车(确认)
69 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 111  
106 112 // 合并参数对象
107 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 127 </script>
... ...
src/pages/search/search.vue
... ... @@ -683,7 +683,7 @@
683 683  
684 684 // 全部跳转H5达人相关页面,达人个人主页连接
685 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 // // 判断并调用通用跳转
... ...