|
|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="leader-info">
|
|
|
- <image src="/static/bed2-bg.png"></image>
|
|
|
+ <image :src="selfObj.headimg || '/static/bed2-bg.png' "></image>
|
|
|
<view class="leader-column">
|
|
|
<view>
|
|
|
<!-- <text>晚霞</text><text class="invite">我</text> -->
|
|
|
- <text>{{ selfObj.name }}</text>
|
|
|
- <text class="mySelf">我</text>
|
|
|
+ <text>{{ selfObj.name || '-' }}</text>
|
|
|
+ <text class="mySelf">{{ selfObj.role || '我' }}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text style="color:#ccc">{{ selfObj.phone }}</text>
|
|
|
+ <text style="color:#ccc">{{ selfObj.phone || '-' }}</text>
|
|
|
<!-- <text style="color:#ccc;font-size: 28rpx;">188****2600</text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -17,27 +17,27 @@
|
|
|
<view v-for="(item, index) in teamList" :key="index" @click.stop="showChild(index)">
|
|
|
<view class="leader-info">
|
|
|
<image :src="!arrowFlagList[index] ? '/static/arrow-right3.png' : '/static/arrow-down.png'" class="arrow-style"></image>
|
|
|
- <image src="/static/bed2-bg.png"></image>
|
|
|
+ <image :src="item.headimg || '/static/bed2-bg.png' "></image>
|
|
|
<view class="leader-column">
|
|
|
<view class="teamLevel-box">
|
|
|
- <view style="white-space: nowrap;">{{ item.name }}</view>
|
|
|
+ <view style="white-space: nowrap;">{{ item.name || '-'}}</view>
|
|
|
<view class="invite">一级分销</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text style="color:#ccc;font-size: 28rpx;">{{ item.phone }}</text>
|
|
|
+ <text style="color:#ccc;font-size: 28rpx;">{{ item.phone || '-' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="leader-info" v-show="arrowFlagList[index]" v-for="childItem in item.child" :key="childItem.id">
|
|
|
<image src="/static/arrow-right3.png" class="arrow-style" style="visibility: hidden;"></image>
|
|
|
- <image src="/static/bed2-bg.png"></image>
|
|
|
+ <image :src="childItem.headimg || '/static/bed2-bg.png' "></image>
|
|
|
<view class="leader-column">
|
|
|
<view class="teamLevel-box">
|
|
|
- <view style="white-space: nowrap;">{{ childItem.name }}</view>
|
|
|
+ <view style="white-space: nowrap;">{{ childItem.name || '-'}}</view>
|
|
|
<view class="invited">二级分销</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text style="color:#ccc;font-size: 28rpx;">{{ childItem.phone }}</text>
|
|
|
+ <text style="color:#ccc;font-size: 28rpx;">{{ childItem.phone || '-'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -98,22 +98,22 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
- this.filterSelf();
|
|
|
- this.getTeamRequest()
|
|
|
+ this.getTeamRequest();
|
|
|
},
|
|
|
methods: {
|
|
|
- filterSelf() {
|
|
|
+ filterSelf(arr) {
|
|
|
let that = this;
|
|
|
- let obj = that.teamList.filter((item, index) => {
|
|
|
+ let obj = arr.filter((item, index) => {
|
|
|
return item.role === '我';
|
|
|
});
|
|
|
that.selfObj = obj[0];
|
|
|
- that.teamList = that.teamList.filter((item, index) => {
|
|
|
+ arr = arr.filter((item, index) => {
|
|
|
return item.role !== '我';
|
|
|
});
|
|
|
- for (let i = 0; i < that.teamList.length; i++) {
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
that.arrowFlagList.push(false);
|
|
|
}
|
|
|
+ return arr;
|
|
|
},
|
|
|
getTeamRequest(){
|
|
|
let that = this;
|
|
|
@@ -132,7 +132,7 @@ export default {
|
|
|
success: res => {
|
|
|
if (res.data.code === 200) {
|
|
|
console.log(res.data.msg)
|
|
|
- //that.cashOutList = res.data.msg
|
|
|
+ that.teamList = that.filterSelf(res.data.msg)
|
|
|
}
|
|
|
}
|
|
|
});
|