分佣:promoter-list 迁移
parent
b15fb02ecf
commit
27321bda16
|
@ -5,6 +5,11 @@ export function getBrokerageUserSummary() {
|
||||||
return request.get('app-api/trade/brokerage-user/get-summary');
|
return request.get('app-api/trade/brokerage-user/get-summary');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得下级分销统计分页
|
||||||
|
export function getBrokerageUserChildSummaryPage(data) {
|
||||||
|
return request.get('app-api/trade/brokerage-user/child-summary-page', data);
|
||||||
|
}
|
||||||
|
|
||||||
// 获得分销用户排行分页(基于用户量)
|
// 获得分销用户排行分页(基于用户量)
|
||||||
export function getBrokerageUserRankPageByUserCount(data) {
|
export function getBrokerageUserRankPageByUserCount(data) {
|
||||||
return request.get('app-api/trade/brokerage-user/rank-page-by-user-count', data);
|
return request.get('app-api/trade/brokerage-user/rank-page-by-user-count', data);
|
||||||
|
|
|
@ -5,50 +5,50 @@
|
||||||
<view class='headerCon acea-row row-between'>
|
<view class='headerCon acea-row row-between'>
|
||||||
<view>
|
<view>
|
||||||
<view class='name'>推广人数</view>
|
<view class='name'>推广人数</view>
|
||||||
<view><text class='num'>{{peopleData.count}}</text>人</view>
|
<view><text class='num'>{{peopleData.firstBrokerageUserCount + peopleData.secondBrokerageUserCount}}</text>人</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='iconfont icon-tuandui'></view>
|
<view class='iconfont icon-tuandui'></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad30">
|
<view class="pad30">
|
||||||
<view class='nav acea-row row-around'>
|
<view class='nav acea-row row-around'>
|
||||||
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{peopleData.total}})</view>
|
<view :class="level === 1 ? 'item on' : 'item'" @click='setType(1)'>一级({{peopleData.firstBrokerageUserCount}})</view>
|
||||||
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{peopleData.totalLevel}})
|
<view :class="level === 2 ? 'item on' : 'item'" @click='setType(2)'>二级({{peopleData.secondBrokerageUserCount}})
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='search acea-row row-between-wrapper'>
|
<view class='search acea-row row-between-wrapper'>
|
||||||
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword"
|
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="nickname"
|
||||||
@confirm="submitForm" confirm-type='search' name="search"></input></view>
|
@confirm="submitForm" confirm-type='search' name="search"></input></view>
|
||||||
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
||||||
</view>
|
</view>
|
||||||
<view class='list'>
|
<view class='list'>
|
||||||
<view class="sortNav acea-row row-middle">
|
<view class="sortNav acea-row row-middle">
|
||||||
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
|
<view class="sortItem" @click='setSort("userCount","asc")' v-if="sort === 'userCountDESC'">团队排序
|
||||||
<image src='/static/images/sort1.png'></image>
|
<image src='/static/images/sort1.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
|
<view class="sortItem" @click='setSort("userCount", "desc")' v-else-if="sort === 'userCountASC'">团队排序
|
||||||
<image src='/static/images/sort3.png'></image>
|
<image src='/static/images/sort3.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
|
<view class="sortItem" @click='setSort("userCount","desc")' v-else>团队排序
|
||||||
<image src='/static/images/sort2.png'></image>
|
<image src='/static/images/sort2.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
|
<view class="sortItem" @click='setSort("price","asc")' v-if="sort === 'priceDESC'">
|
||||||
金额排序
|
金额排序
|
||||||
<image src='/static/images/sort1.png'></image>
|
<image src='/static/images/sort1.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
|
<view class="sortItem" @click='setSort("price", "desc")' v-else-if="sort === 'priceASC'">金额排序
|
||||||
<image src='/static/images/sort3.png'></image>
|
<image src='/static/images/sort3.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
|
<view class="sortItem" @click='setSort("price","desc")' v-else>金额排序
|
||||||
<image src='/static/images/sort2.png'></image>
|
<image src='/static/images/sort2.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
|
<view class="sortItem" @click='setSort("orderCount","asc")' v-if="sort === 'orderCountDESC'">订单排序
|
||||||
<image src='/static/images/sort1.png'></image>
|
<image src='/static/images/sort1.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
|
<view class="sortItem" @click='setSort("orderCount", "desc")' v-else-if="sort === 'orderCountASC'">订单排序
|
||||||
<image src='/static/images/sort3.png'></image>
|
<image src='/static/images/sort3.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
|
<view class="sortItem" @click='setSort("orderCount","desc")' v-else>订单排序
|
||||||
<image src='/static/images/sort2.png'></image>
|
<image src='/static/images/sort2.png'></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -60,83 +60,70 @@
|
||||||
</view>
|
</view>
|
||||||
<view class='text'>
|
<view class='text'>
|
||||||
<view class='name line1'>{{item.nickname}}</view>
|
<view class='name line1'>{{item.nickname}}</view>
|
||||||
<view>加入时间: {{item.time.split(' ')[0]}}</view>
|
<view>加入时间: {{ formatDate(item.brokerageTime) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>人
|
<view><text class='num font-color'>{{ item.brokerageUserCount || 0}}</text>人
|
||||||
</view>
|
</view>
|
||||||
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text>单</view>
|
<view><text class="num">{{ item.orderCount|| 0}}</text>单</view>
|
||||||
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text>元</view>
|
<view><text class="num">{{ fen2yuan(item.brokeragePrice || 0) }}</text>元</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||||
<block v-if="recordList.length == 0 && isShow">
|
<block v-if="recordList.length === 0 && isShow">
|
||||||
<emptyPage title="暂无推广人数~"></emptyPage>
|
<emptyPage title="暂无推广人数~"></emptyPage>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
|
||||||
<!-- #endif -->
|
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { toLogin } from '@/libs/login.js';
|
||||||
spreadPeople,
|
import { mapGetters } from "vuex";
|
||||||
spreadPeoCount
|
|
||||||
} from '@/api/user.js';
|
|
||||||
import {
|
|
||||||
toLogin
|
|
||||||
} from '@/libs/login.js';
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
import emptyPage from '@/components/emptyPage.vue'
|
import emptyPage from '@/components/emptyPage.vue'
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
// #ifdef MP
|
|
||||||
import authorize from '@/components/Authorize';
|
|
||||||
// #endif
|
|
||||||
import home from '@/components/home';
|
import home from '@/components/home';
|
||||||
export default {
|
import * as BrokerageAPI from '@/api/trade/brokerage.js'
|
||||||
|
import * as Util from '@/utils/util.js';
|
||||||
|
import dayjs from "@/plugin/dayjs/dayjs.min.js";
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Loading,
|
Loading,
|
||||||
emptyPage,
|
emptyPage,
|
||||||
// #ifdef MP
|
|
||||||
authorize,
|
|
||||||
// #endif
|
|
||||||
home
|
home
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: 1,
|
peopleData: {
|
||||||
|
firstBrokerageUserCount: 0,
|
||||||
|
secondBrokerageUserCount: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
recordList: [],
|
||||||
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
keyword: '',
|
nickname: '',
|
||||||
sort: '',
|
isAsc: 'desc',
|
||||||
isAsc: '',
|
sortKey: 'userCount',
|
||||||
sortKey: '',
|
sort: 'userCountDESC',
|
||||||
grade: 0,
|
level: 1,
|
||||||
status: false,
|
status: false,
|
||||||
loadingList: false,
|
loadingList: false,
|
||||||
recordList: [],
|
|
||||||
peopleData: {},
|
|
||||||
isShow: false,
|
isShow: false,
|
||||||
isAuto: false, //没有授权的不会自动授权
|
|
||||||
isShowAuth: false //是否隐藏授权
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin']),
|
computed: mapGetters(['isLogin']),
|
||||||
onLoad() {
|
onLoad() {
|
||||||
if (this.isLogin) {
|
if (!this.isLogin) {
|
||||||
this.userSpreadNewList();
|
toLogin();
|
||||||
this.spreadPeoCount();
|
return;
|
||||||
} else {
|
|
||||||
toLogin();
|
|
||||||
}
|
}
|
||||||
|
this.userSpreadNewList();
|
||||||
|
this.spreadPeoCount();
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
if (this.is_show) this.userSpreadNewList();
|
if (this.is_show) this.userSpreadNewList();
|
||||||
|
@ -145,23 +132,15 @@
|
||||||
this.is_show = true;
|
this.is_show = true;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onLoadFun: function(e) {
|
|
||||||
this.userSpreadNewList();
|
|
||||||
},
|
|
||||||
// 授权关闭
|
|
||||||
authColse: function(e) {
|
|
||||||
this.isShowAuth = e
|
|
||||||
},
|
|
||||||
setSort: function(sortKey, isAsc) {
|
setSort: function(sortKey, isAsc) {
|
||||||
let that = this;
|
this.isAsc = isAsc;
|
||||||
that.isAsc = isAsc;
|
this.sort = sortKey + isAsc.toUpperCase();
|
||||||
that.sort = sortKey + isAsc;
|
this.sortKey = sortKey;
|
||||||
that.sortKey = sortKey;
|
this.page = 1;
|
||||||
that.page = 1;
|
this.limit = 20;
|
||||||
that.limit = 20;
|
this.status = false;
|
||||||
that.status = false;
|
this.$set(this, 'recordList', []);
|
||||||
that.$set(that, 'recordList', []);
|
this.userSpreadNewList();
|
||||||
that.userSpreadNewList();
|
|
||||||
},
|
},
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
|
@ -171,14 +150,12 @@
|
||||||
this.userSpreadNewList();
|
this.userSpreadNewList();
|
||||||
},
|
},
|
||||||
|
|
||||||
setType: function(grade) {
|
setType: function(level) {
|
||||||
if (this.grade != grade) {
|
if (this.level !== level) {
|
||||||
this.grade = grade;
|
this.level = level;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.limit = 20;
|
this.limit = 20;
|
||||||
this.keyword = '';
|
this.nickname = '';
|
||||||
this.sort = '';
|
|
||||||
this.isAsc = '';
|
|
||||||
this.status = false;
|
this.status = false;
|
||||||
this.loadingList = false;
|
this.loadingList = false;
|
||||||
this.$set(this, 'recordList', []);
|
this.$set(this, 'recordList', []);
|
||||||
|
@ -186,41 +163,45 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
spreadPeoCount() {
|
spreadPeoCount() {
|
||||||
spreadPeoCount().then(res => {
|
BrokerageAPI.getBrokerageUserSummary().then(res => {
|
||||||
this.peopleData = res.data;
|
this.peopleData = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
userSpreadNewList: function() {
|
userSpreadNewList: function() {
|
||||||
let that = this;
|
let page = this.page;
|
||||||
let page = that.page;
|
let limit = this.limit;
|
||||||
let limit = that.limit;
|
let status = this.status;
|
||||||
let status = that.status;
|
let recordList = this.recordList;
|
||||||
let keyword = that.keyword;
|
|
||||||
let isAsc = that.isAsc;
|
|
||||||
let sortKey = that.sortKey;
|
|
||||||
let grade = that.grade;
|
|
||||||
let recordList = that.recordList;
|
|
||||||
let recordListNew = [];
|
let recordListNew = [];
|
||||||
if (that.loadingList) return;
|
if (this.loadingList || status) {
|
||||||
if (status == true) return;
|
return;
|
||||||
spreadPeople({
|
}
|
||||||
page: page,
|
BrokerageAPI.getBrokerageUserChildSummaryPage({
|
||||||
limit: limit,
|
pageNo: page,
|
||||||
keyword: keyword,
|
pageSize: limit,
|
||||||
grade: grade,
|
nickname: this.nickname,
|
||||||
sortKey: sortKey,
|
level: this.level,
|
||||||
isAsc: isAsc
|
'sortingField.field': this.sortKey,
|
||||||
|
'sortingField.order': this.isAsc,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let recordListData = res.data.list ? res.data.list : [];
|
let recordListData = res.data.list ? res.data.list : [];
|
||||||
let len = recordListData.length;
|
let len = recordListData.length;
|
||||||
recordListNew = recordList.concat(recordListData);
|
recordListNew = recordList.concat(recordListData);
|
||||||
that.status = limit > len;
|
this.status = limit > len;
|
||||||
that.page = page + 1;
|
this.page = page + 1;
|
||||||
that.$set(that, 'recordList', recordListNew || []);
|
this.$set(this, 'recordList', recordListNew || []);
|
||||||
that.loadingList = false;
|
this.loadingList = false;
|
||||||
if(that.recordList.length===0) that.isShow = true;
|
if (this.recordList.length === 0) {
|
||||||
|
this.isShow = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
fen2yuan(price) {
|
||||||
|
return Util.fen2yuan(price)
|
||||||
|
},
|
||||||
|
formatDate: function(date) {
|
||||||
|
return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onReachBottom: function() {
|
onReachBottom: function() {
|
||||||
this.userSpreadNewList();
|
this.userSpreadNewList();
|
||||||
|
|
|
@ -11,21 +11,21 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- top3 排名 -->
|
<!-- top3 排名 -->
|
||||||
<view class="rank acea-row row-bottom row-around">
|
<view class="rank acea-row row-bottom row-around">
|
||||||
<view class="item" v-show="Two.userId">
|
<view class="item" v-show="Two.id">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="Two.avatar"></image>
|
<image :src="Two.avatar"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name line1">{{Two.nickname}}</view>
|
<view class="name line1">{{Two.nickname}}</view>
|
||||||
<view class="num">{{ Two.brokerageUserCount }}人</view>
|
<view class="num">{{ Two.brokerageUserCount }}人</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" v-show="One.userId">
|
<view class="item" v-show="One.id">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="One.avatar"></image>
|
<image :src="One.avatar"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name line1">{{One.nickname}}</view>
|
<view class="name line1">{{One.nickname}}</view>
|
||||||
<view class="num">{{ One.brokerageUserCount }}人</view>
|
<view class="num">{{ One.brokerageUserCount }}人</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" v-show="Three.userId">
|
<view class="item" v-show="Three.id">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="Three.avatar"></image>
|
<image :src="Three.avatar"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
Loading…
Reference in New Issue