Commit 854b848573c36a91f234a73d6f6f48c8217060e6

Authored by 刘淇
1 parent 7bb1c2f0

免费停车

No preview for this file type
src/components/parkRecord.vue
... ... @@ -34,10 +34,12 @@
34 34 <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p>
35 35 <div class="out-wrap">
36 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 43 </div>
42 44 </div>
43 45 </div>
... ... @@ -279,6 +281,7 @@ export default {
279 281 }
280 282 },
281 283 toPayCurrent(i, num) { // 缴纳本次在停费用
  284 + console.log(i)
282 285 var salt = this.$utils.myCommonSalt(32);
283 286 var params = {
284 287 app_id: this.$utils.myVarAppid,
... ... @@ -292,8 +295,9 @@ export default {
292 295 params.sign = this.$utils.signObject(params)
293 296 appApplyParkOut(params).then(response => {
294 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 301 var salt = this.$utils.myCommonSalt(32);
298 302 var jsondata = {
299 303 app_id: this.$utils.myVarAppid,
... ... @@ -332,8 +336,8 @@ export default {
332 336 })
333 337  
334 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
... ... @@ -15,6 +15,7 @@ export default {
15 15  
16 16  
17 17 dateFormat: function (msd) { // 时间转换
  18 + console.log(msd)
18 19 var time = msd
19 20  
20 21 if (null != time && "" != time) {
... ...