小钻风 4 years ago
parent 3c853a7af1
commit 012aa60922

@ -0,0 +1,16 @@
2021-03-09,19:59:45,3-9,730,173
2021-03-08,20:27:44,3-8,1017,556
2021-03-05,17:56:46,3-6,file,1
2021-03-05,17:55:37,3-5,463,32
2021-03-04,20:33:02,3-4,622,275
2021-03-03,19:40:50,3-3,972,5184
2021-03-03,09:23:04,3-3,5502,663
2021-03-01,20:30:00,3-1,46,27
2021-03-01,19:32:50,gra3-1,9,10
2021-03-01,19:27:40,Gray3-1,48,21
2021-03-01,15:14:14,01,42,11
2021-02-07,18:09:44,2.7,12,9
2021-02-05,18:30:18,2.5,284,40
2021-02-04,18:01:05,2.4,16,3
2021-02-02,18:05:40,last,232,85
2021-02-01,17:57:05,01,502,429
1 2021-03-09 19:59:45 3-9 730 173
2 2021-03-08 20:27:44 3-8 1017 556
3 2021-03-05 17:56:46 3-6 file 1
4 2021-03-05 17:55:37 3-5 463 32
5 2021-03-04 20:33:02 3-4 622 275
6 2021-03-03 19:40:50 3-3 972 5184
7 2021-03-03 09:23:04 3-3 5502 663
8 2021-03-01 20:30:00 3-1 46 27
9 2021-03-01 19:32:50 gra3-1 9 10
10 2021-03-01 19:27:40 Gray3-1 48 21
11 2021-03-01 15:14:14 01 42 11
12 2021-02-07 18:09:44 2.7 12 9
13 2021-02-05 18:30:18 2.5 284 40
14 2021-02-04 18:01:05 2.4 16 3
15 2021-02-02 18:05:40 last 232 85
16 2021-02-01 17:57:05 01 502 429

@ -0,0 +1,263 @@
<!-- 导购 -->
<template>
<view class="" style="width: 750rpx; overflow: hidden;">
<view class="myNav">
</view>
<view class="content">
<view class="tab-box">
<view class="tabs flex justify-between align-center">
<view class="tab" v-for="(tab,index) in tabList" :key='index' :class="current===index?'tab-active':''" @click="tabChange(index)">
<text>{{tab.name}}</text>
</view>
</view>
</view>
<view class="">
<swiper class="flex-sub" :current="current" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<swiper-item v-for="(item,index) in tabList" :key='index'>
<scroll-view scroll-y="true" style="height: 344rpx;width: 690rpx;background: #FFFFFF;margin: 20rpx auto;">
<view class="flex justify-center align-center text-center" style="width: 100%; height: 100%;">
<view>
<view class="">
<text style="font-size:36rpx;color:#999999;">预估收益</text>
</view>
<view class="">
<text style="font-size:56rpx;color:#333333;">{{tabsListData[current].guide.amount}}</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<view class="table-list" v-if="current>1">
<view class="table-head flex align-center">
<view class="table-title">
<text>日期</text>
</view>
<view class="table-title">
<text>销售额</text>
</view>
<view class="table-title">
<text>订单数</text>
</view>
<view class="table-title">
<text>预估收益</text>
</view>
</view>
<view class="table-body">
<view>
<view class="table-column flex align-center " v-for="(td,index) in tabsListData[current].guideList" :key='index'>
<view class="table-td">
<text>{{td.day|formatDayDate}}</text>
</view>
<view class="table-td">
<text>{{td.salesVolume}}</text>
</view>
<view class="table-td">
<text>{{td.count}}</text>
</view>
<view class="table-td">
<text>{{td.amount}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{
name: '今日'
}, {
name: '昨日'
}, {
name: '本月',
}, {
name: '上月',
}],
tabsListData: [],
current: 0,
}
},
mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
let nowDay = today.getDate()
//
const newDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatDayDate(todayDate);
};
//
const lastDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay - 1);
return this.formatDayDate(todayDate);
};
//
const newMonth = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatMonthDate(todayDate);
};
//
const lastMonth = () => {
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay(), 0)
this.getDay(lastDay(), 1)
this.getMonth(newMonth(), 2)
this.getMonth(lastMonth(), 3)
console.log(this.tabsListData)
},
filters: {
formatDayDate(mmdd) {
let date = new Date(mmdd);
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (mymonth + '月' + myDay + '日');
},
},
methods: {
changeCurrent(e) {
this.current = e.detail.current
// this.totalAmount()
},
tabChange(index) {
this.current = index
},
getMonth(month, index) {
this.$u.post('/api/v2/app/user/income/month_expect', {
month: month
}).then(res => {
this.$set(this.tabsListData, index, res.data.data)
})
},
getDay(day, index) {
this.$u.post('/api/v2/app/user/income/day_expect', {
day: day
}).then(res => {
this.$set(this.tabsListData, index, res.data.data)
})
},
//
formatDayDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth + '-' + myDay);
},
//
formatMonthDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth);
},
}
}
</script>
<style lang="scss" scoped>
.myNav {
position: absolute;
top: 0;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}
.content {
.tab-box {
// width: 690rpx;
// height: 344rpx;
// background: #5677FC;
margin: 0 30rpx;
.tabs {
.tab {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 20rpx;
border: 2rpx solid #FFFFFF;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
&.tab-active {
background: #FFFFFF;
color: #000000;
}
}
}
}
.table-list {
background-color: #FFFFFF;
margin-top: 20rpx;
padding: 0 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.table-head {
font-size: 32rpx;
.table-title {
height: 90rpx;
line-height: 90rpx;
width: 25%;
text-align: center;
}
}
.table-body {
font-size: 28rpx;
.table-column {
border-top: 2rpx solid #EEEEEE;
.table-td {
width: 25%;
height: 90rpx;
line-height: 90rpx;
text-align: center;
}
}
}
}
}
</style>

