正在显示
3 个修改的文件
包含
75 行增加
和
8 行删除
| ... | ... | @@ -621,11 +621,39 @@ Page({ |
| 621 | 621 | return; |
| 622 | 622 | } |
| 623 | 623 | }, |
| 624 | - | |
| 625 | - /** | |
| 626 | - * 生命周期函数--监听页面隐藏 | |
| 627 | - */ | |
| 628 | - onHide: function() { | |
| 624 | + delet: function() { | |
| 625 | + console.log('delet') | |
| 626 | + return | |
| 627 | + var that = this | |
| 628 | + var Authorization = app.globalData.Authorization; | |
| 629 | + var url = baseUrl + 'persontax/v1/personal-taxes', method = "DELET" | |
| 630 | + wx.showLoading({ | |
| 631 | + title: '', | |
| 632 | + }) | |
| 633 | + wx.request({ | |
| 634 | + url: url, | |
| 635 | + method: method, | |
| 636 | + data: {}, | |
| 637 | + header: { | |
| 638 | + 'content-type': 'application/json', // 默认值 | |
| 639 | + "Authorization": Authorization | |
| 640 | + }, | |
| 641 | + success: function (res) { | |
| 642 | + console.log(res) | |
| 643 | + wx.hideLoading() | |
| 644 | + if (res.statusCode == 200) { | |
| 645 | + wx.navigateBack({ | |
| 646 | + delta: 1 | |
| 647 | + }) | |
| 648 | + } else { | |
| 649 | + that.showtoast(res.data.message) | |
| 650 | + } | |
| 651 | + }, | |
| 652 | + fail(res) { | |
| 653 | + console.log(res) | |
| 654 | + wx.hideLoading() | |
| 655 | + } | |
| 656 | + }) | |
| 629 | 657 | |
| 630 | 658 | }, |
| 631 | 659 | ... | ... |
| ... | ... | @@ -63,9 +63,10 @@ |
| 63 | 63 | </view> |
| 64 | 64 | </view> |
| 65 | 65 | </view> |
| 66 | - | |
| 67 | - <view class="btn_bottom"> | |
| 68 | - <button class="btn_bottom" formType="submit"> 保存</button> | |
| 66 | + | |
| 67 | + <view class="btn_left" bindtap='delet'>删除</view> | |
| 68 | + <view class="btn_bottom_wrap"> | |
| 69 | + <button class="btn_right" formType="submit">保存</button> | |
| 69 | 70 | </view> |
| 70 | 71 | </form> |
| 71 | 72 | </view> | ... | ... |
| ... | ... | @@ -127,4 +127,42 @@ input[disabled]{ |
| 127 | 127 | height: 40rpx; |
| 128 | 128 | float: right; |
| 129 | 129 | margin-top:24rpx; |
| 130 | +} | |
| 131 | + | |
| 132 | +.btn_left{ | |
| 133 | + width: 40%; | |
| 134 | + z-index: 10000; | |
| 135 | + height: 82rpx; | |
| 136 | + text-align: center; | |
| 137 | + position: fixed; | |
| 138 | + color: #357aeb; | |
| 139 | + bottom: 0; | |
| 140 | + line-height: 82rpx; | |
| 141 | + border: 1rpx solid #357aeb; | |
| 142 | + | |
| 143 | +} | |
| 144 | +.btn_bottom_wrap{ | |
| 145 | + width: 60%; | |
| 146 | + z-index: 10000; | |
| 147 | + height: 84rpx; | |
| 148 | + text-align: center; | |
| 149 | + position: fixed; | |
| 150 | + background: #357aeb; | |
| 151 | + /* border: 1rpx solid #357aeb; */ | |
| 152 | + bottom: 0; | |
| 153 | + line-height: 84rpx; | |
| 154 | + right: 0; | |
| 155 | +} | |
| 156 | +.btn_right{ | |
| 157 | + width: 60%; | |
| 158 | + z-index: 10000; | |
| 159 | + height: 84rpx; | |
| 160 | + background: #357aeb; | |
| 161 | + text-align: center; | |
| 162 | + position: fixed; | |
| 163 | + color: #fff; | |
| 164 | + bottom: 0; | |
| 165 | + right: 0; | |
| 166 | + line-height: 84rpx; | |
| 167 | + border-color: #357aeb; | |
| 130 | 168 | } |
| \ No newline at end of file | ... | ... |
请
注册
或
登录
后发表评论