Commit 6c98007da750654330f65e9cf682f31a753499da
1 parent
202f730e
积分购搜索的优化
Showing
3 changed files
with
16 additions
and
16 deletions
packageA/pages/jfbuy/jfbuy.js
| @@ -350,6 +350,8 @@ Page({ | @@ -350,6 +350,8 @@ Page({ | ||
| 350 | } else { | 350 | } else { |
| 351 | data.stypeup = 1; | 351 | data.stypeup = 1; |
| 352 | }; | 352 | }; |
| 353 | + | ||
| 354 | + data.keyword=this.data.keyword | ||
| 353 | 355 | ||
| 354 | // this.data.requestData = data; | 356 | // this.data.requestData = data; |
| 355 | this.setData({ | 357 | this.setData({ |
| @@ -566,13 +568,14 @@ Page({ | @@ -566,13 +568,14 @@ Page({ | ||
| 566 | this.setData({ | 568 | this.setData({ |
| 567 | search_ing:0, | 569 | search_ing:0, |
| 568 | hiddenClear:1, | 570 | hiddenClear:1, |
| 571 | + keyword:'', | ||
| 569 | }) | 572 | }) |
| 573 | + this.sear_list(); | ||
| 570 | }, | 574 | }, |
| 571 | 575 | ||
| 572 | //开始搜索 | 576 | //开始搜索 |
| 573 | submitSearch(){ | 577 | submitSearch(){ |
| 574 | this.sear_list(); | 578 | this.sear_list(); |
| 575 | - this.close_layer(); | ||
| 576 | } | 579 | } |
| 577 | 580 | ||
| 578 | }) | 581 | }) |
| 579 | \ No newline at end of file | 582 | \ No newline at end of file |
packageA/pages/jfbuy/jfbuy.wxml
| @@ -30,6 +30,17 @@ | @@ -30,6 +30,17 @@ | ||
| 30 | 30 | ||
| 31 | </view> | 31 | </view> |
| 32 | 32 | ||
| 33 | + <view class="s_box" wx:if="{{search_ing}}" > | ||
| 34 | + <view class="pdh20 pdv10 flex ai_c jc_sb"> | ||
| 35 | + <view class="input-box"> | ||
| 36 | + <input class="input-search" name="word" placeholder="请输入商品关键字" | ||
| 37 | + bindconfirm="submitSearch" bindinput="getInput" focus="{{focus}}" value="{{keyword}}"/> | ||
| 38 | + <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text> | ||
| 39 | + </view> | ||
| 40 | + <button catchtap="close_layer" class="btn" hover-class="none">取消</button> | ||
| 41 | + </view> | ||
| 42 | + </view> | ||
| 43 | + | ||
| 33 | <!-- <view> --> | 44 | <!-- <view> --> |
| 34 | <scroll-view | 45 | <scroll-view |
| 35 | class="list" | 46 | class="list" |
| @@ -75,17 +86,3 @@ | @@ -75,17 +86,3 @@ | ||
| 75 | </view> | 86 | </view> |
| 76 | </view> | 87 | </view> |
| 77 | 88 | ||
| 78 | -<!-- 和搜索相关 --> | ||
| 79 | -<view wx:if="{{search_ing}}"> | ||
| 80 | - <view class="cover-layer" catchtap="close_layer"></view> | ||
| 81 | - <view class="s_box"> | ||
| 82 | - <view class="pdh20 pdv10 flex ai_c jc_sb"> | ||
| 83 | - <view class="input-box"> | ||
| 84 | - <input class="input-search" name="word" placeholder="请输入商品关键字" | ||
| 85 | - bindconfirm="submitSearch" bindinput="getInput" focus="{{focus}}" value="{{keyword}}"/> | ||
| 86 | - <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text> | ||
| 87 | - </view> | ||
| 88 | - <button catchtap="close_layer" class="btn" hover-class="none">取消</button> | ||
| 89 | - </view> | ||
| 90 | - </view> | ||
| 91 | -</view> | ||
| 92 | \ No newline at end of file | 89 | \ No newline at end of file |
packageA/pages/jfbuy/jfbuy.wxss
| @@ -434,7 +434,7 @@ radio .wx-radio-input.wx-radio-input-checked::before{ | @@ -434,7 +434,7 @@ radio .wx-radio-input.wx-radio-input-checked::before{ | ||
| 434 | 434 | ||
| 435 | 435 | ||
| 436 | /*-- 搜索相关 --*/ | 436 | /*-- 搜索相关 --*/ |
| 437 | -.s_box{ position: fixed;top:0;left: 0;background-color: #fff; width: 100%; z-index: 111111} | 437 | +.s_box{ background-color: #fff; width: 100%; } |
| 438 | .input-box { | 438 | .input-box { |
| 439 | position: relative; | 439 | position: relative; |
| 440 | flex: 1; | 440 | flex: 1; |