[添加转账,提现等新功能]
This commit is contained in:
@@ -7,19 +7,25 @@
|
||||
</view>
|
||||
<view class="integra-info">
|
||||
<view class="integra-right">
|
||||
<view class="integra-title"><text>可用余额</text><image src="/static/icon/integra_icon00.png"></image></view>
|
||||
<view class="integra-title"><text>可用余额</text>
|
||||
<image src="/static/icon/integra_icon00.png"></image>
|
||||
</view>
|
||||
<view class="integra-number">{{number}}</view>
|
||||
<view class="integra-btn"><text>可用余额,入账记录</text></view>
|
||||
</view>
|
||||
<view class="integra-right">
|
||||
<view class="integra-title"><text>待发放</text><image src="/static/icon/integra_icon01.png"></image></view>
|
||||
<view class="integra-title"><text>待发放</text>
|
||||
<image src="/static/icon/integra_icon01.png"></image>
|
||||
</view>
|
||||
<view class="integra-number">{{blockeds}}</view>
|
||||
<navigator hover-class="none" url="/pages/frozen/frozen?type={{type}}&blockeds={{blockeds}}" class="integra-btn integra-blue">立即查询<image src="/static/icon/rightsArrow.png"></image></navigator>
|
||||
<navigator hover-class="none" url="/pages/frozen/frozen?type={{type}}&blockeds={{blockeds}}"
|
||||
class="integra-btn integra-blue">立即查询<image src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="integra-cont" wx:if="{{accounts != ''}}">
|
||||
<view class="integra-cont">
|
||||
<view class="integra-cont-title">
|
||||
<view class="integra-cont-name">账变记录</view>
|
||||
<view class="integra-cont-picker">
|
||||
@@ -28,42 +34,43 @@
|
||||
</picker>
|
||||
<image class="integra-cont-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="integra-list" wx:for="{{accounts}}" wx:key="integras">
|
||||
<view class="integra-text">
|
||||
<view class="integra-title">
|
||||
<view class="integra-title-tips {{item.channel == 'in' ? 'active' : ''}}">{{item.channel == 'in' ? '入' : '出'}}</view>{{item.title}}
|
||||
<block wx:if="{{accounts.length > 0}}">
|
||||
<view class="integra-list" wx:for="{{accounts}}" wx:key="integras">
|
||||
<view class="integra-text">
|
||||
<view class="integra-title">
|
||||
<view class="integra-title-tips {{item.channel == 'in' ? 'active' : ''}}">{{item.channel == 'in' ?
|
||||
'入' : '出'}}</view>{{item.title}}
|
||||
</view>
|
||||
<view class="integra-oints {{item.channel == 'in' ? 'active' : ''}}">
|
||||
{{item.variable}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="integra-oints {{item.channel == 'in' ? 'active' : ''}}">
|
||||
{{item.variable}}
|
||||
<view class="integra-remark">
|
||||
{{item.remark}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="integra-remark">
|
||||
{{item.remark}}
|
||||
</view>
|
||||
<view class="integra-date">
|
||||
<view class="integra-time">
|
||||
<text>{{item.channel == 'in' ? '有效期:' : '扣除时间:'}}</text>
|
||||
{{item.created_at}}{{item.channel == 'in' ? ' 至 ' + item.expired_at : ''}}
|
||||
</view>
|
||||
<!-- <view class="integra-time">
|
||||
<view class="integra-date">
|
||||
<view class="integra-time">
|
||||
<text>{{item.channel == 'in' ? '有效期:' : '扣除时间:'}}</text>
|
||||
{{item.created_at}}{{item.channel == 'in' ? ' 至 ' + item.expired_at : ''}}
|
||||
</view>
|
||||
<!-- <view class="integra-time">
|
||||
<text>到期时间:</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 暂无内容 -->
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="https://storage.funnyzhibo.com/images/2020/05/06/staff_null.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
@@ -204,4 +204,16 @@
|
||||
|
||||
/* .integra-time text {
|
||||
color: #000;
|
||||
} */
|
||||
} */
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
116
pages/favour/favour.js
Normal file
116
pages/favour/favour.js
Normal file
@@ -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=>{})
|
||||
}
|
||||
})
|
||||
6
pages/favour/favour.json
Normal file
6
pages/favour/favour.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "积分赠与",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
51
pages/favour/favour.wxml
Normal file
51
pages/favour/favour.wxml
Normal file
@@ -0,0 +1,51 @@
|
||||
<view class="favourBack">
|
||||
<image class="favourBack-img" src="/static/img/favour_back.png" mode="widthFix"></image>
|
||||
<view class="favourBack-cont">
|
||||
<view class="favourBack-cont-title">本时生活 -- 积分赠与</view>
|
||||
<view class="favourBack-cont-name">{{typeArr[typeIndex].value}}</view>
|
||||
<view class="favourBack-cont-number">{{typeArr[typeIndex].key == 'silver' ? account.silver : account.drill}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="favourCont">
|
||||
<view class="favourCont-title">赠好友积分</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">积分账户</view>
|
||||
<picker class="favourCont-picker" range="{{typeArr}}" range-key="value" bindchange="typeBind">
|
||||
<view class="tabs-text">
|
||||
{{typeArr[typeIndex].value}}
|
||||
</view>
|
||||
<image src="/static/icon/rightsArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">手机号</view>
|
||||
<view class="favourCont-check">
|
||||
<input type="number" bindinput="bindKeyInput" placeholder="请输入被转人手机号" />
|
||||
<view class="favourCont-check-btn" bindtap="checkTel">校验号码</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">转账金额</view>
|
||||
<input type="digit" name="amount" placeholder="请输入转账金额" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">支付密码</view>
|
||||
<input type="number" name="paypass" placeholder="请输入支付密码" password />
|
||||
</view>
|
||||
<button class="favourCont-btn" formType="submit" disabled="{{disabled}}">立即转入</button>
|
||||
<navigator class="favourCont-record" hover-class="none" url="/pages/account/account?type={{typeArr[typeIndex].key}}"><text>赠与记录</text></navigator>
|
||||
</form>
|
||||
</view>
|
||||
|
||||
<!-- 校验手机号弹出 -->
|
||||
<view class="popTel-back" wx:if="{{popShow}}"></view>
|
||||
<view class="popTel" wx:if="{{popShow}}">
|
||||
<view class="popTel-title">当前转入的账户信息</view>
|
||||
<view class="popTel-cont">
|
||||
<image class="popTel-head" src="{{userInfo.avatar}}"></image>
|
||||
<view class="popTel-name">{{userInfo.nickname}}</view>
|
||||
</view>
|
||||
<view class="popTel-btn" bindtap="popHide">知道了</view>
|
||||
</view>
|
||||
187
pages/favour/favour.wxss
Normal file
187
pages/favour/favour.wxss
Normal file
@@ -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;
|
||||
}
|
||||
@@ -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',
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subscribe" bindtap="subscribeTap" wx:if="{{!subState}}">
|
||||
<view class="subscribe" bindtap="subscribeTap" wx:if="{{subState}}">
|
||||
<view class="subscribe-icon">
|
||||
<image class="subscribe-icon-one" src="/static/img/finger_00.png"></image>
|
||||
<image class="subscribe-icon-two" src="/static/img/finger_01.png"></image>
|
||||
|
||||
97
pages/myBalance/myBalance.js
Normal file
97
pages/myBalance/myBalance.js
Normal file
@@ -0,0 +1,97 @@
|
||||
// pages/myBalance/myBalance.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
type : "balance ", //卡类型
|
||||
number : '', //账户余额
|
||||
accounts : '', //账户列表
|
||||
screenArray : [
|
||||
{
|
||||
channel: 'all',
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
channel: 'in',
|
||||
name: '入账'
|
||||
},
|
||||
{
|
||||
channel: 'out',
|
||||
name: '出账'
|
||||
}
|
||||
], //账变记录筛选数组
|
||||
screenChannel: '', //账变记录筛选数组标识
|
||||
screenIndex : 0, //账变记录筛选index
|
||||
page : {}, //分页信息
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 账变记录
|
||||
*/
|
||||
accountInfo(page) {
|
||||
wx.$api.user.logs(this.data.type, this.data.screenChannel, page).then(res=>{
|
||||
let listArr = this.data.accounts,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
|
||||
this.setData({
|
||||
number : res.data.account.balance,
|
||||
accounts : newData,
|
||||
page : res.data.page
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 筛选账变记录-条件
|
||||
*/
|
||||
screenBind(e) {
|
||||
this.setData({
|
||||
screenIndex : e.detail.value,
|
||||
screenChannel: this.data.screenArray[e.detail.value].channel
|
||||
})
|
||||
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取账变记录
|
||||
this.accountInfo(pageNumber);
|
||||
}
|
||||
}
|
||||
})
|
||||
6
pages/myBalance/myBalance.json
Normal file
6
pages/myBalance/myBalance.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTitleText": "收益账户",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
74
pages/myBalance/myBalance.wxml
Normal file
74
pages/myBalance/myBalance.wxml
Normal file
@@ -0,0 +1,74 @@
|
||||
<view class="balance">
|
||||
<image class="balanceBack" src="/static/img/balance-back.png" mode="widthFix"></image>
|
||||
<view class="balanceCont">
|
||||
<view class="balanceCont-name">余额(积分)</view>
|
||||
<view class="balanceCont-number">
|
||||
<text>¥</text>{{number}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<navigator hover-class="none" url="/pages/withdrawal_form/withdrawal_form" class="label">
|
||||
<view class="labelLeft">
|
||||
<image class="labelLeft-img" src="/static/img/balance-icon-00.png"></image>
|
||||
<view class="labelLeft-name">提现</view>
|
||||
</view>
|
||||
<image class="labelLeft-arrow" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
|
||||
<navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record" class="label">
|
||||
<view class="labelLeft">
|
||||
<image class="labelLeft-img" src="/static/img/balance-icon-01.png"></image>
|
||||
<view class="labelLeft-name">提现记录</view>
|
||||
</view>
|
||||
<image class="labelLeft-arrow" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
|
||||
<!-- 账变记录 -->
|
||||
<view class="record">
|
||||
<view class="integra-cont-title">
|
||||
<view class="record-title">账变记录</view>
|
||||
<view class="integra-cont-picker">
|
||||
<picker bindchange="screenBind" value="{{screenIndex}}" range-key="name" range="{{screenArray}}">
|
||||
{{screenArray[screenIndex].name}}
|
||||
</picker>
|
||||
<image class="integra-cont-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{accounts.length > 0}}">
|
||||
<view class="record-list" wx:for="{{accounts}}" wx:key="accounts">
|
||||
<view class="record-list-cont">
|
||||
<image class="record-list-img" src="{{item.channel == 'in' ? '/static/img/balance-icon-02.png' : '/static/img/balance-icon-03.png'}}"></image>
|
||||
<view class="record-list-top">
|
||||
<view class="record-list-left">
|
||||
<view class="record-list-name">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="record-list-time">
|
||||
{{item.created_at}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-list-right {{item.channel == 'in' ? 'active' : ''}}">
|
||||
{{item.variable}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-list-remark">
|
||||
{{item.remark}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/null_icon.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
</view>
|
||||
179
pages/myBalance/myBalance.wxss
Normal file
179
pages/myBalance/myBalance.wxss
Normal file
@@ -0,0 +1,179 @@
|
||||
|
||||
/* 背景 */
|
||||
.balance {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.balanceBack {
|
||||
width: 100vw;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.balanceCont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
padding: 70rpx 0 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.balanceCont-name {
|
||||
color: #717171;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.balanceCont-number {
|
||||
color: #ffba33;
|
||||
font-size: 80rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.balanceCont-number text {
|
||||
font-size: 50rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
/* 提现 */
|
||||
.label {
|
||||
background-color: white;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.labelLeft {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.labelLeft-img {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
margin: 23rpx 20rpx;
|
||||
}
|
||||
|
||||
.labelLeft-arrow {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 28rpx 0;
|
||||
}
|
||||
|
||||
/* 账变记录 */
|
||||
.record {
|
||||
padding: 20rpx 25rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-title {
|
||||
color: #404040;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
line-height: 60prx;
|
||||
margin-bottom: 40rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.integra-cont-title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.integra-cont-picker {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
font-size: 30rpx;
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
|
||||
.integra-cont-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin: 6rpx 0 0 10rpx;
|
||||
}
|
||||
|
||||
/* 记录列表 */
|
||||
|
||||
.record-list {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.record-list-img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.record-list-cont {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.record-list-top {
|
||||
display: flex;
|
||||
padding-left: 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-list-left {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.record-list-time {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.record-list-right {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.record-list-right.active {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.record-list-remark {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
margin: 30rpx 0 0;
|
||||
background-color: #f5f5f5;
|
||||
padding: 10rpx 15rpx;
|
||||
display: inline-block;
|
||||
border-radius: 4rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-list-remark::after {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: -14rpx;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 14rpx solid transparent;
|
||||
border-right: 14rpx solid transparent;
|
||||
border-bottom: 14rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
@@ -80,7 +80,7 @@
|
||||
</view>
|
||||
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="https://storage.funnyzhibo.com/images/2020/05/06/null_icon.png"></image>
|
||||
<image src="/static/img/staff_null.png"></image>
|
||||
<view>暂无订单</view>
|
||||
</view>
|
||||
|
||||
|
||||
72
pages/password/password.js
Normal file
72
pages/password/password.js
Normal file
@@ -0,0 +1,72 @@
|
||||
// pages/password/password.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
passSource : '', //设置密码跳转来源favourUrl为转账跳转
|
||||
passType : '', //是否是首次设置密码
|
||||
disabled : false, //设置支付密码
|
||||
password : '', //支付密码
|
||||
confirmation: '' //确认密码
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 检查用户登录状态
|
||||
const Paypass = wx.getStorageSync("hasPaypass")
|
||||
|
||||
this.setData({
|
||||
passType : Paypass,
|
||||
passSource: options.source
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置密码
|
||||
*/
|
||||
formSubmit(e) {
|
||||
let newoldPassword= e.detail.value.oldPassword,
|
||||
newPassword = e.detail.value.password,
|
||||
newFormSubmit = e.detail.value.confirmation
|
||||
|
||||
let newUrl = '' //定义接口来源名称
|
||||
|
||||
if(this.data.passType == false) newUrl = wx.$api.user.setPassword(newPassword, newFormSubmit)
|
||||
if(this.data.passType == true) newUrl = wx.$api.user.changePassword(newoldPassword, newPassword, newFormSubmit)
|
||||
|
||||
newUrl.then(res=>{
|
||||
// 已设置密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : true
|
||||
})
|
||||
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
})
|
||||
|
||||
// 只有从转账页面跳转才回到上一页
|
||||
if(this.data.passSource == "favourUrl") {
|
||||
setTimeout(()=>{
|
||||
wx.navigateBack({delta: 1})
|
||||
},2000)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 其他跳转回到用户中心
|
||||
setTimeout(()=>{
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
},2000)
|
||||
})
|
||||
}
|
||||
})
|
||||
6
pages/password/password.json
Normal file
6
pages/password/password.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "支付密码",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
20
pages/password/password.wxml
Normal file
20
pages/password/password.wxml
Normal file
@@ -0,0 +1,20 @@
|
||||
<view class="pass">
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label" wx:if="{{passType}}">
|
||||
<view class="favourCont-name">旧密码:</view>
|
||||
<input type="number" password name="oldPassword" placeholder="请输入旧密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">{{passType ? '新密码' : '输入密码'}}:</view>
|
||||
<input type="number" password name="password" placeholder="请输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">确认密码:</view>
|
||||
<input type="number" password name="confirmation" placeholder="请再次输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-btn">
|
||||
<button formType="submit" disabled="{{disabled}}">确认设置</button>
|
||||
<navigator hover-class="none" url="/pages/password_forget/password_forget" class="forget" wx:if="{{passType}}">忘记密码, 立即找回?</navigator>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
48
pages/password/password.wxss
Normal file
48
pages/password/password.wxss
Normal file
@@ -0,0 +1,48 @@
|
||||
.favourCont-label {
|
||||
background-color: #fff;
|
||||
height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.favourCont-label input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
padding-left: 220rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.favourCont-name {
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.favourCont-btn {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
|
||||
.favourCont-btn button {
|
||||
background-color: #3a3b3e;
|
||||
color: #fff;
|
||||
width: 100% !important;
|
||||
line-height: 60rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.forget {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
color: #d6571f;
|
||||
font-weight: 600;
|
||||
}
|
||||
90
pages/password_forget/password_forget.js
Normal file
90
pages/password_forget/password_forget.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// pages/password_forget/password_forget.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
mobileNo : '', //手机号
|
||||
codename : '获取验证码',
|
||||
senddisabled: false, //获取验证码-按钮提交状态
|
||||
disabled : false //按钮提交状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* mobileNo
|
||||
*/
|
||||
getNameValue(e) {
|
||||
this.setData({
|
||||
mobileNo: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
*/
|
||||
sendOut(e) {
|
||||
var _this = this
|
||||
wx.$api.user.send(this.data.mobileNo,'PAYPASS').then(res=>{
|
||||
wx.showToast({
|
||||
title : '发送成功',
|
||||
icon : 'success',
|
||||
duration: 2000
|
||||
})
|
||||
var num = 61;
|
||||
var timer = setInterval(function () {
|
||||
num--;
|
||||
if (num <= 0) {
|
||||
clearInterval(timer);
|
||||
_this.setData({
|
||||
codename : '重新发送',
|
||||
senddisabled: false
|
||||
})
|
||||
|
||||
} else {
|
||||
_this.setData({
|
||||
codename : num + "s后重新获取",
|
||||
senddisabled: true
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置密码
|
||||
*/
|
||||
formSubmit(e) {
|
||||
let newMobile = this.data.mobileNo,
|
||||
newCode = e.detail.value.code,
|
||||
newPassword = e.detail.value.password,
|
||||
newFormSubmit = e.detail.value.confirmation
|
||||
wx.$api.user.resetPassword(newCode, newPassword, newFormSubmit, newMobile, 'PAYPASS').then(res=>{
|
||||
// 已设置密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : true
|
||||
})
|
||||
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
},2000)
|
||||
}).catch(err=>{})
|
||||
}
|
||||
})
|
||||
6
pages/password_forget/password_forget.json
Normal file
6
pages/password_forget/password_forget.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "重置密码",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
24
pages/password_forget/password_forget.wxml
Normal file
24
pages/password_forget/password_forget.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view class="pass">
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">手机号:</view>
|
||||
<input type="number" password name="mobile" placeholder="请输入手机号" bindinput="getNameValue" />
|
||||
<button bindtap="sendOut" class="obtain" disabled="{{senddisabled}}" hover-class="none">{{codename}}</button>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">验证码</view>
|
||||
<input type="number" name="code" placeholder="请输入验证码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">新密码:</view>
|
||||
<input type="number" password name="password" placeholder="请输入新的支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">确认密码:</view>
|
||||
<input type="number" password name="confirmation" placeholder="请再次输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-btn">
|
||||
<button formType="submit" disabled="{{disabled}}">确认设置</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
62
pages/password_forget/password_forget.wxss
Normal file
62
pages/password_forget/password_forget.wxss
Normal file
@@ -0,0 +1,62 @@
|
||||
.favourCont-label {
|
||||
background-color: #fff;
|
||||
height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.favourCont-label input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
padding-left: 220rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.favourCont-name {
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.favourCont-btn {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
|
||||
.favourCont-btn button {
|
||||
background-color: #3a3b3e;
|
||||
color: #fff;
|
||||
width: 100% !important;
|
||||
line-height: 60rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.forget {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.obtain {
|
||||
color: #d6571f;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 30rpx;
|
||||
position: absolute;
|
||||
width: auto !important;
|
||||
text-align: right;
|
||||
line-height: 100rpx;
|
||||
z-index: 9;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
right: 20rpx;
|
||||
top: 0;
|
||||
}
|
||||
23
pages/password_set/password_set.js
Normal file
23
pages/password_set/password_set.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 本时生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
passType : '', //是否是首次设置密码
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 检查用户登录状态
|
||||
const Paypass = wx.getStorageSync("hasPaypass")
|
||||
|
||||
this.setData({
|
||||
passType: Paypass
|
||||
})
|
||||
}
|
||||
})
|
||||
3
pages/password_set/password_set.json
Normal file
3
pages/password_set/password_set.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
8
pages/password_set/password_set.wxml
Normal file
8
pages/password_set/password_set.wxml
Normal file
@@ -0,0 +1,8 @@
|
||||
<navigator url="/pages/password/password?passType={{passType}}" class="label">
|
||||
<view class="label-name">
|
||||
支付密码
|
||||
</view>
|
||||
<view class="label-more">
|
||||
{{ passType ? '已设置' : '未设置'}}<image src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
23
pages/password_set/password_set.wxss
Normal file
23
pages/password_set/password_set.wxss
Normal file
@@ -0,0 +1,23 @@
|
||||
.label {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.label-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.label-more {
|
||||
display: flex;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.label-more image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 28rpx 0 0 10rpx;
|
||||
}
|
||||
56
pages/recommend/recommend.js
Normal file
56
pages/recommend/recommend.js
Normal file
@@ -0,0 +1,56 @@
|
||||
// 本时生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
recomNumber : '', //推荐好友数量
|
||||
recomArr : [], //推荐好友列表
|
||||
page : {}, //下一页
|
||||
lodingStats : false //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取列表
|
||||
this.recomInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品活动订单
|
||||
*/
|
||||
recomInfo(page) {
|
||||
wx.$api.user.childs(page).then(res=>{
|
||||
let listArr = this.data.recomArr,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
|
||||
newData = listArr.concat(res.data.lists.data)
|
||||
this.setData({
|
||||
recomNumber : res.data.all,
|
||||
recomArr : newData,
|
||||
page : res.data.lists.page,
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
this.recomInfo(pageNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/recommend/recommend.json
Normal file
3
pages/recommend/recommend.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
25
pages/recommend/recommend.wxml
Normal file
25
pages/recommend/recommend.wxml
Normal file
@@ -0,0 +1,25 @@
|
||||
<view class="recommend">
|
||||
<image class="recommend-img" src="/static/img/recommend_img.png" mode="widthFix"></image>
|
||||
<view class="recommend-cont">
|
||||
<view class="recommend-cont-number">{{recomNumber}}</view>
|
||||
<view class="recommend-cont-name">推荐好友人数(人)</view>
|
||||
</view>
|
||||
<view class="recommend-list">
|
||||
<view class="recommendIf" wx:if="{{recomArr.length > 0}}">
|
||||
<view class="recommend-label" wx:for="{{recomArr}}" wx:key="recomArr">
|
||||
<image class="recommend-head" src="{{item.avatar}}" mode="aspectFill"></image>
|
||||
<view class="recommend-text">
|
||||
<view class="recommend-text-top">
|
||||
<view class="recommend-text-name">{{item.nickname}}</view>
|
||||
<view class="recommend-text-tel">{{item.username}}</view>
|
||||
</view>
|
||||
<view class="recommend-text-identity">{{item.identity_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/staff_null.png"></image>
|
||||
<view>暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
104
pages/recommend/recommend.wxss
Normal file
104
pages/recommend/recommend.wxss
Normal file
@@ -0,0 +1,104 @@
|
||||
page {
|
||||
background: linear-gradient(to right, #fa603f, #fc963f);
|
||||
}
|
||||
|
||||
.recommend {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.recommend-cont {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
right: 100rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.recommend-cont-number {
|
||||
font-size: 70rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 列表 */
|
||||
.recommend-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 20rpx 40rpx;
|
||||
}
|
||||
|
||||
.recommend-label {
|
||||
position: relative;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.recommend-label::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.recommend-label:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.recommend-label:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.recommend-head {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 60%;
|
||||
}
|
||||
|
||||
.recommend-text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 0 0 0 140rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.recommend-text-top {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.recommend-text-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.recommend-text-tel {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.recommend-text-identity {
|
||||
font-size: 24rpx;
|
||||
color: #7b7b7b;
|
||||
border-radius: 20rpx;
|
||||
border: #d4d4d4 2rpx solid;
|
||||
display: inline-block;
|
||||
padding: 4rpx 15rpx;
|
||||
}
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
@@ -26,10 +26,16 @@ Page({
|
||||
type : 'silver'
|
||||
},
|
||||
{
|
||||
id : 2,
|
||||
id : 1,
|
||||
src : '/static/img/user_card_02.png',
|
||||
color : '#192b4c',
|
||||
type : 'drill'
|
||||
},
|
||||
{
|
||||
id : 2,
|
||||
src : '/static/img/user_card_01.png',
|
||||
color : '#ff8f00',
|
||||
type : 'balance'
|
||||
}
|
||||
],
|
||||
autoplay: false,
|
||||
@@ -77,6 +83,12 @@ Page({
|
||||
*/
|
||||
userInfo() {
|
||||
wx.$api.user.index().then(res=>{
|
||||
// 是否设置过密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : res.data.info.has_paypass
|
||||
})
|
||||
|
||||
this.setData({
|
||||
infos : res.data.info,
|
||||
order : res.data.order,
|
||||
@@ -94,6 +106,30 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理账户积分跳转
|
||||
*/
|
||||
swiperNav(e) {
|
||||
let newType = e.currentTarget.dataset.type
|
||||
if(this.data.isUser){
|
||||
if(newType == "balance"){
|
||||
wx.navigateTo({
|
||||
url: '/pages/myBalance/myBalance'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
wx.navigateTo({
|
||||
url: "/pages/account/account?type=" + newType
|
||||
})
|
||||
}else{
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="userHead">
|
||||
<view class="userHead-img">
|
||||
<image src="{{infos.avatar}}" mode="aspectFill"></image>
|
||||
<view class="userHead-tips {{infos.identity.identity_id == 0 ? '' : 'active'}}">{{infos.identity.identity_id == 0 ? '普通用户':'惠生活会员'}}</view>
|
||||
<view class="userHead-tips {{infos.identity.identity_id == 0 ? '' : 'active'}}">{{infos.identity.name}}</view>
|
||||
</view>
|
||||
<view class="userHead-text">
|
||||
<view class="userHead-name">
|
||||
@@ -36,12 +36,12 @@
|
||||
<view class="userCard-cont">
|
||||
<view class="userCard-clip">
|
||||
<swiper class="userCard-swiper" autoplay="{{swiper.autoplay}}" interval="{{swiper.interval}}" duration="{{swiper.duration}}" current="{{currentId}}">
|
||||
<swiper-item class="userCard-item" bindtap="userNav" data-url="/pages/account/account?type={{item.type}}" wx:for="{{swiper.imgUrls}}" wx:key="swiper">
|
||||
<swiper-item class="userCard-item" bindtap="swiperNav" data-type="{{item.type}}" wx:for="{{swiper.imgUrls}}" wx:key="swiper">
|
||||
<image class="userCard-img" src="{{item.src}}" mode="scaleToFill" bindtap="bannerTap" data-id="{{item.id}}"></image>
|
||||
<view class="userCard-parice" style="color:{{item.color}}" wx:if="{{isUser}}"><text>可用余额:</text>
|
||||
<block wx:if="{{item.id == 0}}">{{account.silver}}</block>
|
||||
<block wx:if="{{item.id == 1}}">{{account.gold}}</block>
|
||||
<block wx:if="{{item.id == 2}}">{{account.drill}}</block>
|
||||
<block wx:if="{{item.id == 2}}">{{account.balance}}</block>
|
||||
<!-- 0.00 -->
|
||||
</view>
|
||||
</swiper-item>
|
||||
@@ -176,9 +176,27 @@
|
||||
<view class="userOrder">
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/code/code">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userCoupon.png"></image>
|
||||
<image src="/static/img/userOrder_07.png"></image>
|
||||
</view>
|
||||
<text>我的邀请码</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/recommend/recommend">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_08.png"></image>
|
||||
</view>
|
||||
<text>我的推荐</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/favour/favour">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_09.png"></image>
|
||||
</view>
|
||||
<text>积分赠与</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/password_set/password_set">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_10.png"></image>
|
||||
</view>
|
||||
<text>支付密码</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -44,8 +44,8 @@
|
||||
}
|
||||
|
||||
.userHead-img view.active {
|
||||
width: 144rpx;
|
||||
left: 8rpx;
|
||||
width: 120rpx;
|
||||
left: 18rpx;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
63
pages/withdrawal_form/withdrawal_form.js
Normal file
63
pages/withdrawal_form/withdrawal_form.js
Normal file
@@ -0,0 +1,63 @@
|
||||
// pages/withdrawal_form/withdrawal_form.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
balance : '', //余额
|
||||
tax : '', //手续费
|
||||
disabled: false //按钮状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 获取提现前置账户信息
|
||||
this.withdrawsInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 提现前置账户信息
|
||||
*/
|
||||
withdrawsInfo() {
|
||||
wx.$api.user.withdraws().then(res=>{
|
||||
this.setData({
|
||||
balance: res.data.balance,
|
||||
tax : res.data.tax
|
||||
})
|
||||
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提现表单填写
|
||||
*/
|
||||
formSubmit(e) {
|
||||
let newAmount = e.detail.value.amount
|
||||
if(newAmount > 1) {
|
||||
wx.$api.user.withdrawsForm(newAmount, "mini").then(res=>{
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
|
||||
wx.showToast({
|
||||
title: '提现申请提交成功',
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '/pages/withdrawal_record/withdrawal_record'
|
||||
})
|
||||
},2000)
|
||||
|
||||
}).catch(err=>{})
|
||||
}else {
|
||||
wx.showToast({
|
||||
title: '金额不得低于2元',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/withdrawal_form/withdrawal_form.json
Normal file
4
pages/withdrawal_form/withdrawal_form.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "提现申请"
|
||||
}
|
||||
22
pages/withdrawal_form/withdrawal_form.wxml
Normal file
22
pages/withdrawal_form/withdrawal_form.wxml
Normal file
@@ -0,0 +1,22 @@
|
||||
<view class="withdrawal">
|
||||
<image class="withdrawal-img" src="/static/img/withdrawal_icon.png"></image>
|
||||
<view class="withdrawal-price">{{balance}}</view>
|
||||
<view class="withdrawal-name">(我的账户余额)</view>
|
||||
</view>
|
||||
|
||||
<view class="withdrawalTips">
|
||||
当前现金金额低于2元不可提现,每次提现的额度不低于2元,提现手续费按照到账周期收取
|
||||
</view>
|
||||
|
||||
<view class="withdrawalForm">
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="withdrawalForm-label">
|
||||
<view class="withdrawalForm-label-name">提现金额</view>
|
||||
<input type="number" name="amount" placeholder="请输入提现金额" />
|
||||
</view>
|
||||
<view class="withdrawalForm-label">
|
||||
提现费用收取,手续费{{tax}}%
|
||||
</view>
|
||||
<button class="withdrawalForm-btn" formType="submit" disabled="{{disabled}}">立即提现</button>
|
||||
</form>
|
||||
</view>
|
||||
54
pages/withdrawal_form/withdrawal_form.wxss
Normal file
54
pages/withdrawal_form/withdrawal_form.wxss
Normal file
@@ -0,0 +1,54 @@
|
||||
/* 余额 */
|
||||
.withdrawal{
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.withdrawal-img {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
}
|
||||
|
||||
.withdrawal-price {
|
||||
color: #df0000;
|
||||
font-size: 50rpx;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.withdrawal-name {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.withdrawalTips {
|
||||
padding: 30rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
color: #b9c6d2;
|
||||
}
|
||||
|
||||
.withdrawalForm-label {
|
||||
background-color: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.withdrawalForm-label input {
|
||||
background-color: transparent;
|
||||
padding-left: 50rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.withdrawalForm-btn {
|
||||
background-color: #ff6d6d;
|
||||
width: calc(100% - 40rpx) !important;
|
||||
color: #fff;
|
||||
height: 90rpx !important;
|
||||
line-height: 90rpx !important;
|
||||
padding: 0;
|
||||
margin-top: 40rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
68
pages/withdrawal_record/withdrawal_record.js
Normal file
68
pages/withdrawal_record/withdrawal_record.js
Normal file
@@ -0,0 +1,68 @@
|
||||
// 本时生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
accounts : [], //列表
|
||||
page : {}, //分页信息
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取提现列表
|
||||
this.recordInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 提现列表
|
||||
*/
|
||||
recordInfo(page) {
|
||||
wx.$api.user.withdrawsList(page).then(res=>{
|
||||
let listArr = this.data.accounts,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
|
||||
this.setData({
|
||||
accounts : newData,
|
||||
page : res.data.page
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取提现列表
|
||||
this.recordInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取提现列表
|
||||
this.recordInfo(pageNumber);
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/withdrawal_record/withdrawal_record.json
Normal file
4
pages/withdrawal_record/withdrawal_record.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "提现记录"
|
||||
}
|
||||
32
pages/withdrawal_record/withdrawal_record.wxml
Normal file
32
pages/withdrawal_record/withdrawal_record.wxml
Normal file
@@ -0,0 +1,32 @@
|
||||
<block wx:if="{{accounts.length > 0}}">
|
||||
<view class="record-list" wx:for="{{accounts}}" wx:key="accounts">
|
||||
<view class="record-top">
|
||||
<view class="record-way">{{item.way}}</view>
|
||||
<view class="record-take">+{{item.take}}</view>
|
||||
</view>
|
||||
<view class="record-cont">
|
||||
<view class="record-label">
|
||||
<view class="record-label-name">提现时间</view>
|
||||
<view class="record-label-time">{{item.create_at}}</view>
|
||||
</view>
|
||||
<view class="record-label">
|
||||
<view class="record-label-name">提现状态</view>
|
||||
<view class="record-label-status" wx:if="{item.status.status_text == 2 && item.status.status_text == 4}">{{item.status.status_text}}</view>
|
||||
<view class="record-label-status record-label-green" wx:elif="{item.status.status_text == 0 && item.status.status_text == 1 && item.status.status_text == 3}">{{item.status.status_text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无记录~</view>
|
||||
</view>
|
||||
43
pages/withdrawal_record/withdrawal_record.wxss
Normal file
43
pages/withdrawal_record/withdrawal_record.wxss
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 记录列表 */
|
||||
.record-list {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 25rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.record-top {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.record-way {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-take {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.record-cont {
|
||||
margin-top: 20rpx;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.record-label {
|
||||
display: flex;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
|
||||
.record-label-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-label-status {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.record-label-green {
|
||||
color: green;
|
||||
}
|
||||
Reference in New Issue
Block a user