|
|
@@ -34,57 +34,6 @@ Page({ |
|
|
|
}, |
|
|
|
gotoPayMoney: function (flags) { |
|
|
|
let that = this; |
|
|
|
// 卡余额充足的时候,才可以付钱 |
|
|
|
// if(e){ |
|
|
|
// if(e.currentTarget.dataset.flags == 'check'){ |
|
|
|
// console.log("frhufr") |
|
|
|
// that.setData({ |
|
|
|
// ids: e.currentTarget.dataset.id, |
|
|
|
// cardid: e.currentTarget.dataset.id, |
|
|
|
// remainingAmount: e.currentTarget.dataset.remainingamount, |
|
|
|
// }) |
|
|
|
// const startSoterAuthentication = () => { |
|
|
|
// wx.startSoterAuthentication({ |
|
|
|
// requestAuthModes: [AUTH_MODE], |
|
|
|
// challenge: 'test', |
|
|
|
// authContent: '请验证已有的指纹以继续', |
|
|
|
// success: (res) => { |
|
|
|
// that.gotoPayMoney() |
|
|
|
// }, |
|
|
|
// fail: (err) => { |
|
|
|
|
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// const checkIsEnrolled = () => { |
|
|
|
// wx.checkIsSoterEnrolledInDevice({ |
|
|
|
// checkAuthMode: AUTH_MODE, |
|
|
|
// success: (res) => { |
|
|
|
// console.log(res) |
|
|
|
// if (parseInt(res.isEnrolled) <= 0) { |
|
|
|
// that.gotoPayMoney(); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// startSoterAuthentication(); |
|
|
|
// }, |
|
|
|
// fail: (err) => { |
|
|
|
// console.error(err) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// wx.checkIsSupportSoterAuthentication({ |
|
|
|
// success: (res) => { |
|
|
|
// console.log(res) |
|
|
|
// checkIsEnrolled() |
|
|
|
// }, |
|
|
|
// fail: (err) => { |
|
|
|
// console.error(err); |
|
|
|
// that.gotoPayMoney(); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
const startSoterAuthentication = () => { |
|
|
|
wx.startSoterAuthentication({ |
|
|
|
requestAuthModes: [AUTH_MODE], |
|
|
@@ -117,13 +66,20 @@ Page({ |
|
|
|
wx.checkIsSupportSoterAuthentication({ |
|
|
|
success: (res) => { |
|
|
|
console.log(res) |
|
|
|
checkIsEnrolled() |
|
|
|
if(res.supportMode == []){ |
|
|
|
that.gotoPay(); |
|
|
|
}else if(res.supportMode == ['fingerPrint']){ |
|
|
|
checkIsEnrolled() |
|
|
|
}else if(res.supportMode = ['fingerPrint', 'facial'] ){ |
|
|
|
that.gotoPay(); |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: (err) => { |
|
|
|
console.error(err); |
|
|
|
that.gotoPay(); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
gotoPay: function () { |
|
|
|
let that = this; |
|
|
|