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 | 350 | } else { |
| 351 | 351 | data.stypeup = 1; |
| 352 | 352 | }; |
| 353 | + | |
| 354 | + data.keyword=this.data.keyword | |
| 353 | 355 | |
| 354 | 356 | // this.data.requestData = data; |
| 355 | 357 | this.setData({ |
| ... | ... | @@ -566,13 +568,14 @@ Page({ |
| 566 | 568 | this.setData({ |
| 567 | 569 | search_ing:0, |
| 568 | 570 | hiddenClear:1, |
| 571 | + keyword:'', | |
| 569 | 572 | }) |
| 573 | + this.sear_list(); | |
| 570 | 574 | }, |
| 571 | 575 | |
| 572 | 576 | //开始搜索 |
| 573 | 577 | submitSearch(){ |
| 574 | 578 | this.sear_list(); |
| 575 | - this.close_layer(); | |
| 576 | 579 | } |
| 577 | 580 | |
| 578 | 581 | }) |
| 579 | 582 | \ No newline at end of file | ... | ... |
packageA/pages/jfbuy/jfbuy.wxml
| ... | ... | @@ -30,6 +30,17 @@ |
| 30 | 30 | |
| 31 | 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 | 44 | <!-- <view> --> |
| 34 | 45 | <scroll-view |
| 35 | 46 | class="list" |
| ... | ... | @@ -75,17 +86,3 @@ |
| 75 | 86 | </view> |
| 76 | 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 | 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 | 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 | 438 | .input-box { |
| 439 | 439 | position: relative; |
| 440 | 440 | flex: 1; | ... | ... |