mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-24 04:18:34 +08:00
全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -2,74 +2,84 @@
|
||||
<view>
|
||||
<view class="promoter-list">
|
||||
<view class='promoterHeader bg-color'>
|
||||
<view class='headerCon acea-row row-between-wrapper'>
|
||||
<view class='headerCon acea-row row-between'>
|
||||
<view>
|
||||
<view class='name'>推广人数</view>
|
||||
<view><text class='num'>{{teamCount}}</text>人</view>
|
||||
<view><text class='num'>{{peopleData.count}}</text>人</view>
|
||||
</view>
|
||||
<view class='iconfont icon-tuandui'></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-around'>
|
||||
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{total}})</view>
|
||||
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{totalLevel}})</view>
|
||||
</view>
|
||||
<view class='search acea-row row-between-wrapper'>
|
||||
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm" confirm-type='search' name="search"></input></view>
|
||||
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="sortNav acea-row row-middle">
|
||||
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">金额排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
<view class="pad30">
|
||||
<view class='nav acea-row row-around'>
|
||||
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{peopleData.total}})</view>
|
||||
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{peopleData.totalLevel}})
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,index) in recordList" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.avatar'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line1'>{{item.nickname}}</view>
|
||||
<view>加入时间: {{item.time}}</view>
|
||||
</view>
|
||||
<view class='search acea-row row-between-wrapper'>
|
||||
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword"
|
||||
@confirm="submitForm" confirm-type='search' name="search"></input></view>
|
||||
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="sortNav acea-row row-middle">
|
||||
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>人</view>
|
||||
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text>单</view>
|
||||
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text>元</view>
|
||||
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
|
||||
金额排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-for="(item,index) in recordList" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.avatar'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line1'>{{item.nickname}}</view>
|
||||
<view>加入时间: {{item.time.split(' ')[0]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>人
|
||||
</view>
|
||||
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text>单</view>
|
||||
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text>元</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||
<block v-if="recordList.length == 0 && isShow">
|
||||
<emptyPage title="暂无推广人数~"></emptyPage>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
@@ -77,7 +87,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
spreadPeople
|
||||
spreadPeople,
|
||||
spreadPeoCount
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
toLogin
|
||||
@@ -85,12 +96,16 @@
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import Loading from "@/components/Loading";
|
||||
// #ifdef MP
|
||||
import authorize from '@/components/Authorize';
|
||||
// #endif
|
||||
import home from '@/components/home';
|
||||
export default {
|
||||
components: {
|
||||
Loading,
|
||||
emptyPage,
|
||||
// #ifdef MP
|
||||
authorize,
|
||||
// #endif
|
||||
@@ -98,9 +113,6 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
totalLevel: 0,
|
||||
teamCount: 0,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
keyword: '',
|
||||
@@ -109,7 +121,10 @@
|
||||
sortKey: '',
|
||||
grade: 0,
|
||||
status: false,
|
||||
loadingList: false,
|
||||
recordList: [],
|
||||
peopleData: {},
|
||||
isShow: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false //是否隐藏授权
|
||||
};
|
||||
@@ -118,14 +133,9 @@
|
||||
onLoad() {
|
||||
if (this.isLogin) {
|
||||
this.userSpreadNewList();
|
||||
this.spreadPeoCount();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
@@ -142,10 +152,10 @@
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
setSort: function(sortKey,isAsc) {
|
||||
setSort: function(sortKey, isAsc) {
|
||||
let that = this;
|
||||
that.isAsc = isAsc;
|
||||
that.sort = sortKey+isAsc;
|
||||
that.sort = sortKey + isAsc;
|
||||
that.sortKey = sortKey;
|
||||
that.page = 1;
|
||||
that.limit = 20;
|
||||
@@ -160,7 +170,7 @@
|
||||
this.$set(this, 'recordList', []);
|
||||
this.userSpreadNewList();
|
||||
},
|
||||
|
||||
|
||||
setType: function(grade) {
|
||||
if (this.grade != grade) {
|
||||
this.grade = grade;
|
||||
@@ -170,10 +180,16 @@
|
||||
this.sort = '';
|
||||
this.isAsc = '';
|
||||
this.status = false;
|
||||
this.loadingList = false;
|
||||
this.$set(this, 'recordList', []);
|
||||
this.userSpreadNewList();
|
||||
}
|
||||
},
|
||||
spreadPeoCount() {
|
||||
spreadPeoCount().then(res => {
|
||||
this.peopleData = res.data;
|
||||
});
|
||||
},
|
||||
userSpreadNewList: function() {
|
||||
let that = this;
|
||||
let page = that.page;
|
||||
@@ -185,6 +201,7 @@
|
||||
let grade = that.grade;
|
||||
let recordList = that.recordList;
|
||||
let recordListNew = [];
|
||||
if (that.loadingList) return;
|
||||
if (status == true) return;
|
||||
spreadPeople({
|
||||
page: page,
|
||||
@@ -194,15 +211,14 @@
|
||||
sortKey: sortKey,
|
||||
isAsc: isAsc
|
||||
}).then(res => {
|
||||
let recordListData = res.data.spreadPeopleList?res.data.spreadPeopleList:[];
|
||||
let recordListData = res.data.list ? res.data.list : [];
|
||||
let len = recordListData.length;
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.total = res.data.total;
|
||||
that.totalLevel = res.data.totalLevel;
|
||||
that.teamCount = res.data.count;
|
||||
that.status = limit > len;
|
||||
that.page = page + 1;
|
||||
that.$set(that, 'recordList', recordListNew || []);
|
||||
that.loadingList = false;
|
||||
if(that.recordList.length===0) that.isShow = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -220,23 +236,28 @@
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
border-top-left-radius: 14rpx;
|
||||
border-top-right-radius: 14rpx;
|
||||
margin-top: -30rpx;
|
||||
}
|
||||
|
||||
.promoter-list .nav .item.on {
|
||||
border-bottom: 5rpx solid #e93323;
|
||||
color: #e93323;
|
||||
border-bottom: 5rpx solid $theme-color;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.promoter-list .search {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
height: 86rpx;
|
||||
padding-left: 30rpx;
|
||||
height: 100rpx;
|
||||
padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom-left-radius: 14rpx;
|
||||
border-bottom-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .search .input {
|
||||
width: 610rpx;
|
||||
width: 592rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50rpx;
|
||||
background-color: #f5f5f5;
|
||||
@@ -265,15 +286,14 @@
|
||||
}
|
||||
|
||||
.promoter-list .search .iconfont {
|
||||
font-size: 45rpx;
|
||||
font-size: 32rpx;
|
||||
color: #515151;
|
||||
width: 110rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list {
|
||||
margin-top: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .sortNav {
|
||||
@@ -282,6 +302,8 @@
|
||||
border-bottom: 1rpx solid #eee;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
border-top-left-radius: 14rpx;
|
||||
border-top-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .sortNav .sortItem {
|
||||
@@ -300,14 +322,10 @@
|
||||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
height: 152rpx;
|
||||
padding: 0 30rpx 0 20rpx;
|
||||
padding: 0 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt {
|
||||
width: 440rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .pictrue {
|
||||
width: 106rpx;
|
||||
@@ -325,9 +343,10 @@
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .text {
|
||||
width: 304rpx;
|
||||
// width: 304rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .text .name {
|
||||
@@ -337,13 +356,12 @@
|
||||
}
|
||||
|
||||
.promoter-list .list .item .right {
|
||||
width: 240rpx;
|
||||
text-align: right;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .right .num{
|
||||
|
||||
.promoter-list .list .item .right .num {
|
||||
margin-right: 7rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user