From 355f5d784e8511db75b34724ffe866a12ec0ff8e Mon Sep 17 00:00:00 2001
From: shark <717155252@qq.com>
Date: Tue, 4 Sep 2018 08:06:16 +0800
Subject: [PATCH] edit passCar
---
app.json | 4 +-
pages/passCar/choiceCar/choiceCar.js | 273 -----------------
pages/passCar/choiceCar/choiceCar.json | 3 -
pages/passCar/choiceCar/choiceCar.wxml | 29 --
pages/passCar/choiceCar/choiceCar.wxss | 291 -------------------
pages/passCar/couponDetail/couponDetail.js | 84 ++++++
pages/passCar/couponDetail/couponDetail.json | 3 +
pages/passCar/couponDetail/couponDetail.wxml | 55 ++++
pages/passCar/couponDetail/couponDetail.wxss | 286 ++++++++++++++++++
pages/passCar/couponList/couponList.js | 2 +-
pages/passCar/passCar.js | 34 +--
pages/passCar/passCar.wxml | 41 +--
12 files changed, 444 insertions(+), 661 deletions(-)
delete mode 100644 pages/passCar/choiceCar/choiceCar.js
delete mode 100644 pages/passCar/choiceCar/choiceCar.json
delete mode 100644 pages/passCar/choiceCar/choiceCar.wxml
delete mode 100644 pages/passCar/choiceCar/choiceCar.wxss
create mode 100644 pages/passCar/couponDetail/couponDetail.js
create mode 100644 pages/passCar/couponDetail/couponDetail.json
create mode 100644 pages/passCar/couponDetail/couponDetail.wxml
create mode 100644 pages/passCar/couponDetail/couponDetail.wxss
diff --git a/app.json b/app.json
index 7200a0c..7fd6e48 100644
--- a/app.json
+++ b/app.json
@@ -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",
diff --git a/pages/passCar/choiceCar/choiceCar.js b/pages/passCar/choiceCar/choiceCar.js
deleted file mode 100644
index 925e5fa..0000000
--- a/pages/passCar/choiceCar/choiceCar.js
+++ /dev/null
@@ -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)
- }
- }
-})
\ No newline at end of file
diff --git a/pages/passCar/choiceCar/choiceCar.json b/pages/passCar/choiceCar/choiceCar.json
deleted file mode 100644
index be67e26..0000000
--- a/pages/passCar/choiceCar/choiceCar.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "券绑车牌"
-}
\ No newline at end of file
diff --git a/pages/passCar/choiceCar/choiceCar.wxml b/pages/passCar/choiceCar/choiceCar.wxml
deleted file mode 100644
index 390c226..0000000
--- a/pages/passCar/choiceCar/choiceCar.wxml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
- 我的爱车
-
-
-
-
-
- {{item.carNumber}}
-
-
-
-
-
- {{'待支付金额:¥'+item.remainingFee}}
-
-
-
-
-
-
-
-
-
-
- +添加爱车
-
-
-
\ No newline at end of file
diff --git a/pages/passCar/choiceCar/choiceCar.wxss b/pages/passCar/choiceCar/choiceCar.wxss
deleted file mode 100644
index bfb628f..0000000
--- a/pages/passCar/choiceCar/choiceCar.wxss
+++ /dev/null
@@ -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;
-}
diff --git a/pages/passCar/couponDetail/couponDetail.js b/pages/passCar/couponDetail/couponDetail.js
new file mode 100644
index 0000000..584990e
--- /dev/null
+++ b/pages/passCar/couponDetail/couponDetail.js
@@ -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
+ });
+ }
+ }
+});
\ No newline at end of file
diff --git a/pages/passCar/couponDetail/couponDetail.json b/pages/passCar/couponDetail/couponDetail.json
new file mode 100644
index 0000000..5aba0d6
--- /dev/null
+++ b/pages/passCar/couponDetail/couponDetail.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "使用优惠券"
+}
\ No newline at end of file
diff --git a/pages/passCar/couponDetail/couponDetail.wxml b/pages/passCar/couponDetail/couponDetail.wxml
new file mode 100644
index 0000000..4eabad8
--- /dev/null
+++ b/pages/passCar/couponDetail/couponDetail.wxml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+ {{data.title}}
+ {{data.subTitle}}
+
+ ¥{{data.salePrice/100}}
+ ¥{{data.price/100}}
+ 满{{data.usePrice/100}}元可用
+ 仅限本店使用
+
+
+
+
+ 有效期至:
+ {{expiredTime}}
+
+
+
+ 适用门店
+
+
+
+
+
+
+ {{data.merchantName}}
+ {{data.addr}}{{data.buildingName}}{{data.floorName}}
+
+
+
+
+
+
+ 下单时间{{createDate}}
+ 核销时间{{updateDate}}
+ 过期时间{{updateDate}}
+ 退款时间{{updateDate}}
+
+ 订单编号{{data.orderId}}
+
+ 实付金额{{data.couponPrice/100}}元
+
+
+
+ 购买须知
+
+
+ {{data.remark}}
+
+
+
\ No newline at end of file
diff --git a/pages/passCar/couponDetail/couponDetail.wxss b/pages/passCar/couponDetail/couponDetail.wxss
new file mode 100644
index 0000000..7cee945
--- /dev/null
+++ b/pages/passCar/couponDetail/couponDetail.wxss
@@ -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;
+}
diff --git a/pages/passCar/couponList/couponList.js b/pages/passCar/couponList/couponList.js
index f08075e..0777bb7 100644
--- a/pages/passCar/couponList/couponList.js
+++ b/pages/passCar/couponList/couponList.js
@@ -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) {
diff --git a/pages/passCar/passCar.js b/pages/passCar/passCar.js
index 1e61ea3..57c7005 100644
--- a/pages/passCar/passCar.js
+++ b/pages/passCar/passCar.js
@@ -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");
diff --git a/pages/passCar/passCar.wxml b/pages/passCar/passCar.wxml
index 8febe5c..b7b0b58 100644
--- a/pages/passCar/passCar.wxml
+++ b/pages/passCar/passCar.wxml
@@ -19,10 +19,6 @@
{{item.carNumber}}
-
-
-
@@ -33,33 +29,8 @@
待缴金额:¥{{item.stopFee.remainingFee}}
-
-
-
-
@@ -67,7 +38,6 @@
我的停车券
-
@@ -82,13 +52,6 @@
-
常见问题
@@ -97,8 +60,8 @@
-
-
+
+