Showing
9 changed files
with
149 additions
and
7 deletions
| @@ -155,7 +155,7 @@ | @@ -155,7 +155,7 @@ | ||
| 155 | "provider": "wx56c8f077de74b07c" | 155 | "provider": "wx56c8f077de74b07c" |
| 156 | }, | 156 | }, |
| 157 | "vktool": { | 157 | "vktool": { |
| 158 | - "version": "2.1.8", | 158 | + "version": "2.1.9", |
| 159 | "provider": "wxd3dc4206c76f14fc" | 159 | "provider": "wxd3dc4206c76f14fc" |
| 160 | } | 160 | } |
| 161 | }, | 161 | }, |
| 1 | +// pack-book/components/checkout/confirm-price.js | ||
| 2 | +import util from '../../../utils/util' | ||
| 3 | +import App from '../../../utils/api' | ||
| 4 | +Component({ | ||
| 5 | + /** | ||
| 6 | + * 组件的属性列表 | ||
| 7 | + */ | ||
| 8 | + properties: { | ||
| 9 | + | ||
| 10 | + }, | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 组件的初始数据 | ||
| 14 | + */ | ||
| 15 | + data: { | ||
| 16 | + hidden:true, | ||
| 17 | + }, | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 组件的方法列表 | ||
| 21 | + */ | ||
| 22 | + methods: { | ||
| 23 | + show(rid,files){ | ||
| 24 | + if(this.data.price<=0){ | ||
| 25 | + return util.toast('请设置金额','none') | ||
| 26 | + } | ||
| 27 | + let bill_list=[] | ||
| 28 | + if(files.length>0){ | ||
| 29 | + let hasNok=false | ||
| 30 | + files.some(f=>{ | ||
| 31 | + if(f.pro==100){ | ||
| 32 | + hasNok=true | ||
| 33 | + bill_list.push(f.remote.url) | ||
| 34 | + } | ||
| 35 | + }) | ||
| 36 | + if(hasNok){ | ||
| 37 | + return util.toast('请等待图片上传完成','none') | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + this.rid=rid | ||
| 41 | + this.bill_list=bill_list | ||
| 42 | + }, | ||
| 43 | + hide(){ | ||
| 44 | + this.setData({ | ||
| 45 | + hidden:false, | ||
| 46 | + }) | ||
| 47 | + }, | ||
| 48 | + submit(){ | ||
| 49 | + this.hide() | ||
| 50 | + }, | ||
| 51 | + } | ||
| 52 | +}) |
| 1 | +<!--pack-book/components/checkout/confirm-price.wxml--> | ||
| 2 | +<view class="mask flex-vc" wx:if="{{!hidden}}"> | ||
| 3 | + <view class="confirm-price"> | ||
| 4 | + <view class="title flex-rr" bindtap="hide"> | ||
| 5 | + <view class="bg-img bg-c1"></view> | ||
| 6 | + </view> | ||
| 7 | + <view class="center flex-vc"> | ||
| 8 | + <view class="tips">应收金额</view> | ||
| 9 | + <view class="price">¥ {{price}}</view> | ||
| 10 | + <view class="submit" bindtap="submit">确认发送</view> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | +</view> |
| 1 | +/* pack-book/components/checkout/confirm-price.wxss */ | ||
| 2 | +@import "/app.wxss"; | ||
| 3 | +.bg-img{ | ||
| 4 | + background-image: url("http://nosqn.colorcun.com/checkout/images/css_sprites.png"); | ||
| 5 | + zoom: 33.5%; | ||
| 6 | +} | ||
| 7 | +.bg-c1 { | ||
| 8 | + width: 36px; height: 36px; | ||
| 9 | + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -209px -111px; | ||
| 10 | +} | ||
| 11 | +.confirm-price{ | ||
| 12 | + width: calc(100% - 144rpx); | ||
| 13 | + height:426rpx; | ||
| 14 | + background:rgba(255,255,255,1); | ||
| 15 | + border-radius:10rpx; | ||
| 16 | +} | ||
| 17 | +.title{ | ||
| 18 | + height: 92rpx; | ||
| 19 | + line-height: 92rpx; | ||
| 20 | + padding: 0 36rpx; | ||
| 21 | +} | ||
| 22 | +.tips{ | ||
| 23 | + height:42rpx; | ||
| 24 | + font-size:30rpx; | ||
| 25 | + font-family:PingFangSC-Medium,PingFang SC; | ||
| 26 | + font-weight:500; | ||
| 27 | + color:rgba(112,112,112,1); | ||
| 28 | + line-height:42rpx; | ||
| 29 | +} | ||
| 30 | +.price{ | ||
| 31 | + height:92rpx; | ||
| 32 | + font-size:66rpx; | ||
| 33 | + font-family:PingFangSC-Medium,PingFang SC; | ||
| 34 | + font-weight:500; | ||
| 35 | + color:rgba(53,53,53,1); | ||
| 36 | + line-height:92rpx; | ||
| 37 | + margin-top: 16rpx; | ||
| 38 | +} | ||
| 39 | +.submit{ | ||
| 40 | + width:334rpx; | ||
| 41 | + height:84rpx; | ||
| 42 | + background:rgba(25,144,149,1); | ||
| 43 | + border-radius:10rpx; | ||
| 44 | + font-size:34rpx; | ||
| 45 | + font-family:PingFangSC-Medium,PingFang SC; | ||
| 46 | + font-weight:500; | ||
| 47 | + color:rgba(254,254,254,1); | ||
| 48 | + line-height:84rpx; | ||
| 49 | + text-align: center; | ||
| 50 | + margin-top: 40rpx; | ||
| 51 | +} |
| @@ -4,7 +4,8 @@ | @@ -4,7 +4,8 @@ | ||
| 4 | "navigationBarTextStyle":"white", | 4 | "navigationBarTextStyle":"white", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "nav":"/components/nav/nav", | 6 | "nav":"/components/nav/nav", |
| 7 | - "qnupload": "plugin://vktool/qnupload" | 7 | + "qnupload": "plugin://vktool/qnupload", |
| 8 | + "confirm-price":"../../components/checkout/confirm-price" | ||
| 8 | } | 9 | } |
| 9 | 10 | ||
| 10 | } | 11 | } |
| @@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
| 90 | <view>消费清单(选填)</view> | 90 | <view>消费清单(选填)</view> |
| 91 | </view> | 91 | </view> |
| 92 | <view class="center"> | 92 | <view class="center"> |
| 93 | - <block wx:for="{{files}}" wx:key="files.key"> | 93 | + <block wx:for="{{files}}" wx:key="fileskey"> |
| 94 | <qnupload qnConf="{{qnConf}}" upConf="{{upConf}}" | 94 | <qnupload qnConf="{{qnConf}}" upConf="{{upConf}}" |
| 95 | file="{{item}}" files="{{files}}" | 95 | file="{{item}}" files="{{files}}" |
| 96 | bindevent="qnevent" class="qnupload"> | 96 | bindevent="qnevent" class="qnupload"> |
| @@ -141,3 +141,5 @@ | @@ -141,3 +141,5 @@ | ||
| 141 | </view> | 141 | </view> |
| 142 | </block> | 142 | </block> |
| 143 | </view> | 143 | </view> |
| 144 | +<view class="submit {{price?'active':''}}">发送给顾客</view> | ||
| 145 | +<confirm-price id="confirm-price" price="{{price}}" rid="{{rid}}" files="{{files}}"></confirm-price> |
| @@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
| 2 | page{ | 2 | page{ |
| 3 | background:rgba(245,245,245,1); | 3 | background:rgba(245,245,245,1); |
| 4 | } | 4 | } |
| 5 | +.pages{ | ||
| 6 | + padding-bottom: 150rpx; | ||
| 7 | +} | ||
| 5 | .bg-img{ | 8 | .bg-img{ |
| 6 | background-image: url("http://nosqn.colorcun.com/checkout/images/css_sprites.png"); | 9 | background-image: url("http://nosqn.colorcun.com/checkout/images/css_sprites.png"); |
| 7 | zoom: 33.5%; | 10 | zoom: 33.5%; |
| @@ -10,10 +13,6 @@ page{ | @@ -10,10 +13,6 @@ page{ | ||
| 10 | width: 48px; height: 48px; | 13 | width: 48px; height: 48px; |
| 11 | background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -141px -111px; | 14 | background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -141px -111px; |
| 12 | } | 15 | } |
| 13 | -.bg-c1 { | ||
| 14 | - width: 36px; height: 36px; | ||
| 15 | - background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -209px -111px; | ||
| 16 | -} | ||
| 17 | .bg-x2 { | 16 | .bg-x2 { |
| 18 | width: 42px; height: 24px; | 17 | width: 42px; height: 24px; |
| 19 | background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -265px -111px; | 18 | background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -265px -111px; |
| @@ -161,4 +160,21 @@ page{ | @@ -161,4 +160,21 @@ page{ | ||
| 161 | .orderimage .center{ | 160 | .orderimage .center{ |
| 162 | padding: 40rpx 0 36rpx 56rpx; | 161 | padding: 40rpx 0 36rpx 56rpx; |
| 163 | } | 162 | } |
| 163 | +.submit{ | ||
| 164 | + width:calc(100% - 72rpx); | ||
| 165 | + height:84rpx; | ||
| 166 | + background:rgba(116,187,190,1); | ||
| 167 | + border-radius:10rpx; | ||
| 168 | + position: fixed; | ||
| 169 | + left: 36rpx; | ||
| 170 | + bottom: 40rpx; | ||
| 171 | + font-size:34rpx; | ||
| 172 | + font-weight:500; | ||
| 173 | + color:rgba(254,254,254,1); | ||
| 174 | + line-height:84rpx; | ||
| 175 | + text-align: center; | ||
| 176 | +} | ||
| 177 | +.submit.active{ | ||
| 178 | + background:rgba(25,144,149,1); | ||
| 179 | +} | ||
| 164 | @import "upload.wxss"; | 180 | @import "upload.wxss"; |
-
Please register or login to post a comment