Commit 21fcf8dc5d452d9140bdad0eb23fae384d1a935b
1 parent
8ca2c31d
【一键订C端:输入备注,提交预订未预留出】https://www.tapd.cn/57419716/bugtrace/bugs/view?bug_id=1157419716001002780
Showing
2 changed files
with
22 additions
and
1 deletions
| @@ -9,6 +9,7 @@ const _u = { | @@ -9,6 +9,7 @@ const _u = { | ||
| 9 | } | 9 | } |
| 10 | let dur=['morning','noon','night','midnight'] | 10 | let dur=['morning','noon','night','midnight'] |
| 11 | Page({ | 11 | Page({ |
| 12 | + paddingBottom:0, | ||
| 12 | user: _u, | 13 | user: _u, |
| 13 | /** | 14 | /** |
| 14 | * 页面的初始数据 | 15 | * 页面的初始数据 |
| @@ -206,4 +207,21 @@ Page({ | @@ -206,4 +207,21 @@ Page({ | ||
| 206 | cardEvent(e){ | 207 | cardEvent(e){ |
| 207 | this.editorReserve() | 208 | this.editorReserve() |
| 208 | }, | 209 | }, |
| 210 | + keyboardheightchange(e){ | ||
| 211 | + console.log(e); | ||
| 212 | + this.setData({ | ||
| 213 | + paddingBottom:e.detail.height?(parseInt(e.detail.height)+100):0 | ||
| 214 | + }) | ||
| 215 | + setTimeout(()=>{ | ||
| 216 | + this.pageScrollToBottom() | ||
| 217 | + },0) | ||
| 218 | + }, | ||
| 219 | + pageScrollToBottom: function () { | ||
| 220 | + wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) { | ||
| 221 | + // 使页面滚动到底部 | ||
| 222 | + wx.pageScrollTo({ | ||
| 223 | + scrollTop: rect.bottom | ||
| 224 | + }) | ||
| 225 | + }).exec() | ||
| 226 | + }, | ||
| 209 | }) | 227 | }) |
| 1 | <!--pages/reserve/submit.wxml--> | 1 | <!--pages/reserve/submit.wxml--> |
| 2 | <layout> | 2 | <layout> |
| 3 | <nav hasBack>预订详情</nav> | 3 | <nav hasBack>预订详情</nav> |
| 4 | -<view class="pages bg_white"> | 4 | +<view class="pages bg_white" style="padding-bottom: {{paddingBottom}}px;"> |
| 5 | <card hasShowStatus hasAddress="{{false}}" bindevent="cardEvent" | 5 | <card hasShowStatus hasAddress="{{false}}" bindevent="cardEvent" |
| 6 | hasOnlineReserve | 6 | hasOnlineReserve |
| 7 | seller="{{seller}}" detail="{{detail}}"> | 7 | seller="{{seller}}" detail="{{detail}}"> |
| @@ -73,6 +73,9 @@ | @@ -73,6 +73,9 @@ | ||
| 73 | <view class="Medium"> | 73 | <view class="Medium"> |
| 74 | <input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)" | 74 | <input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)" |
| 75 | bindinput="changeInput" | 75 | bindinput="changeInput" |
| 76 | + bindkeyboardheightchange="keyboardheightchange" | ||
| 77 | + bindblur="keyboardheightchange" | ||
| 78 | + bindconfirm="keyboardheightchange" | ||
| 76 | data-key="remark" | 79 | data-key="remark" |
| 77 | value="{{user.remark}}" | 80 | value="{{user.remark}}" |
| 78 | placeholder-class="input-pl" maxlength="25"/> | 81 | placeholder-class="input-pl" maxlength="25"/> |
-
Please register or login to post a comment