diff --git a/pages.json b/pages.json
index a43f231..5fbe8af 100644
--- a/pages.json
+++ b/pages.json
@@ -52,7 +52,7 @@
{
"path": "service/gate",
"style": {
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "扫码抬杆"
}
},
{
@@ -317,6 +317,13 @@
"style": {
"navigationBarTitleText": "活动规则"
}
+ },
+ {
+ "path" : "service/carNo",
+ "style" :
+ {
+ "navigationBarTitleText" : "扫码抬杆"
+ }
}
]
}],
diff --git a/subPackages/service/carNo.vue b/subPackages/service/carNo.vue
new file mode 100644
index 0000000..5e379e1
--- /dev/null
+++ b/subPackages/service/carNo.vue
@@ -0,0 +1,115 @@
+
+
+
+ 请输入车牌号码
+ 车牌信息仅用于进出停车场,我们会严格保护您的信息
+
+ 确定
+
+
+
+
+
+
+
diff --git a/subPackages/service/gate.vue b/subPackages/service/gate.vue
index 66d615c..95e6604 100644
--- a/subPackages/service/gate.vue
+++ b/subPackages/service/gate.vue
@@ -1,11 +1,27 @@
-
-
+
+
+
+
+
+
+ 账单号: {{moneyData.bill_id}}
+ 停车场名称:{{moneyData.park_name}}
+ 车牌号:{{moneyData.vpl_number}}
+ 入站时间:{{moneyData.in_time}}
+ 出站时间:{{moneyData.out_time}}
+ 应付:¥{{moneyData.unpaid_charge}}
+
+
+ 未获取到账单信息
+
+
- 同意
+ {{type==1?"同意":"确认支付"}}
+
@@ -13,35 +29,79 @@
export default {
data() {
return {
+ type: 1, // 1 阅读条款 2 扫码
+ vpl_number: '',
content:'',
park_code: '',
arm_code: '',
+ gate_type: '', //in out
+ moneyData: null
};
},
onLoad(options){
+ this.vpl_number = options.carNo
this.park_code = options.park_code
this.arm_code = options.arm_code
+ this.gate_type = options.gate_type || 'in'
+ this.getType()
this.getArticle()
},
methods: {
+ getType () {
+ // 进站 读协议
+ if (this.gate_type == 'in') {
+ this.type = 1
+ } else {
+ this.type = 2
+ this.Post({
+ park_code: this.park_code,
+ vpl_number: this.vpl_number,
+ arm_code: this.arm_code,
+ },'/api/parking/getParkingBill').then(res => {
+ this.moneyData = res.data
+ })
+ }
+
+ },
+
getArticle () {
this.Post({
id:10309
},'/api/article/getArticleById').then(res => {
- uni.setNavigationBarTitle({
- title:res.data.title
- })
this.content = res.data.content
})
},
submit () {
- this.Post({
- park_code: this.park_code,
- arm_code: this.arm_code,
- agree_status: 1,
- }, "/api/parking/raiseCar").then(res=>{
-
- })
+ if (this.type == 1 || (this.moneyData && this.moneyData.is_free)) {
+ this.Post({
+ park_code: this.park_code,
+ arm_code: this.arm_code,
+ agree_status: 1,
+ vpl_number: this.vpl_number,
+ }, "/api/parking/raiseCar").then(res=>{
+ if (res.code == 1) {
+ uni.showToast({
+ title: res.msg
+ })
+ }
+ })
+ } else {
+ this.Post({
+ bill_id: this.moneyData.bill_id,
+ platform: 'miniprogram'
+ },"/api/parking/createPayment").then(res=>{
+ uni.requestPayment({
+ nonceStr: res.data.nonceStr,
+ package: res.data.package,
+ paySign: res.data.paySign,
+ signType: res.data.signType,
+ timeStamp: res.data.timeStamp,
+ complete() {
+ uni.hideLoading()
+ }
+ });
+ })
+ }
}
}
}
@@ -67,7 +127,7 @@
width: 594rpx;
height: 88rpx;
margin: 0 auto;
- background: #F84A56;
+ background: linear-gradient(270deg, #9EE4FE, #7FD491);
border-radius: 43rpx;
text-align: center;
line-height: 88rpx;
@@ -76,4 +136,12 @@
font-weight: 500;
color: #FFFFFF;
}
+ .step2{
+ text-align: center;
+ font-weight: bold;
+ font-size: 40rpx;
+ height: 100vh;
+
+ line-height: 2;
+ }