提现
This commit is contained in:
parent
1088d64c93
commit
6c2e1acd4a
@ -70,3 +70,4 @@
|
|||||||
- pages/member/member 会员商品 <br>
|
- pages/member/member 会员商品 <br>
|
||||||
- member/membertop 会员商品顶部的字
|
- member/membertop 会员商品顶部的字
|
||||||
- member/membershop 单个商品
|
- member/membershop 单个商品
|
||||||
|
- pages/deposit/deposit 提现
|
1
app.json
1
app.json
@ -20,6 +20,7 @@
|
|||||||
"pages/sales1/sales1",
|
"pages/sales1/sales1",
|
||||||
"pages/sales2/sales2",
|
"pages/sales2/sales2",
|
||||||
"pages/member/member",
|
"pages/member/member",
|
||||||
|
"pages/deposit/deposit",
|
||||||
"pages/yue/yue",
|
"pages/yue/yue",
|
||||||
|
|
||||||
"pages/yongjin/yongjin",
|
"pages/yongjin/yongjin",
|
||||||
|
106
pages/deposit/deposit.js
Normal file
106
pages/deposit/deposit.js
Normal 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
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
3
pages/deposit/deposit.json
Normal file
3
pages/deposit/deposit.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
14
pages/deposit/deposit.wxml
Normal file
14
pages/deposit/deposit.wxml
Normal 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>
|
56
pages/deposit/deposit.wxss
Normal file
56
pages/deposit/deposit.wxss
Normal 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;
|
||||||
|
}
|
@ -37,7 +37,11 @@ Page({
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
tixian(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url:"/pages/deposit/deposit"
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
@ -15,5 +15,5 @@
|
|||||||
<view class="detail">
|
<view class="detail">
|
||||||
<yuedetail></yuedetail>
|
<yuedetail></yuedetail>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="tixian">提现</view>
|
<view class="tixian" bind:tap="tixian">提现</view>
|
||||||
</view>
|
</view>
|
Loading…
x
Reference in New Issue
Block a user