[最新]
This commit is contained in:
@@ -10,6 +10,8 @@ Page({
|
||||
data: {
|
||||
userLogin : false,
|
||||
userData : '',
|
||||
nameValue : '',
|
||||
isParent : false
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -97,4 +99,37 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
获取邀请码
|
||||
*/
|
||||
bindinput(e) {
|
||||
this.setData({
|
||||
nameValue: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭绑定邀请码弹窗
|
||||
*/
|
||||
toBd() {
|
||||
this.setData({
|
||||
isParent: !this.data.isParent
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 绑定邀请码
|
||||
*/
|
||||
nameTrue() {
|
||||
wx.$api.mall.userBind({
|
||||
username: this.data.nameValue
|
||||
}).then(res => {
|
||||
// 获取用户信息
|
||||
this.userInfo();
|
||||
this.setData({
|
||||
isParent: false
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
@@ -23,18 +23,26 @@
|
||||
|
||||
<!-- 推荐人 -->
|
||||
<block wx:if="{{userLogin}}">
|
||||
<view class="userCont" wx:if="{{userData.parent != ''}}">
|
||||
<view class="userCont">
|
||||
<view class="white">
|
||||
<view class="parent-user">
|
||||
<image class="parent-icon" src="/static/icons/parent_icon.png"></image>
|
||||
<view class="parent-cont">
|
||||
<view class="parent-cont-name">{{userData.parent.nickname}}<view class="parent-cont-tips">推荐人</view></view>
|
||||
<view class="parent-cont-tel">{{userData.parent.hidden_username}}</view>
|
||||
</view>
|
||||
<view class="parent-tel" bindtap="toCall">
|
||||
<image class="parent-tel-icon" src="/static/icons/parent_tel.png"></image>
|
||||
<view class="parent-tel-name">智能电话</view>
|
||||
</view>
|
||||
<block wx:if="{{userData.parent != ''}}">
|
||||
<view class="parent-cont">
|
||||
<view class="parent-cont-name">{{userData.parent.nickname}}<view class="parent-cont-tips">业务联系人</view></view>
|
||||
<view class="parent-cont-tel">{{userData.parent.hidden_username}}</view>
|
||||
</view>
|
||||
<view class="parent-tel" bindtap="toCall">
|
||||
<image class="parent-tel-icon" src="/static/icons/parent_tel.png"></image>
|
||||
<view class="parent-tel-name">智能电话</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="parent-cont">
|
||||
<view class="parent-cont-no">暂无业务联系人</view>
|
||||
</view>
|
||||
<view class="parent-bd" bindtap="toBd">绑定业务联系人</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -138,4 +146,22 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 绑定业务联系人 -->
|
||||
<view class="namePop {{isParent ? 'active' : ''}}"></view>
|
||||
<view class="nameCont {{isParent ? 'active' : ''}}">
|
||||
<view class="nameCont-white">
|
||||
<view class="nameCont-top">
|
||||
<view class="nameCont-title">绑定业务联系人</view>
|
||||
<view class="nameCont-input">
|
||||
<input type="text" name="name" value="{{nameValue}}" placeholder="请输入业务联系人手机号" bindinput="bindinput" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="nameCont-btn">
|
||||
<view class="nameCont-btn-go" bindtap="toBd">暂不绑定</view>
|
||||
<view class="nameCont-btn-go" bindtap="nameTrue">立即绑定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -150,6 +150,10 @@ page {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.parent-cont-no {
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.parent-cont-name {
|
||||
font-weight: 600;
|
||||
margin-bottom: 6rpx;
|
||||
@@ -175,7 +179,8 @@ page {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.parent-tel {
|
||||
.parent-tel,
|
||||
.parent-bd {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 32rpx;
|
||||
@@ -183,6 +188,15 @@ page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.parent-bd {
|
||||
font-size: 26rpx;
|
||||
border: 2rpx solid #da2b54;
|
||||
color: #da2b54;
|
||||
border-radius: 10rpx;
|
||||
line-height: 64rpx;
|
||||
padding: 0 15rpx;
|
||||
}
|
||||
|
||||
.parent-tel-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
@@ -313,4 +327,109 @@ page {
|
||||
.goodsItem-sales {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
|
||||
/* 邀请码弹出 */
|
||||
.namePop {
|
||||
position: fixed;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
z-index: 100000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.namePop.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nameCont {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 100000;
|
||||
padding: 0 15%;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nameCont.active {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.nameCont-white {
|
||||
background-color: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.nameCont-top {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nameCont-title {
|
||||
font-size: 34rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.nameCont-input {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
position: relative;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 25rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nameCont-input input {
|
||||
width: calc(100% - 40rpx);
|
||||
height: 100%;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.nameCont-colse {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
top: 25rpx;
|
||||
right: 20rpx;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.nameCont-btn {
|
||||
line-height: 100rpx;
|
||||
background-color: #f3f3f3;
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
border-top: 2rpx solid #dfdfdf;
|
||||
}
|
||||
|
||||
.nameCont-btn-go {
|
||||
text-align: center;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.nameCont-btn-go:last-child {
|
||||
position: relative;
|
||||
color: #ff9951;
|
||||
}
|
||||
|
||||
.nameCont-btn-go:last-child::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 2rpx;
|
||||
height: 100%;
|
||||
background-color: #dfdfdf;
|
||||
}
|
||||
@@ -39,25 +39,28 @@
|
||||
<view class="listItem-item" wx:for="{{childrenArr}}" wx:key="childrenArr">
|
||||
<image class="listItem-head" src="{{item.avatar ? item.avatar : '/static/imgs/userHead.png'}}" mode="widthFix"></image>
|
||||
<view class="listItem-cont">
|
||||
<view class="listItem-name nowrap">{{item.nickname || '-'}} <image src="{{item.identity.cover}}" mode="widthFix"></image></view>
|
||||
<view class="listItem-tel nowrap"><view class="listItem-tel-user">{{item.hidden_username || '-'}}</view><view class="listItem-time nowrap">{{item.created_at}}</view></view>
|
||||
<view class="listItem-tel nowrap">
|
||||
<view class="listItem-name">{{item.nickname || '-'}} <image src="{{item.identity.cover}}" mode="widthFix"></image></view>
|
||||
<view class="listItem-tel-user">{{item.hidden_username || '-'}}</view>
|
||||
</view>
|
||||
<view class="listItem-tel nowrap"><view class="listItem-time nowrap">{{item.created_at}}</view></view>
|
||||
</view>
|
||||
<view class="listItem-flex">
|
||||
<view class="listItem-label">
|
||||
<view class="listItem-label-name">
|
||||
个人业绩(元)
|
||||
</view>
|
||||
<view class="listItem-label-number">
|
||||
{{item.self_perf}}
|
||||
</view>
|
||||
<view class="listItem-label-name">
|
||||
个人业绩(元)
|
||||
</view>
|
||||
</view>
|
||||
<view class="listItem-label">
|
||||
<view class="listItem-label-name">
|
||||
总业绩(元)
|
||||
</view>
|
||||
<view class="listItem-label-number">
|
||||
{{item.group_perf}}
|
||||
</view>
|
||||
<view class="listItem-label-name">
|
||||
总业绩(元)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -76,7 +76,7 @@ page {
|
||||
}
|
||||
|
||||
.listItem-item {
|
||||
background-color: #ffffff;
|
||||
background-image: linear-gradient(to bottom, #ffffff, #ecf4ff);
|
||||
border-radius: 20rpx;
|
||||
padding: 25rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
@@ -103,6 +103,7 @@ page {
|
||||
line-height: 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.listItem-name image {
|
||||
@@ -115,10 +116,6 @@ page {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.listItem-tel-user {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.listItem-name text {
|
||||
padding-left: 20rpx;
|
||||
font-weight: normal;
|
||||
@@ -132,12 +129,11 @@ page {
|
||||
|
||||
.listItem-flex {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
background-color: #f6f6f6;
|
||||
padding: 20rpx;
|
||||
margin-top: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 10rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
border-top: 2rpx dotted #89bdff;
|
||||
}
|
||||
|
||||
.listItem-label {
|
||||
@@ -147,12 +143,13 @@ page {
|
||||
|
||||
.listItem-label-name {
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.listItem-label-number {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #318dff;
|
||||
}
|
||||
|
||||
/* 暂无数据 */
|
||||
|
||||
Reference in New Issue
Block a user