Showing
3 changed files
with
28 additions
and
10 deletions
| @@ -96,6 +96,8 @@ Page({ | @@ -96,6 +96,8 @@ Page({ | ||
| 96 | if(this.detail.order_info.status>1){ | 96 | if(this.detail.order_info.status>1){ |
| 97 | title='买单申请详情' | 97 | title='买单申请详情' |
| 98 | } | 98 | } |
| 99 | + //debug | ||
| 100 | + this.detail.order_info.status=1 | ||
| 99 | this.setData({ | 101 | this.setData({ |
| 100 | detail: this.detail, | 102 | detail: this.detail, |
| 101 | title:title, | 103 | title:title, |
| @@ -154,9 +156,20 @@ Page({ | @@ -154,9 +156,20 @@ Page({ | ||
| 154 | }, | 156 | }, |
| 155 | qnevent(e){ | 157 | qnevent(e){ |
| 156 | console.log('qnevent',e.detail); | 158 | console.log('qnevent',e.detail); |
| 159 | + let files=e.detail.data | ||
| 160 | + if(e.detail.act=='uploadFail'){ | ||
| 161 | + files[e.detail.fileCurrent].progress=Math.random() | ||
| 162 | + } | ||
| 163 | + files.forEach(f=>{ | ||
| 164 | + if(f.progress==100){ | ||
| 165 | + if(!f.remote || !f.remote.url){ | ||
| 166 | + f.progress=90+Math.random()*9 | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + }) | ||
| 157 | this.setData({ | 170 | this.setData({ |
| 158 | - files:e.detail.data, | ||
| 159 | - hasAddFile:e.detail.data.length<this.data.upConf.count | 171 | + files:files, |
| 172 | + hasAddFile:files.length<this.data.upConf.count | ||
| 160 | }) | 173 | }) |
| 161 | }, | 174 | }, |
| 162 | displayImage(e){ | 175 | displayImage(e){ |
| @@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
| 106 | <view class="item-label">应收金额</view> | 106 | <view class="item-label">应收金额</view> |
| 107 | <view class="item-value flex-rr" style="position: relative"> | 107 | <view class="item-value flex-rr" style="position: relative"> |
| 108 | 108 | ||
| 109 | - <input class="item-value-input" | 109 | + <input class="item-value-input" style="width: 300rpx;" |
| 110 | bindinput="setPrice" type="digit" maxlength="8" | 110 | bindinput="setPrice" type="digit" maxlength="8" |
| 111 | placeholder-style="font-size:32rpx" placeholder="点击填写金额"/> | 111 | placeholder-style="font-size:32rpx" placeholder="点击填写金额"/> |
| 112 | <view wx:if="{{price}}" | 112 | <view wx:if="{{price}}" |
| @@ -127,8 +127,8 @@ | @@ -127,8 +127,8 @@ | ||
| 127 | file="{{item}}" files="{{files}}" | 127 | file="{{item}}" files="{{files}}" |
| 128 | bindevent="qnevent" class="qnupload"> | 128 | bindevent="qnevent" class="qnupload"> |
| 129 | <view class="upload flex-vc uploaded" | 129 | <view class="upload flex-vc uploaded" |
| 130 | - catchtap="displayImage" data-path="{{item.path}}" | ||
| 131 | - style="background-image: url('{{item.path}}')"> | 130 | + catchtap="displayImage" data-path="{{item.path}}"> |
| 131 | + <image class="image" src="{{item.path}}"></image> | ||
| 132 | <view class="bg-add bg-img" style="background-image: none"></view> | 132 | <view class="bg-add bg-img" style="background-image: none"></view> |
| 133 | <view class="upload-txt"></view> | 133 | <view class="upload-txt"></view> |
| 134 | <view class="image-delete flex-vc" catchtap="deleteImage" data-index="{{index}}"> | 134 | <view class="image-delete flex-vc" catchtap="deleteImage" data-index="{{index}}"> |
| @@ -3,16 +3,21 @@ | @@ -3,16 +3,21 @@ | ||
| 3 | width: 180rpx; | 3 | width: 180rpx; |
| 4 | height: 180rpx; | 4 | height: 180rpx; |
| 5 | margin-right: 30rpx; | 5 | margin-right: 30rpx; |
| 6 | + margin-bottom: 30rpx; | ||
| 6 | } | 7 | } |
| 7 | .upload{ | 8 | .upload{ |
| 8 | border: 2px #E0E0E0 dashed ; | 9 | border: 2px #E0E0E0 dashed ; |
| 9 | box-sizing: border-box; | 10 | box-sizing: border-box; |
| 10 | position: relative; | 11 | position: relative; |
| 11 | - width: 100%; | ||
| 12 | - height: 100%; | ||
| 13 | - background-size: cover; | ||
| 14 | - background-repeat: no-repeat; | ||
| 15 | - background-position: 50% 50%; | 12 | + width: 180rpx; |
| 13 | + height: 180rpx; | ||
| 14 | +} | ||
| 15 | +.upload .image{ | ||
| 16 | + width: 180rpx; | ||
| 17 | + height: 180rpx; | ||
| 18 | + position: absolute; | ||
| 19 | + top:0; | ||
| 20 | + left: 0; | ||
| 16 | } | 21 | } |
| 17 | .uploaded{ | 22 | .uploaded{ |
| 18 | border-width: 0; | 23 | border-width: 0; |
-
Please register or login to post a comment