mall_client/zyhs_app_java/zyhs3_uniapp/pages/user/team.vue

210 lines
4.9 KiB
Vue

<style lang="scss" scoped>
.item-card {
background: #fff;
border-radius: 20upx;
padding: 20upx;
font-size: 26upx;
margin: 15upx;
&_label {
color: #333333;
font-size: 26upx;
}
}
.bottom {
width: 100%;
justify-content: space-between;
}
.list_title {
height: 90rpx;
margin-top: 10rpx;
.u-button{
border-radius: 40rpx 40rpx;
width: 27%;
height:70rpx;
}
}
.table_th {
height: 90rpx;
border-radius: 10rpx 10rpx 0 0;
}
.scroll_view {
position: absolute;
left: 30rpx;
right: 30rpx;
bottom: 0;
top: 520rpx;
.item {
height: 80rpx;
}
}
/deep/.u-tabs__wrapper__nav__item {
flex: 1;
}
.tabs_box {
height: 80rpx;
border-radius: 30upx;
.tabs_item {
height: 80rpx;
border-radius: 30upx;
&.active {
color: #fff;
background-color: #3c9cff;
}
}
}
.icon-box {
position: relative;
display: flex;
align-items: center;
margin: 5upx;
image {
width: 30upx;
height: 30upx;
}
view {
background: linear-gradient(270deg, #FFE48E 5%, #FFD164 100%);
padding: 0upx 30upx 0upx 40upx;
margin-left: -30upx;
font-size: 25upx;
font-weight: 600;
border-radius: 30upx;
}
}
</style>
<template>
<!-- <z-paging ref="paging" v-model="_list" @query="getGroupData"> -->
<view class="padding-30">
<!-- <view class="bg-w tabs_box flex">
<view @click="handlerTab(index)" :class="[tabsIndex == index ? 'active' : '']"
class="flex flex-center flex-1 tabs_item" v-for="(item, index) in tabsList" :key="index">
{{ item.name }}
</view>
</view> -->
<u-gap height="10rpx"></u-gap>
<view class="list_title flex flex-align-center font18 f-b">
<view class="flex-1 flex flex-align-center">
客户列表 <view class="text-3c text-xs ml-10">( {{ list.length }} )</view>
</view>
<!-- class="flex-1" -->
<u-button @click="onRefesh" type="primary">刷新</u-button>
</view>
<scroll-view scroll-y="true" height="500px">
<block>
<view v-for="(item, index) in list" :key="index" class=" item-card">
<view class="mt-6 mb-6 ml-10 flex flex-between">
<view class="item-card_label">
{{ item.nickname }}
</view>
<!-- <view class="icon-box ml-10" v-if="item.status == 1">
<image src="../../static/images/user/vipputong.png"></image>
<view style="background: linear-gradient(270deg, #271D02 5%, #533B03 100%); color: #FFEAA4;">VIP</view>
</view> -->
<view class="text-3c text-number mr-10">
ID: {{ item.username }}
</view>
</view>
<!-- <view class="mt-6 mb-6 flex bottom items-center">
<view class="text-3c text-number">
ID: {{ item.username }}
</view> -->
<!-- <view class="flex flex-between items-center">
<text class="text-1c mr-6">客户数量:</text>
<text class="text-3c mr-6 text-number mr-10 text-xl"> {{ item.teamCount }}</text>
</view> -->
<!-- </view> -->
</view>
</block>
<!-- <block v-else>
<view v-for="(item, index) in fruitList" :key="index" class=" item-card">
<view class="mt-6 mb-6 flex items-center bottom">
<view class=" flex items-center">
<view class="item-card_label">
{{ item.nickname }}
</view>
<view class="icon-box ml-10" v-if="item.status == 1">
<image src="../../static/images/user/vipputong.png"></image>
<view style="background: linear-gradient(270deg, #271D02 5%, #533B03 100%); color: #FFEAA4;">VIP</view>
</view>
</view>
<view class="text-3c text-number">
ID: {{ item.username }}
</view>
</view>
</view>
</block> -->
</scroll-view>
</view>
<!-- </z-paging> -->
</template>
<script>
import url from "@/common/http/url.js"
export default {
data () {
return {
_list: [],
list: [],
// fruitList: [],
tabsIndex: 0,
// tabsList: [{
// name: '购物'
// }, {
// name: '水果卡'
// }]
}
},
onLoad () {
this.getGroupData();
},
async onPullDownRefresh () {
await this.onRefesh();
// setTimeout(() => {
// uni.stopPullDownRefresh() //刷新数据之后停止刷新效果
// }, 1500)
},
methods: {
async onRefesh () {
this.$http('GET', url.user.cleanTeamCache).then(res => {
this.getGroupData();
uni.stopPullDownRefresh()
})
},
async getGroupData () {
await this.getMyPush();
},
handlerTab (index) {
// this.tabsIndex = index;
this.getGroupData();
},
async getMyPush () {
this.$http("GET", url.team.getMyPushMember).then(({
code,
data
}) => {
if (code == 200) this.list = data;
})
}
}
}
</script>