Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhqg-mini
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhqg
zhqg-mini
Commits
0a1bbdd9
Commit
0a1bbdd9
authored
Oct 19, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣模块
parent
306fed17
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
320 additions
and
283 deletions
+320
-283
index.js
pages/distribution/index.js
+21
-79
index.wxml
pages/distribution/index.wxml
+11
-11
index.wxss
pages/distribution/index.wxss
+3
-5
index.js
pages/index/index.js
+1
-1
invite.json
pages/invite/invite.json
+3
-2
invite.wxss
pages/invite/invite.wxss
+1
-1
user.wxml
pages/user/user.wxml
+2
-16
index.js
pages/userAccount/balanceWithdraw/index.js
+86
-82
index.wxml
pages/userAccount/balanceWithdraw/index.wxml
+2
-2
index.js
pages/userAccount/comDetails/index.js
+27
-9
index.wxss
pages/userAccount/distributionOrder/index.wxss
+3
-2
index.js
pages/userAccount/myTeam/index.js
+56
-21
index.wxml
pages/userAccount/myTeam/index.wxml
+14
-7
index.wxss
pages/userAccount/myTeam/index.wxss
+42
-2
index.js
pages/userAccount/withdrawalRecord/index.js
+41
-36
index.wxml
pages/userAccount/withdrawalRecord/index.wxml
+5
-5
index.wxss
pages/userAccount/withdrawalRecord/index.wxss
+1
-1
config.js
utils/config.js
+1
-1
No files found.
pages/distribution/index.js
View file @
0a1bbdd9
// pages/person/person2.js
// var util = require('../../config/util.js');
// var api = require('../../config/api.js');
// var user = require('../../services/user.js');
var
http
=
require
(
"../../utils/http.js"
);
var
app
=
getApp
()
Page
({
/**
...
...
@@ -20,25 +16,18 @@ Page({
},
// 获取分销基础信息
distribution
(
token
)
{
var
that
=
this
;
util
.
request
(
api
.
distribution
,
{
token
:
token
}).
then
(
res
=>
{
console
.
log
(
res
)
that
.
setData
({
pageInfo
:
res
.
data
})
})
},
// 提现信息
myAccount
(
token
)
{
var
that
=
this
;
var
token
=
wx
.
getStorageSync
(
'token'
);
util
.
request
(
api
.
myAccount
,
{
'token'
:
token
}).
then
(
res
=>
{
that
.
setData
({
myAccountInfo
:
res
.
data
})
})
distribution
()
{
var
params
=
{
url
:
"/commission/getCommissionCenter"
,
method
:
"GET"
,
data
:
{},
callBack
:
(
res
)
=>
{
this
.
setData
({
pageInfo
:
res
.
result
})
}
};
http
.
request
(
params
);
},
// 页面跳转
...
...
@@ -52,7 +41,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**
...
...
@@ -66,10 +55,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
// let that = this;
// var token = wx.getStorageSync('token');
// that.distribution(token);
// that.myAccount(token);
this
.
setData
({
userInfo
:
app
.
globalData
.
userInfo
})
this
.
distribution
();
// this.myAccount(token);
},
...
...
@@ -106,55 +96,7 @@ Page({
*/
onShareAppMessage
:
function
()
{
},
clickLogin
()
{
user
.
checkLogin
().
then
(
res
=>
{
console
.
log
(
'has login'
);
}).
catch
(()
=>
{
wx
.
navigateTo
({
url
:
'/pages/auth/login/login'
,
});
});
},
toset
()
{
// wx.navigateTo({
// url: "/pages/baoming/baoming"
// });
// return;
user
.
checkLogin
().
then
(
res
=>
{
wx
.
navigateTo
({
url
:
'/pages/person/personSet/personSet'
});
}).
catch
(()
=>
{
wx
.
navigateTo
({
url
:
'/pages/auth/login/login'
,
});
});
},
clickOrder
(
event
)
{
let
idx
=
event
.
currentTarget
.
dataset
.
index
;
user
.
checkLogin
().
then
(
res
=>
{
if
(
idx
==
5
)
{
wx
.
navigateTo
({
url
:
'/pages/orders/addressSelect/address'
,
})
}
else
{
wx
.
navigateTo
({
url
:
'/pages/orders/orderList/index?index='
+
idx
,
});
}
}).
catch
(()
=>
{
wx
.
navigateTo
({
url
:
'/pages/auth/login/login'
,
});
});
},
}
})
pages/distribution/index.wxml
View file @
0a1bbdd9
<!--pages/me/me.wxml-->
<view class="view-page">
<!-- 用户信息-背景 -->
<
image class="background-img-head" src="../../images/bg@2x.png"></image
>
<
!-- <image class="background-img-head" src="../../images/bg@2x.png"></image> --
>
<!-- 用户信息 -->
<view class="user-info-box">
<!-- 信息 -->
<view class="user-info-show">
<image class="user-portrait" src="{{
pageInfo.userInfo.picture
}}"></image>
<image class="user-portrait" src="{{
userInfo.pic
}}"></image>
<view class="user-name">
<view>{{
pageInfo.userInfo.user
Name}}</view>
<view>推荐人:您是由{{pageInfo.
userInfo.parentN
ame}}推荐</view>
<view>{{
userInfo.nick
Name}}</view>
<view>推荐人:您是由{{pageInfo.
parentM
ame}}推荐</view>
</view>
</view>
<!-- 数字 -->
<view class="user-info-num">
<view>
<text>{{
myAccountInfo ? myAccountInfo.withdrawalSuccessful :
0}}</text>
<text>{{
pageInfo.cashAmount ||
0}}</text>
<text>成功提现佣金</text>
</view>
<view>
<text>{{
myAccountInfo ? myAccountInfo.incomeTotal :
0}}</text>
<text>{{
pageInfo.userAccount ||
0}}</text>
<text>可提现佣金</text>
</view>
</view>
...
...
@@ -32,14 +32,14 @@
<image src="../../images/icon/team@2x.png"></image>
<view>
<text>我的团队</text>
<text>{{pageInfo.teamNum}}人</text>
<text>{{pageInfo.teamNum
ber || 0
}}人</text>
</view>
</view>
<view class="menu-li" bindtap="goPage" data-page="/pages/userAccount/distributionOrder/index">
<image src="../../images/icon/management@2x.png"></image>
<view>
<text>分销订单</text>
<text>{{pageInfo.
distributionOrderNum
}}笔</text>
<text>{{pageInfo.
commissionOrderTimes || 0
}}笔</text>
</view>
</view>
</view>
...
...
@@ -48,14 +48,14 @@
<image src="../../images/icon/commission@2x.png"></image>
<view>
<text>佣金明细</text>
<text>{{pageInfo.commission
Num
}}笔</text>
<text>{{pageInfo.commission
OrderTimes || 0
}}笔</text>
</view>
</view>
<view class="menu-li" bindtap="goPage" data-page="/pages/userAccount/withdrawalRecord/index">
<image src="../../images/icon/detaileds@2x.png"></image>
<view>
<text>提现明细</text>
<text>{{pageInfo.
withdrawalSuccessful
}}笔</text>
<text>{{pageInfo.
cashRecordTimes
}}笔</text>
</view>
</view>
</view>
...
...
@@ -71,7 +71,7 @@
<image src="../../images/icon/cash.png"></image>
<view>
<text>我要提现</text>
<text>{{pageInfo.
toBeWithdrawal
}}元</text>
<text>{{pageInfo.
userAccount || 0
}}元</text>
</view>
</view>
</view>
...
...
pages/distribution/index.wxss
View file @
0a1bbdd9
...
...
@@ -12,7 +12,7 @@ page {
.background-img-head{
width: 100%;
height: 400rpx;
/* height: 400rpx; */
margin-bottom: 40rpx;
}
...
...
@@ -21,12 +21,10 @@ page {
height: 330rpx;
border-radius: 20rpx;
background: white;
position: absolute;
top: 80rpx;
left: 30rpx;
display: flex;
align-items: center;
flex-direction: column;
margin: 20rpx 0;
}
.user-info-show{
...
...
@@ -73,7 +71,7 @@ page {
.rule{
width: 120rpx;
height: 50rpx;
background: #
030521
;
background: #
3a86b9
;
border-radius: 25rpx;
text-align: center;
line-height: 50rpx;
...
...
pages/index/index.js
View file @
0a1bbdd9
...
...
@@ -24,7 +24,7 @@ Page({
url
:
'../logs/logs'
})
},
onLoad
:
function
()
{
onLoad
:
function
(
options
)
{
let
token
=
wx
.
getStorageSync
(
'token'
)
this
.
getAllData
();
// 如果是点击转发跳转进来,分析参数page
...
...
pages/invite/invite.json
View file @
0a1bbdd9
{
"usingComponents"
:
{},
"navigationBarTitleText"
:
"邀请海报"
,
"navigationBarBackgroundColor"
:
"#
000000
"
,
"navigationBarTextStyle"
:
"
white
"
"navigationBarBackgroundColor"
:
"#
fff
"
,
"navigationBarTextStyle"
:
"
black
"
}
\ No newline at end of file
pages/invite/invite.wxss
View file @
0a1bbdd9
/* pages/ininvite/ininvite.wxss */
page{
background-color: #
000000
;
background-color: #
fff
;
}
.box{
width: 100%;
...
...
pages/user/user.wxml
View file @
0a1bbdd9
...
...
@@ -13,8 +13,8 @@
</view>
<view class="prod-col" style="margin-top: 0;padding-top: 0;">
<view class="col-item" bindtap=''>
<view class="num">{{
userAccount.amount
|| 0}}</view>
<view class="tit">
余
额</view>
<view class="num">{{
(userAccount.amount + userAccount.waitAmount)
|| 0}}</view>
<view class="tit">
总
额</view>
</view>
<view class="col-item">
<view class="num">{{userAccount.integral || 0}}</view>
...
...
@@ -85,20 +85,6 @@
</view>
<view class='arrowhead'></view>
</view>
<view class='memu-item' bindtap='toCouponCenter'>
<view class="i-name">
<image src='../../images/icon/getCoupon.png'></image>
<text>领券中心</text>
</view>
<view class='arrowhead'></view>
</view>
<view class='memu-item' bindtap='toMyCouponPage'>
<view class="i-name">
<image src='../../images/icon/myCoupon.png'></image>
<text>我的优惠券</text>
</view>
<view class='arrowhead'></view>
</view>
<view class='memu-item' bindtap='toInvitePage'>
<view class="i-name">
<image src='../../images/icon/toDelivery.png'></image>
...
...
pages/userAccount/balanceWithdraw/index.js
View file @
0a1bbdd9
// pages/newly/redpacket.js
// var util = require('../../config/util.js'
);
// var api = require('../../config/api.js');
var
http
=
require
(
"../../../utils/http.js"
);
var
app
=
getApp
()
Page
({
/**
...
...
@@ -13,72 +13,88 @@ Page({
actualAmount
:
''
,
how
:
false
,
//是否显示如何上传收款码提示框
},
getRate
()
{
var
params
=
{
url
:
"/apiCommon/getBaseParamByCode"
,
method
:
"GET"
,
data
:
{
paramCode
:
'cash_service_rate'
},
callBack
:
(
res
)
=>
{
let
rate
=
JSON
.
parse
(
res
.
result
.
paramValue
).
rate
console
.
log
(
'rate'
,
JSON
.
parse
(
res
.
result
.
paramValue
))
this
.
setData
({
rate
:
rate
});
}
};
http
.
request
(
params
);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getRate
()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
getData
();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
getData
()
{
},
gotoShow
:
function
()
{
gotoShow
:
function
()
{
var
that
=
this
wx
.
chooseImage
({
count
:
1
,
// 最多可以选择的图片张数,默认9
sizeType
:
[
'original'
,
'compressed'
],
// original 原图,compressed 压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// album 从相册选图,camera 使用相机,默认二者都有
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// success
var
tempFilePaths
=
res
.
tempFilePaths
;
// that.setData({
...
...
@@ -88,17 +104,17 @@ Page({
imgStr
:
res
.
tempFilePaths
})
},
fail
:
function
()
{
fail
:
function
()
{
// fail
},
complete
:
function
()
{
complete
:
function
()
{
// complete
}
})
},
amountinput
(
e
)
{
let
value
=
e
.
detail
.
value
let
actualAmount
=
(
value
*
0.92
).
toFixed
(
2
);
let
actualAmount
=
(
value
*
(
1
-
(
this
.
data
.
rate
/
100
))
).
toFixed
(
2
);
console
.
log
(
value
,
actualAmount
)
this
.
setData
({
amount
:
value
,
...
...
@@ -116,7 +132,7 @@ Page({
let
value
=
e
.
detail
.
value
console
.
log
(
value
)
this
.
setData
({
bank
:
value
bank
Name
:
value
})
},
bankCardinput
(
e
)
{
...
...
@@ -127,44 +143,56 @@ Page({
})
},
//最新提现做法
inputimg
:
function
()
{
inputimg
:
function
()
{
let
that
=
this
;
var
token
=
wx
.
getStorageSync
(
'token'
);
var
openid
=
wx
.
getStorageSync
(
'openid'
)
util
.
request
(
api
.
newly_balanceWithdraw
,
{
token
:
token
,
openid
:
openid
,
amount
:
that
.
data
.
amount
,
name
:
that
.
data
.
name
,
bank
:
that
.
data
.
bank
,
bankCard
:
that
.
data
.
bankCard
}).
then
(
function
(
res
)
{
if
(
res
.
status
===
200
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'操作成功,我们将尽快为您提现'
,
icon
:
'none'
})
}
else
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
res
.
desc
,
icon
:
'none'
})
}
});
if
(
!
that
.
data
.
name
)
{
wx
.
showToast
({
title
:
'请填写收款人'
,
icon
:
'none'
})
return
}
if
(
!
that
.
data
.
bankName
)
{
wx
.
showToast
({
title
:
'请填写开户行'
,
icon
:
'none'
})
return
}
if
(
!
that
.
data
.
bankCard
)
{
wx
.
showToast
({
title
:
'请填写银行卡号'
,
icon
:
'none'
})
return
}
var
stockAmount
=
/^
\d{1,}
$/
if
(
!
stockAmount
.
test
(
that
.
data
.
amount
))
{
wx
.
showToast
({
title
:
'请填写提现金额'
,
icon
:
'none'
})
return
}
wx
.
showLoading
()
var
params
=
{
url
:
"/cashApplyRecord/applyToCash"
,
method
:
"POST"
,
data
:
{
userId
:
app
.
globalData
.
userInfo
.
userId
,
amount
:
that
.
data
.
amount
,
name
:
that
.
data
.
name
,
bankName
:
that
.
data
.
bankName
,
bankCard
:
that
.
data
.
bankCard
},
callBack
:
(
res
)
=>
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'操作成功,我们将尽快为您提现'
,
icon
:
'none'
})
},
errBack
:
(
res
)
=>
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
res
.
note
,
icon
:
'none'
})
}
};
http
.
request
(
params
);
},
//之前提现做法
inputimg2
:
function
()
{
inputimg2
:
function
()
{
let
that
=
this
;
if
(
that
.
data
.
imgStr
!=
''
&&
that
.
data
.
amount
>
0
&&
that
.
data
.
name
!=
''
)
{
...
...
@@ -183,14 +211,14 @@ Page({
amount
:
that
.
data
.
amount
,
name
:
that
.
data
.
name
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
)
wx
.
hideLoading
()
if
(
res
.
statusCode
==
200
)
{
var
obj
=
JSON
.
parse
(
res
.
data
)
console
.
log
(
obj
,
obj
.
status
)
if
(
obj
.
status
==
200
)
{
if
(
obj
.
status
==
200
)
{
wx
.
showToast
({
title
:
'操作成功,我们将尽快为您提现'
,
icon
:
'none'
...
...
@@ -201,14 +229,14 @@ Page({
name
:
''
})
}
else
{
}
else
{
wx
.
showToast
({
title
:
obj
.
desc
,
icon
:
'none'
})
}
}
else
{
wx
.
showToast
({
title
:
'操作失败,请稍后重试'
,
...
...
@@ -217,30 +245,6 @@ Page({
}
}
})
// util.request(api.newly_balanceWithdraw, {
// token: token,
// file: that.data.imgStr,
// amount: that.data.amount,
// name: that.data.name
// }).then(function (res) {
// if (res.status === 200) {
// wx.hideLoading()
// wx.showToast({
// title: '操作成功,我们将尽快为您提现',
// icon: 'none'
// })
// } else {
// wx.hideLoading()
// wx.showToast({
// title: res.desc,
// icon: 'none'
// })
// }
// });
}
}
else
{
...
...
@@ -255,13 +259,13 @@ Page({
},
//点击如何上传收款码
showHow
(){
showHow
()
{
this
.
setData
({
how
:
true
,
});
},
hideHow
(){
hideHow
()
{
this
.
setData
({
how
:
false
,
})
...
...
pages/userAccount/balanceWithdraw/index.wxml
View file @
0a1bbdd9
...
...
@@ -8,7 +8,7 @@
</view>
<view class='li'>
<text class='txt'>开户行</text>
<input class='input' type='text' value="{{bank}}" bindinput="bankinput" placeholder-class='phcolor' placeholder='请输入开户行'></input>
<input class='input' type='text' value="{{bank
Name
}}" bindinput="bankinput" placeholder-class='phcolor' placeholder='请输入开户行'></input>
</view>
<view class='li'>
<text class='txt'>银行卡号</text>
...
...
@@ -37,7 +37,7 @@
<view class="notice-container">
<text class='txt-notice-title'>【温馨提醒】</text>
<text class='txt-notice'></text>
<text class='txt-notice'>1、金额满
200元方可提现;\n2、提现收0.6
%手续费;\n3、购物可全额抵扣;</text>
<text class='txt-notice'>1、金额满
100元方可提现;\n2、提现收{{rate}}
%手续费;\n3、购物可全额抵扣;</text>
</view>
<view class="coupon-notice-window" wx:if="{{how}}">
...
...
pages/userAccount/comDetails/index.js
View file @
0a1bbdd9
// pages/userAccount/comDetails/index.js
// var util = require('../../../config/util.js');
// var api = require('../../../config/api.js');
// var user = require('../../../services/user.js');
// var utils = require('../../../utils/util.js')
var
http
=
require
(
"../../../utils/http.js"
);
var
app
=
getApp
()
Page
({
...
...
@@ -10,14 +8,34 @@ Page({
* 页面的初始数据
*/
data
:
{
},
},
getRate
()
{
var
params
=
{
url
:
"/commission/getCommissionDetail"
,
method
:
"GET"
,
data
:
{
},
callBack
:
(
res
)
=>
{
let
list
=
res
.
result
.
list
if
(
that
.
data
.
pageNum
>
1
)
{
list
=
that
.
data
.
list
.
concat
(
list
)
}
that
.
setData
({
list
:
list
,
total
:
res
.
result
.
total
})
console
.
log
(
'list'
,
that
.
data
.
list
)
}
};
http
.
request
(
params
);
},
// 获取页面数据
myAccount
(){
myAccount
()
{
var
that
=
this
;
var
token
=
wx
.
getStorageSync
(
'token'
);
util
.
request
(
api
.
myAccount
,
{
'token'
:
token
}).
then
(
res
=>
{
util
.
request
(
api
.
myAccount
,
{
'token'
:
token
}).
then
(
res
=>
{
that
.
setData
({
pageInfo
:
res
.
data
})
...
...
@@ -25,7 +43,7 @@ Page({
},
// 页面跳转
goPage
(
data
){
goPage
(
data
)
{
wx
.
navigateTo
({
url
:
data
.
currentTarget
.
dataset
.
page
,
})
...
...
pages/userAccount/distributionOrder/index.wxss
View file @
0a1bbdd9
...
...
@@ -88,7 +88,7 @@ page {
}
.li-num{
color: #
030521
;
color: #
3a86b9
;
font-size: 32rpx;
margin: 0 20rpx;
font-weight: bold;
...
...
@@ -144,7 +144,7 @@ page {
.li-bottom view:nth-child(2){
font-size: 32rpx;
color: #
030521
;
color: #
3a86b9
;
font-weight: bold;
margin: 0 20rpx;
}
\ No newline at end of file
pages/userAccount/myTeam/index.js
View file @
0a1bbdd9
// pages/userAccount/myTeam/index.js
// var util = require('../../../config/util.js');
// var api = require('../../../config/api.js');
// var user = require('../../../services/user.js');
var
http
=
require
(
"../../../utils/http.js"
)
var
app
=
getApp
()
Page
({
...
...
@@ -9,37 +8,64 @@ Page({
* 页面的初始数据
*/
data
:
{
tabs
:
[{
name
:
'一级会员'
},
{
name
:
'二级会员'
}],
tabs
:
[{
name
:
'一级会员'
},
{
name
:
'二级会员'
}],
getTabs
:
0
,
list
:
[]
list
:
[],
pageNum
:
1
,
total
:
0
},
// 选项卡切换
tabsGet
(
data
){
tabsGet
(
data
)
{
this
.
setData
({
getTabs
:
data
.
currentTarget
.
dataset
.
index
,
list
:
[]
})
this
.
userMyTeam
(
data
.
currentTarget
.
dataset
.
index
)
},
// 列表内容
userMyTeam
(
type
){
var
that
=
this
;
var
token
=
wx
.
getStorageSync
(
'token'
);
var
userInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'userinfo'
));
util
.
request
(
api
.
userMyTeam
,
{
'type'
:
type
+
1
,
'token'
:
token
}).
then
(
res
=>
{
that
.
setData
({
list
:
res
.
data
.
teamParamList
})
})
getList
()
{
var
that
=
this
var
params
=
{
url
:
"/commission/getOrderPageList"
,
method
:
"GET"
,
data
:
{
userId
:
app
.
globalData
.
userInfo
.
userId
,
pageNum
:
this
.
data
.
pageNum
,
pageSize
:
10
},
callBack
:
(
res
)
=>
{
let
list
=
res
.
result
.
list
if
(
that
.
data
.
pageNum
>
1
)
{
list
=
that
.
data
.
list
.
concat
(
list
)
}
that
.
setData
({
list
:
list
,
total
:
res
.
result
.
total
})
console
.
log
(
'list'
,
that
.
data
.
list
)
}
};
http
.
request
(
params
);
},
getParentName
()
{
var
params
=
{
url
:
"/commission/getParentName"
,
method
:
"GET"
,
data
:
{
userId
:
app
.
globalData
.
userInfo
.
userId
},
callBack
:
(
res
)
=>
{
this
.
setData
({
pageInfo
:
res
.
result
})
}
};
http
.
request
(
params
);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
// this.userMyTeam(0);
this
.
getParentName
()
},
/**
...
...
@@ -53,6 +79,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
setData
({
list
:
[],
pageNum
:
1
,
total
:
0
})
this
.
getList
();
},
...
...
@@ -81,7 +113,10 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
total
>
this
.
data
.
list
.
length
)
{
this
.
data
.
pageNum
++
this
.
getList
()
}
},
/**
...
...
pages/userAccount/myTeam/index.wxml
View file @
0a1bbdd9
<!--pages/userAccount/myTeam/index.wxml-->
<view class="page">
<!-- 选项卡 -->
<view class="tabs">
<view class="user-info-show">
<image class="user-portrait" src="{{pageInfo.pic}}"></image>
<view class="user-name">
<view>{{pageInfo.nickName}}</view>
<view>推荐人:您是由{{pageInfo.parentNickName}}推荐</view>
</view>
</view>
<!-- <view class="tabs">
<view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-index="{{index}}"
class="{{getTabs == index ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view>
</view>
</view>
-->
<!-- 列表展示 -->
<view class="list-box">
<!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index">
<image src="{{item.pic
ture
}}"></image>
<image src="{{item.pic}}"></image>
<view class="li-user">
<text>会员名称:{{item.
user
Name}}</text>
<text>成为会员:{{itme.
registerT
ime}}</text>
<text>会员名称:{{item.
nick
Name}}</text>
<text>成为会员:{{itme.
userRegt
ime}}</text>
</view>
<view class="li-num">
<text>¥{{item.
a
mount}}</text>
<view>{{item.teamNum}}个成员</view>
<text>¥{{item.
orderA
mount}}</text>
<view>{{item.teamNum
ber
}}个成员</view>
</view>
</view>
<!-- 暂无内容 -->
...
...
pages/userAccount/myTeam/index.wxss
View file @
0a1bbdd9
...
...
@@ -2,7 +2,47 @@
page {
background: #f4f4f4;
}
.user-info-show{
display: flex;
align-items: center;
flex-direction: row;
width: 100%;
padding: 20rpx 0;
background: #fff;
}
.user-portrait{
width: 112rpx;
height: 112rpx;
border-radius: 50%;
margin: 0 33rpx 0 40rpx;
}
.user-name{
flex: 1;
display: flex;
align-items: center;
flex-direction: column;
}
.user-name view:nth-child(1){
width: 100%;
font-size: 40rpx;
font-family: PingFang SC Semibold, PingFang SC Semibold-Semibold;
font-weight: 600;
text-align: left;
color: #020202;
}
.user-name view:nth-child(2){
width: 100%;
font-size: 24rpx;
font-family: PingFang SC Regular, PingFang SC Regular-Regular;
font-weight: 400;
text-align: left;
color: #999999;
margin-top: 10rpx;
}
.tabs{
width: 100%;
display: flex;
...
...
@@ -30,7 +70,7 @@ page {
}
.list-box{
margin-top:
9
0rpx;
margin-top:
2
0rpx;
display: flex;
align-items: center;
flex-direction: column;
...
...
@@ -84,7 +124,7 @@ page {
.li-num view{
color: white;
background: #
030521
;
background: #
3a86b9
;
font-size: 22rpx;
height: 40rpx;
line-height: 40rpx;
...
...
pages/userAccount/withdrawalRecord/index.js
View file @
0a1bbdd9
// var util = require('../../../config/util.js');
// var api = require('../../../config/api.js');
// var user = require('../../../services/user.js');
// var utils = require('../../../utils/util.js')
var
http
=
require
(
"../../../utils/http.js"
)
var
app
=
getApp
()
Page
({
...
...
@@ -16,7 +14,7 @@ Page({
{
name
:
'未通过'
,
type
:
2
}
],
getTabs
:
0
,
pageN
o
:
1
,
pageN
um
:
1
,
list
:
[],
total
:
0
},
...
...
@@ -24,39 +22,43 @@ Page({
// 选项卡切换
tabsGet
(
data
)
{
this
.
setData
({
getTabs
:
data
.
currentTarget
.
dataset
.
index
,
list
:
[]
})
this
.
userMyTeam
(
data
.
currentTarget
.
dataset
.
index
)
this
.
getList
(
data
.
currentTarget
.
dataset
.
index
)
},
// 列表内容
userMyTeam
(
type
)
{
var
that
=
this
;
var
token
=
wx
.
getStorageSync
(
'token'
);
var
userInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'userinfo'
));
util
.
request
(
api
.
listWithdraw
,
{
'type'
:
that
.
data
.
tabs
[
type
].
type
,
'token'
:
token
,
'pageNo'
:
that
.
data
.
pageNo
,
'pageSize'
:
10
}).
then
(
res
=>
{
var
info
=
res
.
data
.
withdrawList
.
list
;
// debugger
for
(
var
i
in
info
){
info
[
i
].
createTime
=
utils
.
formatTimeTwo
(
info
[
i
].
createTime
.
time
,
'Y:M:D h:m:s'
)
that
.
data
.
list
.
push
(
info
[
i
])
getList
(
type
)
{
var
that
=
this
var
params
=
{
url
:
"/cashApplyRecord/selectListByOther"
,
method
:
"GET"
,
data
:
{
applyStatus
:
that
.
data
.
tabs
[
type
].
type
,
userId
:
app
.
globalData
.
userInfo
.
userId
,
pageNum
:
this
.
data
.
pageNum
,
pageSize
:
10
},
callBack
:
(
res
)
=>
{
let
list
=
res
.
result
.
list
for
(
var
i
in
list
){
list
[
i
].
createTime
=
utils
.
formatTimeTwo
(
list
[
i
].
createTime
,
'Y:M:D h:m:s'
)
}
createTime
if
(
that
.
data
.
pageNum
>
1
)
{
list
=
that
.
data
.
list
.
concat
(
list
)
}
that
.
setData
({
list
:
list
,
total
:
res
.
result
.
total
})
console
.
log
(
'list'
,
that
.
data
.
list
)
}
that
.
setData
({
list
:
that
.
data
.
list
,
total
:
res
.
data
.
withdrawList
.
totalCount
})
console
.
log
(
that
.
data
.
list
)
})
};
http
.
request
(
params
);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
// this.
userMyTeam
(0);
// this.
getList
(0);
},
/**
...
...
@@ -70,7 +72,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
setData
({
list
:
[],
pageNum
:
1
,
total
:
0
})
this
.
getList
(
0
)
},
/**
...
...
@@ -98,11 +105,9 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
total
>
this
.
data
.
list
.
length
){
that
.
setData
({
pageNo
:
pageNo
++
})
this
.
userMyTeam
(
this
.
data
.
tabs
[
this
.
data
.
getTabs
].
type
)
if
(
this
.
data
.
total
>
this
.
data
.
list
.
length
)
{
this
.
data
.
pageNum
++
this
.
getList
(
this
.
data
.
tabs
[
this
.
data
.
getTabs
].
type
)
}
},
...
...
pages/userAccount/withdrawalRecord/index.wxml
View file @
0a1bbdd9
...
...
@@ -10,17 +10,17 @@
<!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index">
<view class="li-head">
<text wx:if="{{item.
s
tatus == 0}}">待审核</text>
<text wx:if="{{item.
s
tatus == 1}}">已审核</text>
<text wx:if="{{item.
status == 0
}}">未通过</text>
<text wx:if="{{item.
applyS
tatus == 0}}">待审核</text>
<text wx:if="{{item.
applyS
tatus == 1}}">已审核</text>
<text wx:if="{{item.
applyStatus == 2
}}">未通过</text>
<text>-</text>
</view>
<view class="li-body">
<view class="li-user">
<text>姓名:{{item.
n
ame}}</text>
<text>姓名:{{item.
bankN
ame}}</text>
<text>提现时间:{{item.createTime}}</text>
</view>
<view class="li-num">¥{{item.
a
mount}}</view>
<view class="li-num">¥{{item.
cashA
mount}}</view>
</view>
</view>
<!-- 暂无内容 -->
...
...
pages/userAccount/withdrawalRecord/index.wxss
View file @
0a1bbdd9
...
...
@@ -80,7 +80,7 @@ page {
}
.li-num{
color: #
030521
;
color: #
3a86b9
;
font-size: 32rpx;
margin-right: 20rpx;
}
...
...
utils/config.js
View file @
0a1bbdd9
var
domain
=
"http://192.168.31.1
08
:8086/capi"
;
//统一接口域名,测试环境
var
domain
=
"http://192.168.31.1
32
:8086/capi"
;
//统一接口域名,测试环境
exports
.
domain
=
domain
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment