微信支付支持小数点
This commit is contained in:
parent
7992762a35
commit
cfeba9bef3
|
@ -117,11 +117,11 @@ Page({
|
|||
changeMoney(e) {
|
||||
const { money } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
money: Number(money)
|
||||
money: money
|
||||
})
|
||||
},
|
||||
onChangeMoney(e) {
|
||||
this.setData({ money: e.detail ? Number(e.detail) : e.detail })
|
||||
this.setData({ money: e.detail })
|
||||
},
|
||||
async recharge() {
|
||||
const { user, money, meter, tenement, park } = this.data;
|
||||
|
@ -134,7 +134,7 @@ Page({
|
|||
return;
|
||||
}
|
||||
console.log('this.data', this.data)
|
||||
const { code, message, data } = await requestRecharge({ money, meter: meter.code, tenement: tenement.id, park: park.id })
|
||||
const { code, message, data } = await requestRecharge({ money: Number(money), meter: meter.code, tenement: tenement.id, park: park.id })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
border="{{true}}"
|
||||
bind:change="onChangeMoney"
|
||||
size="large"
|
||||
type="number"
|
||||
type="digit"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue
Block a user