Showing
8 changed files
with
103 additions
and
7 deletions
| @@ -7,6 +7,7 @@ const properties={ | @@ -7,6 +7,7 @@ const properties={ | ||
| 7 | confirmColor:{type:String,value:'#fff'}, | 7 | confirmColor:{type:String,value:'#fff'}, |
| 8 | header:{type:String,value:'确认信息'}, | 8 | header:{type:String,value:'确认信息'}, |
| 9 | body:{type:String,value:'确认信息'}, | 9 | body:{type:String,value:'确认信息'}, |
| 10 | + cla:String, | ||
| 10 | }; | 11 | }; |
| 11 | Component({ | 12 | Component({ |
| 12 | options: { | 13 | options: { |
| 1 | <!--components/showModal/showModal.wxml--> | 1 | <!--components/showModal/showModal.wxml--> |
| 2 | -<view class="mask flex-vc" hidden="{{!hasShow}}"> | 2 | +<view class="mask flex-vc {{cla}}" hidden="{{!hasShow}}"> |
| 3 | <view class="showModal"> | 3 | <view class="showModal"> |
| 4 | <view class="header"> | 4 | <view class="header"> |
| 5 | {{opt.header}} | 5 | {{opt.header}} |
| @@ -57,4 +57,22 @@ | @@ -57,4 +57,22 @@ | ||
| 57 | .footer .button-none.confirm{ | 57 | .footer .button-none.confirm{ |
| 58 | } | 58 | } |
| 59 | .footer .button-none.cancel{ | 59 | .footer .button-none.cancel{ |
| 60 | +} | ||
| 61 | +.checkout .body{ | ||
| 62 | + font-size:32rpx; | ||
| 63 | + font-weight:500; | ||
| 64 | + color:rgba(53,53,53,1); | ||
| 65 | + line-height:44rpx; | ||
| 66 | + margin-top: 32rpx; | ||
| 67 | +} | ||
| 68 | +.checkout .confirm{ | ||
| 69 | + width:320rpx; | ||
| 70 | + height:80rpx; | ||
| 71 | + background:rgba(36,35,32,1); | ||
| 72 | + border-radius:10rpx; | ||
| 73 | + font-size:32rpx; | ||
| 74 | + font-family:PingFangSC-Semibold,PingFang SC; | ||
| 75 | + font-weight:600; | ||
| 76 | + color:rgba(255,255,255,1); | ||
| 77 | + line-height:80rpx; | ||
| 60 | } | 78 | } |
| @@ -125,6 +125,8 @@ Page({ | @@ -125,6 +125,8 @@ Page({ | ||
| 125 | this.setData({ | 125 | this.setData({ |
| 126 | firstShowMsg:firstShowMsg, | 126 | firstShowMsg:firstShowMsg, |
| 127 | }) | 127 | }) |
| 128 | + this.GetBalance()//余额 | ||
| 129 | + this.GetCheckout()//账单 | ||
| 128 | } | 130 | } |
| 129 | }) | 131 | }) |
| 130 | }, | 132 | }, |
| @@ -298,5 +300,31 @@ Page({ | @@ -298,5 +300,31 @@ Page({ | ||
| 298 | wx.setStorageSync('order', 'complete') | 300 | wx.setStorageSync('order', 'complete') |
| 299 | } | 301 | } |
| 300 | console.log(pages) | 302 | console.log(pages) |
| 301 | - } | 303 | + }, |
| 304 | + GetBalance(){//获得余额 | ||
| 305 | + App.User.GetBalance().then(res=>{ | ||
| 306 | + this.setData({ | ||
| 307 | + user:res.data | ||
| 308 | + }) | ||
| 309 | + }) | ||
| 310 | + }, | ||
| 311 | + GetCheckout(){ | ||
| 312 | + App.Customer.GetOrderInfo({rid:this.options.id}).then(res=>{ | ||
| 313 | + this.setData({ | ||
| 314 | + checkout:res.data | ||
| 315 | + }) | ||
| 316 | + }) | ||
| 317 | + }, | ||
| 318 | + checkout(){ | ||
| 319 | + if(this.data.detail.status==0){ | ||
| 320 | + this.selectComponent('#showModal').options({ | ||
| 321 | + header: '未到就餐时间', | ||
| 322 | + body: '到店就餐时,可提前买单' | ||
| 323 | + }).show(); | ||
| 324 | + }else{ | ||
| 325 | + wx.navigateTo({ | ||
| 326 | + url:'/pack-checkout/pages/index?rid='+this.data.detail.id | ||
| 327 | + }) | ||
| 328 | + } | ||
| 329 | + }, | ||
| 302 | }) | 330 | }) |
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | "getpos":"/components/userinfo/getpos", | 13 | "getpos":"/components/userinfo/getpos", |
| 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 | } | 18 | } |
| 18 | } | 19 | } |
| @@ -42,6 +42,18 @@ | @@ -42,6 +42,18 @@ | ||
| 42 | <subscribe class="flex-lr share-view subscribe" ids="{{[0]}}"> | 42 | <subscribe class="flex-lr share-view subscribe" ids="{{[0]}}"> |
| 43 | <view class="share-but">提醒我包间预订结果</view> | 43 | <view class="share-but">提醒我包间预订结果</view> |
| 44 | </subscribe> | 44 | </subscribe> |
| 45 | + <view class="flex-lr share-view-cookbook"> | ||
| 46 | + <userinfo | ||
| 47 | + binduserinfo="checkout" | ||
| 48 | + share="{{detail}}" | ||
| 49 | + share-act="invitation" | ||
| 50 | + class="share-but-view"> | ||
| 51 | + <view class="share-but Regular"> | ||
| 52 | + 提前买单 | ||
| 53 | + <view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> | ||
| 54 | + </view> | ||
| 55 | + </userinfo> | ||
| 56 | + </view> | ||
| 45 | </block> | 57 | </block> |
| 46 | <block wx:elif="{{detail.status==6}}"> | 58 | <block wx:elif="{{detail.status==6}}"> |
| 47 | <view class="icon"> | 59 | <view class="icon"> |
| @@ -97,6 +109,19 @@ | @@ -97,6 +109,19 @@ | ||
| 97 | </view> | 109 | </view> |
| 98 | <view class="share-but Regular" wx:else="">提前点餐</view> | 110 | <view class="share-but Regular" wx:else="">提前点餐</view> |
| 99 | </userinfo> | 111 | </userinfo> |
| 112 | + <userinfo | ||
| 113 | + binduserinfo="checkout" | ||
| 114 | + share="{{detail}}" | ||
| 115 | + share-act="invitation" | ||
| 116 | + class="share-but-view"> | ||
| 117 | + <view class="share-but Regular"> | ||
| 118 | + <view class="flex-cc"> | ||
| 119 | + <view class="checkout-icon checkout-icon-{{checkout.status}}" wx:if="{{checkout}}"></view> | ||
| 120 | + 提前买单 | ||
| 121 | + </view> | ||
| 122 | + <view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> | ||
| 123 | + </view> | ||
| 124 | + </userinfo> | ||
| 100 | </view> | 125 | </view> |
| 101 | </block> | 126 | </block> |
| 102 | <view style="height: 40rpx;"></view> | 127 | <view style="height: 40rpx;"></view> |
| @@ -175,4 +200,5 @@ | @@ -175,4 +200,5 @@ | ||
| 175 | <manager manager="{{detail}}" id="manager"></manager> | 200 | <manager manager="{{detail}}" id="manager"></manager> |
| 176 | <as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as> | 201 | <as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as> |
| 177 | <getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos> | 202 | <getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos> |
| 178 | -<activity-enter floclass="detail_owner"></activity-enter> | ||
| 203 | +<activity-enter floclass="detail_owner"></activity-enter> | ||
| 204 | +<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> |
| @@ -45,9 +45,6 @@ | @@ -45,9 +45,6 @@ | ||
| 45 | width: 100%; | 45 | width: 100%; |
| 46 | background-color: #262628; | 46 | background-color: #262628; |
| 47 | } | 47 | } |
| 48 | -.share-view-cookbook:last-child{ | ||
| 49 | - border-width: 0; | ||
| 50 | -} | ||
| 51 | .share-view-cookbook{ | 48 | .share-view-cookbook{ |
| 52 | margin-top: 0rpx; | 49 | margin-top: 0rpx; |
| 53 | margin-bottom: 20rpx; | 50 | margin-bottom: 20rpx; |
| @@ -61,6 +58,7 @@ | @@ -61,6 +58,7 @@ | ||
| 61 | .share-but{ | 58 | .share-but{ |
| 62 | width: 100%; | 59 | width: 100%; |
| 63 | text-align: center; | 60 | text-align: center; |
| 61 | + position: relative; | ||
| 64 | } | 62 | } |
| 65 | 63 | ||
| 66 | .seller{ | 64 | .seller{ |
| @@ -160,4 +158,26 @@ | @@ -160,4 +158,26 @@ | ||
| 160 | } | 158 | } |
| 161 | .share-view.subscribe{ | 159 | .share-view.subscribe{ |
| 162 | margin-top: 24rpx; | 160 | margin-top: 24rpx; |
| 161 | +} | ||
| 162 | +.money-tips{ | ||
| 163 | + width:184rpx; | ||
| 164 | + height:34rpx; | ||
| 165 | + background:rgba(240,85,34,1); | ||
| 166 | + border-radius:16rpx 16rpx 16rpx 0rpx; | ||
| 167 | + | ||
| 168 | + font-size:20rpx; | ||
| 169 | + font-weight:500; | ||
| 170 | + color:rgba(255,255,255,1); | ||
| 171 | + line-height:34rpx; | ||
| 172 | + | ||
| 173 | + position: absolute; | ||
| 174 | + top:-28rpx; | ||
| 175 | + right:-16rpx; | ||
| 176 | +} | ||
| 177 | +.checkout-icon{ | ||
| 178 | + width: 32rpx; | ||
| 179 | + height: 32rpx; | ||
| 180 | + margin-right: 20rpx; | ||
| 181 | + background-color: #1AAD19; | ||
| 182 | + background-size: 100% 100%; | ||
| 163 | } | 183 | } |
-
Please register or login to post a comment