| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <template>
- <view class="container">
- <view class="topView">
- <view class="moneyLabel">
- <text>总金额 (元)</text>
- </view>
- <view class="moneyNum">
- <text>{{data.total?data.total:'0.00'}}</text>
- </view>
- <view class="allMoney">
- <text>累计收益:{{data.settled?data.settled:'0.00'}}元</text>
- </view>
- <view class="redLabel1">
- <text>每月1日系统自动结算收益金额</text>
- </view>
- <view class="detailView">
- <view>
- <text class="label1">账户余额</text>
- <text class="label2">{{data.balance?data.balance:'0.00'}}</text>
- </view>
- <view>
- <text class="label1">待结算金额</text>
- <text class="label2">{{data.frozen?data.frozen:'0.00'}}</text>
- </view>
- </view>
- </view>
- <view class="item_list">
- <view class="item" v-for="(item, index) in inComeItemList" :key="index" @tap="tapToMenu(index)">
- <view class="item_content">
- <image :src="item.itemIcon"></image>
- <text>{{ item.itemName }}</text>
- </view>
- <image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
- </view>
- </view>
- <view v-if="!isPromoter" class="btnView">
- <view class="btn" @tap="tapToMenu(3)">
- <Text>团长申请</text>
- </view>
- <view class="btn1" @tap="tapToMenu(4)">
- <Text>残忍拒绝</text>
- </view>
- </view>
- </view>
- </template>
- <script>
-
- export default {
- components: {
-
- },
- data() {
- return {
- data:null,
- memberId: 0,
- isPromoter:false,
- inComeItemList: [
- {
- itemName: '结算记录',
- itemIcon: 'http://139.9.103.171:1888/img/image/settlementRecordsIcon.png'
- },
- {
- itemName: '收益记录',
- itemIcon: 'http://139.9.103.171:1888/img/image/incomeRecord_icon.png'
- },
- // {
- // itemName: '我邀请的人',
- // itemIcon: 'http://139.9.103.171:1888/img/image/inViteRecordIcon.png'
- // }
- ],
- }
- },
- methods: {
- tapToMenu(idx) {
- if(idx==0||idx==1||idx==2){
- if(!this.$auth.isPromoter())return;
- }
- switch (idx) {
- case 0: // 结算记录
- uni.navigateTo({
- url: '/pagesM/pages/balance_records'
- });
- break;
- case 1: // 收益记录
- uni.navigateTo({
- url: '/pagesM/pages/earn_records'
- });
- break;
- case 2: // 我邀请的人
- uni.navigateTo({
- url: '/pagesM/pages/my_invite'
- });
- break;
- case 3: // 申请推广
- uni.navigateTo({
- url: '/pagesM/pages/applyToPromotion'
- });
- break;
- case 4: // 拒绝
- uni.navigateBack({
- delta:1
- })
- break;
- default:
- break;
- }
- },
- onLoadPage() {
- this.memberId = this.$auth.getMemberId();
- if(this.$auth.isPromoter()){
- this.isPromoter = true;
- }
- this.getData();
- },
- async getData(){
- let resp = await this.$api.distributionCommission({
- _isShowLoading: true
- })
- this.data = resp
- }
- }
-
- }
- </script>
- <style lang="scss" scoped>
- .container {
- padding-top: 20rpx;
- background-color: #F6F4F5;
- width: 100vw;
- height: 100vh;
- font-family: 'PingFang-SC-Bold';
- }
- .topView{
- margin-left: 20rpx;
- border-radius: 20rpx;
- width: 710rpx;
- height:540rpx;
- background-color: #ffffff;
- }
- .moneyLabel{
- padding-top: 99rpx;
- width: 710rpx;
- justify-content: center;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
-
- text{
- color: #333333;
- font-size: 30rpx;
- }
- }
- .moneyNum{
- padding-top: 10rpx;
- width: 710rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- text{
- color: $dt-color-primary;
- font-size: 72rpx;
- }
- }
- .allMoney{
- padding-top: -30rpx;
- width: 710rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- text{
- color: #333333;
- font-size: 24rpx;
- }
- }
- .redLabel1{
- padding-top: 15rpx;
- width: 710rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- text{
- color: #EA7A7A;
- font-size: 24rpx;
- background-color:#EEEEEE ;
- padding-left: 6rpx;
- padding-right: 6rpx;
- border-radius: 15rpx;
- }
- }
- .detailView{
- padding-top: 50rpx;
- width: 710rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-around;
- view{
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- text{
- color: #EA7A7A;
- font-size: 24rpx;
- }
- .label1{
- color: #999999;
- font-size: 24rpx;
- }
- .label2{
- margin-top: 10rpx;
- color:#333333;
- font-size: 36rpx;
- }
- }
- }
-
- .item_list {
- display: flex;
- flex-direction: column;
- background: #fff;
- margin-top: 20upx;
- margin-left: 20rpx;
- margin-right: 20rpx;
- border-radius: 20rpx;
- .item {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- padding: 0 30upx;
- height: 90upx;
- border-bottom: 1upx solid #e5e5e5;
-
- .item_content {
- display: flex;
- flex-direction: row;
- align-items: center;
-
- image {
- width: 38upx;
- height: 38upx;
- }
-
- text {
- font-size: 28upx;
- color: #333333;
- margin-left: 20upx;
- }
- }
-
- image {
- width: 10upx;
- height: 18upx;
- }
- }
-
- .item:last-child {
- border: none;
- }
- }
- .btnView{
- margin-top: 119rpx;
- width: 100vw;
- display: flex;
- flex-direction: row;
- align-items: center;
- .btn{
- width: 247rpx;
- height:88rpx;
- background-color: $dt-color-primary;
- border-radius: 15rpx;
- padding-top: 5rpx;
- margin-left: 79rpx;
- text-align: center;
- text{
- line-height:88rpx ;
- color:#ffffff;
- font-size: 30rpx;
- }
- }
- .btn1{
- margin-left: 104rpx;
- width: 247rpx;
- height:88rpx;
- background-color: #ffffff;
- border-radius: 15rpx;
- padding-top: 5rpx;
- text-align: center;
- text{
- line-height:88rpx ;
- color:#999999;
- font-size: 30rpx;
- }
- }
- }
- </style>
|