Commit 3e245bf329d9f17773f0f23bd7e352be704060e0

Authored by 前端开发-罗建龙
1 parent 04aa24bc

oa1

pages/goods/goodsInfo/goodsInfo.js
... ... @@ -268,6 +268,7 @@ Page({
268 268 base_nor_prom_id:0,
269 269 base_nor_goods_id:0,
270 270 user_pre_buynum:0, //用户优惠促销参与次数
  271 + keyword:'', //门店搜索
271 272 },
272 273  
273 274 //------初始化加载----------
... ... @@ -3594,7 +3595,13 @@ Page({
3594 3595 })
3595 3596  
3596 3597 },
3597   -
  3598 + //获取搜索门店输入的值
  3599 + input_store: function(e) {
  3600 + this.setData({
  3601 + keyword: e.detail.value
  3602 + })
  3603 + },
  3604 +
3598 3605  
3599 3606 //---------拿出门店分类和门店------------
3600 3607 get_sto(e) {
... ... @@ -3643,6 +3650,11 @@ Page({
3643 3650 }
3644 3651 clearInterval(timer_get);
3645 3652  
  3653 + //门店搜索关键字
  3654 + if (th.data.keyword) {
  3655 + dd.keyword=th.data.keyword
  3656 + }
  3657 +
3646 3658  
3647 3659 //如果会员是有默认的门店话
3648 3660 if (!th.data.def_pick_store && th.data.fir_def_store && Object.keys(th.data.fir_def_store).length > 0) {
... ... @@ -3708,6 +3720,8 @@ Page({
3708 3720 th.deal_pickup(e); //--普通门店排版--
3709 3721 }, 800)
3710 3722 }
  3723 + }else{
  3724 + wx.hideLoading();
3711 3725 }
3712 3726 })
3713 3727 }, 200)
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -1600,6 +1600,12 @@
1600 1600 </view>
1601 1601 </view>
1602 1602 </view>
  1603 + <view class="searchbar flex-vertical-between storeListpadd">
  1604 + <input class="inputstore fs28" placeholder="{{keyword==''?'输入要搜索的门店':keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="get_sto" />
  1605 + <view class="search flex-center" bindtap="get_sto">
  1606 + <view class="fs28">搜索</view>
  1607 + </view>
  1608 + </view>
1603 1609 <!-- 门店列表,最外层的门店列表,一开始 -->
1604 1610 <view class="store-list">
1605 1611 <!-- 如果还没有点击更多门店的时候 -->
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -3383,7 +3383,7 @@ margin: auto; */
3383 3383 height: 120rpx;
3384 3384 line-height: 125rpx;
3385 3385 border-bottom: 1rpx solid #eee;
3386   -
  3386 + padding: 10rpx 0;
3387 3387 }
3388 3388  
3389 3389 .store-list .store_choose .store {
... ... @@ -4018,3 +4018,27 @@ button.custom-service::after {
4018 4018 left: -1000px;
4019 4019 top: -1000px;
4020 4020 }
  4021 +
  4022 +.searchbar {
  4023 + height: 95rpx;
  4024 + border-bottom: 2rpx solid rgb(238, 238, 238);
  4025 +}
  4026 +.storeListpadd {
  4027 + padding: 0rpx 31rpx;
  4028 +}
  4029 +.search {
  4030 + width: 125rpx;
  4031 + height: 45rpx;
  4032 + line-height: 45rpx;
  4033 + background-color: rgb(219, 27, 52);
  4034 + border-radius: 30rpx;
  4035 + color: rgb(255, 255, 255);
  4036 +}
  4037 +.inputstore {
  4038 + width: 510rpx;
  4039 + height: 43rpx;
  4040 + line-height: 43rpx;
  4041 + border-radius: 30rpx;
  4042 + border: 2rpx solid rgb(238, 238, 238);
  4043 + padding-left: 30rpx;
  4044 +}
4021 4045 \ No newline at end of file
... ...