Commit 1b55896919bce3352f1e9a9d90f3da2e326350aa

Authored by yvan.ni
1 parent 5a363051

1.我的礼包的功能

2. 首页
3. 批量预约
packageA/pages/myGiftDetails/myGiftDetails.js
@@ -309,18 +309,24 @@ Page({ @@ -309,18 +309,24 @@ Page({
309 309
310 //一键领取券 310 //一键领取券
311 show_get_quan:function (e) { 311 show_get_quan:function (e) {
312 - this.setData({'details.isget':1}); 312 + var th=this;
313 var json = { 313 var json = {
314 - 314 + store_id:os.stoid,
  315 + user_id:getApp().globalData.user_id,
  316 + id:this.data.id
315 }; 317 };
316 - var url = ""; 318 + var url = "/api/weshop/libao/libaoFormvip/saveLibaoQuan";
317 getApp().request.post(url,{ 319 getApp().request.post(url,{
318 data:json, 320 data:json,
319 success:function(res) { 321 success:function(res) {
320 if (res.data.code == 0) { 322 if (res.data.code == 0) {
321 - 323 + th.setData({'details.isget':1});
322 } else { 324 } else {
323 - 325 + wx.showToast({
  326 + title: res.data.msg,
  327 + icon: 'none',
  328 + duration: 2000
  329 + })
324 } 330 }
325 }, 331 },
326 }) 332 })
packageA/pages/myGiftDetails/myGiftDetails.wxml
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 <view class="pdb80"> 2 <view class="pdb80">
3 <!-- 图片 --> 3 <!-- 图片 -->
4 <view><image src="{{imghost + (details.lburl ? details.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/></view> 4 <view><image src="{{imghost + (details.lburl ? details.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/></view>
  5 +
  6 + <view wx:if="{{index==1}}" class="fs26 exp_title">兑换结束时间:{{filter.format_time(details.expdate,1)}}</view>
5 <!-- 描述--> 7 <!-- 描述-->
6 <view class="desc-container"> 8 <view class="desc-container">
7 <!-- 标题 --> 9 <!-- 标题 -->
@@ -94,7 +96,7 @@ @@ -94,7 +96,7 @@
94 <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff"> 96 <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff">
95 已领取{{list[0].freebh}} 97 已领取{{list[0].freebh}}
96 </view> 98 </view>
97 - <view wx:else bindtap="show_hxm" data-type="1" class="btn red">立即使用</view> 99 + <view wx:elif="{{details.codetype!=1}}" bindtap="show_hxm" data-type="1" class="btn red">立即使用</view>
98 </block> 100 </block>
99 </view> 101 </view>
100 102
packageA/pages/myGiftDetails/myGiftDetails.wxss
@@ -97,4 +97,5 @@ page { @@ -97,4 +97,5 @@ page {
97 } 97 }
98 .fir_view{ 98 .fir_view{
99 justify-content: space-between; height: 98rpx; line-height: 98rpx; padding: 0 8rpx; 99 justify-content: space-between; height: 98rpx; line-height: 98rpx; padding: 0 8rpx;
100 -}  
101 \ No newline at end of file 100 \ No newline at end of file
  101 +}
  102 +.exp_title{text-align: center;height: 60rpx; line-height: 60rpx;background-color: #cccdce;color: #c0283a}
102 \ No newline at end of file 103 \ No newline at end of file
packageA/pages/my_service2/appment_main.js
@@ -329,7 +329,7 @@ Page({ @@ -329,7 +329,7 @@ Page({
329 is_textea: 0 329 is_textea: 0
330 }) 330 })
331 var itemId = th.data.itemId; //服务id 331 var itemId = th.data.itemId; //服务id
332 - var url = "/api/weshop/marketing/reservation/storage/pageAll"; 332 + var url = "/api/weshop/marketing/reservation/service/storage/page";
333 var key_word = th.data.key_word; 333 var key_word = th.data.key_word;
334 key_word = key_word.replace(/\s+/g, ""); 334 key_word = key_word.replace(/\s+/g, "");
335 getApp().request.promiseGet(url, { 335 getApp().request.promiseGet(url, {
@@ -344,7 +344,7 @@ Page({ @@ -344,7 +344,7 @@ Page({
344 } 344 }
345 }).then(res => { 345 }).then(res => {
346 wx.hideLoading(); 346 wx.hideLoading();
347 - if (res.data.code == 0) { 347 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0) {
348 th.data.curpage++; 348 th.data.curpage++;
349 var arr1 = th.data.store_list; 349 var arr1 = th.data.store_list;
350 var arr2 = res.data.data.pageData; 350 var arr2 = res.data.data.pageData;
pages/index/index/index.wxml
@@ -212,7 +212,7 @@ @@ -212,7 +212,7 @@
212 <swiper-item wx:for="{{pindGoods}}" wx:key="{{index}}" wx:for-index="pix"> 212 <swiper-item wx:for="{{pindGoods}}" wx:key="{{index}}" wx:for-index="pix">
213 <view class="teamheight" style='display:block;' wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> 213 <view class="teamheight" style='display:block;' wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
214 <view class="kill-item"> 214 <view class="kill-item">
215 - <navigator class="flex navwidth" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{aitem.goods_name}}" hover-class="none"> 215 + <navigator class="flex navwidth" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&title={{aitem.goods_name}}" hover-class="none">
216 <view class="kill-pic"> 216 <view class="kill-pic">
217 <image class="wh100" src="{{url+aitem.original_img}}" data-val="{{aitem.original_img}}" data-errorimg="pindGoods[{{pix}}][{{aind}}].original_img" binderror="bind_bnerr2" lazy-load="true"> 217 <image class="wh100" src="{{url+aitem.original_img}}" data-val="{{aitem.original_img}}" data-errorimg="pindGoods[{{pix}}][{{aind}}].original_img" binderror="bind_bnerr2" lazy-load="true">
218 </image> 218 </image>