充值输入框问题修正

This commit is contained in:
lxy 2024-07-03 09:55:14 +08:00
parent d5acaadca7
commit 1765b1af43
6 changed files with 25 additions and 10 deletions

View File

@ -2,7 +2,6 @@
"usingComponents": {
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
"l-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/popup/index",
"l-arc-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/arc-popup/index",
"l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index",
"deposit-new": "../../deposit/new/index"
}

View File

@ -91,7 +91,16 @@
.ad-container {
padding: 24rpx;
background-color: white;
.safe-area-inset-bottom();
// .safe-area-inset-bottom();
height: 45vh;
.btnBox {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
.safe-area-inset-bottom();
}
}
.uf {

View File

@ -130,7 +130,13 @@ export default OakComponent({
onGoToUnfinishedPay && onGoToUnfinishedPay(payId);
},
setDepositOpen(depositOpen: boolean) {
this.setState({ depositOpen });
this.setState({ depositOpen }, () => {
setTimeout(() => {
this.setState({
focus: depositOpen
})
}, 333);
});
},
setUfOpen(ufOpen: boolean) {
this.setState({ ufOpen });
@ -222,6 +228,7 @@ export default OakComponent({
depositing: false,
setDepPriceMp(price: number | null) { this.setDepPrice(price) },
setDepositChannelMp(depositChannel: PayChannel | undefined) { this.setDepositChannel(depositChannel) },
focus: false
},
lifetimes: {
ready() {

View File

@ -47,13 +47,10 @@
</view>
</view>
<block wx:if="{{depositOpen}}">
<l-arc-popup
<l-popup
show="{{depositOpen}}"
direction="bottom"
content-align="bottom"
bind:lintap="onDepositModalClose"
min-height="200"
max-height="800"
z-index="1000"
>
<view class="ad-container">
<deposit-new
@ -65,8 +62,9 @@
onSetPrice="{{setDepPriceMp}}"
onSetChannel="{{setDepositChannelMp}}"
onSetPrice="{{setDepPriceMp}}"
focus="{{focus}}"
/>
<view style="margin-top: 12rpx">
<view class="btnBox">
<l-button
type="default"
size="long"
@ -78,7 +76,7 @@
</l-button>
</view>
</view>
</l-arc-popup>
</l-popup>
</block>
<block wx:if="{{ufOpen}}">
<l-dialog

View File

@ -12,6 +12,7 @@ export default OakComponent({
onSetPrice: (price: null | number) => undefined as void,
onSetChannel: (channel: PayChannel) => undefined as void,
loss: [0, '', {}] as [number, string, any],
focus: false,
},
data: {
onChooseChannelMp(channel: PayChannel) { this.onChooseChannel(channel) },

View File

@ -9,6 +9,7 @@
type="number"
placeholder="一次最大充值{{depositMax}}元"
bind:lininput="onDepPriceChangeMp"
focus="{{focus}}"
/>
</l-form-item>
<block wx:if="{{price > 0}}">