Commit f15b3804 by wangyalan-git

分佣/个人中心/浏览足迹/

parent 7b5a7635
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"pages/prod/prod", "pages/prod/prod",
"pages/login/login", "pages/login/login",
"pages/prod-classify/prod-classify", "pages/prod-classify/prod-classify",
"pages/footprint/footprint",
"pages/recent-news/recent-news", "pages/recent-news/recent-news",
"pages/news-detail/news-detail", "pages/news-detail/news-detail",
"pages/invite/invite", "pages/invite/invite",
......
// pages/prod-classify/prod-classify.js
var http = require('../../utils/http.js');
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
pageNum: 1,
total: 0,
},
// 列表内容
getList() {
var that = this
var params = {
url: "/browseRecord/getPageList",
method: "GET",
data: {
pageNum: this.data.pageNum,
pageSize: 6
},
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);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.setData({
list: [],
pageNum: 1,
total: 0
})
this.getList();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
if (this.data.total > this.data.list.length) {
this.data.pageNum++
this.getList()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
{
"usingComponents": {
"prod": "/components/production/production"
},
"navigationBarTitleText": "足迹"
}
\ No newline at end of file
<!--pages/prod-classify/prod-classify.wxml-->
<view class='container'>
<view class='line-fix'></view>
<view class='tit-background'></view>
<view>
<block wx:for="{{list}}" wx:key ="key">
<prod item="{{item}}" ></prod>
</block>
</view>
</view>
\ No newline at end of file
/* pages/prod-classify/prod-classify.wxss */
page {
background: #fff;
}
.line-fix {
width: 100%;
height: 2rpx;
background: #e1e1e1;
position: fixed;
top: 0;
}
.tit-background {
width: 100%;
height: 20rpx;
background: #f4f4f4;
}
...@@ -58,6 +58,9 @@ Page({ ...@@ -58,6 +58,9 @@ Page({
callBack: (res) => { callBack: (res) => {
app.globalData.shareCode = '' app.globalData.shareCode = ''
console.log("绑定成功", res) console.log("绑定成功", res)
},
errCallBack: (res) => {
} }
}; };
http.request(params); http.request(params);
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</block> </block>
<view class='total-num'> <view class='total-num'>
<text class="prodcount">共1件商品</text> <!-- <text class="prodcount">共1件商品</text> -->
<view class='prodprice'>合计: <view class='prodprice'>合计:
<text class='symbol'>¥</text> <text class='symbol'>¥</text>
<text class='big-num'>{{wxs.parsePrice(item.actualTotal)[0]}}</text> <text class='big-num'>{{wxs.parsePrice(item.actualTotal)[0]}}</text>
......
// pages/pay-result/pay-result.js // pages/pay-result/pay-result.js
var http = require('../../utils/http.js');
Page({ Page({
/** /**
......
...@@ -11,7 +11,8 @@ Page({ ...@@ -11,7 +11,8 @@ Page({
orderAmount: '', orderAmount: '',
sts: '', sts: '',
collectionCount: 0, collectionCount: 0,
userAccount: '' userAccount: '',
userCount: ''
}, },
/** /**
...@@ -26,7 +27,28 @@ Page({ ...@@ -26,7 +27,28 @@ Page({
onReady: function () { onReady: function () {
}, },
//跳转公告列表页面
onNewsPage: function () {
wx.navigateTo({
url: '/pages/recent-news/recent-news',
})
},
getPageInfo() {
var that = this
var params = {
url: "/p/user/userCount",
method: "GET",
data: {},
callBack: function (res) {
wx.hideLoading();
that.setData({
userCount: res.result
});
}
};
http.request(params);
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
...@@ -50,8 +72,8 @@ Page({ ...@@ -50,8 +72,8 @@ Page({
} }
}; };
http.request(params); http.request(params);
this.showCollectionCount();
this.getUserAccount() this.getUserAccount()
this.getPageInfo()
}, },
/** /**
...@@ -132,25 +154,7 @@ Page({ ...@@ -132,25 +154,7 @@ Page({
url: '/pages/orderList/orderList?sts=' + sts, url: '/pages/orderList/orderList?sts=' + sts,
}) })
}, },
/**
* 查询所有的收藏量
*/
showCollectionCount: function () {
var ths = this;
wx.showLoading();
var params = {
url: "/p/user/collection/count",
method: "GET",
data: {},
callBack: function (res) {
wx.hideLoading();
ths.setData({
collectionCount: res
});
}
};
http.request(params);
},
// 用户余额/积分 // 用户余额/积分
getUserAccount: function () { getUserAccount: function () {
var params = { var params = {
...@@ -179,6 +183,11 @@ Page({ ...@@ -179,6 +183,11 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: url url: url
}) })
},
myFootprint: function () {
wx.navigateTo({
url: '/pages/footprint/footprint'
})
} }
......
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
<view class="prod-col"> <view class="prod-col">
<view class="col-item" bindtap='myCollectionHandle'> <view class="col-item" bindtap='myCollectionHandle'>
<view class="num">{{collectionCount}}</view> <view class="num">{{userCount.collectCount || 0}}</view>
<view class="tit">我的收藏</view> <view class="tit">我的收藏</view>
</view> </view>
<view class="col-item"> <view class="col-item" bindtap="onNewsPage">
<view class="num">5</view> <view class="num">{{userCount.noticeCount || 0}}</view>
<view class="tit">我的消息</view> <view class="tit">我的消息</view>
</view> </view>
<view class="col-item"> <view class="col-item" bindtap="myFootprint">
<view class="num">3</view> <view class="num">{{userCount.browseCount || 0}}</view>
<view class="tit">我的足迹</view> <view class="tit">我的足迹</view>
</view> </view>
</view> </view>
......
...@@ -10,7 +10,7 @@ Page({ ...@@ -10,7 +10,7 @@ Page({
data: { data: {
}, },
getRate() { getList() {
var params = { var params = {
url: "/commission/getCommissionDetail", url: "/commission/getCommissionDetail",
method: "GET", method: "GET",
...@@ -18,29 +18,13 @@ Page({ ...@@ -18,29 +18,13 @@ Page({
}, },
callBack: (res) => { callBack: (res) => {
let list = res.result.list this.setData({
if (that.data.pageNum > 1) { pageInfo: res.result
list = that.data.list.concat(list)
}
that.setData({
list: list,
total: res.result.total
}) })
console.log('list', that.data.list)
} }
}; };
http.request(params); http.request(params);
}, },
// 获取页面数据
myAccount() {
var that = this;
var token = wx.getStorageSync('token');
util.request(api.myAccount, { 'token': token }).then(res => {
that.setData({
pageInfo: res.data
})
})
},
// 页面跳转 // 页面跳转
goPage(data) { goPage(data) {
...@@ -53,7 +37,7 @@ Page({ ...@@ -53,7 +37,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.myAccount(); this.getList();
}, },
/** /**
...@@ -67,7 +51,7 @@ Page({ ...@@ -67,7 +51,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
}, },
/** /**
......
...@@ -3,26 +3,26 @@ ...@@ -3,26 +3,26 @@
<!-- 头部数据 --> <!-- 头部数据 -->
<view class="head-box"> <view class="head-box">
<view class="title-text">累计收入(元)</view> <view class="title-text">累计收入(元)</view>
<view class="title-num">¥{{pageInfo.incomeTotal}}</view> <view class="title-num">¥{{pageInfo.totalCommission || 0}}</view>
<view class="title-li"> <view class="title-li">
<view> <view>
<text>可提现佣金</text> <text>可提现佣金</text>
<text>¥{{pageInfo.toBeWithdrawal}}</text> <text>¥{{pageInfo.amount || 0}}</text>
</view> </view>
<view> <view>
<text>待打款佣金</text> <text>待打款佣金</text>
<text>¥{{pageInfo.pendingPayment}}</text> <text>¥{{pageInfo.waitAmount || 0}}</text>
</view> </view>
<view> <view>
<text>累计提现金额</text> <text>累计提现金额</text>
<text>¥{{pageInfo.withdrawalSuccessful}}</text> <text>¥{{pageInfo.cashAmount || 0}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 菜单列表 --> <!-- 菜单列表 -->
<view class="menu-box"> <view class="menu-box">
<view bindtap="goPage" data-page="/pages/newly/balanceWithdraw"> <view bindtap="goPage" data-page="/pages/userAccount/balanceWithdraw/index">
<image src="../../../images/icon/cash.png"></image> <image src="../../../images/icon/cash.png"></image>
<text>提现申请</text> <text>提现申请</text>
</view> </view>
......
// var util = require('../../../config/util.js'); var http = require("../../../utils/http.js")
// var api = require('../../../config/api.js'); var app = getApp()
// var user = require('../../../services/user.js');
// var utils = require('../../../utils/util.js')
Page({ Page({
...@@ -9,55 +7,69 @@ Page({ ...@@ -9,55 +7,69 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
// pageImgHead: api.Url_URI,
tabs: [ tabs: [
{ name: '全部', type: 0 }, { name: '全部', type: '' },
{ name: '待分成', type: 1 }, { name: '待分成', type: 1 },
{ name: '已分成', type: 2 }, { name: '已分成', type: 2 },
{ name: '取消分成', type: 3 } { name: '取消分成', type: 3 }
], ],
getTabs: 0, applyStatus: '',
pageNo: 1, pageNum: 1,
list: [], list: [],
total: 0 total: 0,
}, },
// 选项卡切换 // 选项卡切换
tabsGet(data) { tabsGet(data) {
this.setData({ getTabs: data.currentTarget.dataset.index, list: [] }) let id = data.currentTarget.dataset.type
this.userMyTeam(data.currentTarget.dataset.index) this.setData({
applyStatus: id,
list: [],
pageNum: 1,
total: 0
})
this.getList()
}, },
getList() {
// 列表内容 var that = this
userMyTeam(type) { var params = {
var that = this; url: "/commission/selectListByOther",
var token = wx.getStorageSync('token'); method: "GET",
var userInfo = JSON.parse(wx.getStorageSync('userinfo')); data: {
util.request(api.distributionOrder, { status: this.data.applyStatus,
'type': that.data.tabs[type].type, parentUserId: app.globalData.userInfo.userId,
'token': token, pageNum: this.data.pageNum,
'pageNo': that.data.pageNo, pageSize: 10
'pageSize': 10 },
}).then(res => { callBack: (res) => {
var info = res.data.pageBean.list; let list = res.result.list
// debugger list.forEach(item => {
for (var i in info) { item.totalNumber = 0
info[i].amountAll = (info[i].amount * info[i].goodsNum).toFixed(2) item.itemList.forEach(good => {
that.data.list.push(info[i]) item.totalNumber += good.commissionNumber
})
console.log('item',item)
})
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, http.request(params);
total: res.data.pageBean.totalCount
})
console.log(that.data.list)
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.userMyTeam(0); // this.getList(0);
}, },
/** /**
...@@ -71,7 +83,12 @@ Page({ ...@@ -71,7 +83,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.setData({
list: [],
pageNum: 1,
total: 0
})
this.getList()
}, },
/** /**
...@@ -100,10 +117,8 @@ Page({ ...@@ -100,10 +117,8 @@ Page({
*/ */
onReachBottom: function () { onReachBottom: function () {
if (this.data.total > this.data.list.length) { if (this.data.total > this.data.list.length) {
that.setData({ this.data.pageNum++
pageNo: pageNo++ this.getList()
})
// this.userMyTeam(this.data.tabs[this.data.getTabs].type)
} }
}, },
......
<view class="page"> <view class="page">
<!-- 选项卡 --> <!-- 选项卡 -->
<view class="tabs"> <view class="tabs">
<view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-index="{{index}}" <view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-type="{{item.type}}"
class="{{getTabs == index ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view> class="{{applyStatus == item.type ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view>
</view> </view>
<!-- 列表展示 --> <!-- 列表展示 -->
<view class="list-box"> <view class="list-box">
<!-- 订单列表 -->
<block wx:for="{{list}}" wx:key=''>
<view class='prod-item'>
<view class="order-num">
<text>订单编号:{{item.orderNumber}}</text>
<view class='order-state'>
<text
class="order-sts {{item.orderStatus==1?'red':''}} {{(item.orderStatus==5||item.orderStatus==6)?'gray':''}}">{{item.orderStatus==1?'待支付':(item.orderStatus==2?'待发货':(item.orderStatus==3?'待收货':(item.orderStatus==5?'已完成':'已取消')))}}</text>
</view>
</view>
<!-- 商品列表 -->
<!-- 一个订单单个商品的显示 -->
<block wx:if="{{item.itemList.length==1}}">
<block wx:for="{{item.itemList}}" wx:for-item="prod" wx:key=''>
<view>
<view class='item-cont' bindtap='toOrderDetailPage' data-ordernum="{{item.orderNumber}}">
<view class='prod-pic'>
<image src='{{prod.prodUrl}}'></image>
</view>
<view class='prod-info'>
<view class='prodname'>
{{prod.prodName}}
</view>
<view class='prod-info-cont'>{{prod.skuName}}</view>
<view class='price-nums'>
<text class='prodprice'><text class='symbol'>¥</text>
<text class='big-num'>{{wxs.parsePrice(prod.skuPrice)[0]}}</text>
<text class='small-num'>.{{wxs.parsePrice(prod.skuPrice)[1]}}</text></text>
<text class="prodcount">x{{prod.commissionNumber}}</text>
</view>
</view>
</view>
</view>
</block>
</block>
<!-- 一个订单多个商品时的显示 -->
<block wx:else>
<view class='item-cont' bindtap='toOrderDetailPage' data-ordernum="{{item.orderNumber}}">
<scroll-view scroll-x="true" scroll-left='0' scroll-with-animation="false" class="categories">
<block wx:for="{{item.itemList}}" wx:for-item="prod" wx:key=''>
<view class='prod-pic'>
<image src="{{prod.prodUrl}}"></image>
</view>
</block>
</scroll-view>
</view>
</block>
<view class='total-num'>
<view>
下单人: {{item.nickName}}
</view>
<view>
<text class="prodcount">共{{item.totalNumber}}件商品</text>
<view class='prodprice'>总佣金:
<text class='symbol'>¥</text>
<text class='big-num'>{{wxs.parsePrice(item.orderCommissionAmount)[0]}}</text>
<text class='small-num'>.{{wxs.parsePrice(item.orderCommissionAmount)[1]}}</text>
</view>
</view>
</view>
<!-- end 商品列表 -->
</view>
</block>
<!-- 列表展示 --> <!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index"> <!-- <view class="li-box" wx:for="{{2}}" wx:key="index">
<view class="li-head"> <view class="li-head">
<text>分销等级:{{item.distributionLevel}}</text> <text>分销等级:{{item.distributionLevel}}</text>
<text>下单人:{{item.userName}}</text> <text>下单人:{{item.nickName}}</text>
</view> </view>
<view class="li-body"> <view class="li-body">
<image src="{{pageImgHead}}{{item.bannerJson}}"></image> <image src="{{item.prodUrl}}"></image>
<view class="li-user"> <view class="li-user">
<text>{{item.goodsName}}</text> <text>{{item.goodsName}}</text>
<text>x{{item.goodsNum}}</text> <text>x{{item.goodsNum}}</text>
...@@ -23,13 +93,14 @@ ...@@ -23,13 +93,14 @@
</view> </view>
<view class="li-bottom"> <view class="li-bottom">
<view> <view>
<text>订单编号:{{item.subOrderId}}</text> <text>订单编号:{{item.orderNumber}}</text>
<text>下单时间:{{item.insertTime}}</text> <text>下单时间:{{item.insertTime}}</text>
</view> </view>
<view>佣金:¥{{item.amountAll}}</view> <view>佣金:¥{{item.amountAll}}</view>
</view> </view>
</view> </view> -->
<!-- 暂无内容 --> <!-- 暂无内容 -->
<view class="offList" wx:if="{{list.length == 0}}">—— 暂无内容 ——</view> <view class="offList" wx:if="{{list.length == 0}}">—— 暂无内容 ——</view>
</view> </view>
</view> </view>
\ No newline at end of file <wxs module="wxs" src="../../../wxs/number.wxs" />
\ No newline at end of file
...@@ -2,7 +2,187 @@ page { ...@@ -2,7 +2,187 @@ page {
background: #f4f4f4; background: #f4f4f4;
} }
.tabs{
/* 商品列表 */
.prod-item {
background-color: #fff;
margin-top: 15rpx;
font-size: 28rpx;
width: 100%;
}
.prod-item .item-cont .prod-pic image {
width: 180rpx;
height: 180rpx;
}
.prod-item .order-num {
padding: 20rpx 30rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
}
.order-state {
display: flex;
align-items: center;
font-size: 24rpx;
}
.prod-item .item-cont .categories {
white-space: nowrap;
}
.prod-item .item-cont {
display: flex;
align-items: center;
padding: 20rpx 30rpx;
border-radius: 10rpx;
display: -webkit-flex;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
background: #fafafa;
}
.prod-item .order-num .clear-btn {
width: 32rpx;
height: 32rpx;
font-size: 0;
vertical-align: top;
margin-left: 42rpx;
position: relative;
}
.prod-item .order-num .clear-btn::after {
content: " ";
display: block;
position: absolute;
left: -10px;
top: 0rpx;
width: 1px;
height: 32rpx;
background: #ddd;
}
.prod-item .order-num .clear-btn .clear-list-btn {
width: 100%;
height: 100%;
vertical-align: middle;
}
.prod-item .item-cont .prod-pic {
font-size: 0;
display: inline-block;
width: 160rpx;
height: 160rpx;
overflow: hidden;
background: #fff;
margin-right: 16rpx;
}
.prod-item .item-cont .prod-pic image {
width: 100%;
height: 100%;
}
.prod-item .item-cont .prod-info {
margin-left: 10rpx;
font-size: 28rpx;
width: 100%;
position: relative;
height: 160rpx;
-webkit-flex: 1;
-ms-flex: 1;
-webkit-box-flex: 1;
-moz-box-flex: 1;
flex: 1;
}
.prod-item .item-cont .prod-info .prodname {
font-size: 28rpx;
line-height: 36rpx;
max-height: 86rpx;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
word-break: break-all;
}
.prod-item .item-cont .prod-info .prod-info-cont {
color: #999;
line-height: 40rpx;
margin-top: 10rpx;
font-size: 22rpx;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
word-break: break-all;
}
.prod-item .total-num {
text-align: right;
padding: 20rpx 30rpx;
font-size: 28rpx;
display: flex;
justify-content: space-between;
}
.prod-item .price-nums .prodprice {
color: #333;
position: absolute;
bottom: 0;
}
.prod-item .price-nums .prodcount {
position: absolute;
bottom: 5rpx;
right: 0;
color: #999;
font-family: verdana;
}
.prod-item .total-num .prodprice {
display: inline-block;
color: #333;
}
.prod-item .total-num .symbol,
.prod-item .total-num .big-num,
.prod-item .total-num .small-num {
color: #3a86b9;
}
.prod-item .total-num .prodcount {
margin-right: 20rpx;
}
.prod-item .prod-foot {
padding: 20rpx 30rpx;
border-top: 2rpx solid #e6e6e6;
}
.prod-item .prod-foot .total {
font-size: 25rpx;
margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #e9eaec;
}
.prod-item .prod-foot .btn {
display: flex;
align-items: center;
justify-content: flex-end;
}
.tabs {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -13,22 +193,22 @@ page { ...@@ -13,22 +193,22 @@ page {
top: 0; top: 0;
} }
.tabs view{ .tabs view {
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.tabsTrue{ .tabsTrue {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.tabsFalse{ .tabsFalse {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }
.list-box{ .list-box {
margin-top: 90rpx; margin-top: 90rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -36,7 +216,7 @@ page { ...@@ -36,7 +216,7 @@ page {
min-height: 80vh; min-height: 80vh;
} }
.li-box{ .li-box {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
...@@ -48,13 +228,13 @@ page { ...@@ -48,13 +228,13 @@ page {
margin: 20rpx 0; margin: 20rpx 0;
} }
.li-box image{ .li-box image {
width: 130rpx; width: 130rpx;
height: 130rpx; height: 130rpx;
margin: 0 20rpx 0 20rpx; margin: 0 20rpx 0 20rpx;
} }
.li-body{ .li-body {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
...@@ -62,7 +242,7 @@ page { ...@@ -62,7 +242,7 @@ page {
margin: 20rpx 0 margin: 20rpx 0
} }
.li-user{ .li-user {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -72,35 +252,35 @@ page { ...@@ -72,35 +252,35 @@ page {
height: 130rpx; height: 130rpx;
} }
.li-user text{ .li-user text {
width: 100%; width: 100%;
} }
.li-user text:nth-child(1){ .li-user text:nth-child(1) {
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.li-user text:nth-child(2){ .li-user text:nth-child(2) {
color: #999999; color: #999999;
} }
.li-num{ .li-num {
color: #3a86b9; color: #3a86b9;
font-size: 32rpx; font-size: 32rpx;
margin: 0 20rpx; margin: 0 20rpx;
font-weight: bold; font-weight: bold;
} }
.offList{ .offList {
font-size: 30rpx; font-size: 30rpx;
color: #999999; color: #999999;
margin-top: 20rpx; margin-top: 20rpx;
} }
.li-head{ .li-head {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -109,18 +289,18 @@ page { ...@@ -109,18 +289,18 @@ page {
padding: 0 0 20rpx 0; padding: 0 0 20rpx 0;
} }
.li-head text:nth-child(1){ .li-head text:nth-child(1) {
flex: 1; flex: 1;
font-size: 30rpx; font-size: 30rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.li-head text:nth-child(2){ .li-head text:nth-child(2) {
font-size: 30rpx; font-size: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.li-bottom{ .li-bottom {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
...@@ -129,7 +309,7 @@ page { ...@@ -129,7 +309,7 @@ page {
padding: 20rpx 0 0 0; padding: 20rpx 0 0 0;
} }
.li-bottom view:nth-child(1){ .li-bottom view:nth-child(1) {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -137,13 +317,13 @@ page { ...@@ -137,13 +317,13 @@ page {
margin: 0 0 0 20rpx; margin: 0 0 0 20rpx;
} }
.li-bottom view:nth-child(1) text{ .li-bottom view:nth-child(1) text {
width: 100%; width: 100%;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
.li-bottom view:nth-child(2){ .li-bottom view:nth-child(2) {
font-size: 32rpx; font-size: 32rpx;
color: #3a86b9; color: #3a86b9;
font-weight: bold; font-weight: bold;
......
...@@ -8,38 +8,51 @@ Page({ ...@@ -8,38 +8,51 @@ Page({
*/ */
data: { data: {
tabs: [ tabs: [
{ name: '全部', type: 3 }, { name: '全部', type: '' },
{ name: '待审核', type: 0 }, { name: '待审核', type: 0 },
{ name: '已审核', type: 1 }, { name: '已审核', type: 1 },
{ name: '未通过', type: 2 } { name: '未通过', type: 2 }
], ],
getTabs: 0, applyStatus: '',
pageNum: 1, pageNum: 1,
list: [], list: [],
total: 0 total: 0,
}, },
// 选项卡切换 // 选项卡切换
tabsGet(data) { tabsGet(data) {
this.setData({ getTabs: data.currentTarget.dataset.index, list: [] }) let id = data.currentTarget.dataset.type
this.getList(data.currentTarget.dataset.index) this.setData({
applyStatus: id,
list: [],
pageNum: 1,
total: 0
})
this.getList()
}, },
getList(type) { getList() {
var that = this var that = this
var params = { var params = {
url: "/cashApplyRecord/selectListByOther", url: "/cashApplyRecord/selectListByOther",
method: "GET", method: "GET",
data: { data: {
applyStatus: that.data.tabs[type].type, applyStatus: this.data.applyStatus,
userId: app.globalData.userInfo.userId, userId: app.globalData.userInfo.userId,
pageNum: this.data.pageNum, pageNum: this.data.pageNum,
pageSize: 10 pageSize: 10
}, },
callBack: (res) => { callBack: (res) => {
let list = res.result.list let list = res.result.list
for(var i in list){ list.forEach(item => {
list[i].createTime = utils.formatTimeTwo(list[i].createTime, 'Y:M:D h:m:s') if (item.applyStatus == 1) {
}createTime item.showStatus = '已审核'
} else if (item.applyStatus == 2) {
item.showStatus = '未通过'
} else {
item.showStatus = '待审核'
}
})
if (that.data.pageNum > 1) { if (that.data.pageNum > 1) {
list = that.data.list.concat(list) list = that.data.list.concat(list)
} }
...@@ -47,7 +60,7 @@ Page({ ...@@ -47,7 +60,7 @@ Page({
list: list, list: list,
total: res.result.total total: res.result.total
}) })
console.log('list',that.data.list) console.log('list', that.data.list)
} }
}; };
http.request(params); http.request(params);
...@@ -77,7 +90,7 @@ Page({ ...@@ -77,7 +90,7 @@ Page({
pageNum: 1, pageNum: 1,
total: 0 total: 0
}) })
this.getList(0) this.getList()
}, },
/** /**
...@@ -107,7 +120,7 @@ Page({ ...@@ -107,7 +120,7 @@ Page({
onReachBottom: function () { onReachBottom: function () {
if (this.data.total > this.data.list.length) { if (this.data.total > this.data.list.length) {
this.data.pageNum++ this.data.pageNum++
this.getList(this.data.tabs[this.data.getTabs].type) this.getList()
} }
}, },
......
<view class="page"> <view class="page">
<!-- 选项卡 --> <!-- 选项卡 -->
<view class="tabs"> <view class="tabs">{{item.type}}
<view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-index="{{index}}" <view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-type="{{item.type}}"
class="{{getTabs == index ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view> class="{{applyStatus === item.type ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view>
</view> </view>
<!-- 列表展示 --> <!-- 列表展示 -->
...@@ -10,17 +10,21 @@ ...@@ -10,17 +10,21 @@
<!-- 列表展示 --> <!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index"> <view class="li-box" wx:for="{{list}}" wx:key="index">
<view class="li-head"> <view class="li-head">
<text wx:if="{{item.applyStatus == 0}}">待审核</text> <view>
<text wx:if="{{item.applyStatus == 1}}">已审核</text> <text>{{item.bankName}}</text>
<text wx:if="{{item.applyStatus == 2}}">未通过</text> <view class="time">{{item.createTime}}</view>
<text>-</text> </view>
<text>{{item.showStatus}}</text>
</view> </view>
<view class="li-body"> <view class="li-body">
<view class="li-user"> <view>
<text>姓名:{{item.bankName}}</text> <view class="li-num">¥{{item.amount}}</view>
<text>提现时间:{{item.createTime}}</text> <text class="notice">提现金额</text>
</view>
<view>
<view class="li-num">¥{{item.cashAmount}}</view>
<text class="notice">实际到账金额</text>
</view> </view>
<view class="li-num">¥{{item.cashAmount}}</view>
</view> </view>
</view> </view>
<!-- 暂无内容 --> <!-- 暂无内容 -->
......
...@@ -2,7 +2,7 @@ page { ...@@ -2,7 +2,7 @@ page {
background: #f4f4f4; background: #f4f4f4;
} }
.tabs{ .tabs {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -13,22 +13,22 @@ page { ...@@ -13,22 +13,22 @@ page {
top: 0; top: 0;
} }
.tabs view{ .tabs view {
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.tabsTrue{ .tabsTrue {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.tabsFalse{ .tabsFalse {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }
.list-box{ .list-box {
margin-top: 90rpx; margin-top: 90rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -36,77 +36,79 @@ page { ...@@ -36,77 +36,79 @@ page {
min-height: 80vh; min-height: 80vh;
} }
.li-box{ .li-box {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
box-shadow: 0rpx 1rpx 15rpx #bababa; box-shadow: 0rpx 1rpx 15rpx #bababa;
width: 690rpx; width: 690rpx;
padding: 30rpx 0;
background: white; background: white;
border-radius: 20rpx; border-radius: 20rpx;
margin: 20rpx 0; margin: 20rpx 0;
} }
.li-box image{ .li-box image {
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
border-radius: 50%; border-radius: 50%;
margin: 0 20rpx 0 20rpx; margin: 0 20rpx 0 20rpx;
} }
.li-body{ .li-body {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
justify-content: space-between;
width: 100%; width: 100%;
padding: 20rpx 0;
} }
.li-user{ .li-body>view {
flex: 1; width: 50%;
display: flex; /* text-align: center; */
align-items: center; margin-left: 20rpx;
flex-direction: column;
font-size: 30rpx;
margin: 0 0 0 20rpx;
}
.li-user text{
width: 100%;
}
.li-user text:nth-child(2){
color: #999999;
} }
.li-num{ .li-num {
color: #3a86b9; color: #333;
font-size: 32rpx; font-size: 32rpx;
margin-right: 20rpx; }
.li-body .notice{
color: #999;
font-size: 24rpx;
} }
.offList{ .offList {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
margin-top: 20rpx; margin-top: 20rpx;
} }
.li-head{ .li-head {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; justify-content: space-between;
align-items: baseline;
flex-direction: row; flex-direction: row;
border-bottom: 1rpx solid #F2F2F2; border-bottom: 1rpx solid #F2F2F2;
padding: 0 0 20rpx 0; padding: 20rpx 0;
} }
.li-head text:nth-child(1){ .li-head text:nth-child(1) {
flex: 1; flex: 1;
font-size: 30rpx; font-size: 30rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.li-head text:nth-child(2){ .li-head text:nth-child(2) {
font-size: 30rpx; font-size: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
color: #3a86b9;
}
.li-head .time {
font-size: 24rpx;
color: #999;
margin-left: 20rpx;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment