| @@ -1,7 +1,6 @@ | |||
| { | |||
| "pages": [ | |||
| "pages/index/index", | |||
| "pages/passCar/choiceCar/choiceCar", | |||
| "pages/bannerdetail/index", | |||
| "pages/getuserinfo/index", | |||
| "pages/phoneinput/phoneinput", | |||
| @@ -22,7 +21,8 @@ | |||
| "pages/getphoneInfo/index", | |||
| "pages/addPark/addPark", | |||
| "pages/orderquanma/index", | |||
| "pages/passCar/couponList/couponList" | |||
| "pages/passCar/couponList/couponList", | |||
| "pages/passCar/couponDetail/couponDetail" | |||
| ], | |||
| "tabBar": { | |||
| "color": "#9F9F9F", | |||
| @@ -1,273 +0,0 @@ | |||
| // pages/passCar/passCar.js | |||
| let config = require('../../../config/config.js') | |||
| let Http = require('../../../utils/HttpBasics') | |||
| const app = getApp(); | |||
| Page({ | |||
| data: { | |||
| park: null, | |||
| carList: [], | |||
| addCar: null, | |||
| tcq: 2 | |||
| }, | |||
| // ready() { | |||
| // app.couponChannelListCallback = token => { | |||
| // Http.setToken(token); | |||
| // Http.get({ | |||
| // url: config.api.couponChannelList, | |||
| // data: { | |||
| // pageNum: 1, | |||
| // pageSize: 2, | |||
| // targetAd: 2 | |||
| // } | |||
| // }).then(res => { | |||
| // console.log(res); | |||
| // this.setData({ | |||
| // list: res.data.list | |||
| // }); | |||
| // }); | |||
| // }; | |||
| // }, | |||
| /*车牌动态样式 */ | |||
| changeStyle: function () { | |||
| var height = this.data.dataHeight == '150rpx' ? '80rpx' : '150rpx'; | |||
| var lineHeight = this.data.dataHeight == '150rpx' ? '80rpx' : '150rpx'; | |||
| var fontWeight = this.data.fontWeight == '600' ? '500' : '600'; | |||
| this.setData({ | |||
| dataHeight: height, | |||
| dataLineHeight: lineHeight, | |||
| dataFontWeight: fontWeight | |||
| }); | |||
| }, | |||
| onLoad: function (options) { | |||
| var that = this | |||
| that.init(); | |||
| }, | |||
| onShow: function (options) { | |||
| var that = this | |||
| if (options) | |||
| console.log(options) | |||
| if (that.data.addCar) { | |||
| console.log(JSON.stringify(that.data.addCar)) | |||
| // 绑车牌 | |||
| if (app.globalData.carLogin) { | |||
| that.bindCar(that.data.addCar) | |||
| } else { | |||
| that.bindCar(that.data.addCar) | |||
| } | |||
| that.setData({ | |||
| addCar: null | |||
| }) | |||
| } | |||
| }, | |||
| //我的停车券的显示与消失 | |||
| showquan: function () { | |||
| let that = this; | |||
| if (that.data.tcq == 1) { | |||
| that.setData({ | |||
| tcq: 2 | |||
| }) | |||
| } | |||
| else if (that.data.tcq == 2) { | |||
| that.setData({ | |||
| tcq: 1 | |||
| }) | |||
| } | |||
| }, | |||
| jumpToAdd: function () { | |||
| wx.navigateTo({ | |||
| url: '/pages/addPark/addPark', | |||
| }); | |||
| }, | |||
| jumpToPay: function () { | |||
| console.log("停车支付去") | |||
| //wx.redirectTo({ | |||
| // url: '/pages/pay/pay', | |||
| //}) | |||
| }, | |||
| passb: function () { | |||
| wx.showToast({ | |||
| title: '货物在路上~', | |||
| }) | |||
| }, | |||
| passc: function () { | |||
| wx.showToast({ | |||
| title: '宝宝最可爱~', | |||
| }) | |||
| }, | |||
| orderPay: function () { | |||
| wx.redirectTo({ | |||
| url: '/pages/pay/pay' | |||
| }); | |||
| }, | |||
| bindCar: function (carNum) { | |||
| var that = this | |||
| // ETCP | |||
| var etcpData = { | |||
| etcpToken: app.globalData.etcpToken, | |||
| carNumber: carNum, | |||
| } | |||
| // 停简单 | |||
| var tjdData = { | |||
| carNumber: carNum, | |||
| } | |||
| var postData = (app.globalData.parkVendor == 1) ? etcpData : tjdData | |||
| Http.post({ | |||
| url: config.api.bindCar, | |||
| data: postData, | |||
| }) | |||
| .then(res => { | |||
| console.log(res) | |||
| that.setData({ | |||
| addCar: null | |||
| }) | |||
| that.initUsrCarList() | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: "绑车牌成功!", | |||
| success: function () { } | |||
| }) | |||
| }) | |||
| .catch(error => { | |||
| console.log(error) | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: error.data.message, | |||
| success: function () { } | |||
| }) | |||
| }) | |||
| }, | |||
| unbindCar: function (carNum) { | |||
| var that = this | |||
| var postData = | |||
| (app.globalData.parkVendor == 1) ? { | |||
| etcpToken: app.globalData.etcpToken, | |||
| carNumber: carNum, | |||
| } : { | |||
| carNumber: carNum, | |||
| } | |||
| Http.post({ | |||
| url: config.api.unbindCar, | |||
| data: postData, | |||
| }) | |||
| .then(res => { | |||
| console.log(res) | |||
| that.initUsrCarList() | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: "解绑车牌成功!", | |||
| success: function () { } | |||
| }) | |||
| }) | |||
| .catch(error => { | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: "解绑车牌失败!", | |||
| success: function () { } | |||
| }) | |||
| }) | |||
| }, | |||
| unbindCarBtn: function (e) { | |||
| console.log(e) | |||
| var that = this | |||
| var carNum = e.currentTarget.dataset.car | |||
| that.unbindCar(carNum) | |||
| }, | |||
| getStopFeeItem: function (carItem, i) { | |||
| var that = this | |||
| var postData = | |||
| (app.globalData.parkVendor == 1) ? { | |||
| etcpToken: app.globalData.etcpToken, | |||
| carNumber: carItem.carNumber, | |||
| } : { | |||
| carNumber: carItem.carNumber, | |||
| outCarId: carItem.outCarId, | |||
| } | |||
| var stopFee = 'carList[' + i + '].stopFee' | |||
| var extraData = 'carList[' + i + '].extraData' | |||
| var extraDataStr = { params: { CarNumber: carItem.carNumber } } | |||
| console.log(postData) | |||
| Http.post({ | |||
| url: config.api.getCarStopFee, | |||
| data: postData | |||
| }) | |||
| .then(res => { | |||
| console.log(res) | |||
| console.log(stopFee) | |||
| that.setData({ | |||
| [stopFee]: res.data, | |||
| [extraData]: extraDataStr | |||
| }) | |||
| }) | |||
| .catch(error => { | |||
| console.log(error) | |||
| }) | |||
| }, | |||
| getStopFee: function () { | |||
| var that = this | |||
| // carLogin | |||
| for (var i = 0; i < that.data.carList.length; i++) { | |||
| that.getStopFeeItem(that.data.carList[i], i) | |||
| } | |||
| // console.log(JSON.stringify(getStopFeeItem)) | |||
| }, | |||
| initPark: function () { | |||
| var that = this | |||
| // 车场信息获取 | |||
| Http.get({ | |||
| url: config.api.getParkInfo, | |||
| data: {} | |||
| }) | |||
| .then(res => { | |||
| console.log(res) | |||
| that.setData({ | |||
| park: res.data, | |||
| }) | |||
| }) | |||
| }, | |||
| initUsrCarList: function () { | |||
| var that = this | |||
| // 绑定车获取 | |||
| Http.get({ | |||
| url: config.api.getUserCarList, | |||
| data: {} | |||
| }).then(res => { | |||
| console.log(res); | |||
| that.setData({ | |||
| carList: res.data | |||
| }) | |||
| }) | |||
| }, | |||
| init: function () { | |||
| var that = this | |||
| app.parkInitCallback = token => { | |||
| that.initPark() | |||
| that.initUsrCarList() | |||
| if (!app.globalData.carLogin) { | |||
| // 共同登录 | |||
| Http.post({ | |||
| url: config.api.carInit, | |||
| data: { | |||
| phone: app.globalData.phone | |||
| } | |||
| }).then(res => { | |||
| app.globalData.carLogin = true | |||
| app.globalData.parkVendor = res.data.vendor | |||
| if (res.data.token != "undefined") { | |||
| app.globalData.etcpToken = res.data.token | |||
| console.log("etcpToken", app.globalData.etcpToken) | |||
| } | |||
| // 获取 停车费 | |||
| that.getStopFee() | |||
| }) | |||
| } | |||
| } | |||
| if (app.globalData.token && app.globalData.token != null) { | |||
| app.parkInitCallback(app.globalData.token) | |||
| } | |||
| } | |||
| }) | |||
| @@ -1,3 +0,0 @@ | |||
| { | |||
| "navigationBarTitleText": "券绑车牌" | |||
| } | |||
| @@ -1,29 +0,0 @@ | |||
| <view class='container'> | |||
| <view class='borderBox'> | |||
| <view class='borderUp'>我的爱车 | |||
| <label class='carNumber'></label> | |||
| </view> | |||
| <view class='passNumberBox' wx:for='{{carList}}' wx:key='{{index}}'> | |||
| <view class='passUp'> | |||
| <view class='passNumber' bindtap='orderPay' style='height:{{dataHeight}};font-weight:{{dataWeight}};line-height:{{dataLineHeight}}'> | |||
| <text class='number'>{{item.carNumber}}</text> | |||
| </view> | |||
| <button class='deleteButton' bindtap='unbindCarBtn' data-car='{{item.carNumber}}'>解绑</button> | |||
| </view> | |||
| <view class='orderBox' wx:if='{{item.remainingFee}}'> | |||
| <view class='priceBox'> | |||
| <text>{{'待支付金额:¥'+item.remainingFee}}</text> | |||
| </view> | |||
| <view class='payBox'> | |||
| <navigator target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data="{{item.extraData}}" version="release"> | |||
| <button>去支付</button> | |||
| </navigator> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='addBox' wx:if='{{carList.length<3}}'> | |||
| <view class='add' bindtap="jumpToAdd"> | |||
| <text>+</text>添加爱车</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -1,291 +0,0 @@ | |||
| /**passCar.wxss**/ | |||
| page{ | |||
| background-color: #f8f8f8; | |||
| } | |||
| .headBox{ | |||
| margin-top: 13rpx; | |||
| width: 750rpx; | |||
| height: 210rpx; | |||
| box-sizing: border-box; | |||
| padding: 30rpx 40rpx; | |||
| display: flex; | |||
| background-color: white | |||
| } | |||
| .headBox image{ | |||
| width: 150rpx; | |||
| height: 150rpx; | |||
| margin:10rpx 30rpx 0 0; | |||
| border-radius:16rpx; | |||
| } | |||
| .numberBox{ | |||
| width: 400rpx; | |||
| height: 150rpx | |||
| } | |||
| .titleName{ | |||
| line-height: 60rpx; | |||
| height:60rpx; | |||
| color: #666; | |||
| font-size: 32rpx; | |||
| width: 400rpx; | |||
| word-break:break-all; | |||
| text-align: justify; | |||
| margin-bottom: 10rpx; | |||
| } | |||
| ::-webkit-scrollbar{ | |||
| width: 0; | |||
| height: 0; | |||
| color: transparent; | |||
| } | |||
| .carLocation,.locationNumber{ | |||
| width: 400rpx; | |||
| height: 40rpx; | |||
| color: #666; | |||
| font-size: 24rpx; | |||
| line-height: 30rpx; | |||
| } | |||
| .price{ | |||
| font-size: 28rpx; | |||
| } | |||
| .borderBox{ | |||
| width: 750rpx; | |||
| margin-top: 26rpx; | |||
| } | |||
| .borderUp{ | |||
| padding: 50rpx; | |||
| width: 650rpx; | |||
| height: 50rpx; | |||
| line-height: 50rpx; | |||
| font-size: 36rpx; | |||
| color: #333; | |||
| border-bottom: 1rpx #f8f8f8 solid; | |||
| background-color: white; | |||
| } | |||
| .carNumber{ | |||
| padding: 50rpx; | |||
| height: 50rpx; | |||
| line-height: 50rpx; | |||
| font-size: 28rpx; | |||
| color: #cbcbcb; | |||
| background-color: white; | |||
| } | |||
| .addBox{ | |||
| width: 750rpx; | |||
| height: 220rpx; | |||
| position: relative; | |||
| background-color: white; | |||
| } | |||
| .add{ | |||
| position: absolute; | |||
| left: 50%; | |||
| top: 50%; | |||
| transform: translate(-50%,-50%); | |||
| font-size: 34rpx; | |||
| color: #666; | |||
| border:2px dashed #eee; | |||
| padding: 30rpx 50rpx; | |||
| border-radius:16rpx; | |||
| } | |||
| .add text{ | |||
| font-size: 40rpx; | |||
| } | |||
| .bottonBox{ | |||
| width: 750rpx; | |||
| margin-top: 75rpx; | |||
| } | |||
| .textStyle{ | |||
| background-color: white; | |||
| height: 90rpx; | |||
| line-height: 90rpx; | |||
| padding-left: 130rpx; | |||
| color: #333; | |||
| font-size: 28rpx; | |||
| letter-spacing: 1rpx; | |||
| border-bottom: 1rpx #f8f8f8 solid; | |||
| position: relative; | |||
| } | |||
| .textStyle image{ | |||
| width: 50rpx; | |||
| height: 50rpx; | |||
| top: 20rpx; | |||
| left: 50rpx; | |||
| position: absolute; | |||
| } | |||
| .passNumberBox{ | |||
| width: 750rpx; | |||
| position: relative; | |||
| background-color: white; | |||
| border-bottom: 1rpx #f8f8f8 solid ; | |||
| } | |||
| .passNumber{ | |||
| width: 400rpx; | |||
| height: 150rpx; | |||
| font-size: 32rpx; | |||
| font-weight: 600; | |||
| line-height: 150rpx; | |||
| left: 55rpx; | |||
| position: absolute; | |||
| } | |||
| .nopay{ | |||
| height: 80rpx; | |||
| line-height: 80rpx; | |||
| font-weight: 400; | |||
| } | |||
| .number{ | |||
| font-size: 32rpx; | |||
| } | |||
| .parkPrice{ | |||
| font-size: 30rpx; | |||
| font-weight: 500; | |||
| } | |||
| .deleteButton{ | |||
| font-size: 28rpx; | |||
| line-height: 50rpx; | |||
| height: 50rpx; | |||
| top: 50%; | |||
| right: 30rpx; | |||
| position: absolute; | |||
| transform: translate(0,-50%); | |||
| } | |||
| .detail{ | |||
| width: 32rpx; | |||
| height: 32rpx; | |||
| right: 50rpx; | |||
| top: 32rpx; | |||
| position: absolute; | |||
| } | |||
| .detail image{ | |||
| width: 32rpx; | |||
| height: 32rpx; | |||
| position: absolute; | |||
| left: 0; | |||
| top: 0; | |||
| } | |||
| .voucher{ | |||
| width: 90%; | |||
| padding: 0 5%; | |||
| background-color: rgb(255, 178, 50); | |||
| /* background-color: #cbcbcb; */ | |||
| height: 80rpx; | |||
| position: relative; | |||
| margin: 24rpx 0; | |||
| border-bottom: 2rpx #fff solid; | |||
| display: flex; | |||
| justify-content: space-between; | |||
| } | |||
| .textV1,.textV2{ | |||
| height: 58rpx; | |||
| width: 225rpx; | |||
| padding-top: 22rpx; | |||
| text-align: center; | |||
| line-height: 80rxp; | |||
| font-size: 28rpx; | |||
| color: #fff; | |||
| } | |||
| .textV2{ | |||
| margin-top: -1rpx; | |||
| padding: 0; | |||
| /* background-color: rgb(0, 192, 255); */ | |||
| border-radius: 10rpx; | |||
| width: 221rpx; | |||
| height: 80rpx; | |||
| line-height: 80rpx; | |||
| font-size: 36rpx; | |||
| border: 4rpx #fff solid; | |||
| margin-bottom: 22rpx; | |||
| } | |||
| /* .textV1{ | |||
| position: absolute; | |||
| left: 10rpx; | |||
| top: 22rpx; | |||
| } */ | |||
| /* .textV2{ | |||
| position: absolute; | |||
| top: 22rpx; | |||
| right: 80rpx; | |||
| } */ | |||
| .choice{ | |||
| width: 80rpx; | |||
| height: 80rpx; | |||
| position: relative; | |||
| } | |||
| .choice image{ | |||
| position: absolute; | |||
| left: 50%; | |||
| top: 50%; | |||
| transform: translate(-50%,-50%); | |||
| width: 30rpx; | |||
| height: 30rpx; | |||
| } | |||
| .buy-view { | |||
| background: #fff; | |||
| position: relative; | |||
| padding-top: 10rpx; | |||
| height:98rpx; | |||
| bottom: 0rpx; | |||
| margin-top: 50rpx; | |||
| /* left: 0; | |||
| right: 0; */ | |||
| } | |||
| .buy { | |||
| background: #00c0ff; | |||
| height: 88rpx; | |||
| width: 98%; | |||
| margin: 30rpx auto; | |||
| color: #fff; | |||
| font-size: 36rpx; | |||
| line-height: 88rpx; | |||
| border-radius: 6rpx; | |||
| } | |||
| .borderBox{ | |||
| width: 750rpx; | |||
| margin-top: 26rpx; | |||
| } | |||
| .orderBox { | |||
| width: 100%; | |||
| height: 100rpx; | |||
| border-top: 1rpx #f8f8f8 solid; | |||
| position: relative; | |||
| display: flex; | |||
| } | |||
| .passUp { | |||
| width: 100%; | |||
| height: 150rpx; | |||
| position: relative; | |||
| } | |||
| .priceBox{ | |||
| width: 500rpx; | |||
| } | |||
| .priceBox text{ | |||
| margin-top: 35rpx; | |||
| color: #333; | |||
| font-size: 24rpx; | |||
| margin-left: 50rpx; | |||
| display: block; | |||
| } | |||
| .payBox{ | |||
| width: 250rpxpx; | |||
| } | |||
| .payBox button{ | |||
| width: 230rpx; | |||
| border:0; | |||
| font-size: 32rpx; | |||
| margin-top: 13rpx; | |||
| margin-right: 20rpx; | |||
| background-color: lightgreen; | |||
| color: white; | |||
| } | |||
| input{ | |||
| outline:none; | |||
| border:none; | |||
| list-style: none; | |||
| } | |||
| button::after{ | |||
| border:none; | |||
| } | |||
| @@ -0,0 +1,84 @@ | |||
| const util = require("../../../utils/util"); | |||
| const config = require("../../../config/config.js"); | |||
| const Http = require("../../../utils/HttpBasics"); | |||
| //券详情页面 | |||
| Page({ | |||
| data: { | |||
| code: "", | |||
| data: {}, | |||
| createDate: "", | |||
| expiredTime: "", | |||
| updateDate: "", | |||
| //存储计时器 | |||
| setInter: "" | |||
| }, | |||
| onUnload: function () { | |||
| let that = this; | |||
| clearInterval(that.data.setInter); | |||
| }, | |||
| onLoad: function (options) { | |||
| console.log(options); | |||
| let that = this; | |||
| that.setData({ | |||
| code: options.quancode | |||
| }); | |||
| //获得优惠券的详情 | |||
| that.data.setInter = setInterval(function () { | |||
| if ( | |||
| options.quancode != null && | |||
| options.quancode != "" && | |||
| options.quancode != undefined && | |||
| options.couponorderstatus == 0 | |||
| ) { | |||
| Http.get({ | |||
| url: config.api.couponOrderDetail, | |||
| data: { | |||
| couponOrderId: options.quancode | |||
| } | |||
| }).then(res => { | |||
| console.log(res); | |||
| that.setData({ | |||
| data: res.data | |||
| }); | |||
| that.setData({ | |||
| expiredTime: util.fmtDate(that.data.data.expiredTime), | |||
| updateDate: util.fmtDate(that.data.data.updateDate), | |||
| createDate: util.fmtDate(that.data.data.createDate) | |||
| }); | |||
| }); | |||
| } | |||
| }, 2000); | |||
| // if (options.couponorderstatus != "0") { | |||
| Http.get({ | |||
| url: config.api.couponOrderDetail, | |||
| data: { | |||
| couponOrderId: options.quancode | |||
| } | |||
| }).then(res => { | |||
| console.log(res); | |||
| that.setData({ | |||
| data: res.data | |||
| }); | |||
| that.setData({ | |||
| expiredTime: util.fmtDate(that.data.data.expiredTime), | |||
| updateDate: util.fmtDate(that.data.data.updateDate), | |||
| createDate: util.fmtDate(that.data.data.createDate) | |||
| }); | |||
| util.barcode("barcode", options.quancode, 510, 100); | |||
| util.qrcode("qrcode", options.quancode, 350, 350); | |||
| }); | |||
| // } | |||
| }, | |||
| phone: function () { | |||
| let that = this; | |||
| console.log(that.data); | |||
| if (that.data.data.merchantLinkPhone) { | |||
| wx.makePhoneCall({ | |||
| phoneNumber: that.data.data.merchantLinkPhone | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "使用优惠券" | |||
| } | |||
| @@ -0,0 +1,55 @@ | |||
| <view class="container page"> | |||
| <view class="coupon_detail clearfix"> | |||
| <view class="fl wmfl"> | |||
| <image src="{{data.coverImg}}" /> | |||
| </view> | |||
| <view class="fr"> | |||
| <text class="title">{{data.title}}</text> | |||
| <view class="time">{{data.subTitle}}</view> | |||
| <view class="money"> | |||
| <text>¥{{data.salePrice/100}}</text> | |||
| <del>¥{{data.price/100}}</del> | |||
| <text wx:if="{{data.usePrice!=undefined}}" class="manjian">满{{data.usePrice/100}}元可用</text> | |||
| <text wx:if="{{data.usePrice==undefined}}" class="manjian">仅限本店使用</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class="timevalidity"> | |||
| <text>有效期至:</text> | |||
| <text>{{expiredTime}}</text> | |||
| </view> | |||
| <view class="posi"> | |||
| <view class="tit"> | |||
| 适用门店 | |||
| </view> | |||
| <view class='posi_logo'> | |||
| <view> | |||
| <image src='{{data.merChantImgUrl}}'></image> | |||
| </view> | |||
| <view> | |||
| <text>{{data.merchantName}}</text> | |||
| <text>{{data.addr}}{{data.buildingName}}{{data.floorName}}</text> | |||
| </view> | |||
| <image bindtap='phone' class="tel" src="./../../../assets/img/tel.jpg" mode="widthFix" /> | |||
| </view> | |||
| </view> | |||
| <view class='note'> | |||
| <view wx:if="{{data.couponOrderStatus==0}}"><text>下单时间</text><text>{{createDate}}</text></view> | |||
| <view wx:if="{{data.couponOrderStatus==1}}"><text>核销时间</text><text>{{updateDate}}</text></view> | |||
| <view wx:if="{{data.couponOrderStatus==2}}"><text>过期时间</text><text>{{updateDate}}</text></view> | |||
| <view wx:if="{{data.couponOrderStatus==3}}"><text>退款时间</text><text>{{updateDate}}</text></view> | |||
| <view><text>订单编号</text><text>{{data.orderId}}</text></view> | |||
| <!-- <view><text>手机号</text><text>2018.05.25</text></view> --> | |||
| <view><text>实付金额</text><text>{{data.couponPrice/100}}元</text></view> | |||
| </view> | |||
| <view class='notes' style="border-bottom:0"> | |||
| <view> | |||
| <text>购买须知</text> | |||
| </view> | |||
| <view> | |||
| <text><text class='spot'></text>{{data.remark}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -0,0 +1,286 @@ | |||
| .container { | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .panel,.zhuangtai image{ | |||
| position: relative; | |||
| width: 510rpx; | |||
| height: 581rpx; | |||
| display: block; | |||
| border-radius: 10rpx; | |||
| background-color: #fff; | |||
| margin: 22rpx auto 0; | |||
| padding: 30rpx 0 0; | |||
| z-index: 10000000000; | |||
| } | |||
| .pane2{ | |||
| background: #fff; | |||
| opacity: .6; | |||
| } | |||
| .pane2 image{ | |||
| width: 500rpx; | |||
| display: block; | |||
| margin: 40rpx auto 0; | |||
| } | |||
| .buy { | |||
| background: #fff; | |||
| height: 88rpx; | |||
| width: 98%; | |||
| color: #7e7e7e; | |||
| line-height: 88rpx; | |||
| border-radius: 16rpx; | |||
| border: 1px solid #eee; | |||
| } | |||
| .barcode { | |||
| height: 100rpx; | |||
| width: 510rpx; | |||
| margin: 0 auto; | |||
| } | |||
| .barnum { | |||
| font-size: 24rpx; | |||
| text-align: center; | |||
| letter-spacing: 2rpx; | |||
| white-space: nowrap; | |||
| color: #7f7f7f; | |||
| } | |||
| .barnum text { | |||
| color: #767676; | |||
| } | |||
| .barcode > canvas { | |||
| width: 510rpx; | |||
| height: 100rpx; | |||
| } | |||
| .qrcode { | |||
| position: relative; | |||
| height: 350rpx; | |||
| width: 350rpx; | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: flex-end; | |||
| align-items: center; | |||
| margin: 0 auto; | |||
| } | |||
| .qrcode > canvas { | |||
| width: 350rpx; | |||
| height: 350rpx; | |||
| } | |||
| .coupon_detail { | |||
| padding: 0 20rpx; | |||
| } | |||
| .fl { | |||
| float: left; | |||
| } | |||
| .fr { | |||
| float: right; | |||
| } | |||
| .coupon_detail .wmfl{ | |||
| display: block; | |||
| width: 255rpx; | |||
| height: 184rpx; | |||
| border-radius: 16rpx; | |||
| overflow: hidden; | |||
| } | |||
| .coupon_detail image { | |||
| display: block; | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .coupon_detail .fr { | |||
| width: 400rpx; | |||
| } | |||
| .coupon_detail .title { | |||
| font-size: 36rpx; | |||
| } | |||
| .time { | |||
| font-size: 26rpx; | |||
| color: #999; | |||
| } | |||
| .time text { | |||
| font-size: 26rpx; | |||
| color: red; | |||
| } | |||
| .money text { | |||
| color: red; | |||
| font-size: 36rpx; | |||
| } | |||
| .money del { | |||
| color: #999; | |||
| font-size: 26rpx; | |||
| text-decoration: line-through; | |||
| margin-left: 20rpx; | |||
| } | |||
| .clearfix:after { | |||
| content: "."; | |||
| display: block; | |||
| height: 0; | |||
| clear: both; | |||
| visibility: hidden; | |||
| } | |||
| .timevalidity { | |||
| margin-top: 20rpx; | |||
| text-indent: 20rpx; | |||
| } | |||
| .timevalidity text:nth-of-type(1) { | |||
| color: #333; | |||
| font-size: 30rpx; | |||
| } | |||
| .timevalidity text:nth-of-type(2) { | |||
| font-size: 30rpx; | |||
| color: red; | |||
| } | |||
| .posi { | |||
| width: 100%; | |||
| display: flex; | |||
| flex-direction: column; | |||
| background: #fff; | |||
| border-bottom: 20rpx solid #f5f5f5; | |||
| border-top: 20rpx solid #f5f5f5; | |||
| position: relative; | |||
| } | |||
| .posi_logo { | |||
| width: 92%; | |||
| padding: 30rpx 4%; | |||
| display: flex; | |||
| position: relative; | |||
| z-index: 100; | |||
| } | |||
| .posi_logo view:nth-child(1) { | |||
| width: 126rpx; | |||
| height: 126rpx; | |||
| border-radius: 50%; | |||
| overflow: hidden; | |||
| flex: 2; | |||
| } | |||
| .posi_logo view:nth-child(1) image { | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .posi_logo view:nth-child(2) { | |||
| position: relative; | |||
| z-index: 100; | |||
| display: flex; | |||
| flex-direction: column; | |||
| flex: 8; | |||
| padding-top: 20rpx; | |||
| padding-left: 30rpx; | |||
| } | |||
| .posi_logo view:nth-child(2) text:nth-child(1) { | |||
| font-size: 30rpx; | |||
| } | |||
| .posi_logo view:nth-child(2) text:nth-child(2) { | |||
| font-size: 24rpx; | |||
| color: #b8b8b8; | |||
| padding-top: 10rpx; | |||
| } | |||
| .tit { | |||
| font-size: 30rpx; | |||
| color: #000; | |||
| font-weight: bold; | |||
| padding: 24rpx 0 33rpx; | |||
| border-bottom: 1px solid #eee; | |||
| text-indent: 20rpx; | |||
| } | |||
| .tel { | |||
| position: absolute; | |||
| right: 50rpx; | |||
| top: 0; | |||
| bottom: 0; | |||
| margin: auto; | |||
| width: 50rpx; | |||
| height: 50rpx; | |||
| z-index:1000000; | |||
| } | |||
| .notes { | |||
| border-top: 20rpx solid #f5f5f5; | |||
| } | |||
| .notes view:nth-child(1) { | |||
| width: 92%; | |||
| height: 87rpx; | |||
| padding: 0 4%; | |||
| line-height: 87rpx; | |||
| background: #fff; | |||
| border-bottom: 1rpx solid #f5f5f5; | |||
| } | |||
| .notes view:nth-child(1) text { | |||
| font-size: 30rpx; | |||
| font-weight: bold; | |||
| } | |||
| .notes view:nth-child(2) { | |||
| width: 92%; | |||
| padding: 0 4%; | |||
| background: #fff; | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-top: 2%; | |||
| } | |||
| .notes view:nth-child(2) > text { | |||
| font-size: 28rpx; | |||
| color: #a9a9a9; | |||
| line-height: 56rpx; | |||
| } | |||
| .note view { | |||
| height: 94rpx; | |||
| line-height: 94rpx; | |||
| border-bottom: 2rpx solid #f9f9f9; | |||
| } | |||
| .note view text { | |||
| display: inline-block; | |||
| } | |||
| .note text:nth-of-type(1) { | |||
| width: 30%; | |||
| text-indent: 30rpx; | |||
| text-align: left; | |||
| font-size: 30rpx; | |||
| color: #000; | |||
| } | |||
| .note text:nth-of-type(2) { | |||
| width: 67%; | |||
| padding-right: 3%; | |||
| text-align: right; | |||
| color: #bdbdbd; | |||
| font-size: 30rpx; | |||
| } | |||
| .manjian { | |||
| margin-left: 26rpx; | |||
| color: #666 !important; | |||
| font-size: 26rpx !important; | |||
| } | |||
| @@ -37,7 +37,7 @@ Page({ | |||
| console.log(e.currentTarget.dataset.quancode); | |||
| console.log("点击跳转到券详情"); | |||
| wx.navigateTo({ | |||
| url: `/pages/couponorder/detail/index?quancode=${ | |||
| url: `/pages/passCar/couponDetail/couponDetail?quancode=${ | |||
| e.currentTarget.dataset.quancode | |||
| }`, | |||
| success: function (res) { | |||
| @@ -7,6 +7,7 @@ Page({ | |||
| park: null, | |||
| carList: [], | |||
| payList:[], | |||
| aaaaa:[], | |||
| addCar: null, | |||
| tcq: 2, | |||
| flag:'' | |||
| @@ -79,6 +80,7 @@ Page({ | |||
| var that = this | |||
| // ETCP | |||
| for(let car of that.data.carList){ | |||
| console.log('11111111111' + JSON.stringify(car) ) | |||
| if (car.stopFee.remainingFee){ | |||
| that.data.payList.push(car) | |||
| console.log(car) | |||
| @@ -95,8 +97,8 @@ Page({ | |||
| var etcpData = { | |||
| etcpToken: app.globalData.etcpToken, | |||
| carNumber: that.data.payList[0].carNumber ? that.data.payList[0].carNumber:'', | |||
| couponFreeId:5655, | |||
| merchantId: '196123418314145793', | |||
| couponFreeId: that.data.couponList[0].couponFreeId, | |||
| merchantId: that.data.couponList[0].id, | |||
| } | |||
| console.log('--->>>'+JSON.stringify(etcpData)) | |||
| // 停简单 | |||
| @@ -116,15 +118,16 @@ Page({ | |||
| data: postCouponData, | |||
| }) | |||
| .then(res => { | |||
| that.initUsrCarList() | |||
| console.log('>>>>>>>>>>' + res.code) | |||
| // that.initUsrCarList() | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: "车牌绑定优免券成功!", | |||
| success: function (res) { | |||
| console.log(res); | |||
| // console.log(res.data.code); | |||
| that.setData({ | |||
| // flag:res.data. | |||
| // flag:res | |||
| }) | |||
| } | |||
| }) | |||
| @@ -144,7 +147,7 @@ Page({ | |||
| //获取名下停车券列表 | |||
| getList() { | |||
| var that = this; | |||
| console.log('1111111111111111111111.......'); | |||
| // console.log('1111111111111111111111.......'); | |||
| // console.log(key); | |||
| // console.log(pageNum); | |||
| if (1) { | |||
| @@ -152,35 +155,20 @@ Page({ | |||
| // title: "加载中" | |||
| // }); | |||
| Http.get({ | |||
| url: config.api.couponOrderCarList + "?type=5", | |||
| url: config.api.couponOrderCarList + "?type=5&couponOrderStatus=0", | |||
| data: { | |||
| pageNum: 1, | |||
| pageSize: 8, | |||
| couponOrderStatus: 0 | |||
| } | |||
| }).then(res => { | |||
| console.log('>>>>>>>>>>>>>>Res'+JSON.stringify(res)) | |||
| // console.log('>>>>>>>>>>>>>>Res'+JSON.stringify(res)) | |||
| that.setData({ | |||
| couponList: res.data.list | |||
| }) | |||
| console.log("姐姐的订单列表"); | |||
| setTimeout(function () { | |||
| wx.hideLoading(); | |||
| }, 1200); | |||
| // if (pageNum >= res.data.pages) { | |||
| // that.setData({ | |||
| // allow_load: false | |||
| // }); | |||
| // } | |||
| /** | |||
| * 先赋值后渲染页面 | |||
| * concat 不会改变原数组值 | |||
| * push 会改变原数组值,但不会一条一条插入,而是整个数组插入 | |||
| */ | |||
| // that.data.list = that.data.list.concat(res.data.list); | |||
| // that.setData({ | |||
| // list: that.data.list | |||
| // }); | |||
| }); | |||
| } else { | |||
| console.log("加载完成allow_load设置成false"); | |||
| @@ -19,10 +19,6 @@ | |||
| <view class='passUp'> | |||
| <view class='passNumber' bindtap='orderPay'> | |||
| <text class='number'>{{item.carNumber}}</text> | |||
| <!-- <text class='price'>待缴金额:¥{{item.remainingParkFee?item.remainingParkFee:'0'}}</text> --> | |||
| <!-- <text class='parkPrice'>待缴金额:¥500</text> --> | |||
| <!-- <text>已缴:{{item.stopFee.paidFee}}</text> | |||
| <text>优免金额{{item.stopFee.discountAmount}}</text> --> | |||
| </view> | |||
| <button class='deleteButton' bindtap='unbindCarBtn' data-car='{{item.carNumber}}'>解绑</button> | |||
| </view> | |||
| @@ -33,33 +29,8 @@ | |||
| <view class='priceBox right'> | |||
| <text class="textRight">待缴金额:¥{{item.stopFee.remainingFee}}</text> | |||
| </view> | |||
| <!-- <view class='payBox'> | |||
| <navigator target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data="{{item.extraData}}" version="release"> | |||
| <button>去支付</button> | |||
| </navigator> | |||
| </view> --> | |||
| </view> | |||
| </view> | |||
| <!-- <view class='passNumberBox'> | |||
| <view class='passNumber nopay' bindtap='orderPay'> | |||
| <text class='number'>蒙B35412</text> | |||
| </view> | |||
| <button class='deleteButton' bindtap='unbindCarBtn' data-car='{{item.carNumber}}'>解绑</button> | |||
| <navigator target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data="{{item.extraData}}" version="release"> | |||
| <button class='deleteButton' >支付</button> | |||
| </navigator> | |||
| </view> | |||
| <view class='passNumberBox'> | |||
| <view class='passNumber nopay' bindtap='orderPay'> | |||
| <text class='number'>沪B88888</text> | |||
| </view> | |||
| <button class='deleteButton' bindtap='unbindCarBtn' data-car='{{item.carNumber}}'>解绑</button> | |||
| </view> --> | |||
| <!-- <view class='addBox' wx:if='{{carList.length<3}}'> | |||
| <view class='add' bindtap="jumpToAdd"> | |||
| <text>+</text>添加爱车</view> | |||
| </view> --> | |||
| </view> | |||
| <view class='bottonBox'> | |||
| <navigator url="/pages/passCar/couponList/couponList"> | |||
| @@ -67,7 +38,6 @@ | |||
| <image src='../../assets/img/quan.png'></image> | |||
| 我的停车券 | |||
| <view class='detail'> | |||
| <!-- <image wx:if="{{tcq==1}}" src='../../assets/img/down.png'></image> --> | |||
| <image src='../../assets/img/right.png'></image> | |||
| </view> | |||
| </view> | |||
| @@ -82,13 +52,6 @@ | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!-- <view class='textStyle' bindtap='passb'> | |||
| <image src='../../assets/img/jilu.png'></image> | |||
| 停车记录 | |||
| <view class='detail'> | |||
| <image src='../../assets/img/right.png'></image> | |||
| </view> | |||
| </view> --> | |||
| <view class='textStyle' bindtap='passc'> | |||
| <image src='../../assets/img/wenti.png'></image> | |||
| 常见问题 | |||
| @@ -97,8 +60,8 @@ | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view bindtap='bindCoupon' class="buy-view app-border-top" wx:if='{{payList.length}}'> | |||
| <navigator class='buyBox' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data="{{item.extraData}}" version="release"> | |||
| <view bindtap='bindCoupon' class="buy-view app-border-top"> | |||
| <navigator wx:if='{{flag}}' class='buyBox' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data="{{item.extraData}}" version="release"> | |||
| </navigator> | |||
| <button class='buy'>立即支付</button> | |||
| </view> | |||