@@ -247,7 +247,7 @@ Page({ | |||||
if (ifSetUserInfo == 1) { | if (ifSetUserInfo == 1) { | ||||
wx.showModal({ | wx.showModal({ | ||||
title: '完善个人信息', | title: '完善个人信息', | ||||
content: '完善个人信息后可获得积分哦', | |||||
content: '请继续完成个人信息哦', | |||||
showCancel: true, | showCancel: true, | ||||
cancelText: "以后再说", | cancelText: "以后再说", | ||||
cancelColor: '', | cancelColor: '', | ||||
@@ -257,7 +257,6 @@ Page({ | |||||
if (res.cancel) { | if (res.cancel) { | ||||
console.log('cancel'); | console.log('cancel'); | ||||
} | } | ||||
if (res.confirm) { | if (res.confirm) { | ||||
wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 | wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -258,7 +258,7 @@ Page({ | |||||
merChantDetail = encodeURIComponent(merChantDetail) | merChantDetail = encodeURIComponent(merChantDetail) | ||||
console.log(that.data.data, 'data'); | console.log(that.data.data, 'data'); | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/scanPay/scanPay?merChant=${merChantDetail}&cardid=${that.data.data.id}&remainingAmount=${that.data.data.remainingAmount / 100}`, | |||||
url: `/pages/scanPay/scanPay?merChant=${merChantDetail}&cardid=${that.data.data.id}&remainingAmount=${that.data.data.remainingAmount / 100}&payCheck=${that.data.data.payCheck}`, | |||||
}) | }) | ||||
} | } | ||||
} | } | ||||
@@ -62,7 +62,7 @@ | |||||
<radio value="0" checked="true" />无验证 | <radio value="0" checked="true" />无验证 | ||||
</label> | </label> | ||||
<label> | <label> | ||||
<radio value="1" />密码验证 | |||||
<radio value="1" />设置支付密码 | |||||
</label> | </label> | ||||
</radio-group> | </radio-group> | ||||
@@ -7,7 +7,7 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
data:null, | |||||
data: null, | |||||
pay_success: imgurl.pay_success.url | pay_success: imgurl.pay_success.url | ||||
}, | }, | ||||
@@ -18,12 +18,15 @@ Page({ | |||||
let pamars = JSON.parse(options.data); | let pamars = JSON.parse(options.data); | ||||
pamars.updateDate = Util.formatTime(pamars.updateDate, "yyyy-MM-dd hh:mm:ss"); | pamars.updateDate = Util.formatTime(pamars.updateDate, "yyyy-MM-dd hh:mm:ss"); | ||||
this.setData({ | this.setData({ | ||||
data:pamars | |||||
data: pamars | |||||
}) | }) | ||||
}, | }, | ||||
goIndex:function(){ | |||||
wx.navigateBack({ | |||||
delta: 2 | |||||
goIndex: function () { | |||||
// wx.navigateBack({ | |||||
// delta: 2 | |||||
// }) | |||||
wx.navigateTo({ | |||||
url: '/pages/cardorder/index/index', | |||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
@@ -20,7 +20,11 @@ Page({ | |||||
showInput: false, | showInput: false, | ||||
ids: "", | ids: "", | ||||
wmyes: imgurl.wmyes.url, | wmyes: imgurl.wmyes.url, | ||||
wmclose: imgurl.wmclose.url | |||||
wmclose: imgurl.wmclose.url, | |||||
isPwd: false, | |||||
payCheck: 0, | |||||
pwdSw: false, | |||||
password: '' | |||||
}, | }, | ||||
/** | /** | ||||
@@ -36,6 +40,7 @@ Page({ | |||||
cardids: options.cardid, | cardids: options.cardid, | ||||
remainingAmount: options.remainingAmount, | remainingAmount: options.remainingAmount, | ||||
remainingAmounts: options.remainingAmount, | remainingAmounts: options.remainingAmount, | ||||
payCheck: options.payCheck * 1 | |||||
}) | }) | ||||
}, | }, | ||||
bindKeyInput(e) { | bindKeyInput(e) { | ||||
@@ -44,6 +49,28 @@ Page({ | |||||
inputValue: e.detail.value | inputValue: e.detail.value | ||||
}) | }) | ||||
}, | }, | ||||
// 关闭密码框 | |||||
contentClick(e) { | |||||
if (this.data.pwdSw && e.target.id != 'checkPwd') { | |||||
this.setData({ | |||||
isPwd: false, | |||||
pwdSw: false, | |||||
password: '' | |||||
}) | |||||
} | |||||
}, | |||||
inputPwd(e) { | |||||
this.setData({ | |||||
password: e.detail.value | |||||
}) | |||||
}, | |||||
goGetPay() { | |||||
this.startAuth() | |||||
}, | |||||
suretoPay: function (e) { | suretoPay: function (e) { | ||||
let that = this; | let that = this; | ||||
if (e.currentTarget.dataset.sure == 'sure' && that.data.checked) { | if (e.currentTarget.dataset.sure == 'sure' && that.data.checked) { | ||||
@@ -59,6 +86,25 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
checkPwd() { | |||||
if (!this.data.inputValue) { | |||||
wx.showToast({ | |||||
title: '金额不能为空!', | |||||
icon: 'error' | |||||
}) | |||||
return | |||||
} | |||||
if (this.data.payCheck && !this.data.pwdSw) { | |||||
this.setData({ | |||||
isPwd: true, // 打开密码框 | |||||
pwdSw: true // 允许点击其他区域时关闭密码框 | |||||
}) | |||||
} else { | |||||
this.startAuth() | |||||
} | |||||
}, | |||||
gotoPayMoney: function () { | gotoPayMoney: function () { | ||||
let that = this; | let that = this; | ||||
const startSoterAuthentication = () => { | const startSoterAuthentication = () => { | ||||
@@ -140,7 +186,9 @@ Page({ | |||||
data: { | data: { | ||||
cardId: that.data.cardid, | cardId: that.data.cardid, | ||||
merchantId: that.data.merChant.id, | merchantId: that.data.merChant.id, | ||||
totalFee: that.data.inputValue | |||||
totalFee: that.data.inputValue, | |||||
payCheck: that.data.payCheck, | |||||
password: that.data.password | |||||
} | } | ||||
}) | }) | ||||
.then(res => { | .then(res => { | ||||
@@ -148,9 +196,13 @@ Page({ | |||||
wx.hideLoading(); | wx.hideLoading(); | ||||
that.setData({ | that.setData({ | ||||
showModel: false, | showModel: false, | ||||
showInput: false | |||||
showInput: false, | |||||
isPwd: false, | |||||
pwdSw: false, | |||||
password: '' | |||||
}) | }) | ||||
wx.navigateTo({ | |||||
wx.reLaunch({ | |||||
url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, | url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, | ||||
}) | }) | ||||
} | } | ||||
@@ -248,7 +300,7 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
showPage: true, | showPage: true, | ||||
cardList: res.data.list, | cardList: res.data.list, | ||||
arrays: arrays | |||||
arrays: arrays, | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
@@ -1,6 +1,7 @@ | |||||
<navbar home back text="付款"></navbar> | <navbar home back text="付款"></navbar> | ||||
<view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
<view class='content' > | |||||
<view class='{{isPwd?"content active":"content"}}' bindtap="contentClick"> | |||||
<view class='head clearfix'> | <view class='head clearfix'> | ||||
<text class='fl'>付款给{{merChant.merchantName}}</text> | <text class='fl'>付款给{{merChant.merchantName}}</text> | ||||
<image class='fr' src='{{merChant.merchantImgUrl}}' mode='widthFix'></image> | <image class='fr' src='{{merChant.merchantImgUrl}}' mode='widthFix'></image> | ||||
@@ -9,7 +10,7 @@ | |||||
<view class='money'> | <view class='money'> | ||||
<text class='icon'>¥</text> | <text class='icon'>¥</text> | ||||
<input bindinput="bindKeyInput" disabled='{{showInput}}' class='num' type="digit" focus placeholder="" /> | <input bindinput="bindKeyInput" disabled='{{showInput}}' class='num' type="digit" focus placeholder="" /> | ||||
<button bindtap='startAuth' hover-class='active'>确认付款</button> | |||||
<button id="checkPwd" bindtap='checkPwd' 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> | ||||
@@ -29,11 +30,11 @@ | |||||
<view class='card-items-right'> | <view class='card-items-right'> | ||||
<view class='card-items-right-text'>余额:{{item.remainingAmount/100}}元</view> | <view class='card-items-right-text'>余额:{{item.remainingAmount/100}}元</view> | ||||
<view class='card-items-right-radio' class='icons'> | <view class='card-items-right-radio' class='icons'> | ||||
<image wx:if="{{item.id == ids&&item.flag}}" src='{{wmyes}}' mode='widthFix'></image> | |||||
<image wx:if="{{item.id == ids&&item.flag}}" src='{{wmyes}}' mode='widthFix'></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view wx:if='{{item.remainingAmount/100<inputValue||!item.flag}}' class='card-items {{item.flag?"":"opcacity"}}' wx:for="{{cardList}}" wx:key="index"> | |||||
<view wx:if='{{item.remainingAmount/100<inputValue||!item.flag}}' class='card-items {{item.flag?"":"opcacity"}}' wx:for="{{cardList}}" wx:key="index"> | |||||
<view class='card-items-left'> | <view class='card-items-left'> | ||||
<view class='card-items-left-img'> | <view class='card-items-left-img'> | ||||
<image src='{{item.coverImg}}'></image> | <image src='{{item.coverImg}}'></image> | ||||
@@ -52,4 +53,12 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
<view class='{{isPwd?"pwdDialog active":"pwdDialog"}}'> | |||||
<view class="title"> | |||||
输入密码 | |||||
</view> | |||||
<input class="pwdForm" type="password" placeholder="请输入密码" bindinput="inputPwd" value="{{password}}" /> | |||||
<button type="primary" bindtap="goGetPay" data-type='pwdTrue'>确定</button> | |||||
</view> | </view> |
@@ -1,67 +1,83 @@ | |||||
.content{ | |||||
padding:0 57rpx; | |||||
.content { | |||||
height: 1300rpx; | |||||
padding: 0 57rpx; | |||||
} | } | ||||
.title{ | |||||
.content.active { | |||||
opacity: 0.5; | |||||
} | |||||
.title { | |||||
margin-top: 60rpx; | margin-top: 60rpx; | ||||
} | } | ||||
.head{ | |||||
.head { | |||||
margin-top: 40rpx; | margin-top: 40rpx; | ||||
} | } | ||||
.head image{ | |||||
.head image { | |||||
width: 100rpx; | width: 100rpx; | ||||
height: 100rpx; | height: 100rpx; | ||||
border-radius:50%; | |||||
} | |||||
.head .fl{ | |||||
font-size:32rpx; | |||||
font-family:PingFang-SC-Bold; | |||||
font-weight:bold; | |||||
color:rgba(51,51,51,1); | |||||
} | |||||
.txt1{ | |||||
font-size:32rpx; | |||||
font-family:PingFang-SC-Regular; | |||||
font-weight:400; | |||||
color:rgba(134,134,134,1); | |||||
} | |||||
.money button{ | |||||
width:636rpx; | |||||
height:95rpx; | |||||
border-radius: 50%; | |||||
} | |||||
.head .fl { | |||||
font-size: 32rpx; | |||||
font-family: PingFang-SC-Bold; | |||||
font-weight: bold; | |||||
color: rgba(51, 51, 51, 1); | |||||
} | |||||
.txt1 { | |||||
font-size: 32rpx; | |||||
font-family: PingFang-SC-Regular; | |||||
font-weight: 400; | |||||
color: rgba(134, 134, 134, 1); | |||||
} | |||||
.money button { | |||||
width: 636rpx; | |||||
height: 95rpx; | |||||
line-height: 95rpx; | line-height: 95rpx; | ||||
margin:80rpx auto 0; | |||||
margin: 80rpx auto 0; | |||||
/* background:rgba(2,192,255,1); */ | /* background:rgba(2,192,255,1); */ | ||||
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||||
border-radius:48rpx; | |||||
background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); | |||||
border-radius: 48rpx; | |||||
color: #fff; | color: #fff; | ||||
} | } | ||||
.money .icon{ | |||||
font-size:38rpx; | |||||
font-weight:500; | |||||
color:rgba(51,51,51,1); | |||||
} | |||||
.money .num{ | |||||
font-size:58rpx!important; | |||||
font-family:PingFang-SC-Bold; | |||||
font-weight:bold; | |||||
color:rgba(51,51,51,1); | |||||
display: inline-block!important; | |||||
.money .icon { | |||||
font-size: 38rpx; | |||||
font-weight: 500; | |||||
color: rgba(51, 51, 51, 1); | |||||
} | |||||
.money .num { | |||||
font-size: 58rpx !important; | |||||
font-family: PingFang-SC-Bold; | |||||
font-weight: bold; | |||||
color: rgba(51, 51, 51, 1); | |||||
display: inline-block !important; | |||||
width: 580rpx; | width: 580rpx; | ||||
height: 60rpx; | height: 60rpx; | ||||
margin-top: 16rpx; | margin-top: 16rpx; | ||||
padding-top: 4rpx; | padding-top: 4rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
} | } | ||||
.active{ | |||||
.active { | |||||
opacity: .6; | opacity: .6; | ||||
} | } | ||||
.model{ | |||||
.model { | |||||
height: 100vh; | height: 100vh; | ||||
width: 100%; | width: 100%; | ||||
position: fixed; | position: fixed; | ||||
top: 0; | top: 0; | ||||
left: 0; | left: 0; | ||||
} | } | ||||
.zhezhao{ | |||||
.zhezhao { | |||||
position: fixed; | position: fixed; | ||||
top: 0; | top: 0; | ||||
left: 0; | left: 0; | ||||
@@ -71,7 +87,8 @@ | |||||
background: #000; | background: #000; | ||||
opacity: 0.5; | opacity: 0.5; | ||||
} | } | ||||
.card-model{ | |||||
.card-model { | |||||
position: fixed; | position: fixed; | ||||
height: 750rpx; | height: 750rpx; | ||||
width: 100%; | width: 100%; | ||||
@@ -80,33 +97,37 @@ | |||||
z-index: 20; | z-index: 20; | ||||
background: #fff; | background: #fff; | ||||
} | } | ||||
.card-top{ | |||||
.card-top { | |||||
position: relative; | position: relative; | ||||
height: 85rpx; | height: 85rpx; | ||||
width: 100%; | width: 100%; | ||||
background: #E67663; | background: #E67663; | ||||
line-height: 85rpx; | line-height: 85rpx; | ||||
text-align: center; | text-align: center; | ||||
font-size:30rpx; | |||||
font-weight:500; | |||||
color:rgba(255,255,255,1); | |||||
font-size: 30rpx; | |||||
font-weight: 500; | |||||
color: rgba(255, 255, 255, 1); | |||||
} | } | ||||
.card-content{ | |||||
.card-content { | |||||
height: 550rpx; | height: 550rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.card-content image{ | |||||
.card-content image { | |||||
width: 64rpx; | width: 64rpx; | ||||
height: 64rpx; | height: 64rpx; | ||||
border-radius:10rpx; | |||||
border-radius: 10rpx; | |||||
position: absolute; | position: absolute; | ||||
left: 20rpx; | left: 20rpx; | ||||
top: 0; | top: 0; | ||||
bottom: 0; | bottom: 0; | ||||
margin: auto; | |||||
margin: auto; | |||||
z-index: 100; | z-index: 100; | ||||
} | } | ||||
.card-items{ | |||||
.card-items { | |||||
position: relative; | position: relative; | ||||
height: 130rpx; | height: 130rpx; | ||||
line-height: 130rpx; | line-height: 130rpx; | ||||
@@ -115,43 +136,52 @@ | |||||
margin: 0 auto; | margin: 0 auto; | ||||
border-bottom: 1rpx solid #eee; | border-bottom: 1rpx solid #eee; | ||||
} | } | ||||
.card-items-left{ | |||||
.card-items-left { | |||||
width: 50%; | width: 50%; | ||||
float: left; | float: left; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
} | } | ||||
.card-items-right{ | |||||
.card-items-right { | |||||
width: 50%; | width: 50%; | ||||
float: right; | float: right; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
} | } | ||||
.card-items-left-img{ | |||||
.card-items-left-img { | |||||
width: 30%; | width: 30%; | ||||
height: 130rpx; | height: 130rpx; | ||||
float: left; | float: left; | ||||
} | } | ||||
.card-items-left-text{ | |||||
.card-items-left-text { | |||||
width: 70%; | width: 70%; | ||||
height: 130rpx; | height: 130rpx; | ||||
float: left; | float: left; | ||||
} | } | ||||
.card-items-right-text{ | |||||
.card-items-right-text { | |||||
text-align: right; | text-align: right; | ||||
float: left; | float: left; | ||||
width: 80%; | width: 80%; | ||||
} | } | ||||
.card-items-right-radio{ | |||||
.card-items-right-radio { | |||||
float: left; | float: left; | ||||
width: 20%; | width: 20%; | ||||
} | } | ||||
.checkcard-box{ | |||||
.checkcard-box { | |||||
width: 84%; | width: 84%; | ||||
background: #02C0FF!important; | |||||
background: #02C0FF !important; | |||||
} | } | ||||
.opcacity{ | |||||
opacity: .2!important; | |||||
.opcacity { | |||||
opacity: .2 !important; | |||||
} | } | ||||
.icons{ | |||||
.icons { | |||||
width: 40rpx; | width: 40rpx; | ||||
height: 40rpx; | height: 40rpx; | ||||
position: absolute; | position: absolute; | ||||
@@ -160,10 +190,12 @@ | |||||
right: 20rpx; | right: 20rpx; | ||||
margin: auto; | margin: auto; | ||||
} | } | ||||
.icons image{ | |||||
width:100%; | |||||
.icons image { | |||||
width: 100%; | |||||
} | } | ||||
.close{ | |||||
.close { | |||||
position: absolute; | position: absolute; | ||||
width: 40rpx; | width: 40rpx; | ||||
height: 40rpx; | height: 40rpx; | ||||
@@ -171,4 +203,41 @@ | |||||
bottom: 0; | bottom: 0; | ||||
right: 40rpx; | right: 40rpx; | ||||
margin: auto; | margin: auto; | ||||
} | |||||
.pwdDialog { | |||||
position: absolute; | |||||
top: 40%; | |||||
left: 50%; | |||||
transform: translate(-50%, -50%); | |||||
width: 500rpx; | |||||
height: 300rpx; | |||||
background-color: #fff; | |||||
box-shadow: 0 6px 20px 0 #00000026; | |||||
transition: all .3s; | |||||
opacity: 0; | |||||
z-index: -1; | |||||
border-radius: 20rpx; | |||||
padding: 0 60rpx 80rpx 60rpx; | |||||
} | |||||
.pwdDialog.active { | |||||
opacity: 1; | |||||
z-index: 999; | |||||
} | |||||
.pwdDialog .title { | |||||
text-align: center; | |||||
font-weight: 600; | |||||
font-size: 36rpx; | |||||
margin-bottom: 20rpx; | |||||
} | |||||
.pwdForm { | |||||
height: 80rpx; | |||||
border: 1px solid #f99c32; | |||||
background-color: #fefcf3; | |||||
border-radius: 10rpx; | |||||
padding-left: 20rpx; | |||||
margin-bottom: 40rpx; | |||||
} | } |