@ -1,5 +1,5 @@
<template>
<view class="">
<view class="content-box">
<view class="myNav">
</view>
@ -24,7 +24,7 @@
</view>
<view>
<view class="box bg-white">
<navigator url="../selfBuyEarnings/selfBuyEarnings" hover-class="none" class="subtitle flex justify-between">
<navigator url="./purchase" hover-class="none" class="subtitle flex justify-between">
<view class="flex align-center">
<image src="../../static/mine/t01.png" style="width: 64rpx;" mode="widthFix"></image>
<view>自购收益</view>
@ -48,7 +48,7 @@
</view>
<view class="box bg-white">
<navigator url="../shareEarnings/shareEarnings" hover-class="none" class="subtitle flex justify-between">
<navigator url="./guide" hover-class="none" class="subtitle flex justify-between">
<view class="flex align-center">
<image src="../../static/mine/t02.png" style="width: 64rpx;" mode="widthFix"></image>
<view>导购收益</view>
@ -72,13 +72,14 @@
</view>
<view class="box bg-white">
<view class="subtitle flex justify-between" @tap="toTeamEarnings">
<view class="flex align-center">
<image src="../../static/mine/t03.png" style="width: 64rpx;" mode="widthFix"></image>
<view>团队收益</view>
</view>
<view class="flex more">查看明细<text class="cuIcon-right"></text></view>
</view>
<navigator url="./team" hover-class="none" class="subtitle flex justify-between">
<view class="flex align-center">
<image src="../../static/mine/t03.png" style="width: 64rpx;" mode="widthFix"></image>
<view>团队收益</view>
</view>
<view class="flex more">查看明细<text class="cuIcon-right"></text></view>
</navigator>
<view class="money-box flex justify-between">
<view>
<view class="txt">团队销售额()</view>
@ -95,7 +96,7 @@
</view>
</view>
<view class="box bg-white">
<navigator url="../shareEarnings/shareEarnings" hover-class="none" class="subtitle flex justify-between">
<navigator url="./recommend" hover-class="none" class="subtitle flex justify-between">
<view class="flex align-center">
<image src="../../static/mine/t02.png" style="width: 64rpx;" mode="widthFix"></image>
<view>推荐收益</view>
@ -118,7 +119,7 @@
</view>
</view>
<view class="box bg-white">
<navigator url="../shareEarnings/shareEarnings" hover-class="none" class="subtitle flex justify-between">
<navigator url="./reward" hover-class="none" class="subtitle flex justify-between">
<view class="flex align-center">
<image src="../../static/mine/t02.png" style="width: 64rpx;" mode="widthFix"></image>
<view>平台奖励</view>
@ -159,13 +160,12 @@
}, {
name: '上月',
}],
current: null,
tabsListData: [],
amountTotal:0
current: 0,
tabsListData: [],
amountTotal: 0
}
},
mounted() {
async mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
@ -190,22 +190,20 @@
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay())
this.getDay(lastDay())
this.getMonth(newMonth())
this.getMonth(lastMonth())
this.current = 0
await this.getDay(newDay(), 0)
await this.getDay(lastDay(), 1)
await this.getMonth(newMonth(), 2)
await this.getMonth(lastMonth(), 3)
this.totalAmount()
},
methods: {
totalAmount() {
let obj = this.tabsListData[this.current]
let numTotal = 0
Object.keys(obj).forEach(function(key) {
numTotal += obj[key].amount
})
Object.keys(obj).forEach(function(keys) {
numTotal += obj[keys].amount
})
this.amountTotal = numTotal
},
//
formatDayDate(date) {
@ -230,48 +228,43 @@
return (myyear + "-" + mymonth);
},
changeCurrent(e) {
console.log(e)
this.current = e.detail.current
this.totalAmount()
},
change(index) {
this.current = index
this.totalAmount()
},
getMonth(month) {
this.$u.post('/api/v2/app/user/income/month_incomes', {
async getMonth(month, index) {
const res = await this.$u.post('/api/v2/app/user/income/month_incomes', {
month: month
}).then(res => {
// console.log(res)
this.tabsListData.push(res.data.data)
})
this.$set(this.tabsListData, index, res.data.data)
},
getDay(day) {
this.$u.post('/api/v2/app/user/income/day_incomes', {
async getDay(day, index) {
const res = await this.$u.post('/api/v2/app/user/income/day_incomes', {
day: day
}).then(res => {
this.tabsListData.push(res.data.data)
})
}
},
watch:{
current: {
handler(newValue) {
this.totalAmount()
},
immediate: true
this.$set(this.tabsListData, index, res.data.data)
}
}
}
</script>
<style lang="scss" scoped>
.content-box {
width: 750rpx;
overflow: hidden;
}
.myNav {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 150rpx 150rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}

@ -0,0 +1,273 @@
<!-- 自购 -->
<template>
<view class="" style="width: 750rpx; overflow: hidden;">
<view class="myNav">
</view>
<view class="content">
<view class="tab-box">
<view class="tabs flex justify-between align-center">
<view class="tab" v-for="(tab,index) in tabList" :key='index' :class="current===index?'tab-active':''" @click="tabChange(index)">
<text>{{tab.name}}</text>
</view>
</view>
</view>
<view class="">
<swiper class="flex-sub" :current="current" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<swiper-item v-for="(item,index) in tabList" :key='index'>
<scroll-view scroll-y="true" style="height: 344rpx;width: 690rpx;background: #FFFFFF;margin: 20rpx auto;">
<view class="flex justify-center align-center text-center" style="width: 100%; height: 100%;">
<view>
<view class="">
<text style="font-size:36rpx;color:#999999;">预估收益</text>
</view>
<view class="">
<text style="font-size:56rpx;color:#333333;">{{tabsListData[current].purchase.amount}}</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<view class="table-list" v-if="current>1">
<view class="table-head flex align-center">
<view class="table-title">
<text>日期</text>
</view>
<view class="table-title">
<text>销售额</text>
</view>
<view class="table-title">
<text>订单数</text>
</view>
<view class="table-title">
<text>预估收益</text>
</view>
</view>
<view class="table-body">
<view>
<view class="table-column flex align-center " v-for="(td,index) in tabsListData[current].purchaseList" :key='index'>
<view class="table-td">
<text>{{td.day|formatDayDate}}</text>
</view>
<view class="table-td">
<text>{{td.salesVolume}}</text>
</view>
<view class="table-td">
<text>{{td.count}}</text>
</view>
<view class="table-td">
<text>{{td.amount}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{
name: '今日'
}, {
name: '昨日'
}, {
name: '本月',
}, {
name: '上月',
}],
tabsListData: [],
current: 0,
}
},
mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
let nowDay = today.getDate()
//
const newDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatDayDate(todayDate);
};
//
const lastDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay - 1);
return this.formatDayDate(todayDate);
};
//
const newMonth = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatMonthDate(todayDate);
};
//
const lastMonth = () => {
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay(), 0)
this.getDay(lastDay(), 1)
this.getMonth(newMonth(), 2)
this.getMonth(lastMonth(), 3)
console.log(this.tabsListData)
},
filters: {
formatDayDate(mmdd) {
let date = new Date(mmdd);
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (mymonth + '月' + myDay + '日');
},
},
methods: {
changeCurrent(e) {
this.current = e.detail.current
// this.totalAmount()
},
tabChange(index) {
this.current = index
},
getMonth(month, index) {
this.$u.post('/api/v2/app/user/income/month_expect', {
month: month
}).then(res => {
this.$set(this.tabsListData, index, res.data.data)
})
// const res = await this.$u.post('/api/v2/app/user/income/month_expect', {
// month: month
// })
},
getDay(day, index) {
this.$u.post('/api/v2/app/user/income/day_expect', {
day: day
}).then(res => {
this.$set(this.tabsListData, index, res.data.data)
})
// const res = await this.$u.post('/api/v2/app/user/income/day_expect', {
// day: day
// })
// this.$set(this.tabsListData, index, res.data.data)
},
//
formatDayDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth + '-' + myDay);
},
//
formatMonthDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth);
},
}
}
</script>
<style lang="scss" scoped>
.myNav {
position: absolute;
top: 0;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}
.content {
.tab-box {
// width: 690rpx;
// height: 344rpx;
// background: #5677FC;
margin: 0 30rpx;
.tabs {
.tab {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 20rpx;
border: 2rpx solid #FFFFFF;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
&.tab-active {
background: #FFFFFF;
color: #000000;
}
}
}
}
.table-list {
background-color: #FFFFFF;
margin-top: 20rpx;
padding: 0 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.table-head {
font-size: 32rpx;
.table-title {
height: 90rpx;
line-height: 90rpx;
width: 25%;
text-align: center;
}
}
.table-body {
font-size: 28rpx;
.table-column {
border-top: 2rpx solid #EEEEEE;
.table-td {
width: 25%;
height: 90rpx;
line-height: 90rpx;
text-align: center;
}
}
}
}
}
</style>

