Commit 8116582752240927cb02d293e51cfc05e3ca73d4

Authored by pengye
1 parent 8d8ebaee

菜品券分享以及菜品券买券页面新版修改

@@ -28,7 +28,6 @@ Page({ @@ -28,7 +28,6 @@ Page({
28 */ 28 */
29 onLoad(options) { 29 onLoad(options) {
30 this.setData({ 30 this.setData({
31 - use:util.determine(options.use),  
32 opt:{ 31 opt:{
33 id:options.id, 32 id:options.id,
34 name:options.name, 33 name:options.name,
@@ -63,14 +62,20 @@ Page({ @@ -63,14 +62,20 @@ Page({
63 let exp_date=util.determine(detail.exp_date); 62 let exp_date=util.determine(detail.exp_date);
64 let price = detail.price * 1; 63 let price = detail.price * 1;
65 let num = this.data.num * 1; 64 let num = this.data.num * 1;
  65 + let use=util.determine(detail.use)
  66 + if(use && use.images){
  67 + use.images=util.determine(use.images)
  68 + }
66 this.setData({ 69 this.setData({
67 detail, 70 detail,
68 exp_date, 71 exp_date,
69 - totalize: (price * num).toFixed(2) 72 + totalize: (price * num).toFixed(2),
  73 + use,
70 }) 74 })
71 console.log('detail',{...detail}); 75 console.log('detail',{...detail});
72 console.log('exp_date',{...exp_date}); 76 console.log('exp_date',{...exp_date});
73 console.log('totalize',this.data.totalize); 77 console.log('totalize',this.data.totalize);
  78 + console.log('use',use);
74 } 79 }
75 }) 80 })
76 }, 81 },
1 <!--pack-activity/pack/buyCoupon.wxml 代金券抢购页面--> 1 <!--pack-activity/pack/buyCoupon.wxml 代金券抢购页面-->
2 <wxs src="../../utils/util.wxs" module="util" /> 2 <wxs src="../../utils/util.wxs" module="util" />
3 <nav>{{opt.name}}</nav> 3 <nav>{{opt.name}}</nav>
4 -<view class="wrap"> 4 +<scroll-view class="view scroll-view" scroll-y="true">
  5 + <image wx:if="{{use.is_dish=='1' && use.images.length>0}}" class="imgs1" mode="widthFix" src="{{use.images[0]}}" mode="" />
5 <view class="info info1"> 6 <view class="info info1">
6 <view class="info_left font38r"> 7 <view class="info_left font38r">
7 {{detail.aname}} 8 {{detail.aname}}
@@ -12,12 +13,20 @@ @@ -12,12 +13,20 @@
12 {{detail.price || 0}}元 13 {{detail.price || 0}}元
13 </view> 14 </view>
14 <view class="operation"> 15 <view class="operation">
15 - <image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction"/>  
16 - <input type="number" model:value="{{num}}" bindinput="bindKeyNameInput"/>  
17 - <image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode=""/> 16 + <image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction" />
  17 + <input type="number" model:value="{{num}}" bindinput="bindKeyNameInput" />
  18 + <image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode="" />
18 </view> 19 </view>
19 </view> 20 </view>
20 </view> 21 </view>
  22 + <view class="info" wx:if="{{use.is_dish=='1'}}">
  23 + <view class="info_left font32r">
  24 + 菜品
  25 + </view>
  26 + <view class="info_right text_info font32r">
  27 + {{use.dish}}
  28 + </view>
  29 + </view>
21 <view class="info"> 30 <view class="info">
22 <view class="info_left font32r"> 31 <view class="info_left font32r">
23 券要求 32 券要求
@@ -68,13 +77,19 @@ @@ -68,13 +77,19 @@
68 {{detail.grant_last}} 77 {{detail.grant_last}}
69 </view> 78 </view>
70 </view> 79 </view>
  80 + <block wx:if="{{use.is_dish=='1' && use.images.length>0}}">
  81 + <block wx:for="{{use.images}}">
  82 + <image wx:if="{{index!='0'}}" class="imgs1" mode="widthFix" src="{{item}}" mode="" />
  83 + </block>
  84 + </block>
71 <view wx:if="{{detail.explain}}" class="info"> 85 <view wx:if="{{detail.explain}}" class="info">
72 <view class="info_left font32r"> 86 <view class="info_left font32r">
73 券说明 87 券说明
74 </view> 88 </view>
75 </view> 89 </view>
76 <view class="explain_news">{{detail.explain}}</view> 90 <view class="explain_news">{{detail.explain}}</view>
77 -</view> 91 + <view class="hei"></view>
  92 +</scroll-view>
78 <view class="fixed_box"> 93 <view class="fixed_box">
79 <view class="shoppingCart_img"> 94 <view class="shoppingCart_img">
80 <image src="https://qn.colorcun.com/WechatIMG711.png" mode="" /> 95 <image src="https://qn.colorcun.com/WechatIMG711.png" mode="" />
@@ -137,4 +137,14 @@ page { @@ -137,4 +137,14 @@ page {
137 .btnsDisabled{ 137 .btnsDisabled{
138 background: #999999 !important; 138 background: #999999 !important;
139 color: #fff !important; 139 color: #fff !important;
  140 +}
  141 +.imgs1{
  142 + width: 100%;
  143 +}
  144 +.scroll-view{
  145 + margin-bottom: 200rpx;
  146 + padding-bottom: 60rpx;
  147 +}
  148 +.hei{
  149 + height: 160rpx;
140 } 150 }