From 6c2e1acd4a052ed2344ea5ef4dcba89d6180ab68 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Mon, 30 Dec 2019 09:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + app.json | 1 + pages/deposit/deposit.js | 106 +++++++++++++++++++++++++++++++++++++ pages/deposit/deposit.json | 3 ++ pages/deposit/deposit.wxml | 14 +++++ pages/deposit/deposit.wxss | 56 ++++++++++++++++++++ pages/yongjin/yongjin.js | 6 ++- pages/yongjin/yongjin.wxml | 2 +- 8 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 pages/deposit/deposit.js create mode 100644 pages/deposit/deposit.json create mode 100644 pages/deposit/deposit.wxml create mode 100644 pages/deposit/deposit.wxss diff --git a/README.md b/README.md index 95ae4be..2e67499 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,4 @@ - pages/member/member 会员商品
- member/membertop 会员商品顶部的字 - member/membershop 单个商品 +- pages/deposit/deposit 提现 \ No newline at end of file diff --git a/app.json b/app.json index 7351910..bbe7f15 100644 --- a/app.json +++ b/app.json @@ -20,6 +20,7 @@ "pages/sales1/sales1", "pages/sales2/sales2", "pages/member/member", + "pages/deposit/deposit", "pages/yue/yue", "pages/yongjin/yongjin", diff --git a/pages/deposit/deposit.js b/pages/deposit/deposit.js new file mode 100644 index 0000000..e7e822c --- /dev/null +++ b/pages/deposit/deposit.js @@ -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 + }); + + }) + }) + } +}) \ No newline at end of file diff --git a/pages/deposit/deposit.json b/pages/deposit/deposit.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/deposit/deposit.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/deposit/deposit.wxml b/pages/deposit/deposit.wxml new file mode 100644 index 0000000..04a4375 --- /dev/null +++ b/pages/deposit/deposit.wxml @@ -0,0 +1,14 @@ + + + 余额 + ¥{{user_money}} + + +
+ 金额: + 微信账号: + 支付宝: + 注:一次最多可提取10万元。 + +
+
diff --git a/pages/deposit/deposit.wxss b/pages/deposit/deposit.wxss new file mode 100644 index 0000000..d33b906 --- /dev/null +++ b/pages/deposit/deposit.wxss @@ -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; +} diff --git a/pages/yongjin/yongjin.js b/pages/yongjin/yongjin.js index a8fa78b..85cb227 100644 --- a/pages/yongjin/yongjin.js +++ b/pages/yongjin/yongjin.js @@ -37,7 +37,11 @@ Page({ }) }, - + tixian(){ + wx.navigateTo({ + url:"/pages/deposit/deposit" + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/yongjin/yongjin.wxml b/pages/yongjin/yongjin.wxml index 5aa9402..1f7590d 100644 --- a/pages/yongjin/yongjin.wxml +++ b/pages/yongjin/yongjin.wxml @@ -15,5 +15,5 @@ --> - 提现 + 提现 \ No newline at end of file