Browse Source

fix 卡支付问题

pull/1/head
Stormeye Wu 5 years ago
parent
commit
cda758664c
3 changed files with 14 additions and 13 deletions
  1. +10
    -12
      pages/addPark/addPark.js
  2. +1
    -0
      pages/cardorder/index/index.js
  3. +3
    -1
      pages/scanPay/scanPay.js

+ 10
- 12
pages/addPark/addPark.js View File

@@ -60,22 +60,22 @@ Page({
},


onLoad: function (options) {
onLoad: function(options) {
let that = this;

if (Object.keys(options).length!=0){
if (Object.keys(options).length != 0) {
that.setData({
flags: options.flags
})
}
},
jumpTo: function () {
jumpTo: function() {
// 返回
wx.navigateBack({
url: '/index/passCar'
})
},
handleTap: function (e) {
handleTap: function(e) {
this.buttonStatus();
this.setData({
choose: e.target.dataset.cardata,
@@ -116,7 +116,7 @@ Page({

}
},
chooseNum: function (e) {
chooseNum: function(e) {
if (e.target.dataset.msg == 'I') {
return
}
@@ -340,7 +340,7 @@ Page({
this.buttonStatus();
},

submit: function () {
submit: function() {
if (this.data.title != "" && this.data.numFir != "" && this.data.numSco != "" && this.data.numThr != "" && this.data.numFor != "" && this.data.numFive != "" && this.data.numSix != "") {
var carNumber = ''
carNumber += this.data.title + this.data.numFir + this.data.numSco + this.data.numThr + this.data.numFor + this.data.numFive + this.data.numSix
@@ -351,12 +351,11 @@ Page({
prevPage.setData({
addCar: carNumber
})
if (this.data.flags =='managepalte'){
if (this.data.flags == 'managepalte') {
wx.navigateBack({
url: '/pages/managelicenseplate/managelicenseplate?addcar=' + carNumber,
})
}
else{
} else {
wx.navigateBack({
url: '/index/passCar?addcar=' + carNumber,
})
@@ -364,7 +363,7 @@ Page({
}
},

buttonStatus: function () {
buttonStatus: function() {
if (this.data.title != "" && this.data.numFir != "" && this.data.numSco != "" && this.data.numThr != "" && this.data.numFor != "" && this.data.numFive != "" && this.data.numSix != "") {
this.setData({
buttonStatus: true
@@ -375,5 +374,4 @@ Page({
});
}
}
})

})

+ 1
- 0
pages/cardorder/index/index.js View File

@@ -82,6 +82,7 @@ Page({
if (res.code == 200) {
let merChantDetail = JSON.stringify(res.data);
if (merChantDetail && e.currentTarget.dataset.cardid && e.currentTarget.dataset.remainingamount) {
merChantDetail = encodeURIComponent(merChantDetail)
wx.navigateTo({
url: `/pages/scanPay/scanPay?merChant=${merChantDetail}&cardid=${e.currentTarget.dataset.cardid}&remainingAmount=${e.currentTarget.dataset.remainingamount}`,
})


+ 3
- 1
pages/scanPay/scanPay.js View File

@@ -28,8 +28,10 @@ Page({
*/
onLoad: function(options) {
let that = this;
let merChant = decodeURIComponent(options.merChant)
console.log(merChant)
that.setData({
merChant: JSON.parse(options.merChant),
merChant: JSON.parse(merChant),
cardid: options.cardid,
cardids: options.cardid,
remainingAmount: options.remainingAmount,


Loading…
Cancel
Save