Commit 854b848573c36a91f234a73d6f6f48c8217060e6
1 parent
7bb1c2f0
免费停车
Showing
3 changed files
with
13 additions
and
8 deletions
dist.zip
No preview for this file type
src/components/parkRecord.vue
@@ -34,10 +34,12 @@ | @@ -34,10 +34,12 @@ | ||
34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> | 34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
35 | <div class="out-wrap"> | 35 | <div class="out-wrap"> |
36 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> | 36 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> |
37 | - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-if="parkingData[0].parkDuration<=900">申请离场</p> | ||
38 | - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else-if="parkingData[0].parkDuration<=1800&parkingData[0].carType==7">申请离场</p> | ||
39 | - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else-if="parkingData[0].parkDuration<=1800&parkingData[0].carType==8">申请离场</p> | ||
40 | - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>出场缴费</p> | 37 | + <!--<p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-if="parkingData[0].parkDuration<=900">申请离场</p>--> |
38 | + <!--<p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else-if="parkingData[0].parkDuration<=1800&parkingData[0].carType==7">申请离场</p>--> | ||
39 | + <!--<p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else-if="parkingData[0].parkDuration<=1800&parkingData[0].carType==8">申请离场</p>--> | ||
40 | + <!--<p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>结束停车</p>--> | ||
41 | + | ||
42 | + <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)">{{i.parkDuration>i.orderFreeDuration?"结束停车":"申请离场"}}</p> | ||
41 | </div> | 43 | </div> |
42 | </div> | 44 | </div> |
43 | </div> | 45 | </div> |
@@ -279,6 +281,7 @@ export default { | @@ -279,6 +281,7 @@ export default { | ||
279 | } | 281 | } |
280 | }, | 282 | }, |
281 | toPayCurrent(i, num) { // 缴纳本次在停费用 | 283 | toPayCurrent(i, num) { // 缴纳本次在停费用 |
284 | + console.log(i) | ||
282 | var salt = this.$utils.myCommonSalt(32); | 285 | var salt = this.$utils.myCommonSalt(32); |
283 | var params = { | 286 | var params = { |
284 | app_id: this.$utils.myVarAppid, | 287 | app_id: this.$utils.myVarAppid, |
@@ -292,8 +295,9 @@ export default { | @@ -292,8 +295,9 @@ export default { | ||
292 | params.sign = this.$utils.signObject(params) | 295 | params.sign = this.$utils.signObject(params) |
293 | appApplyParkOut(params).then(response => { | 296 | appApplyParkOut(params).then(response => { |
294 | console.log(response) | 297 | console.log(response) |
295 | - | ||
296 | - if (response.code == '5005') { | 298 | + if(response.code == '5000'){ |
299 | + this.$msgbox('提示', '您已成功申请离场!') | ||
300 | + }else if (response.code == '5005') { | ||
297 | var salt = this.$utils.myCommonSalt(32); | 301 | var salt = this.$utils.myCommonSalt(32); |
298 | var jsondata = { | 302 | var jsondata = { |
299 | app_id: this.$utils.myVarAppid, | 303 | app_id: this.$utils.myVarAppid, |
@@ -332,8 +336,8 @@ export default { | @@ -332,8 +336,8 @@ export default { | ||
332 | }) | 336 | }) |
333 | 337 | ||
334 | } else { | 338 | } else { |
335 | - //$('.dialog-out').show() | ||
336 | - this.$msgbox('提示', '您已成功申请离场!') | 339 | + this.$router.go(0); |
340 | + this.$msgbox('提示', '您申请离场失败!') | ||
337 | } | 341 | } |
338 | 342 | ||
339 | }) | 343 | }) |
src/utils/utils.js