mall-uniapp/pages/users/user_spread_user/index.vue

232 lines
20 KiB
Vue
Raw Normal View History

2020-08-13 08:12:57 +00:00
<template>
<view>
<view class='my-promotion'>
<view class="header">
<view class='name acea-row row-center-wrapper'>
<view>当前佣金</view>
<navigator :url="'/pages/users/user_spread_money/index?type=1&extractCount='+spreadInfo.extractCount" hover-class="none" class='record'>提现记录<text class='iconfont icon-xiangyou'></text></navigator>
2020-08-13 08:12:57 +00:00
</view>
<view class='num'>{{spreadInfo.commissionCount}}</view>
<view class='profit acea-row row-between-wrapper'>
<view class='item'>
<view>昨日收益</view>
<view class='money'>{{spreadInfo.lastDayCount ? Number(spreadInfo.lastDayCount).toFixed(2) : 0}}</view>
2020-08-13 08:12:57 +00:00
</view>
<view class='item'>
<view>累积已提</view>
<view class='money'>{{spreadInfo.extractCount ? Number(spreadInfo.extractCount).toFixed(2) : 0}}</view>
2020-08-13 08:12:57 +00:00
</view>
</view>
</view>
<!-- #ifdef H5 -->
2020-08-13 08:12:57 +00:00
<navigator url="/pages/users/user_cash/index" hover-class="none" class='bnt bg-color'>立即提现</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
<view @click="openSubscribe('/pages/users/user_cash/index')" class='bnt bg-color'>立即提现</view>
<!-- #endif -->
<view class='list acea-row row-between-wrapper'>
<navigator url='/pages/users/user_spread_code/index' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-erweima'></text>
<view>推广名片</view>
</navigator>
<navigator url='/pages/users/promoter-list/index' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-tongji'></text>
<view>推广人统计</view>
</navigator>
<navigator :url="'/pages/users/user_spread_money/index?type=2&commissionCount='+spreadInfo.commissionCount" hover-class="none" class='item acea-row row-center-wrapper row-column'>
2020-08-13 08:12:57 +00:00
<text class='iconfont icon-qiandai'></text>
<view>佣金明细</view>
</navigator>
<navigator url='/pages/users/promoter-order/index' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-dingdan'></text>
<view>推广人订单</view>
</navigator>
<navigator url='/pages/users/promoter_rank/index' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-paihang1'></text>
<view>推广人排行</view>
</navigator>
<navigator url='/pages/users/commission_rank/index' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-paihang'></text>
<view>佣金排行</view>
</navigator>
</view>
</view>
<!-- #ifdef MP -->
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
2020-08-13 08:12:57 +00:00
<!-- #endif -->
<home></home>
</view>
</template>
<script>
import { getSpreadInfo } from '@/api/user.js';
import { openExtrctSubscribe } from '@/utils/SubscribeMessage.js';
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from "vuex";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
import home from '@/components/home';
export default {
components: {
// #ifdef MP
authorize,
// #endif
home
},
data() {
return {
spreadInfo: {},
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
};
},
computed: mapGetters(['isLogin']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getSpreadInfo();
}
},
deep: true
}
},
2020-08-13 08:12:57 +00:00
onLoad() {
if (this.isLogin) {
this.getSpreadInfo();
} else {
toLogin();
}
},
methods: {
onLoadFun: function() {
this.getSpreadInfo();
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
openSubscribe: function(page) {
uni.navigateTo({
url: page,
2020-08-13 08:12:57 +00:00
});
// uni.showLoading({
// title: '正在加载',
// })
// openExtrctSubscribe().then(res => {
// uni.hideLoading();
// uni.navigateTo({
// url: page,
// });
// }).catch(() => {
// uni.hideLoading();
// });
2020-08-13 08:12:57 +00:00
},
/**
* 获取个人用户信息
*/
getSpreadInfo: function() {
let that = this;
getSpreadInfo().then(res => {
that.$set(that,'spreadInfo',res.data);
});
}
}
}
</script>
<style scoped lang="scss">
.my-promotion .header {
background-image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zxDPAraWO+NvR/miA3MZXdEPkR51RcqG1oFZGlgQoDmnONJqwRpylQY3a8CABDhge1XJE2fIFcHwOgIRE4xa5rD/X7Y3dDEXlRla3T/FQD0lV1DpfKXwBzR6bxYUf4qAPSVXaO9Kv836N5W9C7GBWJZ90WA0ol5lY8QdHM+HOWcUDQ//CrdAUmkn/X/TLID8sMRoYP8FYAH1bXjQ0A//AbdOWs1TzXXHs0nkn1zRGp+0IcfAgb5KwDIonrwA0b0w2+IGUDaENO0L4M54lNzvgLMDyWqH759/4//+Bj8p/sP9u7gBGEoAIJoKyYak/4rFBXjUYgEPsx7JSxzX0LkTojcCZE7IXInRO6EyJ0QuRMid0LkTojcCZE7IXInRO6EyJ0QuRMid0LkTojcCZE7IXInRO6EyJ0QuRMid0LkTojcCZE7IXInRO6EyJ0QuRMid0LkTojcCZE7IXInRO6EDJ77oPecPxniJH/NMGzu0zxfP7bySfE0b4Z49bDtM2xHZxgz92l+H6+vl5f1vkRvuZ+tL5fdeh/0ev1szx6W7wzrcjv2xD9i7g/2ziU9bhgEwEcZ8db9T9jGro2FcJ10pWHKJl/Gk4XgB/GQFQBSa0FM6OO2c0C2RBH9wxQB0MVaFOV/AH5B3JG0paL0UWYGZGuZmHyUIoAkV4Mxvn4oy+EODntiZ3x9jPxNEcofowhAabfyY79fDHc4Q/uHB3gP7bl8SIAH9NCeyU8D/Fq4A0l7EP4MM29e/9/xg9Mn8jPe18K9D0Y2FbGP5B0oJHEiH8l7SGRURFsU+UnF
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 375rpx;
}
.my-promotion .header .name {
font-size: 30rpx;
color: #fff;
padding-top: 57rpx;
position: relative;
}
.my-promotion .header .name .record {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
position: absolute;
right: 20rpx;
}
.my-promotion .header .name .record .iconfont {
font-size: 25rpx;
margin-left: 10rpx;
vertical-align: 2rpx;
}
.my-promotion .header .num {
text-align: center;
color: #fff;
margin-top: 28rpx;
font-size: 90rpx;
font-family: 'Guildford Pro';
}
.my-promotion .header .profit {
padding: 0 20rpx;
margin-top: 35rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.8);
}
.my-promotion .header .profit .item {
min-width: 200rpx;
text-align: center;
}
.my-promotion .header .profit .item .money {
font-size: 34rpx;
color: #fff;
margin-top: 5rpx;
}
.my-promotion .bnt {
font-size: 28rpx;
color: #fff;
width: 258rpx;
height: 68rpx;
border-radius: 50rpx;
text-align: center;
line-height: 68rpx;
margin: -32rpx auto 0 auto;
}
.my-promotion .list {
padding: 0 30rpx 50rpx 30rpx;
2020-08-13 08:12:57 +00:00
margin-top: 10rpx;
}
.my-promotion .list .item {
width: 335rpx;
2020-08-13 08:12:57 +00:00
height: 240rpx;
border-radius: 14rpx;
2020-08-13 08:12:57 +00:00
background-color: #fff;
margin-top: 20rpx;
font-size: 30rpx;
color: #666;
}
.my-promotion .list .item .iconfont {
font-size: 70rpx;
background-image: linear-gradient(to right, #fc4d3d 0%, #e93323 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 20rpx;
}
</style>