Browse Source

[卡支付]

tags/广东版3.2.1
meo 6 years ago
parent
commit
85b81be04a
4 changed files with 9 additions and 13 deletions
  1. +2
    -1
      pages/cardorder/index/index.js
  2. +5
    -9
      pages/scanPay/scanPay.js
  3. +1
    -2
      pages/scanPay/scanPay.wxml
  4. +1
    -1
      pages/user/index.wxml

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

@@ -43,10 +43,11 @@ Page({
// 扫一扫去支付
gotoPay: function(e) {
let that = this;
console.log(e.currentTarget.dataset.remainingamount)
wx.scanCode({
success: (res) => {
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) => {


+ 5
- 9
pages/scanPay/scanPay.js View File

@@ -19,6 +19,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options.remainingAmount)
let that = this;
that.setData({
merChant: JSON.parse(options.merChant),
@@ -48,7 +49,9 @@ Page({
.then(res => {
console.log(res);
if(res.code==200){
that.startAuth();
wx.navigateTo({
url: '/pages/paySuccess/paySuccess',
})
}
})
.catch(err => {
@@ -65,11 +68,6 @@ Page({
showCancel: false
})
} else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) {
// wx.showModal({
// title: '抱歉',
// content: '余额不足',
// showCancel: false
// })
that.setData({
showModel: true
})
@@ -85,9 +83,7 @@ Page({
challenge: 'test',
authContent: '请验证已有的指纹以继续',
success: (res) => {
wx.navigateTo({
url: '/pages/paySuccess/paySuccess',
})
that.gotoPayMoney();
},
fail: (err) => {



+ 1
- 2
pages/scanPay/scanPay.wxml View File

@@ -1,5 +1,4 @@
<view class='content'>
<!-- <view class='title'>卡余额:{{remainingAmount}}元</view> -->
<view class='head clearfix'>
<text class='fl'>付款给{{merChant.merchant_name}}</text>
<image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image>
@@ -8,7 +7,7 @@
<view class='money'>
<text class='icon'>¥</text>
<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 class='model' wx:if="{{showModel}}">
<view class='zhezhao'></view>


+ 1
- 1
pages/user/index.wxml View File

@@ -76,7 +76,7 @@
<view class="margin"></view>
<!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> -->
<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>
</view>


Loading…
Cancel
Save