添加:我的分享 - 增加上级信息弹框
This commit is contained in:
parent
d80c896a75
commit
0dbfd12c82
|
|
@ -763,6 +763,10 @@ export function shareholdersStatistics() {
|
|||
export function shareholdersOrderList() {
|
||||
return request.get(`user/shareholders/order_list`);
|
||||
}
|
||||
// 分销商上级信息
|
||||
export function spreadParent() {
|
||||
return request.get(`user/spread_parent`);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@
|
|||
<text class='iconfont icon-erweima'></text>
|
||||
<view>佣金排行</view>
|
||||
</view>-->
|
||||
<view class='item acea-row row-center-wrapper row-column' @click="showParent">
|
||||
<text class='iconfont icon-yonghu2'></text>
|
||||
<view>我的上级</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="instructions" v-if="showProtocol">
|
||||
|
|
@ -67,12 +72,38 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--我的上级弹框-->
|
||||
<uni-popup ref="spreadPopup" type="center">
|
||||
<view class="spread-content">
|
||||
<view class="s-title">我的上级</view>
|
||||
<template v-if="Object.values(spread).length > 0 && spread.uid > 0">
|
||||
<!--存在上级-->
|
||||
<view class="user-info">
|
||||
<view class="avatar-content">
|
||||
<image class="avatar" :src="spread.avatar" />
|
||||
<view class="status">{{ spread.spread_fixed == 1 ? '永久' : '临时' }}</view>
|
||||
</view>
|
||||
<view class="nickname">{{ spread.real_name || spread.nickname}}</view>
|
||||
<view class="time" v-if="spread.spread_time">关联时间:{{ spread.spread_time }}</view>
|
||||
<view class="time" v-if="spread.spread_limit && spread.spread_fixed != 1">到期时间:{{ spread.spread_limit }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--暂无上级-->
|
||||
<emptyPage class="empty-page" title="未绑定上级~"></emptyPage>
|
||||
</template>
|
||||
<view class="closeBtn" @click="closeParent">我知道了</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { spreadInfo, commissionDescription } from '@/api/user.js';
|
||||
<script>
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import { spreadInfo, commissionDescription,spreadParent } from '@/api/user.js';
|
||||
import { openEextractSubscribe } from '@/utils/SubscribeMessage.js';
|
||||
import {mapGetters} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
|
|
@ -81,6 +112,7 @@
|
|||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage,
|
||||
"jyf-parser": parser,
|
||||
},
|
||||
data() {
|
||||
|
|
@ -95,6 +127,7 @@
|
|||
img: 'width:100%;display:block;',
|
||||
video: 'width:100%;'
|
||||
},
|
||||
spread: {},
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin','uid','viewColor']),
|
||||
|
|
@ -170,7 +203,7 @@
|
|||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
url: '/pages/user/index'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -199,11 +232,25 @@
|
|||
uni.navigateTo({
|
||||
url: path
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 显示我的上级
|
||||
showParent(){
|
||||
let _this = this;
|
||||
if(Object.values(_this.spread).length <= 0){
|
||||
spreadParent().then(res => {
|
||||
if(Number(res.status) === 200){
|
||||
_this.spread = res.data || {};
|
||||
_this.$refs.spreadPopup.open('center');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
_this.$refs.spreadPopup.open('center');
|
||||
}
|
||||
},
|
||||
// 关闭我的上级弹框
|
||||
closeParent(){
|
||||
this.$refs.spreadPopup.close();
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
|
@ -316,13 +363,11 @@
|
|||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.my-promotion .header .name .record .iconfont {
|
||||
font-size: 25rpx;
|
||||
margin-left: 10rpx;
|
||||
vertical-align: 2rpx;
|
||||
}
|
||||
|
||||
.my-promotion .header .num {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
|
|
@ -330,25 +375,21 @@
|
|||
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;
|
||||
|
|
@ -360,12 +401,10 @@
|
|||
margin: -32rpx auto 0 auto;
|
||||
border: 10rpx solid #fff;
|
||||
}
|
||||
|
||||
.my-promotion .list {
|
||||
padding: 0 20rpx 50rpx 20rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.my-promotion .list .item {
|
||||
width: 345rpx;
|
||||
height: 240rpx;
|
||||
|
|
@ -375,7 +414,6 @@
|
|||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.my-promotion .list .item .iconfont {
|
||||
font-size: 70rpx;
|
||||
background-image: linear-gradient(to right, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
|
|
@ -420,7 +458,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.instructions .setAgCount .icon {
|
||||
font-size: 42rpx;
|
||||
color: #b4b1b4;
|
||||
|
|
@ -429,14 +466,12 @@
|
|||
right: 15rpx;
|
||||
|
||||
}
|
||||
|
||||
.instructions .setAgCount .title {
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.instructions .setAgCount .content {
|
||||
margin-top: 32rpx;
|
||||
color: #333;
|
||||
|
|
@ -447,4 +482,80 @@
|
|||
height: 756rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.spread-content{
|
||||
width: 80vw;
|
||||
padding: 30rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
.s-title{
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.empty-page{
|
||||
/deep/ .empty-box{
|
||||
margin-bottom: 200rpx!important;
|
||||
}
|
||||
}
|
||||
.user-info{
|
||||
padding: 30rpx 0;
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.avatar-content{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
.avatar{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.status{
|
||||
font-size: 26rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: calc(40rpx / 2);
|
||||
background-color: #409eff;
|
||||
color: #fff;
|
||||
width: 70rpx;
|
||||
text-align: center;
|
||||
height: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nickname{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.time{
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 26rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
.closeBtn{
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
background: #b51613;
|
||||
color: #ffffff;
|
||||
border-radius: 200rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue