You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hezhiying/pages/fenxiao/fenxiao.vue

188 lines
4.4 KiB

1 year ago
<template>
<view class="fenxiao">
<view class="fenxiaoInfo">
<view class="fxTop">
<text class="tixian">佣金</text>
1 year ago
<view class="fxIntro" @click="show=true">
1 year ago
<text>分销说明</text>
<u-icon size="15" color="#c4b39b" name="more-circle"></u-icon>
</view>
</view>
1 year ago
<view class="fxMiddle">
1 year ago
<text></text>
1 year ago
<text class="num">{{totalObj.available_commission_amount}}</text>
</view>
1 year ago
<view class="fxBottom">
<view class="fxItem">
<text class="num">{{totalObj.total_commission_amount}}</text>
<text class="total">累计总获得</text>
</view>
<view class="fxItem">
<text class="num">{{totalObj.today_commission_amount}}</text>
<text class="total">今日获得</text>
</view>
<view class="fxItem">
<text class="num">{{totalObj.seven_day_commission_amount}}</text>
<text class="total">近7日获得</text>
</view>
</view>
</view>
<image class="line" src="../../static/image/line.png" mode="widthFix"></image>
<view class="card">
<u-cell-group :border="false">
<u-cell icon="rmb-circle" :iconStyle="{'color':'#9f751f'}" @click="jump(1)" :titleStyle="{'color':'#9f751f'}" title="我的佣金" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
<!-- <u-cell icon="file-text" :iconStyle="{'color':'#9f751f'}" :titleStyle="{'color':'#9f751f'}" title="提现记录" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell> -->
<u-cell icon="heart" :iconStyle="{'color':'#9f751f'}" @click="jump(2)" :titleStyle="{'color':'#9f751f'}" title="我的粉丝" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
1 year ago
<u-cell icon="order" :iconStyle="{'color':'#9f751f'}" @click="jump(3)" :titleStyle="{'color':'#9f751f'}" title="粉丝订单" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
1 year ago
</u-cell-group>
</view>
1 year ago
<u-popup :show="show" mode="bottom" @close="close" round="10">
<view style="padding:24rpx;max-height:calc(60vh);overflow: auto;">
<u-parse :content="content" style="margin-top:45px;"></u-parse>
</view>
</u-popup>
1 year ago
</view>
</template>
<script>
import {getUserCommissionStatistic} from '@/common/api.js'
1 year ago
import {privacyPolicy} from '@/common/api.js'
1 year ago
export default{
data(){
return{
totalObj:{
1 year ago
"available_commission_amount":"",
1 year ago
"total_commission_amount": "",
"today_commission_amount": "",
"seven_day_commission_amount": ""
1 year ago
},
show:false,
content:''
1 year ago
}
},
methods:{
1 year ago
close() {
this.show = false
},
getText(){
privacyPolicy({id:9}).then(res=>{
this.content = res.data.content
})
},
1 year ago
getInfo(){
getUserCommissionStatistic().then(res=>{
console.log(res,"nnn")
this.totalObj = Object.assign({},this.totalObj,res.data)
})
},
jump(type){
switch (type){
case 1:
uni.navigateTo({
url: '/pages/fenxiao/yongjin'
})
break;
case 2:
uni.navigateTo({
url: '/pages/fenxiao/fans'
})
break;
case 3:
uni.navigateTo({
1 year ago
url: '/pages/fenxiao/fansOrder'
1 year ago
})
break;
}
},
},
mounted(){
this.getInfo()
1 year ago
this.getText()
1 year ago
}
}
</script>
<style lang="scss" scoped>
.fenxiao{
min-height: calc(100vh - 90rpx);
border-top: 1px solid transparent;
background: url('../../static/image/bg.png');
background-size: contain;
.fenxiaoInfo{
width:80%;
margin:14% auto 0 auto;
background: url('../../static/image/fenxiaobg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
border-radius: 15rpx;
padding:30rpx;
}
.fxTop{
display: flex;
align-items: center;
justify-content: space-between;
.tixian{
color: #9f751f;
font-size: 30rpx;
}
.fxIntro{
font-size: 30rpx;
color: #c4b39b;
display: flex;
align-items: center;
text{
margin-right:10rpx;
}
}
}
.fxMiddle{
font-size: 30rpx;
margin:26rpx 0;
color: #9f751f;
text-align: center;
.num{
font-size: 58rpx;
font-weight: normal;
color: rgb(77, 154, 94);
}
}
.fxBottom{
display: flex;
1 year ago
margin-top:20rpx;
1 year ago
align-items: center;
justify-content: space-between;
.fxItem{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.num{
font-size: 32rpx;
color: #9f751f;
}
.total{
font-size: 26rpx;
color: #7a5f26;
margin-top:10rpx;
}
}
}
.line{
width:100%;
height:auto;
}
.card{
margin-top: 8px;
padding: 16px 22px;
}
}
::v-deep .u-line{
border:1px solid #9f751f !important;
}
::v-deep .u-cell__body{
padding:30rpx 0 !important
}
</style>