This commit is contained in:
pplokijuhyg 2019-12-30 09:40:07 +08:00
parent 1088d64c93
commit 6c2e1acd4a
8 changed files with 187 additions and 2 deletions

View File

@ -70,3 +70,4 @@
- pages/member/member 会员商品 <br>
- member/membertop 会员商品顶部的字
- member/membershop 单个商品
- pages/deposit/deposit 提现

View File

@ -20,6 +20,7 @@
"pages/sales1/sales1",
"pages/sales2/sales2",
"pages/member/member",
"pages/deposit/deposit",
"pages/yue/yue",
"pages/yongjin/yongjin",

106
pages/deposit/deposit.js Normal file
View File

@ -0,0 +1,106 @@
// pages/deposit/deposit.js
import bin from "../../utils/bin"
Page({
/**
* 页面的初始数据
*/
data: {
user_money:"0.00"
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
bin.request({
url:"User/getusercenter"
}).then((res)=>{
this.setData({
user_money:res.data.result.user_money
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
tixian(e){
var money=e.detail.value.money;
var wechat=e.detail.value.wechat;
var zhifubao=e.detail.value.zhifubao;
// console.log(money,wechat,zhifubao)
if(wechat== "" && zhifubao == ""){
wx.showToast({
title: "请填写微信或支付宝帐号",
icon: 'none',
duration: 1500
});
return ;
}
bin.getuserid().then((id)=>{
bin.request({
url:"User/withdrawals",
urldata:{
user_id:id,
money,
wechat,
zhifubao
}
}).then((res)=>{
// console.log( )
wx.showToast({
title: res.data.result.message,
icon: 'success',
duration: 1500
});
})
})
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,14 @@
<view class="container">
<view class="topview">
<text class="topl">余额</text>
<text class="topr">¥{{user_money}}</text>
<view class="clearfix"></view>
</view>
<form bindsubmit="tixian">
<view class="topview">金额:</view><input value="" name="money"/>
<view class="topview">微信账号:</view><input value="" name="wechat"/>
<view class="topview">支付宝:</view><input value="" name="zhifubao"/>
<view class="zhu">注:一次最多可提取10万元。</view>
<button bindtap="clickButton" form-type="submit">提现</button>
</form>
</view>

View File

@ -0,0 +1,56 @@
/* pages/deposit/deposit.wxss */
.container {
padding: 0 30rpx;
}
a.container {
display: block;
padding: 0 32rpx;
color: #666;
}
.topview {
margin-bottom: 20rpx;
}
.topview .topl {
float: left;
}
.topview .topr {
float: right;
font-size: 16px;
}
.clearfix {
clear: both;
}
input {
background-color: #f7f7f7;
height: 80rpx;
line-height: 80rpx;
width: 100%;
text-align: left;
padding: 0 20rpx;
box-sizing: border-box;
font-size: 18px;
}
.zhu {
margin-top: 20rpx;
color: #999;
font-size: 13px;
}
button {
margin-top: 60rpx;
background-color: #fff;
line-height: 80rpx;
border-radius: 40rpx;
border: 1px solid #ff6666;
color: #ff6666;
}
.topview {
margin-bottom: 20rpx;
font-size: 14px;
padding-top: 20rpx;
}
.ziti {
margin-bottom: 20rpx;
font-size: 14px;
padding-top: 20rpx;
}

View File

@ -37,7 +37,11 @@ Page({
})
},
tixian(){
wx.navigateTo({
url:"/pages/deposit/deposit"
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -15,5 +15,5 @@
<view class="detail">
<yuedetail></yuedetail>
</view> -->
<view class="tixian">提现</view>
<view class="tixian" bind:tap="tixian">提现</view>
</view>