Commit 2db52dc1c480fcb0e0ceae9cbaf04d819216d353

Authored by yvan.ni
1 parent cd1fb372

1. 门店搜索功能的bug

2.  专享礼包分享
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -349,5 +349,29 @@ Page({
349 349 var nav_b = th.selectComponent("#nav_b"); //组件的id
350 350 nav_b.close_box();
351 351 nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");
352   - }
  352 + },
  353 +
  354 + //--- 分享设置 --
  355 + onShareAppMessage: function (e) {
  356 + var curPage=this;
  357 + var pagePath = curPage.route; //当前页面url
  358 + if (pagePath.indexOf('/') != 0) {
  359 + pagePath = '/' + pagePath;
  360 + }
  361 +
  362 + pagePath+="?isBuy="+this.data.isBuy;
  363 + if(this.data.isBuy==0){
  364 + pagePath+="&lbId="+this.data.getGiftID;
  365 + }else{
  366 + pagePath+="&orderSn="+this.data.orderSn;
  367 + }
  368 +
  369 + return {
  370 + title: "礼包详情",
  371 + path:pagePath,
  372 + }
  373 + },
  374 +
  375 +
  376 +
353 377 });
354 378 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -116,4 +116,19 @@ Page({
116 116  
117 117 },
118 118  
  119 +
  120 +//--- 分享设置 --
  121 +onShareAppMessage: function (e) {
  122 + var curPage=this;
  123 + var pagePath = curPage.route; //当前页面url
  124 + if (pagePath.indexOf('/') != 0) {
  125 + pagePath = '/' + pagePath;
  126 + }
  127 + return {
  128 + title: "专享礼包",
  129 + path:pagePath,
  130 + }
  131 +},
  132 +
  133 +
119 134 });
120 135 \ No newline at end of file
... ...
pages/store/index.js
... ... @@ -12,6 +12,7 @@ Page({
12 12 is_no_more:0,
13 13 key_word:'', //关键字搜索
14 14 cat_id:0, //分类ID
  15 + islading:0,
15 16 },
16 17  
17 18 onShow:function(){
... ... @@ -65,6 +66,8 @@ Page({
65 66  
66 67 get_list:function(){
67 68 if(this.data.is_no_more==1) return false;
  69 + if(this.data.islading==1) return false;
  70 + this.data.islading=1;
68 71 var th=this,req = getApp().request;
69 72 var dd = {
70 73 store_id: o.stoid,
... ... @@ -84,6 +87,7 @@ Page({
84 87 req.promiseGet("/api/weshop/pickup/list", {
85 88 data: dd,
86 89 }).then(res => {
  90 + this.data.islading=0;
87 91 wx.hideLoading();
88 92 if(res.data.code==0){
89 93 if(res.data.data.pageData.length<=0){
... ... @@ -132,6 +136,7 @@ Page({
132 136 cid: item['cat_id']
133 137 })
134 138 this.data.page=1;
  139 + this.data.is_no_more=0;
135 140 this.setData({ pick_list:null})
136 141 this.get_list();
137 142  
... ... @@ -139,7 +144,8 @@ Page({
139 144  
140 145 //搜索关键字
141 146 sear:function(){
142   - this.data.page=1;
  147 + this.data.page=1;
  148 + this.data.is_no_more=0;
143 149 this.setData({ pick_list:null})
144 150 this.get_list();
145 151 },
... ...
pages/store/index.wxml
1 1 <view class="bcolor flex jc_sb">
2   - <view class="sear_inp">
  2 + <view class="sear_inp flex ai-center">
3 3 <view class="sear_btn" bindtap='sear'>
4 4 <image src="{{url}}/miniapp/images/search.png" style="width: 30rpx; height: 30rpx; margin-left: 10rpx;"></image>
5   - </view>
  5 + </view>
6 6 <input bindinput ="lose_focus" class="fs28" value=""/>
7 7 </view>
8 8 <view class="select">
... ...
pages/store/index.wxss
... ... @@ -42,7 +42,7 @@ position: relative;
42 42 .bcolor{background-color: #f5f5f5; height: 126rpx;}
43 43  
44 44 .sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;}
45   -.sear_inp input{ position: relative; top:10rpx;width: 400rpx; display: inline-block;}
  45 +.sear_inp input{width: 400rpx;}
46 46 .select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center }
47   -.sear_btn{ width: 50rpx; height: 100%; display: inline-block;}
  47 +.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;}
48 48  
... ...