diff --git a/api/interfaces/index.js b/api/interfaces/index.js index 057d676..99d3a64 100644 --- a/api/interfaces/index.js +++ b/api/interfaces/index.js @@ -83,7 +83,7 @@ const busineSee = (business) => req({url: "business/" + business}) const busineForm = (business_id, business_item_id, type, mobile, username) => req({url: "business/create",method: "POST", data: {business_id: business_id, business_item_id: business_item_id, type: type, mobile: mobile, username: username}}) //订阅 -const subscribe = (subscribe) => req({url: "wechat/" + subscribe + "/welfare_subscribe",method: "POST"}) +const subscribe = (subscribe, channel) => req({url: "wechat/" + subscribe + "/welfare_subscribe",method: "POST", data: {channel: channel}}) export default({ index, diff --git a/api/interfaces/user.js b/api/interfaces/user.js index 0483c88..289e61a 100644 --- a/api/interfaces/user.js +++ b/api/interfaces/user.js @@ -61,6 +61,36 @@ const washcarCreate = (welfare_id, right_id, qty, address_id, is_deliver) => req // 我的分享 const myshare = (parent_id) => req({url: "user/share",data:{parent_id : parent_id || ''}}) +// 我的推荐 +const childs = (page) => req({url: "user/childs",data:{page : page}}) + +// 校验转账的手机号码 +const ajaxTel = (mobile) => req({url: "ajax/user", data:{mobile : mobile}}) + +// 转账获取积分账户分类 +const transfers = () => req({url: "user/transfers"}) + +// 转账提交表单 +const transfersForm = (mobile, type, amount, paypass) => req({url: "user/transfers", method: "POST", data:{mobile : mobile, type : type, amount : amount, paypass: paypass}}) + +// 设置支付密码 +const setPassword = (password, password_confirmation) => req({url: "user/setting/set_password", method: "POST", data:{password : password, password_confirmation : password_confirmation}}) + +// 修改支付密码 +const changePassword = (old_password, password, password_confirmation) => req({url: "user/setting/change_password", method: "POST", data:{old_password : old_password, password : password, password_confirmation : password_confirmation}}) + +// 重置支付密码 +const resetPassword = (code, password, password_confirmation, mobile, channel) => req({url: "user/setting/reset_password", method: "POST", data:{code : code, password : password, password_confirmation : password_confirmation, mobile : mobile, channel : channel}}) + +// 提现前置账户信息 +const withdraws = () => req({url: "withdraws/create"}) + +// 提现记录列表 +const withdrawsList = (page) => req({url: "user/withdraws", data:{page : page}}) + +// 提现表单填写 +const withdrawsForm = (amount, channel) => req({url: "withdraws", method: "POST", data:{amount : amount, channel: channel}}) + export default({ index, mobiles, @@ -81,5 +111,15 @@ export default({ merchant_card, washcarBuy, washcarCreate, - myshare + myshare, + childs, + ajaxTel, + transfers, + transfersForm, + setPassword, + changePassword, + resetPassword, + withdraws, + withdrawsList, + withdrawsForm }) diff --git a/app.json b/app.json index 8ec5ea7..2f9f0c8 100644 --- a/app.json +++ b/app.json @@ -29,7 +29,15 @@ "pages/washcar/washcar", "pages/makeForm/makeForm", "pages/car/index", - "pages/code/code" + "pages/code/code", + "pages/myBalance/myBalance", + "pages/password/password", + "pages/favour/favour", + "pages/recommend/recommend", + "pages/withdrawal_record/withdrawal_record", + "pages/withdrawal_form/withdrawal_form", + "pages/password_set/password_set", + "pages/password_forget/password_forget" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/account/account.wxml b/pages/account/account.wxml index d6f5909..6a9be52 100644 --- a/pages/account/account.wxml +++ b/pages/account/account.wxml @@ -7,19 +7,25 @@ - 可用余额 + 可用余额 + + {{number}} 可用余额,入账记录 - 待发放 + 待发放 + + {{blockeds}} - 立即查询 + 立即查询 + - + 账变记录 @@ -28,42 +34,43 @@ - - - - - {{item.channel == 'in' ? '入' : '出'}}{{item.title}} + + + + + {{item.channel == 'in' ? + '入' : '出'}}{{item.title}} + + + {{item.variable}} + - - {{item.variable}} + + {{item.remark}} - - - {{item.remark}} - - - - {{item.channel == 'in' ? '有效期:' : '扣除时间:'}} - {{item.created_at}}{{item.channel == 'in' ? ' 至 ' + item.expired_at : ''}} - - + + + + 加载中... + + + 没有更多了~ + + + + + + + 抱歉,目前暂无内容~ - - - 加载中... - - - 没有更多了~ - - - - - - - - 抱歉,目前暂无内容~ \ No newline at end of file diff --git a/pages/account/account.wxss b/pages/account/account.wxss index e8e90e2..bc8d81f 100644 --- a/pages/account/account.wxss +++ b/pages/account/account.wxss @@ -204,4 +204,16 @@ /* .integra-time text { color: #000; -} */ \ No newline at end of file +} */ + +/* 暂无内容 */ +.recommend-hint { + text-align: center; + color: #999; + padding: 100rpx 0; +} + +.recommend-hint image { + width: 200rpx; + height: 200rpx; +} \ No newline at end of file diff --git a/pages/favour/favour.js b/pages/favour/favour.js new file mode 100644 index 0000000..89f9efe --- /dev/null +++ b/pages/favour/favour.js @@ -0,0 +1,116 @@ +// 本市生活 + +Page({ + + /** + * 页面的初始数据 + */ + data: { + account : '', //账户积分 + typeArr : [], //转账类型 + typeIndex: 0, //转账下标 + userInfo : '', //转账用户信息 + mobile : '', //转账手机号 + disabled : false, //支付按钮状态 + popShow : false //校验弹出层 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + // 获取账户下拉列表 + this.accountList(); + }, + + /** + * 账户下拉列表 + */ + accountList() { + wx.$api.user.transfers().then(res=>{ + this.setData({ + account: res.data.account, + typeArr: res.data.accounts + }) + }) + }, + + /** + * 账户下拉选择 + */ + typeBind(e) { + this.setData({ + typeIndex: e.detail.value + }) + }, + + /** + * 转入的手机号 + */ + bindKeyInput(val){ + this.setData({ + mobile : val.detail.value + }) + }, + + /** + * 校验手机号码 + */ + checkTel() { + wx.$api.user.ajaxTel(this.data.mobile).then(res=>{ + this.setData({ + userInfo: res.data, + popShow : !this.data.popShow + }) + }).catch(err=>{}) + }, + + /** + * 关闭校验弹出 + */ + popHide() { + this.setData({ + popShow : !this.data.popShow + }) + }, + + /** + * 提交表单 + */ + formSubmit(e) { + // 检查用户登录状态 + const Paypass = wx.getStorageSync("hasPaypass") + if(Paypass == false) { + wx.showModal({ + title : '提示', + content : '抱歉,您还没有设置支付密码', + success : res=> { + if (res.confirm) { + wx.navigateTo({ + url: '/pages/password/password?source=favourUrl' + }) + } else if (res.cancel) {} + } + }) + return + } + let newAmount = e.detail.value.amount, + newMobile = this.data.mobile, + newPaypass = e.detail.value.paypass, + newType = this.data.typeArr[this.data.typeIndex].key + + wx.$api.user.transfersForm(newMobile, newType, newAmount, newPaypass).then(res=>{ + this.setData({ + disabled: true + }) + wx.showToast({ + title: '转入成功', + }) + setTimeout(()=>{ + wx.redirectTo({ + url: "/pages/account/account?type=" + newType + }) + },2000) + }) .catch(err=>{}) + } +}) \ No newline at end of file diff --git a/pages/favour/favour.json b/pages/favour/favour.json new file mode 100644 index 0000000..98cf688 --- /dev/null +++ b/pages/favour/favour.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "积分赠与", + "navigationBarBackgroundColor": "#000000", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/favour/favour.wxml b/pages/favour/favour.wxml new file mode 100644 index 0000000..73665de --- /dev/null +++ b/pages/favour/favour.wxml @@ -0,0 +1,51 @@ + + + + 本时生活 -- 积分赠与 + {{typeArr[typeIndex].value}} + {{typeArr[typeIndex].key == 'silver' ? account.silver : account.drill}} + + + + + 赠好友积分 +
+ + 积分账户 + + + {{typeArr[typeIndex].value}} + + + + + + 手机号 + + + 校验号码 + + + + 转账金额 + + + + 支付密码 + + + + 赠与记录 +
+
+ + + + + 当前转入的账户信息 + + + {{userInfo.nickname}} + + 知道了 + \ No newline at end of file diff --git a/pages/favour/favour.wxss b/pages/favour/favour.wxss new file mode 100644 index 0000000..42cd0a3 --- /dev/null +++ b/pages/favour/favour.wxss @@ -0,0 +1,187 @@ +page { + background: #fcdece; +} + +.favourBack { + position: relative; +} + +.favourBack-img { + width: 100vw; + display: block; +} + +.favourBack-cont { + position: absolute; + top: 0; + width: 100%; + padding: 140rpx 40rpx; + box-sizing: border-box; + left: 0; + color: #ca3c19; +} + +.favourBack-cont-title { + font-size: 32rpx; + font-weight: 600; + margin-bottom: 30rpx; +} + +.favourBack-cont-name { + font-size: 46rpx; + font-weight: 600; +} + +.favourBack-cont-number { + background-color: #ff5e5d; + color: #fff; + border-radius: 50rpx; + display: inline-block; + padding: 4rpx 20rpx; + margin-top: 15rpx; +} + +/* 表单 */ +.favourCont { + background-color: #fff; + margin: 0 30rpx; + padding: 0 40rpx 60rpx; + box-sizing: border-box; + border-radius: 30rpx; +} + +.favourCont-title { + text-align: center; + color: #d57449; + font-size: 38rpx; + font-weight: 600; + width: 100%; + padding: 30rpx 0 50rpx; +} + +.favourCont-label { + position: relative; + line-height: 80rpx; + background-color: #f4f4f4; + margin-bottom: 40rpx; + font-size: 28rpx; +} + +.favourCont-name { + background-color: #ffffff; + width: 130rpx; +} + +.favourCont-label>input, +.favourCont-picker, +.favourCont-check { + position: absolute; + left: 0; + font-size: 28rpx; + top: 0; + display: block; + height: 80rpx; + padding: 0 30rpx 0 160rpx; + width: 100%; + box-sizing: border-box; +} + +.favourCont-picker image { + width: 50rpx; + height: 50rpx; + position: absolute; + right: 10rpx; + top: 14rpx; +} + +.favourCont-btn { + background: linear-gradient(to right, #ff8e65, #ff5f5d); + color: #fff; + margin-top: 80rpx; + width: 100% !important; + font-size: 32rpx; + line-height: 54rpx; +} + +.favourCont-record { + text-align: center; + color: #ff5f5d; + font-size: 30rpx; + font-weight: 600; + margin-top: 40rpx; + text-align: center; + width: 100%; +} + +.favourCont-record text { + border-bottom: #ff5f5d solid 4rpx; + display: inline-block; +} + +.favourCont-check { + line-height: 80rpx; +} + +.favourCont-check>input { + height: 80rpx; +} + +.favourCont-check-btn { + font-size: 28rpx; + position: absolute; + right: 0; + top: 0; + background: #ff8e65; + padding: 0 20rpx; + color: #fff; + z-index: 9; +} + +/* 校验弹出层 */ +.popTel-back { + position: fixed; + left: 0; + top: 0; + background: rgba(0, 0, 0, .7); + width: 100vw; + height: 100vh; + z-index: 10; +} + +.popTel { + position: fixed; + left: 140rpx; + right: 140rpx; + top: 30%; + z-index: 11; + background-color: #fff; + border-radius: 20rpx; + text-align: center; + overflow: hidden; +} + +.popTel-title { + font-size: 32rpx; + background-color: #ff8e65; + color: #fff; + line-height: 80rpx; +} + +.popTel-cont { + padding: 60rpx 0; +} + +.popTel-head { + width: 100rpx; + height: 100rpx; + border-radius: 50%; + margin: 0 auto 20rpx; + border: #ff8e65 solid 2rpx; +} + +.popTel-btn { + border-top: 2rpx solid #dedede; + line-height: 90rpx; + color: #ff8e65; + font-size: 30rpx; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index d012a21..3ff8879 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -351,7 +351,7 @@ Page({ tmplIds: ['g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY'], success: res=> { if(res["g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY"] == "accept") { - wx.$api.index.subscribe(1).then(res=>{ + wx.$api.index.subscribe(1, 'mini').then(res=>{ wx.showLoading({ title: res.data, icon : 'none', diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 1247c72..5dab53f 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -113,7 +113,7 @@
- +