123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- <template>
- <view class="content">
- <!-- 头部 -->
- <view class="container">
- <view class="jiedianbackground"><image src="../../static/image/jiedian.png" mode=""></image></view>
- <view class="number-box">
- <view class="number">
- <text>{{ userInfo.A_count + userInfo.B_count + userInfo.C_count }}</text>
- 人
- </view>
- <view class="renshu">我的接点人数</view>
- </view>
- </view>
- <view class="message">
- <view class="yeji">
- <view class="yeji-a">
- <view class="yeji-top">A区业绩</view>
- <view class="yeji-buttom">¥{{ userInfo.A_achievement }}</view>
- </view>
- <view class="border"></view>
- <view class="yeji-a">
- <view class="yeji-top">B区业绩</view>
- <view class="yeji-buttom">¥{{ userInfo.B_achievement }}</view>
- </view>
- <view class="border"></view>
- <view class="yeji-a">
- <view class="yeji-top">C区业绩</view>
- <view class="yeji-buttom">¥{{ userInfo.C_achievement }}</view>
- </view>
- </view>
- <view class="relation-box">
- <view class="relation">
- <view class="headbox">
- <view class="head">
- <view class="photo"><image :src="avatar || '../../static/error/missing-face.png'"></image></view>
- </view>
- <view class="head-title"><image src="../../static/image/jiedian1.png" mode=""></image></view>
- </view>
- <view class="information">
- <view class="name clamp">{{ name }}</view>
- <view class="cell clamp">{{ phone }}</view>
- </view>
- </view>
- <view class="sanchaji"><image src="../../static/image/sanchaji.png" mode=""></image></view>
- <view class="subordinate">
- <view class="headbox" v-if="listA != ''" @click="nav('a')">
- <view class="head">
- <view class="photo"><image :src="listA.avatar" mode=""></image></view>
- </view>
- <view class="head-title"><image src="../../static/image/jiedian1.png" mode=""></image></view>
- </view>
- <view class="zhuce" v-if="listA == ''" @click="navto('a')">注册接点A</view>
- <view class="headbox" v-if="listB != ''" @click="nav('b')">
- <view class="head">
- <view class="photo"><image :src="listB.avatar" mode=""></image></view>
- </view>
- <view class="head-title"><image src="../../static/image/jiedian1.png" mode=""></image></view>
- </view>
- <view class="zhuce" v-if="listB == ''" @click="navto('b')">注册接点B</view>
- <view class="headbox" v-if="listC != ''" @click="nav('c')">
- <view class="head">
- <view class="photo"><image :src="listC.avatar" mode=""></image></view>
- </view>
- <view class="head-title"><image src="../../static/image/jiedian1.png" mode=""></image></view>
- </view>
- <view class="zhuce" v-if="listC == ''" @click="navto('c')">注册接点C</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { getjiedian } from '@/api/user.js';
- import { mapState, mapMutations } from 'vuex';
- export default {
- data() {
- return {
- a: 1,
- b: 2,
- c: 3,
- people: 255,
- listA: '',
- listB: '',
- listC: '',
- name: '',
- phone: '',
- avatar: '',
- id: ''
- };
- },
- computed: {
- ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
- },
- onLoad() {
- this.name = this.userInfo.nickname;
- this.phone = this.userInfo.phone;
- this.avatar = this.userInfo.avatar;
- this.id = this.userInfo.uid;
- this.loadData();
- },
- methods: {
- loadData() {
- const obj = this;
- getjiedian({}, this.id).then(({ data }) => {
- if (data.list.length != 0) {
- data.list.forEach(e => {
- console.log('e', e);
- if (e.parent_area == 'A') {
- this.listA = e;
- } else if (e.parent_area == 'B') {
- this.listB = e;
- } else if (e.parent_area == 'C') {
- this.listC = e;
- }
- });
- } else {
- return;
- }
- });
- },
- nav(type) {
- if (type == 'a') {
- this.name = this.listA.nickname;
- this.phone = this.listA.phone;
- this.avatar = this.listA.avatar;
- this.id = this.listA.uid;
- this.listA = '';
- this.listB = '';
- this.listC = '';
- this.loadData();
- } else if (type == 'b') {
- this.name = this.listB.nickname;
- this.phone = this.listB.phone;
- this.avatar = this.listB.avatar;
- this.id = this.listB.uid;
- this.listA = '';
- this.listB = '';
- this.listC = '';
- this.loadData();
- } else if (type == 'c') {
- this.name = this.listC.nickname;
- this.phone = this.listC.phone;
- this.avatar = this.listC.avatar;
- this.id = this.listC.uid;
- this.listA = '';
- this.listB = '';
- this.listC = '';
- this.loadData();
- }
- },
- navto(type) {
- if (type == 'a') {
- uni.navigateTo({
- url: '/pages/public/register?id=' + this.id + '&area=A'
- });
- } else if (type == 'b') {
- uni.navigateTo({
- url: '/pages/public/register?id=' + this.id + '&area=B'
- });
- } else if (type == 'c') {
- if (this.listA == '' || this.listB == '') {
- this.$api.msg('请先注册完接点A和接点B');
- } else {
- uni.navigateTo({
- url: '/pages/public/register?id=' + this.id + '&area=C'
- });
- }
- }
- }
- }
- };
- </script>
- <style lang="scss">
- page {
- padding: 0;
- margin: 0;
- height: 100%;
- background-color: #ffffff;
- }
- .container {
- width: 750rpx;
- height: 400rpx;
- position: relative;
- .jiedianbackground {
- position: absolute;
- width: 750rpx;
- height: 400rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .number-box {
- width: 750rpx;
- height: 400rpx;
- position: absolute;
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- .number {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #3f7c1f;
- text {
- font-size: 72rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #3f7c1f;
- line-height: 86rpx;
- }
- }
- .renshu {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #3f7c1f;
- }
- }
- }
- .message {
- padding: 0 30rpx;
- .relation-box {
- margin-top: 100rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .relation {
- position: relative;
- display: flex;
- align-items: center;
- .headbox {
- position: absolute;
- width: 154rpx;
- height: 154rpx;
- .head {
- width: 154rpx;
- height: 154rpx;
- background: #ef9e20;
- box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
- border-radius: 50%;
- overflow: hidden;
- .photo {
- width: 154rpx;
- height: 154rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .head-title {
- margin: -30rpx 30rpx 0 30rpx;
- width: 94rpx;
- height: 32rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .information {
- margin-left: 77rpx;
- display: flex;
- padding: 20rpx 10rpx;
- flex-direction: column;
- width: 297rpx;
- height: 137rpx;
- background: #ffffff;
- border: 4rpx solid #6eab4e;
- border-radius: 10rpx;
- .name {
- text-align: left;
- margin-left: 70rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #3f7c1f;
- }
- .cell {
- text-align: left;
- margin-left: 70rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #abd56f;
- }
- }
- }
- .sanchaji {
- margin: 30rpx 0;
- width: 530rpx;
- height: 91rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .subordinate {
- width: 750rpx;
- display: flex;
- justify-content: space-around;
- .zhuce {
- padding: 10rpx;
- background: #abd56f;
- color: #fff;
- height: 70rpx;
- }
- .headbox {
- width: 154rpx;
- height: 154rpx;
- .head {
- width: 154rpx;
- height: 154rpx;
- background: #ef9e20;
- box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
- border-radius: 50%;
- overflow: hidden;
- .photo {
- width: 154rpx;
- height: 154rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .head-title {
- margin: -30rpx 30rpx 0 30rpx;
- width: 94rpx;
- height: 32rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- }
- .yeji {
- position: relative;
- margin-top: -72rpx;
- width: 690rpx;
- height: 143rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
- border-radius: 10rpx;
- display: flex;
- justify-content: space-around;
- align-items: center;
- .yeji-a {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: center;
- .yeji-top {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 35px;
- }
- .yeji-buttom {
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 35px;
- }
- }
- .border {
- width: 1rpx;
- height: 51rpx;
- background: #dddddd;
- }
- }
- }
- </style>
|