@@ -43,10 +43,11 @@ Page({ | |||||
// 扫一扫去支付 | // 扫一扫去支付 | ||||
gotoPay: function(e) { | gotoPay: function(e) { | ||||
let that = this; | let that = this; | ||||
console.log(e.currentTarget.dataset.remainingamount) | |||||
wx.scanCode({ | wx.scanCode({ | ||||
success: (res) => { | success: (res) => { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&cardRemainRealAmount=${e.currentTarget.dataset.cardRemainRealAmount}`, | |||||
url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&remainingAmount=${e.currentTarget.dataset.remainingamount}`, | |||||
}) | }) | ||||
}, | }, | ||||
fail: (res) => { | fail: (res) => { | ||||
@@ -19,6 +19,7 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
console.log(options.remainingAmount) | |||||
let that = this; | let that = this; | ||||
that.setData({ | that.setData({ | ||||
merChant: JSON.parse(options.merChant), | merChant: JSON.parse(options.merChant), | ||||
@@ -48,7 +49,9 @@ Page({ | |||||
.then(res => { | .then(res => { | ||||
console.log(res); | console.log(res); | ||||
if(res.code==200){ | if(res.code==200){ | ||||
that.startAuth(); | |||||
wx.navigateTo({ | |||||
url: '/pages/paySuccess/paySuccess', | |||||
}) | |||||
} | } | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
@@ -65,11 +68,6 @@ Page({ | |||||
showCancel: false | showCancel: false | ||||
}) | }) | ||||
} else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | ||||
// wx.showModal({ | |||||
// title: '抱歉', | |||||
// content: '余额不足', | |||||
// showCancel: false | |||||
// }) | |||||
that.setData({ | that.setData({ | ||||
showModel: true | showModel: true | ||||
}) | }) | ||||
@@ -85,9 +83,7 @@ Page({ | |||||
challenge: 'test', | challenge: 'test', | ||||
authContent: '请验证已有的指纹以继续', | authContent: '请验证已有的指纹以继续', | ||||
success: (res) => { | success: (res) => { | ||||
wx.navigateTo({ | |||||
url: '/pages/paySuccess/paySuccess', | |||||
}) | |||||
that.gotoPayMoney(); | |||||
}, | }, | ||||
fail: (err) => { | fail: (err) => { | ||||
@@ -1,5 +1,4 @@ | |||||
<view class='content'> | <view class='content'> | ||||
<!-- <view class='title'>卡余额:{{remainingAmount}}元</view> --> | |||||
<view class='head clearfix'> | <view class='head clearfix'> | ||||
<text class='fl'>付款给{{merChant.merchant_name}}</text> | <text class='fl'>付款给{{merChant.merchant_name}}</text> | ||||
<image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image> | <image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image> | ||||
@@ -8,7 +7,7 @@ | |||||
<view class='money'> | <view class='money'> | ||||
<text class='icon'>¥</text> | <text class='icon'>¥</text> | ||||
<input bindinput="bindKeyInput" class='num' type="digit" focus placeholder="" /> | <input bindinput="bindKeyInput" class='num' type="digit" focus placeholder="" /> | ||||
<button bindtap='gotoPayMoney' hover-class='active'>确认付款</button> | |||||
<button bindtap='startAuth' hover-class='active'>确认付款</button> | |||||
</view> | </view> | ||||
<view class='model' wx:if="{{showModel}}"> | <view class='model' wx:if="{{showModel}}"> | ||||
<view class='zhezhao'></view> | <view class='zhezhao'></view> | ||||
@@ -76,7 +76,7 @@ | |||||
<view class="margin"></view> | <view class="margin"></view> | ||||
<!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | ||||
<view bindlongtap='showVersion' class='version'> | <view bindlongtap='showVersion' class='version'> | ||||
<view wx:if="{{flag=='show'}}">版本号:3.2.1</view> | |||||
<view wx:if="{{flag=='show'}}">版本号:3.2.2</view> | |||||
<view wx:if="{{flag=='hidden'}}"></view> | <view wx:if="{{flag=='hidden'}}"></view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||