
<view class="container">
<form bindsubmit="bindSave">
<view class="form-box">
<view class="row-wrap">
<view class="label">充值金额</view>
<view class="label-right">
<input name="amount" class="input" type="text" placeholder="最少100元起"/>
</view>
</view>
</view>
<button type="warn" class="save-btn" formType="submit">申请提现</button>
<button type="default" class="cancel-btn" bindtap="bindCancel">取消</button>
</form>
</view>
|
page{
height: 100%;
}
.container{
background-color: #f5f5f9;
justify-content: initial;
}
.form-box{
width:100%;
background-color: #fff;
margin-top: 20rpx;
}
.row-wrap{
width: 720rpx;
height: 88rpx;
line-height: 88rpx;
margin-left: 30rpx;
border-bottom: 1rpx solid #eee;
display: flex;
font-size: 28rpx;
/*justify-content: space-between;*/
}
.row-wrap .label{
width: 160rpx;
color: #000
}
.row-wrap .label-right{
flex: 1;
height: 88rpx;
line-height: 88rpx;
}
.row-wrap .label-right input{
height: 100%;
font-size: 28rpx;
padding-right: 30rpx;
}
.row-wrap .right-box{
margin-right: 30rpx;
}
.arrow-right{
width: 15rpx;
height: 24rpx;
}
.save-btn,
.cancel-btn{
width: 690rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
margin-top:30rpx;
border-radius: 6rpx;
box-sizing: border-box;
}
.save-btn{
background-color: #e64340;
color:#fff;
}
button[type="default"]{
background-color: #ffffff;
color:#000;
}
.addr-details{
height: auto;
padding: 30rpx 0;
margin-left:30rpx;
border-bottom: 1rpx solid #eee;
display: flex;
font-size: 28rpx;
}
.addr-details .label{
margin:auto 0 auto 0;
width: 160rpx;
color: #000
}
.addr-details textarea{
box-sizing: border-box;
width: 480rpx;
overflow: scroll;
}
picker {
min-width: 20rpx;
height: 100%;
margin-right: 20rpx;
}
.hui{
color: #777;
}
|
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
bindCancel: function () {
wx.navigateBack({})
},
bindSave: function (e) {
var that = this;
var amount = e.detail.value.amount;
if (amount == "" || amount * 1 < 100) {
wx.showModal({
title: '错误',
content: '请填写正确的提现金额',
showCancel: false
})
return
}
wx.request({
url: 'https://api.it120.cc/' + app.globalData.subDomain + '/user/withDraw/apply',
data: {
token: app.globalData.token,
money: amount
},
success: function (res) {
if (res.data.code == 0) {
wx.showModal({
title: '成功',
content: '您的提现申请已提交,等待财务打款',
showCancel: false,
success: function (res) {
if (res.confirm) {
that.bindCancel();
}
}
})
} else {
wx.showModal({
title: '错误',
content: res.data.msg,
showCancel: false
})
}
}
})
}
})
|
模板简介:该模板名称为【微信小程序红色申请提现单功能样式设计制作开发教程】,大小是,文档格式为.,推荐使用打开,作品中的图片,文字等数据均可修改,图片请在作品中选中图片替换即可,文字修改直接点击文字修改即可,您也可以新增或修改作品中的内容,该模板来自用户分享,如有侵权行为请联系网站客服处理。欢迎来懒人模板【小程序教程】栏目查找您需要的精美模板。