|
|
@ -3,8 +3,8 @@ |
|
|
|
<view class="status-bar"></view> |
|
|
|
<view class="status-bar"></view> |
|
|
|
<image class="bg" src="https://occupationlab.com/images/preschoolEdu/person-bg.png" /> |
|
|
|
<image class="bg" src="https://occupationlab.com/images/preschoolEdu/person-bg.png" /> |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="platformId !== 7" class="team-wrap" :style="{paddingTop: headerTop}"> |
|
|
|
<view class="team-wrap" :style="{paddingTop: headerTop}"> |
|
|
|
<view class="team"> |
|
|
|
<view v-if="platformId !== 7" class="team"> |
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'classificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'classificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -12,17 +12,16 @@ |
|
|
|
<view class="wrap"> |
|
|
|
<view class="wrap"> |
|
|
|
<view class="info"> |
|
|
|
<view class="info"> |
|
|
|
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> |
|
|
|
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> |
|
|
|
<image class="avatar" :src="avatar" mode=""></image> |
|
|
|
<image class="avatar" :src="info.userAvatars" mode=""></image> |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
<view class="text"> |
|
|
|
<view class="text"> |
|
|
|
<view class="name">{{ info.realName || userName }}</view> |
|
|
|
<view class="name">{{ curAccount.account || userName }}</view> |
|
|
|
<view class="phone">1369641301</view> |
|
|
|
<view class="phone">{{ curAccount.phone }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="auth" @click="toAuth"> |
|
|
|
<view class="auth" @click="toAuth"> |
|
|
|
{{ isAuth ? '' : '待' }}实名认证 |
|
|
|
{{ info.authentication }} |
|
|
|
<uni-icons class="icon" type="right" size="16" color="#4876f9"></uni-icons> |
|
|
|
<uni-icons class="icon" type="right" size="16" color="#4876f9"></uni-icons> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="!disabled" class="tag">团队负责人</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="block" style="padding-bottom: 0;"> |
|
|
|
<view class="block" style="padding-bottom: 0;"> |
|
|
@ -57,7 +56,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="platformId === 7"> |
|
|
|
<template v-if="platformId === 7"> |
|
|
|
<view class="types"> |
|
|
|
<view class="types" @click="toEnterAuth(6)"> |
|
|
|
<view class="item"> |
|
|
|
<view class="item"> |
|
|
|
<view class="left"> |
|
|
|
<view class="left"> |
|
|
|
<view class="icon"> |
|
|
|
<view class="icon"> |
|
|
@ -65,10 +64,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text">我是供应商</view> |
|
|
|
<view class="text">我是供应商</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn" @click="tips">供应商认证</view> |
|
|
|
<view class="btn">供应商认证</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="types"> |
|
|
|
<view class="types" @click="toEnterAuth(5)"> |
|
|
|
<view class="item item2"> |
|
|
|
<view class="item item2"> |
|
|
|
<view class="left"> |
|
|
|
<view class="left"> |
|
|
|
<view class="icon"> |
|
|
|
<view class="icon"> |
|
|
@ -76,7 +75,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text">我是幼儿园</view> |
|
|
|
<view class="text">我是幼儿园</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn" @click="tips">幼儿园认证</view> |
|
|
|
<view class="btn">幼儿园认证</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -84,9 +83,10 @@ |
|
|
|
<view v-else class="block" style="padding-bottom: 0;"> |
|
|
|
<view v-else class="block" style="padding-bottom: 0;"> |
|
|
|
<view class="identity"> |
|
|
|
<view class="identity"> |
|
|
|
<view class="title">我是{{ platformName }}</view> |
|
|
|
<view class="title">我是{{ platformName }}</view> |
|
|
|
<view class="badge">{{ platformName }}负责人</view> |
|
|
|
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view> |
|
|
|
<view class="auth" @click="toPage('/team/certified/certified')">未认证</view> |
|
|
|
<view class="auth">{{ auditStatus }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="enterInfo.companyName" class="company-name">{{ enterInfo.companyName }}</view> |
|
|
|
<view class="identity-bg"> |
|
|
|
<view class="identity-bg"> |
|
|
|
<image v-if="isPreschool" class="pic" src="https://occupationlab.com/images/preschoolEdu/preschool1.png" mode="widthFix" /> |
|
|
|
<image v-if="isPreschool" class="pic" src="https://occupationlab.com/images/preschoolEdu/preschool1.png" mode="widthFix" /> |
|
|
|
<image v-else class="pic" src="https://occupationlab.com/images/preschoolEdu/supplier1.png" mode="widthFix" /> |
|
|
|
<image v-else class="pic" src="https://occupationlab.com/images/preschoolEdu/supplier1.png" mode="widthFix" /> |
|
|
@ -99,7 +99,7 @@ |
|
|
|
<view class="title">工作台</view> |
|
|
|
<view class="title">工作台</view> |
|
|
|
|
|
|
|
|
|
|
|
<ul class="func"> |
|
|
|
<ul class="func"> |
|
|
|
<li @click="toPage('/team/auth/auth')"> |
|
|
|
<li @click="toEnterAuth(platformId)"> |
|
|
|
<image src="https://occupationlab.com/images/preschoolEdu/icon7.png" /> |
|
|
|
<image src="https://occupationlab.com/images/preschoolEdu/icon7.png" /> |
|
|
|
<view class="text ell">{{ platformName }}认证</view> |
|
|
|
<view class="text ell">{{ platformName }}认证</view> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -159,23 +159,25 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { getTeamsByPlatformId } from '@/apis/modules/parner.js' |
|
|
|
import { getTeamsByPlatformId } from '@/apis/modules/parner.js' |
|
|
|
import { authenticationOrNot, updateAvatars } from '@/apis/modules/user.js' |
|
|
|
import { viewUserDetails, enterpriseCertificationStatus, updateAvatars } from '@/apis/modules/user.js' |
|
|
|
import OSS from '@/libs/Oss/upload' |
|
|
|
import OSS from '@/libs/Oss/upload' |
|
|
|
|
|
|
|
import Common from '@/config/common' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
per: true, // 是否有权限 |
|
|
|
per: true, // 是否有权限 |
|
|
|
teamId: uni.getStorageSync('teamId') || '', |
|
|
|
teamId: uni.getStorageSync('teamId') || '', |
|
|
|
platformId: uni.getStorageSync('platformId'), |
|
|
|
platformId: uni.getStorageSync('platformId'), |
|
|
|
|
|
|
|
openId: uni.getStorageSync('openId'), |
|
|
|
|
|
|
|
userName: uni.getStorageSync('userName'), |
|
|
|
teams: [], |
|
|
|
teams: [], |
|
|
|
info: {}, |
|
|
|
info: {}, |
|
|
|
// avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png', |
|
|
|
enterInfo: {}, |
|
|
|
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', |
|
|
|
headerTop: 0, |
|
|
|
userName: uni.getStorageSync('userName'), |
|
|
|
auditStatus: '', |
|
|
|
hasOwnTeam: 0, // 有自己的团队 |
|
|
|
isMember: true, // 成员标识 |
|
|
|
disabled: true, |
|
|
|
organizationName: '', |
|
|
|
isAuth: false, |
|
|
|
curAccount: {} |
|
|
|
headerTop: 0 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -197,24 +199,39 @@ |
|
|
|
this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px' |
|
|
|
this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px' |
|
|
|
// #endif |
|
|
|
// #endif |
|
|
|
this.per = true |
|
|
|
this.per = true |
|
|
|
this.getAuthOrNot() |
|
|
|
this.getInfo() |
|
|
|
this.platformId === 7 || this.getTeams() |
|
|
|
if (this.platformId !== 7) { |
|
|
|
|
|
|
|
this.getTeams() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.getEnterInfo() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化权限 |
|
|
|
// 个人信息 |
|
|
|
initRole() { |
|
|
|
async getInfo() { |
|
|
|
if (!uni.getStorageSync('auth').includes('我的')) { |
|
|
|
const { result } = await viewUserDetails({ |
|
|
|
this.per = false |
|
|
|
openId: this.openId |
|
|
|
} else { |
|
|
|
}) |
|
|
|
this.getInfo() |
|
|
|
if (result.hrUserInfo) { |
|
|
|
|
|
|
|
if (!result.hrUserInfo.userAvatars) result.hrUserInfo.userAvatars = Common.avatar // 没有头像则显示默认头像 |
|
|
|
|
|
|
|
this.info = result.hrUserInfo |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const org = result.organizationInfoList |
|
|
|
|
|
|
|
if (org && org.length) this.organizationName = org[0].organizationName |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// userAccountList里有两个身份,则显示企业的名字,否则显示个人姓名 |
|
|
|
|
|
|
|
const accountList = result.userAccountList |
|
|
|
|
|
|
|
if (accountList && accountList.length) { |
|
|
|
|
|
|
|
const enter = accountList.find(e => e.platformId !== '7') |
|
|
|
|
|
|
|
this.curAccount = enter || accountList[0] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 实名认证状态 |
|
|
|
// 企业认证信息 |
|
|
|
async getAuthOrNot() { |
|
|
|
async getEnterInfo() { |
|
|
|
const res = await authenticationOrNot() |
|
|
|
const { data } = await enterpriseCertificationStatus(this.openId) |
|
|
|
if (res.authenticationInformation) { |
|
|
|
if (data) { |
|
|
|
this.isAuth = true |
|
|
|
this.auditStatus = Common.auditStatus.find(e => e.id === data.auditStatus).name |
|
|
|
this.info = res.authenticationInformation |
|
|
|
this.enterInfo = data |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取团队信息 |
|
|
|
// 获取团队信息 |
|
|
@ -239,6 +256,7 @@ |
|
|
|
uni.setStorageSync('team', data[0]) |
|
|
|
uni.setStorageSync('team', data[0]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.isMember = uni.getStorageSync('team').isTeam == 0 // 成员 |
|
|
|
this.teams = data |
|
|
|
this.teams = data |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 团队选择回调 |
|
|
|
// 团队选择回调 |
|
|
@ -248,48 +266,39 @@ |
|
|
|
uni.setStorageSync('team', e) |
|
|
|
uni.setStorageSync('team', e) |
|
|
|
uni.setStorageSync('teamId', teamId) |
|
|
|
uni.setStorageSync('teamId', teamId) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取个人信息 |
|
|
|
|
|
|
|
getInfo() { |
|
|
|
|
|
|
|
const { partnerId, teamId } = uni.getStorageSync('team') |
|
|
|
|
|
|
|
my({ |
|
|
|
|
|
|
|
partnerId, |
|
|
|
|
|
|
|
teamId |
|
|
|
|
|
|
|
}).then(({ my }) => { |
|
|
|
|
|
|
|
this.my = my |
|
|
|
|
|
|
|
const avatar = my.info.userAvatars || 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png' |
|
|
|
|
|
|
|
this.avatar = avatar |
|
|
|
|
|
|
|
uni.setStorageSync('avatar', avatar) |
|
|
|
|
|
|
|
}).catch(e => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 上传头像回调 |
|
|
|
// 上传头像回调 |
|
|
|
onChooseAvatar(e) { |
|
|
|
onChooseAvatar(e) { |
|
|
|
OSS(e.detail.avatarUrl, (name) => { |
|
|
|
OSS(e.detail.avatarUrl, ({ url }) => { |
|
|
|
updateAvatars(name).then(res => { |
|
|
|
updateAvatars({ |
|
|
|
// this.getInfo() |
|
|
|
url, |
|
|
|
|
|
|
|
userName: '', |
|
|
|
|
|
|
|
openId: this.openId |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
this.getInfo() |
|
|
|
}).catch(e => {}) |
|
|
|
}).catch(e => {}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// uni.uploadFile({ |
|
|
|
|
|
|
|
// url: 'https://huorantech.cn/nakadai/nakadai/oss/fileUpload', |
|
|
|
|
|
|
|
// filePath: e.detail.avatarUrl, |
|
|
|
|
|
|
|
// name: 'file', |
|
|
|
|
|
|
|
// header: { |
|
|
|
|
|
|
|
// token: uni.getStorageSync('token'), |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
// formData: {}, |
|
|
|
|
|
|
|
// success: ({ data }) => { |
|
|
|
|
|
|
|
// updateAvatars(JSON.parse(data).filesResult.fileUrl).then(res => { |
|
|
|
|
|
|
|
// this.getInfo() |
|
|
|
|
|
|
|
// }).catch(e => {}) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
toPage(href) { |
|
|
|
toPage(href) { |
|
|
|
this.$util.to(href) |
|
|
|
this.$util.to(href) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 跳转实名认证 |
|
|
|
// 跳转实名认证 |
|
|
|
toAuth() { |
|
|
|
toAuth() { |
|
|
|
this.toPage(this.isAuth ? '/team/rePersonAuth/rePersonAuth' : '/team/personAuth/personAuth') |
|
|
|
this.toPage(this.info.authentication === '已认证' ? '/team/rePersonAuth/rePersonAuth' : '/team/personAuth/personAuth') |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转企业认证 |
|
|
|
|
|
|
|
toEnterAuth(platformId) { |
|
|
|
|
|
|
|
const { auditStatus, platformSource } = this.enterInfo |
|
|
|
|
|
|
|
// 审核状态(0默认未提交 1.待审核,2.已通过,3.已驳回) |
|
|
|
|
|
|
|
if (auditStatus === 1) { |
|
|
|
|
|
|
|
if (platformSource != platformId) { |
|
|
|
|
|
|
|
// 如果组织认证已经在审核中的,点击另外一个认证的,弹窗提示“您已提交我是供应商的认证,无法再提交幼儿园认证。 |
|
|
|
|
|
|
|
this.$util.errMsg(`您已提交我是${platformId === 5 ? '供应商' : '幼儿园'}的认证,无法再提交${platformId === 5 ? '幼儿园' : '供应商'}认证。`) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$util.errMsg('您已提交认证,请等待审核。') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$util.to(auditStatus === 2 ? '/team/certified/certified' : '/team/auth/auth?platformId=' + platformId) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提示暂未开放 |
|
|
|
// 提示暂未开放 |
|
|
|
tips() { |
|
|
|
tips() { |
|
|
@ -309,7 +318,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
.team { |
|
|
|
.team { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
width: 300rpx; |
|
|
|
max-width: 70%; |
|
|
|
/deep/.selected-item text { |
|
|
|
/deep/.selected-item text { |
|
|
|
font-size: 30rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: 600; |
|
|
|
font-weight: 600; |
|
|
@ -352,6 +361,7 @@ |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.name { |
|
|
|
.name { |
|
|
|
|
|
|
|
max-width: 49vw; |
|
|
|
margin-bottom: 10rpx; |
|
|
|
margin-bottom: 10rpx; |
|
|
|
font-size: 32rpx; |
|
|
|
font-size: 32rpx; |
|
|
|
font-weight: 600; |
|
|
|
font-weight: 600; |
|
|
@ -367,6 +377,7 @@ |
|
|
|
padding: 4rpx 16rpx; |
|
|
|
padding: 4rpx 16rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: $uni-primary; |
|
|
|
color: $uni-primary; |
|
|
|
|
|
|
|
white-space: nowrap; |
|
|
|
border: 1px solid #8ca5eb; |
|
|
|
border: 1px solid #8ca5eb; |
|
|
|
border-radius: 20px; |
|
|
|
border-radius: 20px; |
|
|
|
.icon { |
|
|
|
.icon { |
|
|
@ -428,6 +439,11 @@ |
|
|
|
color: #9c9c9c; |
|
|
|
color: #9c9c9c; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.company-name { |
|
|
|
|
|
|
|
margin-top: 20rpx; |
|
|
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
|
|
color: #333; |
|
|
|
|
|
|
|
} |
|
|
|
.identity-bg { |
|
|
|
.identity-bg { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
margin: 20rpx 0 50rpx; |
|
|
|
margin: 20rpx 0 50rpx; |
|
|
|