新增个人中心运营中心

This commit is contained in:
2023-02-14 13:09:51 +08:00
parent 97ea24f85a
commit dfd6b9f88f
7 changed files with 1289 additions and 477 deletions

View File

@@ -47,7 +47,6 @@ const request = (parameter, hideLoding = true) => {
data : parameter.data || {}, data : parameter.data || {},
method : parameter.method || 'GET', method : parameter.method || 'GET',
success : res => { success : res => {
console.log(res)
if (res.header.Authorization){ if (res.header.Authorization){
updateToken('token', res.header.Authorization) updateToken('token', res.header.Authorization)
} }

View File

@@ -133,6 +133,29 @@ const relationsBind = (invite, type) => {
}) })
} }
// 提交运营中心别名
const submitTeamName = (data) => {
return request({
url: 'user/team',
data:data,
method: 'POST'
})
}
// 获取运营中心记录
const getTeam = () => {
return request({
url : 'user/team',
})
}
// 获取运营中心记录
const getTeamLogs = data => {
return request({
url: 'user/team/logs',
data
})
}
export { export {
relations, relations,
code, code,
@@ -148,5 +171,8 @@ export {
userInfoBank, userInfoBank,
getRegion, getRegion,
relationsVerify, relationsVerify,
relationsBind relationsBind,
submitTeamName,
getTeam,
getTeamLogs,
} }

View File

@@ -220,6 +220,16 @@
"navigationBarBackgroundColor": "#926fff", "navigationBarBackgroundColor": "#926fff",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, {
"path": "pages/account/yunying",
"auth": true,
"name": "YunYing",
"style": {
"navigationBarTitleText": "运营中心",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#446EFE",
"navigationBarTextStyle": "white"
}
}, { }, {
"path": "pages/account/cash", "path": "pages/account/cash",
"auth": true, "auth": true,

559
pages/account/yunying.vue Normal file
View File

@@ -0,0 +1,559 @@
<template>
<view class="content">
<!-- :style="'background-image: url(' + require('@/static/icons/yunying_bg.png') + ');'" -->
<!-- 账户余额 -->
<view class="total">
<view class="total-item-1">
<view class="total-left">
<view class="total-value nowrap ">
{{team_name || '--'}}
<u-icon @click='yunyingShow = true,yunying_name = team_name' name="edit-pen-fill" class='pen'
color="#eee" size="34rpx" bold />
</view>
<view class="total-text nowrap">运营中心</view>
</view>
</view>
<view class="total-item-2">
<view> 团队人数 :<span>{{users_count}}</span></view>
<view> 总业绩 :<span>{{all_perf}}</span></view>
</view>
</view>
<!-- 账户记录 -->
<view class="tabs">
<u-tabs :list="tabs" :scrollable="false" :activeStyle="{color: '#446EFE', fontWeight: 'bold'}"
lineColor="#446EFE" @click="onTabs" />
</view>
<view class="logs">
<block v-if="list.length > 0">
<view class="log-flex" v-for="(item, index) in list" :key="index">
<block v-if="type === 'balance'">
<view class="text">
<view class="type nowrap">
{{item.remark || '-'}}
<span :class="item.frozen.value == 0 ? '' : 'active'">{{item.frozen.text}}</span>
</view>
<view class="time nowrap">{{item.created_at}}</view>
</view>
<view class="price nowrap">
<span :class="item.frozen.value == 0 ? '' : 'active'">{{item.amount}}</span>
</view>
</block>
<block v-if="type === 'withdraws'">
<view class="text">
<view class="type nowrap"><text>[{{item.status.status_text}}]</text>{{item.title || '-'}}
</view>
<view class="remark nowrap" v-if="item.remark != null">{{item.remark || '-'}}</view>
<view class="time nowrap">{{item.created_at}}</view>
</view>
<view class="price nowrap">{{item.amount}}</view>
</block>
<block v-if="type === 'edit'">
<view class="text">
<view class="type nowrap"> {{ item.title }} </view>
<view class="time nowrap">{{item.created_at}}</view>
</view>
<view class="price nowrap" style="font-size: 28rpx;font-weight: normal;">{{item.status.text}}</view>
</block>
</view>
</block>
<block v-else>
<view class="list-null">
<u-empty mode="history" icon="http://cdn.uviewui.com/uview/empty/history.png"
:text="type === 'edit'?' 暂无记录':'暂未开放'" />
</view>
</block>
</view>
<u-loadmore v-if="pagesShow" :status="status" />
<!-- 弹窗展示输入运营中心姓名 -->
<u-popup :show="yunyingShow" mode="center" @close="yunyingShow = false" :round="22">
<view class="yunying">
<view class="yunying_title">
<view class="title"> 修改运营中心 </view>
<image class="yunying_bg" src="/static/icons/yunying_bg.png" mode="widthFix" />
</view>
<view class="rz-item">
<input type="text" maxlength="4" v-model='yunying_name' placeholder-class="inputP"
placeholder="请输入名称" />
<view class="btn">运营中心</view>
</view>
<view class="button" @click="sureYunYing">确认修改名称</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
balance,
withdrawsLog
} from '@/apis/interfaces/account.js'
import {
getTeam,
submitTeamName,
getTeamLogs,
} from '@/apis/interfaces/user.js'
export default {
data() {
return {
type: 'edit',
tabs: [{
name: '名称修改',
value: 'edit'
}, {
name: '团队人数',
value: 'balance'
},
{
name: '总业绩',
value: 'withdraws'
},
],
total: '0.00',
sended: '0.00',
frozen: '0.00',
list: [],
page: {
current: 1,
has_more: false,
},
pagesShow: false,
status: '',
yunyingShow: false, // 运营中心是否展示
yunying_name: '', // 运营名称
team_name: '',
team_status: '', // 状态 1可以申请但是没有完善2申请完审核中3已通过已修改
users_count: '-',
all_perf: '-',
};
},
onShow() {
this.page = {
current: 1,
has_more: false,
}
this.getList()
this.getTeam();
},
methods: {
// 获取运营中心基本信息
getTeam() {
getTeam().then(res => {
this.team_name = res.name
this.users_count = res.users_count
this.all_perf = res.all_perf
}).catch(err => {
this.errMsg(err)
})
},
// 运营中心确认按钮处理
sureYunYing() {
if (this.yunying_name == '' || this.yunying_name.length == 0) {
uni.showToast({
title: '请输入运营中心名称',
icon: 'none',
mask: true,
duration: 2000
})
return
}
submitTeamName({
name: this.yunying_name
}).then(res => {
this.showBind = false
uni.showModal({
title: '微信提示',
content: '运营中心姓名修改完成,请耐心等待审核!',
showCancel: false,
success: res => {
this.yunyingShow = false
this.getList()
this.getTeam()
}
})
}).catch(err => {
this.yunyingShow = false
uni.showToast({
title: err.message,
icon: 'none',
mask:true,
duration:3000
})
})
},
onTabs(e) {
if (e.value === this.type) return
this.type = e.value
this.page = {
current: 1,
has_more: false,
}
this.list = []
// this.total = '0.00'
// this.sended = '0.00'
// this.frozen = '0.00'
this.getList()
},
// 获取账户余额
getList() {
// if (this.type === 'balance') this.getBalance()
// if (this.type === 'withdraws') this.getWithdraws()
if (this.type == 'edit'){
this.getTeams()
uni.showLoading({
title: '加载中...',
mask: true
})
}
},
// 获取账户余额
getBalance() {
balance({
page: this.page.current
}).then(res => {
let {
balance,
logs,
sended,
frozen
} = res;
let atList = logs.page.current == 1 ? [] : this.list
this.total = balance
this.sended = sended
this.frozen = frozen
this.list = atList.concat(logs.data)
this.page = logs.page
this.pagesShow = false
uni.hideLoading()
}).catch(err => {
this.errMsg(err)
})
},
// 获取提现记录
getTeams() {
getTeamLogs({}).then(res => {
console.log(res)
this.list = res
this.pagesShow = false
uni.hideLoading()
}).catch(err => {
this.errMsg(err)
})
},
// 获取运营中心修改记录
getWithdraws() {
withdrawsLog({
page: this.page.current
}).then(res => {
let {
all,
lists
} = res;
let atList = lists.page.current == 1 ? [] : this.list
this.total = all;
this.list = atList.concat(lists.data)
this.page = lists.page
this.pagesShow = false
uni.hideLoading()
}).catch(err => {
this.errMsg(err)
})
},
// 错误提示
errMsg(err) {
uni.showToast({
title: err.message,
icon: 'none'
})
},
},
onReachBottom() {
// this.pagesShow = true;
// if (this.page.has_more) {
// this.status = 'loading';
// this.page.current++
// this.getList()
// return
// }
// this.status = 'nomore';
}
}
</script>
<style lang="scss">
// tabs
.tabs {
border-radius: 20rpx 20rpx 0 0;
padding: 5px 0;
margin: -54px 30rpx 0;
background: white;
position: relative;
z-index: 1;
border-bottom: solid 1rpx #F6F6F6;
}
// 账户余额
.total {
background-size: cover;
background-position: top center;
padding: 50rpx 30rpx 170rpx;
background-color: #446EFE;
color: white;
.total-item-1 {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
}
.total-item-2 {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
// margin-top: $margin;
position: relative;
top: $margin;
padding-bottom: 20rpx;
font-size: 30rpx;
view {
opacity: 0.9;
font-size: 26rpx;
}
span {
font-size: 32rpx;
}
}
.total-left {
width: calc(100% - 200rpx);
}
.total-value {
font-weight: bold;
font-size: 60rpx;
font-family: Arial, Helvetica, sans-serif;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.pen {
margin-left: 20rpx;
}
}
.total-text {
font-size: 26rpx;
opacity: .9;
line-height: 40rpx;
padding-top: 20rpx;
}
.total-btn {
background: white;
color: #446EFE;
line-height: 70rpx;
border-radius: 40rpx;
width: 200rpx;
font-weight: bold;
text-align: center;
}
}
// 记录空
.list-null {
height: 70vh;
display: flex;
align-items: center;
justify-content: center;
}
// 记录
.logs {
box-sizing: border-box;
background-color: white;
margin: 0 30rpx;
padding: 0 30rpx;
border-radius: 0 0 20rpx 20rpx;
.log-flex {
padding: 25rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
color: #666666;
border-top: solid 1rpx #F6F6F6;
&:first-child {
border-top: none;
}
.text {
width: calc(100% - 200rpx);
}
.price {
width: 200rpx;
text-align: right;
font-weight: bold;
color: #446EFE;
.active {
color: #d90017;
}
}
.type {
// font-weight: bold;
font-size: 30rpx;
color: #333;
padding-top: 10rpx;
text {
font-weight: normal;
padding-right: 10rpx;
color: $main-color;
}
span {
font-size: 22rpx;
font-weight: normal;
background-color: rgba(#446EFE, 0.4);
padding: 2rpx 20rpx;
border-radius: 40rpx;
color: #fff;
position: relative;
left: 20rpx;
top: -6rpx;
}
.active {
background-color: rgba(#d90017, 0.4);
}
}
.remark {
font-size: 28rpx;
}
.time {
font-size: 26rpx;
padding-top: 4rpx;
color: gray;
}
}
}
.yunying {
width: 606rpx;
.yunying_title {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
z-index: 9;
.title {
position: absolute;
left: 30rpx;
z-index: 10;
color: #fff;
}
.yunying_bg {
width: 100%;
}
}
.button {
width: 540rpx;
height: 90rpx;
background: #446EFE;
border-radius: 50rpx;
text-align: center;
line-height: 90rpx;
font-size: 30rpx;
font-family: PingFang SC;
color: #FFFFFF;
margin: $margin 33rpx 40rpx 33rpx;
font-weight: bold;
}
.title {
padding: $padding;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
border-bottom: solid 1rpx #f9f9f9;
}
.rz-item {
padding: $padding;
margin-top: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #111111;
position: relative;
.title {
font-size: 30rpx;
}
input {
flex: 1;
background-color: #f9f9f9;
margin-left: $margin;
padding: 20rpx $padding;
border-radius: 10rpx;
font-size: 34rpx;
}
.inputP {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
}
.btn {
height: 60rpx;
background: #446EFE;
border-radius: 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
padding: 0 20rpx;
position: absolute;
right: 50rpx;
}
}
}
</style>

View File

@@ -3,22 +3,20 @@
<view class="user-info"> <view class="user-info">
<block v-if="isAuth"> <block v-if="isAuth">
<view class="user-info-left"> <view class="user-info-left">
<u-avatar <u-avatar shape="square" class="active" size="120rpx"
shape="square" :default-url="require('@/static/imgs/default-active.png')" :src="avatar" mode="aspectFill"
class="active" @click="onNav('UserInfo')"></u-avatar>
size="120rpx"
:default-url="require('@/static/imgs/default-active.png')"
:src="avatar"
mode="aspectFill"
@click="onNav('UserInfo')"
></u-avatar>
<view class="nickname nowrap" @click="onNav('UserInfo')">{{nickname}}</view> <view class="nickname nowrap" @click="onNav('UserInfo')">{{nickname}}</view>
<view class="tags"> <view class="tags">
<view class="tags-item" v-if="certification"><image class="tags-icon" src="@/static/icons/Identity_icon.png" mode="widthFix"></image>实名认证</view> <view class="tags-item" v-if="certification">
<image class="tags-icon" src="@/static/icons/Identity_icon.png" mode="widthFix"></image>实名认证
</view>
<view class="tags-item">{{identity.name}}</view> <view class="tags-item">{{identity.name}}</view>
</view> </view>
<view class="state"> <view class="state">
<view class="state-tag"><u-icon class="state-icon" size="28rpx" color="#555" name="plus"></u-icon>状态</view> <view class="state-tag">
<u-icon class="state-icon" size="28rpx" color="#555" name="plus"></u-icon>状态
</view>
</view> </view>
</view> </view>
<view class="user-info-right" @click="onUserCode"> <view class="user-info-right" @click="onUserCode">
@@ -27,14 +25,9 @@
</block> </block>
<block v-else> <block v-else>
<view class="user-info-left"> <view class="user-info-left">
<u-avatar <u-avatar shape="square" class="active" size="120rpx"
shape="square" :default-url="require('@/static/imgs/default-active.png')" mode="aspectFill"
class="active" @click="onNav('UserInfo')"></u-avatar>
size="120rpx"
:default-url="require('@/static/imgs/default-active.png')"
mode="aspectFill"
@click="onNav('UserInfo')"
></u-avatar>
<view class="nickname nowrap" @click="onNav('UserInfo')">登录</view> <view class="nickname nowrap" @click="onNav('UserInfo')">登录</view>
<view class="tags">暂未登录</view> <view class="tags">暂未登录</view>
</view> </view>
@@ -45,91 +38,121 @@
</view> </view>
<view class="border-solid-empty"></view> <view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('AccountIntegral')"> <view class="nav-flex" @click="onNav('AccountIntegral')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_00.png"></image>火力值</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_00.png"></image>火力值
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onNav('AccountCash')"> <view class="nav-flex" @click="onNav('AccountCash')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_01.png"></image>业绩账户</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_01.png"></image>业绩账户
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="border-solid-empty"></view> <view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('UserTeam')"> <view class="nav-flex" @click="onNav('UserTeam')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的客户</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的客户
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('YunYing')" v-if="team_status != 0">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/yunying.png"></image> 运营中心
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onNav('AccountBonus')"> <view class="nav-flex" @click="onNav('AccountBonus')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_04.png"></image>奖金账户</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_04.png"></image>奖金账户
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onNav('UserCertification')"> <view class="nav-flex" @click="onNav('UserCertification')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_03.png"></image>实名认证</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_03.png"></image>实名认证
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onParent"> <view class="nav-flex" @click="onParent">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onNav('WeChat')"> <view class="nav-flex" @click="onNav('WeChat')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="border-solid-empty"></view> <view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('UserSet')"> <view class="nav-flex" @click="onNav('UserSet')">
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_05.png"></image>设置</view> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_05.png"></image>设置
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<!-- 绑定分享关系 --> <!-- 绑定分享关系 -->
<u-modal <u-modal :show="showBind" confirmColor="#446EFE" :showCancelButton="true"
:show="showBind" :confirmText="isInvitation ? '校验邀请码': '绑定关系'" @cancel="()=> {
confirmColor="#446EFE"
:showCancelButton="true"
:confirmText="isInvitation ? '校验邀请码': '绑定关系'"
@cancel="()=> {
this.showBind = false this.showBind = false
this.isInvitation = true this.isInvitation = true
this.invitation = '' this.invitation = ''
}" }" @confirm="onBind">
@confirm="onBind"
>
<slot> <slot>
<view class="bind-view" v-if="isInvitation"> <view class="bind-view" v-if="isInvitation">
<view class="bind-title">绑定推荐人</view> <view class="bind-title">绑定推荐人</view>
<view class="bind-subtitle">选择通过那种方式绑定推荐人</view> <view class="bind-subtitle">选择通过那种方式绑定推荐人</view>
<view class="bind-type"> <view class="bind-type">
<u-radio-group <u-radio-group class="bind-type-radios" v-model="bindTypeVal" placement="row">
class="bind-type-radios" <u-radio :customStyle="{marginLeft: '4px', marginRight: '4px'}"
v-model="bindTypeVal" v-for="(item, index) in bindTypeArr" :key="index" :label="item.name"
placement="row" :name="item.value" />
>
<u-radio
:customStyle="{marginLeft: '4px', marginRight: '4px'}"
v-for="(item, index) in bindTypeArr"
:key="index"
:label="item.name"
:name="item.value"
/>
</u-radio-group> </u-radio-group>
</view> </view>
<view class="bind-input"> <view class="bind-input">
<input type="text" v-model="invitation" :placeholder="bindTypeVal == 'mobile'? '输入推荐人手机号' : '输入推荐人邀请码'"> <input type="text" v-model="invitation"
:placeholder="bindTypeVal == 'mobile'? '输入推荐人手机号' : '输入推荐人邀请码'">
</view> </view>
</view> </view>
<view class="bind-user" v-else> <view class="bind-user" v-else>
<view class="bind-title">推荐人</view> <view class="bind-title">推荐人</view>
<view class="bind-subtitle">请确认绑定推荐人关系用户信息</view> <view class="bind-subtitle">请确认绑定推荐人关系用户信息</view>
<view class="bind-acitve"> <view class="bind-acitve">
<image :src="invitationUser.avatar || require('@/static/imgs/default-active.png')" mode="aspectFill"></image> <image :src="invitationUser.avatar || require('@/static/imgs/default-active.png')"
mode="aspectFill"></image>
</view> </view>
<view class="bind-nickname">{{invitationUser.nickname}}</view> <view class="bind-nickname">{{invitationUser.nickname}}</view>
<view class="bind-username">{{invitationUser.username}}</view> <view class="bind-username">{{invitationUser.username}}</view>
</view> </view>
</slot> </slot>
</u-modal> </u-modal>
<!-- 弹窗展示输入运营中心姓名 -->
<u-popup :show="yunyingShow" mode="center" @close="yunyingShow = false" :round="22">
<view class="yunying">
<view class="yunying_title">
<view class="title"> 完善运营中心 </view>
<image class="yunying_bg" src="/static/icons/yunying_bg.png" mode="widthFix" />
</view>
<view class="rz-item">
<input type="text" maxlength="4" v-model='yunying_name' placeholder-class="inputP" placeholder="请输入名称" />
<view class="btn">运营中心</view>
</view>
<view class="button" @click="sureYunYing">确认名称</view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import { info,relationsVerify, relationsBind } from '@/apis/interfaces/user.js' import {
info,
relationsVerify,
relationsBind,
submitTeamName,
} from '@/apis/interfaces/user.js'
export default { export default {
data() { data() {
return { return {
@@ -139,9 +162,14 @@
avatar: '', avatar: '',
certification: '', certification: '',
// 绑定关系 // 绑定关系
bindTypeArr : [ bindTypeArr: [{
{ name: '手机号', value: 'mobile'}, name: '手机号',
{ name: '邀请码', value: 'verify'}, value: 'mobile'
},
{
name: '邀请码',
value: 'verify'
},
], ],
bindTypeVal: 'mobile', bindTypeVal: 'mobile',
showBind: false, showBind: false,
@@ -153,6 +181,9 @@
username: '' username: ''
}, },
invitation: '', invitation: '',
yunyingShow:false, // 运营中心是否展示
yunying_name:'', // 运营名称
team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
}; };
}, },
onShow() { onShow() {
@@ -166,12 +197,22 @@
title: '加载中...' title: '加载中...'
}) })
info().then(res => { info().then(res => {
let { nickname, identity, avatar, certification, parent } = res let {
nickname,
identity,
avatar,
certification,
parent,team_status
} = res
this.nickname = nickname this.nickname = nickname
this.identity = identity this.identity = identity
this.avatar = avatar this.avatar = avatar
this.certification = certification this.certification = certification
this.parent = parent this.parent = parent
this.team_status = team_status
if(team_status == 1){
this.yunyingShow = true
}
uni.hideLoading() uni.hideLoading()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@@ -182,7 +223,18 @@
}, },
// 导航 // 导航
onNav(name) { onNav(name) {
this.$Router.push({name}) if(this.team_status == 2){
uni.showToast({
title:'运营中心名称审核中',
icon:'none',
mask:true,
duration:3000,
})
return
}
this.$Router.push({
name
})
}, },
// 推荐关系 // 推荐关系
onParent() { onParent() {
@@ -252,10 +304,14 @@
success: res => { success: res => {
switch (res.tapIndex) { switch (res.tapIndex) {
case 0: case 0:
this.$Router.push({ name: 'UserCode' }) this.$Router.push({
name: 'UserCode'
})
break; break;
case 1: case 1:
this.$Router.push({ name: 'SalesmanCode' }) this.$Router.push({
name: 'SalesmanCode'
})
break; break;
} }
} }
@@ -272,11 +328,43 @@
confirmColor: '#446EFE', confirmColor: '#446EFE',
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.$Router.pushTab({name: 'Work'}) this.$Router.pushTab({
name: 'Work'
})
} }
} }
}) })
},
// 运营中心确认按钮处理
sureYunYing(){
if(this.yunying_name == '' || this.yunying_name.length == 0){
uni.showToast({
title:'请完善运营中心名称',
icon:'none',
mask:true,
duration:2000,
})
return
} }
submitTeamName({name:this.yunying_name}).then(res => {
this.showBind = false
uni.showModal({
title: '微信提示',
content: '运营中心姓名完善完成,请耐心等待审核!',
showCancel: false,
success: res => {
this.getUserInfo()
this.yunyingShow = false
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
} }
} }
</script> </script>
@@ -289,9 +377,11 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 34rpx; font-size: 34rpx;
.nav-icon { .nav-icon {
display: flex; display: flex;
align-items: center; align-items: center;
.nav-icon-src { .nav-icon-src {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
@@ -301,14 +391,17 @@
} }
} }
} }
// 用户信息 // 用户信息
.user-info { .user-info {
padding: 50rpx $padding; padding: 50rpx $padding;
display: flex; display: flex;
&-left { &-left {
padding-left: 140rpx; padding-left: 140rpx;
position: relative; position: relative;
width: calc(100% - 150rpx); width: calc(100% - 150rpx);
.active { .active {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -316,13 +409,16 @@
border-radius: $radius; border-radius: $radius;
overflow: hidden; overflow: hidden;
} }
.nickname { .nickname {
font-size: 42rpx; font-size: 42rpx;
line-height: 50rpx; line-height: 50rpx;
font-weight: bold; font-weight: bold;
} }
.tags { .tags {
padding-top: 20rpx; padding-top: 20rpx;
.tags-item { .tags-item {
@extend .border; @extend .border;
display: inline-block; display: inline-block;
@@ -334,12 +430,15 @@
color: #555; color: #555;
font-weight: 400; font-weight: 400;
margin-left: $margin - 10; margin-left: $margin - 10;
&::after { &::after {
border-radius: 20rpx; border-radius: 20rpx;
} }
&:first-child { &:first-child {
margin-left: 0; margin-left: 0;
} }
.tags-icon { .tags-icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
@@ -349,8 +448,10 @@
} }
} }
} }
.state { .state {
padding-top: 20rpx; padding-top: 20rpx;
.state-tag { .state-tag {
@extend .border; @extend .border;
display: inline-block; display: inline-block;
@@ -361,9 +462,11 @@
height: 50rpx; height: 50rpx;
color: #555; color: #555;
font-weight: 400; font-weight: 400;
&::after { &::after {
border-radius: 50rpx; border-radius: 50rpx;
} }
.state-icon { .state-icon {
display: inline-block; display: inline-block;
margin-right: 5rpx; margin-right: 5rpx;
@@ -371,12 +474,14 @@
} }
} }
} }
&-right { &-right {
width: 150rpx; width: 150rpx;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
position: relative; position: relative;
text-align: center; text-align: center;
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
@@ -386,6 +491,7 @@
height: 100%; height: 100%;
background-image: linear-gradient(90deg, $border-color 50%, transparent 50%); background-image: linear-gradient(90deg, $border-color 50%, transparent 50%);
} }
.user-qrcode { .user-qrcode {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
@@ -393,22 +499,27 @@
} }
} }
} }
// 邀请码 // 邀请码
.bind-view { .bind-view {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.bind-title { .bind-title {
text-align: center; text-align: center;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
} }
.bind-type { .bind-type {
margin-top: 30rpx; margin-top: 30rpx;
.bind-type-radios { .bind-type-radios {
justify-content: center; justify-content: center;
} }
} }
.bind-subtitle { .bind-subtitle {
line-height: 40rpx; line-height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
@@ -416,8 +527,10 @@
padding-top: 15rpx; padding-top: 15rpx;
text-align: center; text-align: center;
} }
.bind-input { .bind-input {
padding-top: 30rpx; padding-top: 30rpx;
input { input {
background: #f8f8f8; background: #f8f8f8;
width: 100%; width: 100%;
@@ -431,16 +544,19 @@
} }
} }
} }
// 确认绑定用户关系 // 确认绑定用户关系
.bind-user { .bind-user {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.bind-title { .bind-title {
text-align: center; text-align: center;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
} }
.bind-subtitle { .bind-subtitle {
line-height: 40rpx; line-height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
@@ -448,9 +564,11 @@
padding-top: 15rpx; padding-top: 15rpx;
text-align: center; text-align: center;
} }
.bind-acitve { .bind-acitve {
text-align: center; text-align: center;
padding-top: 30rpx; padding-top: 30rpx;
image { image {
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
@@ -458,6 +576,7 @@
border-radius: 50%; border-radius: 50%;
} }
} }
.bind-nickname { .bind-nickname {
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
@@ -466,6 +585,7 @@
line-height: 40rpx; line-height: 40rpx;
padding-top: 20rpx; padding-top: 20rpx;
} }
.bind-username { .bind-username {
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
@@ -473,4 +593,102 @@
color: gray; color: gray;
} }
} }
.yunying {
width: 606rpx;
.yunying_title{
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
z-index: 9;
.title{
position: absolute;
left: 30rpx;
z-index: 10;
color: #fff;
}
.yunying_bg{
width: 100%;
}
}
.button {
width: 540rpx;
height: 90rpx;
background: #4674DA;
border-radius: 50rpx;
text-align: center;
line-height: 90rpx;
font-size: 30rpx;
font-family: PingFang SC;
color: #FFFFFF;
margin: $margin 33rpx 40rpx 33rpx;
font-weight: bold;
}
.title {
padding: $padding;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
border-bottom: solid 1rpx #f9f9f9;
}
.rz-item {
padding: $padding;
margin-top: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #111111;
position: relative;
.title{
font-size: 30rpx;
}
input {
flex: 1;
background-color: #f9f9f9;
margin-left: $margin;
padding: 20rpx $padding;
border-radius: 10rpx;
font-size: 34rpx;
}
.inputP {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
}
.btn {
height: 60rpx;
background: #4674DA;
border-radius: 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
padding: 0 20rpx;
position: absolute;
right: 50rpx;
}
}
}
</style> </style>

BIN
static/icons/yunying.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/icons/yunying_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB