| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <template>
- <view class="page">
- <!-- 头部吸顶区域 -->
- <u-sticky bgColor="#fff">
- <view class="header dis a-c ">
- <image class="avatarImg" src="/static/image/avatar.png" mode=""></image>
- <view class="dis f-c ml-2 ">
- <view class="dis a-c j-s">
- <view class="dis a-c">
- <text class="name">{{info.name}}</text>
- <image class="level" src="/static/image/tool/level1.png" mode=""></image>
- </view>
- <text class="time">{{info.joinTime}}加入</text>
- </view>
- <text class="phone mt-1">{{info.mobile}}</text>
- <view class="dis a-c referrer mt-1">
- <text class="mr-3">推荐人</text>
- <text>{{info.inviteePerson}}({{info.level==1?'一':info.level==2?'二':'三'}}级分销员)</text>
- </view>
- </view>
- </view>
- <view class="tabView">
- <u-tabs :list="categoryList" @click="click" :current="current" :scrollable="false"
- :lineWidth="lineWidth" :activeStyle="{ color: '#333', fontWeight: 'bold' }"
- :inactiveStyle="{ color: '#999' }" :itemStyle="{ height: '48rpx' }"></u-tabs>
- </view>
- </u-sticky>
- <view class="content-list" v-if="current==0">
- <view class="item mt-2" v-for="(item,index) in ordersList" :key="index">
- <view class="above dis a-c ">
- <image class="level" src="/static/image/tool/level1.png" mode=""></image>
- <text class="ml-1">{{item.licenseNo}}</text>
- <text class="time">{{item.signingTime}}</text>
- </view>
- <view class="below mt-2 dis a-c f-wrap">
- <view class="view">
- <text class="mr-3">保费</text>
- <text>{{item.premium}}</text>
- </view>
- <view class="view">
- <text class="mr-3">贡献佣金</text>
- <text>{{item.commission}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="content-list" v-else v-for="(item,index) in distributorList" :key="index">
- <view class="item mt-2">
- <view class="above dis a-c ">
- <image class="avatar" src="/static/image/avatar.png" mode=""></image>
- <text class="ml-1 mr-2">{{item.name}}</text>
- <image class="level" src="/static/image/tool/level1.png" mode=""></image>
- </view>
- <view class="below mt-2 dis a-c f-wrap">
- <view class="view">
- <text class="mr-3">邀请人</text>
- <text>{{item.inviteePerson}}</text>
- </view>
- <view class="view">
- <text class="mr-3">贡献佣金</text>
- <text>{{item.commission || 0 }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- current: 0,
- categoryList: [{
- name: '订单',
- },
- {
- name: '邀请分销员',
- },
- ],
- info: {},
- ordersList: [],
- distributorList: [],
- }
- },
- onShow() {
- },
- onLoad(options) {
- this.info = JSON.parse(options.info);
- this.distributorDetails();
- this.distributor();
- },
- computed: {
- //tab滑块长度
- lineWidth() {
- return this.current ? '64' : '32';
- }
- },
- methods: {
- async distributorDetails() {
- let res = await this.$http.post('/sysDistributionSetting/getDistributionOrder', {
- userId: this.info.id
- })
- if (res.code == 200) {
- this.ordersList = res.data;
- }
- },
- async distributor() {
- let res = await this.$http.get('/sysDistributionSetting/inviteeDistributor', {
- id: this.info.id,
- level: this.info.level,
- })
- if (res.code == 200) {
- this.distributorList = res.data;
- }
- },
- click(tab) {
- this.current = tab.index;
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- background: #f8f8f8;
- height: calc(100vh - 88rpx);
- }
- .tabView {
- padding: 20rpx 0;
- box-sizing: border-box;
- }
- .header {
- padding: 25rpx 30rpx;
- box-sizing: border-box;
- border-bottom: 1rpx solid #eee;
- >view {
- flex: 1;
- }
- .avatarImg {
- width: 140rpx;
- height: 140rpx;
- }
- .name {
- font-size: 32rpx;
- color: #333;
- font-weight: bold;
- margin-right: 20rpx;
- }
- .time {
- font-size: 22rpx;
- color: #999;
- }
- .level {
- width: 40rpx;
- height: 36rpx;
- }
- .phone {
- font-size: 28rpx;
- color: #333;
- }
- .referrer {
- font-size: 28rpx;
- >:first-child {
- color: #999;
- }
- >:last-child {
- color: #333;
- }
- }
- }
- .content-list {
- padding: 0 30rpx;
- box-sizing: border-box;
- .item {
- padding: 25rpx 30rpx;
- box-sizing: border-box;
- background: #FFFFFF;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- .above {
- .level {
- width: 40rpx;
- height: 36rpx;
- }
- .avatar {
- width: 44rpx;
- height: 44rpx;
- }
- .time {
- font-size: 22rpx;
- color: #999;
- font-weight: 400;
- margin-left: auto;
- }
- text {
- font-size: 32rpx;
- color: #333;
- font-weight: bold;
- }
- }
- .below {
- .view {
- width: 50%;
- text:first-child {
- font-size: 28rpx;
- color: #999;
- }
- text:last-child {
- font-size: 28rpx;
- color: #333;
- }
- }
- }
- }
- }
- /* 自定义tab滑块样式 */
- ::v-deep .u-tabs__wrapper__nav__line {
- background: linear-gradient(90deg, #FDE935 10%, rgba(253, 233, 53, 0.1) 100%) !important;
- border-radius: 6rpx;
- }
- </style>
|