@ -0,0 +1,290 @@
<!-- 导购 -->
<template>
<view class="" style="width: 750rpx; overflow: hidden;">
<view class="myNav">
</view>
<view class="content">
<view class="tab-box">
<view class="tabs flex justify-between align-center">
<view class="tab" v-for="(tab,index) in tabList" :key='index' :class="current===index?'tab-active':''" @click="tabChange(index)">
<text>{{tab.name}}</text>
</view>
</view>
</view>
<view class="">
<swiper class="flex-sub" :current="current" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<swiper-item v-for="(item,index) in tabList" :key='index'>
<scroll-view scroll-y="true" style="height: 344rpx;width: 690rpx;background: #FFFFFF;margin: 20rpx auto;">
<view class="flex justify-center align-center text-center" style="width: 100%; height: 100%;">
<view>
<view class="">
<text style="font-size:36rpx;color:#999999;">预估收益</text>
</view>
<view class="">
<text style="font-size:56rpx;color:#333333;">{{memberList[current].recommend.amount}}</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<view class="member-line">
<view class="line">
</view>
</view>
<view class="member-box">
<view class="member-title flex">
<view class="" style="width: 350rpx;">
<text>团队贡献榜</text>
</view>
<view class="" style="flex: 1;">
<text>团队2人数{{memberList[current].recommendList.length}}</text>
</view>
<view class="">
<text>||</text>
</view>
</view>
<view class="member-table" >
<view class="member-list flex" v-for="(item,index) in memberList[current].recommendList" :key='index'>
<view class="">
<view class="avatar">
<u-lazy-load threshold="-100" :image="IMAGE_URL+item.headImgUrl" :index="index" height="140" border-radius="70"
:loading-img="IMAGE_URL + '/null05.png'" :error-img="IMAGE_URL + '/null05.png'" img-mode="aspectFill"></u-lazy-load>
</view>
</view>
<view class="" style="flex:1">
<view class="flex justify-between" >
<view class="user-name">
{{item.nickname}}
</view>
<view class="user-price">
{{item.amount}}
</view>
</view>
<view class="flex align-center flex-wrap" >
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.wechatNo}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.phone}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.nickname}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.count}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{
name: '今日'
}, {
name: '昨日'
}, {
name: '本月',
}, {
name: '上月',
}],
tabsListData: [],
current: 0,
IMAGE_URL: this.IMAGE_URL,
memberList: [],
}
},
mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
let nowDay = today.getDate()
//
const newDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatDayDate(todayDate);
};
//
const lastDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay - 1);
return this.formatDayDate(todayDate);
};
//
const newMonth = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatMonthDate(todayDate);
};
//
const lastMonth = () => {
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay(), 0)
this.getDay(lastDay(), 1)
this.getMonth(newMonth(), 2)
this.getMonth(lastMonth(), 3)
console.log(this.tabsListData)
},
filters: {
formatDayDate(mmdd) {
let date = new Date(mmdd);
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (mymonth + '月' + myDay + '日');
},
},
methods: {
changeCurrent(e) {
this.current = e.detail.current
// this.totalAmount()
},
tabChange(index) {
this.current = index
},
getMonth(month, index) {
this.$u.post('/api/v2/app/user/income/month_expect_team', {
month: month
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
getDay(day, index) {
this.$u.post('/api/v2/app/user/income/day_expect_team', {
day: day
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
//
formatDayDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth + '-' + myDay);
},
//
formatMonthDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth);
},
}
}
</script>
<style lang="scss" scoped>
.myNav {
position: absolute;
top: 0;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}
.content {
.tab-box {
margin: 0 30rpx;
.tabs {
.tab {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 20rpx;
border: 2rpx solid #FFFFFF;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
&.tab-active {
background: #FFFFFF;
color: #000000;
}
}
}
}
.member-line {
width: 722rpx;
margin: 20rpx auto 0;
padding: 6rpx 8rpx;
background: #E3E3E3;
box-shadow: 0rpx 4rpx 8rpx 0px rgba(0, 0, 0, 0.25);
border-radius: 14rpx;
z-index: 10;
.line {
width: 706rpx;
height: 8rpx;
background: #6A6A6A;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.39);
border-radius: 14rpx;
opacity: 0.31;
}
}
.member-box {
margin: 0 30rpx;
position: relative;
top: -6rpx;
z-index: 100;
padding: 0 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.11);
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 20rpx;
}
.member-title {
margin-bottom: 20rpx;
padding: 40rpx 0 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
</style>

@ -0,0 +1,244 @@
<!-- 导购 -->
<template>
<view class="" style="width: 750rpx; overflow: hidden;">
<view class="myNav">
</view>
<view class="content">
<view class="tab-box">
<view class="tabs flex justify-between align-center">
<view class="tab" v-for="(tab,index) in tabList" :key='index' :class="current===index?'tab-active':''" @click="tabChange(index)">
<text>{{tab.name}}</text>
</view>
</view>
</view>
<view class="">
<swiper class="flex-sub" :current="current" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<swiper-item v-for="(item,index) in tabList" :key='index'>
<scroll-view scroll-y="true" style="height: 344rpx;width: 690rpx;background: #FFFFFF;margin: 20rpx auto;">
<view class="flex justify-center align-center text-center" style="width: 100%; height: 100%;">
<view>
<view class="">
<text style="font-size:36rpx;color:#999999;">预估收益</text>
</view>
<view class="">
<text style="font-size:56rpx;color:#333333;">{{memberList[current].recommend.amount}}</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<view class="member-line">
<view class="line">
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{
name: '今日'
}, {
name: '昨日'
}, {
name: '本月',
}, {
name: '上月',
}],
tabsListData: [],
current: 0,
IMAGE_URL: this.IMAGE_URL,
memberList: [],
}
},
mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
let nowDay = today.getDate()
// 当天
const newDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatDayDate(todayDate);
};
// 昨天
const lastDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay - 1);
return this.formatDayDate(todayDate);
};
// 当月
const newMonth = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatMonthDate(todayDate);
};
// 上月
const lastMonth = () => {
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay(), 0)
this.getDay(lastDay(), 1)
this.getMonth(newMonth(), 2)
this.getMonth(lastMonth(), 3)
console.log(this.tabsListData)
},
filters: {
formatDayDate(mmdd) {
let date = new Date(mmdd);
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (mymonth + '月' + myDay + '日');
},
},
methods: {
changeCurrent(e) {
this.current = e.detail.current
// this.totalAmount()
},
tabChange(index) {
this.current = index
},
getMonth(month, index) {
this.$u.post('/api/v2/app/user/income/month_expect_team', {
month: month
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
getDay(day, index) {
this.$u.post('/api/v2/app/user/income/day_expect_team', {
day: day
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
//天数格式化
formatDayDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth + '-' + myDay);
},
// 月格式化
formatMonthDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth);
},
}
}
</script>
<style lang="scss" scoped>
.myNav {
position: absolute;
top: 0;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}
.content {
.tab-box {
margin: 0 30rpx;
.tabs {
.tab {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 20rpx;
border: 2rpx solid #FFFFFF;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
&.tab-active {
background: #FFFFFF;
color: #000000;
}
}
}
}
.member-line {
width: 722rpx;
margin: 20rpx auto 0;
padding: 6rpx 8rpx;
background: #E3E3E3;
box-shadow: 0rpx 4rpx 8rpx 0px rgba(0, 0, 0, 0.25);
border-radius: 14rpx;
z-index: 10;
.line {
width: 706rpx;
height: 8rpx;
background: #6A6A6A;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.39);
border-radius: 14rpx;
opacity: 0.31;
}
}
.member-box {
margin: 0 30rpx;
position: relative;
top: -6rpx;
z-index: 100;
padding: 0 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.11);
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 20rpx;
}
.member-title {
margin-bottom: 20rpx;
padding: 40rpx 0 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
</style>

@ -0,0 +1,290 @@
<!-- 导购 -->
<template>
<view class="" style="width: 750rpx; overflow: hidden;">
<view class="myNav">
</view>
<view class="content">
<view class="tab-box">
<view class="tabs flex justify-between align-center">
<view class="tab" v-for="(tab,index) in tabList" :key='index' :class="current===index?'tab-active':''" @click="tabChange(index)">
<text>{{tab.name}}</text>
</view>
</view>
</view>
<view class="">
<swiper class="flex-sub" :current="current" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<swiper-item v-for="(item,index) in tabList" :key='index'>
<scroll-view scroll-y="true" style="height: 344rpx;width: 690rpx;background: #FFFFFF;margin: 20rpx auto;">
<view class="flex justify-center align-center text-center" style="width: 100%; height: 100%;">
<view>
<view class="">
<text style="font-size:36rpx;color:#999999;">预估收益</text>
</view>
<view class="">
<text style="font-size:56rpx;color:#333333;">{{memberList[current].team.amount}}</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<view class="member-line">
<view class="line">
</view>
</view>
<view class="member-box">
<view class="member-title flex">
<view class="" style="width: 350rpx;">
<text>团队贡献榜</text>
</view>
<view class="" style="flex: 1;">
<text>团队人数{{memberList[current].teamList.length}}</text>
</view>
<view class="">
<text>||</text>
</view>
</view>
<view class="member-table" >
<view class="member-list flex" v-for="(item,index) in memberList[current].teamList" :key='index'>
<view class="">
<view class="avatar">
<u-lazy-load threshold="-100" :image="IMAGE_URL+item.headImgUrl" :index="index" height="140" border-radius="70"
:loading-img="IMAGE_URL + '/null05.png'" :error-img="IMAGE_URL + '/null05.png'" img-mode="aspectFill"></u-lazy-load>
</view>
</view>
<view class="" style="flex:1">
<view class="flex justify-between" >
<view class="user-name">
{{item.nickname}}
</view>
<view class="user-price">
{{item.amount}}
</view>
</view>
<view class="flex align-center flex-wrap" >
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.wechatNo}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.phone}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.nickname}}
</view>
<view class="" style="width: 50%;padding: 10rpx 0;">
{{item.count}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{
name: '今日'
}, {
name: '昨日'
}, {
name: '本月',
}, {
name: '上月',
}],
tabsListData: [],
current: 0,
IMAGE_URL: this.IMAGE_URL,
memberList: [],
}
},
mounted() {
let today = new Date()
let nowYear = today.getFullYear()
let nowMonth = today.getMonth()
let nowDay = today.getDate()
//
const newDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatDayDate(todayDate);
};
//
const lastDay = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay - 1);
return this.formatDayDate(todayDate);
};
//
const newMonth = () => {
let todayDate = new Date(nowYear, nowMonth, nowDay);
return this.formatMonthDate(todayDate);
};
//
const lastMonth = () => {
let todayDate = new Date(nowYear, nowMonth - 1, nowDay);
return this.formatMonthDate(todayDate);
};
this.getDay(newDay(), 0)
this.getDay(lastDay(), 1)
this.getMonth(newMonth(), 2)
this.getMonth(lastMonth(), 3)
console.log(this.tabsListData)
},
filters: {
formatDayDate(mmdd) {
let date = new Date(mmdd);
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (mymonth + '月' + myDay + '日');
},
},
methods: {
changeCurrent(e) {
this.current = e.detail.current
// this.totalAmount()
},
tabChange(index) {
this.current = index
},
getMonth(month, index) {
this.$u.post('/api/v2/app/user/income/month_expect_team', {
month: month
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
getDay(day, index) {
this.$u.post('/api/v2/app/user/income/day_expect_team', {
day: day
}).then(res => {
console.log(res)
this.$set(this.memberList, index, res.data.data)
})
},
//
formatDayDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
let myDay = date.getDate()
if (myDay < 10) {
myDay = '0' + myDay
}
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth + '-' + myDay);
},
//
formatMonthDate(date) {
let myyear = date.getFullYear();
let mymonth = date.getMonth() + 1;
if (mymonth < 10) {
mymonth = "0" + mymonth;
}
return (myyear + "-" + mymonth);
},
}
}
</script>
<style lang="scss" scoped>
.myNav {
position: absolute;
top: 0;
left: -100rpx;
width: 950rpx;
height: 386rpx;
border-radius: 0 0 350rpx 350rpx;
background: #16182B;
z-index: -1;
}
.content {
.tab-box {
margin: 0 30rpx;
.tabs {
.tab {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 20rpx;
border: 2rpx solid #FFFFFF;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
&.tab-active {
background: #FFFFFF;
color: #000000;
}
}
}
}
.member-line {
width: 722rpx;
margin: 20rpx auto 0;
padding: 6rpx 8rpx;
background: #E3E3E3;
box-shadow: 0rpx 4rpx 8rpx 0px rgba(0, 0, 0, 0.25);
border-radius: 14rpx;
z-index: 10;
.line {
width: 706rpx;
height: 8rpx;
background: #6A6A6A;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.39);
border-radius: 14rpx;
opacity: 0.31;
}
}
.member-box {
margin: 0 30rpx;
position: relative;
top: -6rpx;
z-index: 100;
padding: 0 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.11);
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 20rpx;
}
.member-title {
margin-bottom: 20rpx;
padding: 40rpx 0 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
</style>

@ -564,17 +564,58 @@
}
},
{
"path": "myIncome/myIncome",
// "style": {
// "navigationBarTitleText": "我的收益",
// "enablePullDownRefresh": false
// },
"path": "myIncome/myIncome",
"style": {
"navigationBarTitleText": "我的收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/purchase",
"style": {
"navigationBarTitleText": "自购收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/guide",
"style": {
"navigationBarTitleText": "导购收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/team",
"style": {
"navigationBarTitleText": "团队收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/recommend",
"style": {
"navigationBarTitleText": "推荐收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/reward",
"style": {
"navigationBarTitleText": "平台收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "agreement/share",

@ -494,9 +494,8 @@
page {
background-color: #F3F4F6;
}
//
.customer-service {
margin: 0;
padding: 0;
line-height: 0;
@ -505,38 +504,12 @@
border-radius: 0;
border: none;
color: #FFFFFF;
// &button{
// margin:0;
// padding: 0;
// line-height: 0;
// }
// &button
&::after {
border: none;
}
}
// .login-box {
// position: fixed;
// width: 100vw;
// height: 100vh;
// image {
// width: 160rpx;
// box-shadow: 5rpx 5rpx 10rpx 3rpx rgba(0, 0, 0, 0.3);
// margin-bottom: 200rpx;
// }
// button {
// width: 400rpx;
// height: 60rpx;
// line-height: 60rpx;
// border-radius: 15rpx;
// }
// }
.top-container {
position: relative;
border-radius: 80rpx/30rpx;

Loading…
Cancel
Save