Commit fa18c3deb831de02ea98341bc9851da7dd8a8cf9

Authored by vking
1 parent dd838921

商家红包活动

@@ -5,6 +5,7 @@ Component({ @@ -5,6 +5,7 @@ Component({
5 * 组件的属性列表 5 * 组件的属性列表
6 */ 6 */
7 properties: { 7 properties: {
  8 + cla:String,
8 seller:{ 9 seller:{
9 type:Object, 10 type:Object,
10 value:{} 11 value:{}
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <view class="toast flex-vc" wx:if="{{red_envelopes_price>0}}"> 37 <view class="toast flex-vc" wx:if="{{red_envelopes_price>0}}">
38 <view style="text-align: center;">恭喜您获得<text>{{red_envelopes_price}}元红包</text></view> 38 <view style="text-align: center;">恭喜您获得<text>{{red_envelopes_price}}元红包</text></view>
39 </view> 39 </view>
40 -<view class="tips reserve-detail" wx:if="{{money>0 && red_envelopes_price==0}}"> 40 +<view class="{{cla?cla:'tips reserve-detail'}}" wx:if="{{money>0 && red_envelopes_price==0}}">
41 <view class="msg"> 41 <view class="msg">
42 {{money}}元 42 {{money}}元
43 <view class="jiao"></view> 43 <view class="jiao"></view>
@@ -179,4 +179,11 @@ @@ -179,4 +179,11 @@
179 .tips.reserve-detail .msg:before{ 179 .tips.reserve-detail .msg:before{
180 content: "预订买单,立即抵扣"; 180 content: "预订买单,立即抵扣";
181 color:rgba(255,255,255,1); 181 color:rgba(255,255,255,1);
  182 +}
  183 +
  184 +.detail_owner .jiao{
  185 + display: none;
  186 +}
  187 +.detail_owner .msg:after{
  188 + content: "红包待用";
182 } 189 }
@@ -16,7 +16,12 @@ Page({ @@ -16,7 +16,12 @@ Page({
16 */ 16 */
17 onLoad: function (options) { 17 onLoad: function (options) {
18 this.options=options 18 this.options=options
19 - this.GetBalance() 19 + this.setData({
  20 + seller:{
  21 + id:options.sid
  22 + }
  23 + })
  24 + //this.GetBalance()
20 }, 25 },
21 26
22 /** 27 /**
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 "subscribe":"/components/userinfo/subscribe", 9 "subscribe":"/components/userinfo/subscribe",
10 "jinduBar":"../components/jinduBar", 10 "jinduBar":"../components/jinduBar",
11 "discount":"../components/discount", 11 "discount":"../components/discount",
12 - "xfCard":"../components/xfCard" 12 + "xfCard":"../components/xfCard",
  13 + "seller-discount":"/components/reserve/seller/discount"
13 } 14 }
14 } 15 }
@@ -133,7 +133,10 @@ @@ -133,7 +133,10 @@
133 <subscribe ids="{{[1]}}" bindevent="checkoutInit"> 133 <subscribe ids="{{[1]}}" bindevent="checkoutInit">
134 <view class="checkout-button"> 134 <view class="checkout-button">
135 获取消费金额 135 获取消费金额
136 - <view class="checkout-button-money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> 136 + <view class="checkout-button-money-tips">
  137 + <seller-discount id="seller-discount" seller="{{seller}}" wx:if="{{seller}}"
  138 + cla="detail_owner"></seller-discount>
  139 + </view>
137 </view> 140 </view>
138 </subscribe> 141 </subscribe>
139 </view> 142 </view>
@@ -141,4 +144,4 @@ @@ -141,4 +144,4 @@
141 </view> 144 </view>
142 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> 145 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
143 <discount id="discount" checkout="{{checkout}}" bindevent="discountEvent"></discount> 146 <discount id="discount" checkout="{{checkout}}" bindevent="discountEvent"></discount>
144 -<xfCard id="xfCard" checkout="{{checkout}}"></xfCard>  
  147 +<xfCard id="xfCard" checkout="{{checkout}}"></xfCard>
@@ -127,7 +127,7 @@ Page({ @@ -127,7 +127,7 @@ Page({
127 firstShowMsg:firstShowMsg, 127 firstShowMsg:firstShowMsg,
128 }) 128 })
129 } 129 }
130 - this.GetBalance()//余额 130 + //this.GetBalance()//余额
131 this.GetCheckout()//账单 131 this.GetCheckout()//账单
132 }) 132 })
133 }, 133 },
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 "as":"/components/actionSheet/index", 14 "as":"/components/actionSheet/index",
15 "subscribe": "/components/userinfo/subscribe", 15 "subscribe": "/components/userinfo/subscribe",
16 "activity-enter":"/components/activity/enter", 16 "activity-enter":"/components/activity/enter",
17 - "showModal":"/components/tips/showModal/showModal" 17 + "showModal":"/components/tips/showModal/showModal",
  18 + "seller-discount":"/components/reserve/seller/discount"
18 } 19 }
19 } 20 }
@@ -50,7 +50,10 @@ @@ -50,7 +50,10 @@
50 class="share-but-view"> 50 class="share-but-view">
51 <view class="share-but Regular"> 51 <view class="share-but Regular">
52 提前买单 52 提前买单
53 - <view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> 53 + <view class="money-tips">
  54 + <seller-discount id="seller-discount" seller="{{detail.seller}}" wx:if="{{detail.seller}}"
  55 + cla="detail_owner"></seller-discount>
  56 + </view>
54 </view> 57 </view>
55 </userinfo> 58 </userinfo>
56 </view> 59 </view>
@@ -120,7 +123,10 @@ @@ -120,7 +123,10 @@
120 <view class="checkout-icon checkout-icon-{{checkout.status}}" wx:if="{{checkout}}"></view> 123 <view class="checkout-icon checkout-icon-{{checkout.status}}" wx:if="{{checkout}}"></view>
121 提前买单 124 提前买单
122 </view> 125 </view>
123 - <view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> 126 + <view class="money-tips">
  127 + <seller-discount id="seller-discount" seller="{{detail.seller}}" wx:if="{{detail.seller}}"
  128 + cla="detail_owner"></seller-discount>
  129 + </view>
124 </view> 130 </view>
125 </userinfo> 131 </userinfo>
126 </view> 132 </view>
@@ -231,4 +237,4 @@ @@ -231,4 +237,4 @@
231 <as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as> 237 <as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as>
232 <getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos> 238 <getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos>
233 <activity-enter floclass="detail_owner"></activity-enter> 239 <activity-enter floclass="detail_owner"></activity-enter>
234 -<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>  
  240 +<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>