yujialong 11 months ago
parent 32b22e17e2
commit acd91b5d0a
  1. 4
      apis/modules/parner.js
  2. 50
      apis/modules/product.js
  3. 6
      apis/modules/supplier.js
  4. 25
      apis/modules/user.js
  5. 1
      components/filter-popup/filter-popup.vue
  6. 51
      config/common.js
  7. 10
      config/product.js
  8. 3
      libs/Oss/upload.js
  9. 5
      libs/util.js
  10. 5
      other/supplierDetail/supplierDetail.vue
  11. 6
      pages.json
  12. 17
      pages/index/index.vue
  13. 19
      pages/login/login.vue
  14. 154
      pages/person/person.vue
  15. 103
      pages/supplier/supplier.vue
  16. BIN
      static/image/avatar.png
  17. 4
      styles/common.scss
  18. 73
      team/auth/auth.vue
  19. 28
      team/certified/certified.vue
  20. 114
      team/info/info.vue
  21. 266
      team/infoEdit/infoEdit.vue
  22. 6
      team/personAuth/personAuth.vue
  23. 46
      team/qrcode/qrcode.vue
  24. 21
      team/setting/setting.vue
  25. 3
      team/teams/teams.vue
  26. 42
      team/userName/userName.vue

@ -9,8 +9,8 @@ export const teamList = (data) => {
return post('nakadai/nakadai/partnerAccount/partnerAccountList', data)
}
export const generateInvitationCode = accountId => {
return post(`nakadai/nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
export const generateInvitationCode = platformId => {
return post(`nakadai/kindergarten/platformTeamAccount/generateInvitationCode?platformId=${platformId}`)
}
export const treeList = (data) => {

@ -1,50 +0,0 @@
import request from '@/apis/request.js'
const { get, post } = request
export const AppletsDataProductList = (data) => {
return post('nakadai/nakadai/dataProduct/AppletsDataProductList', data)
}
export const tagsList = () => {
return get('nakadai/tags/tagsList')
}
export const listOfGoods = (data) => {
return post('nakadai/mall/listOfGoods', data)
}
export const detailsOfGoods = (id) => {
return get('nakadai/mall/detailsOfGoods?mallId=' + id)
}
export const productCategoryList = () => {
return get('nakadai/productClassification/productCategoryList')
}
export const productTypeList = () => {
return get('nakadai/productType/productTypeList')
}
export const addToShoppingCart = (data) => {
return post('nakadai/mini/program/shopping/cart/addToShoppingCart', data)
}
export const delCart = (data) => {
return post('nakadai/mini/program/shopping/cart/batchDeletion', data)
}
export const shoppingCartList = (data) => {
return post('nakadai/mini/program/shopping/cart/shoppingCartList', data)
}
export const courseDiscipline = () => {
return get('nakadai/nakadai/subject/courseDiscipline')
}
export const courseProfessionalClass = id => {
return get('nakadai/nakadai/subject/courseProfessionalClass?disciplineId=' + id)
}
export const courseProfessional = id => {
return get('nakadai/nakadai/subject/courseProfessional?professionalClassId=' + id)
}

@ -0,0 +1,6 @@
import request from '@/apis/request.js'
const { get, post } = request
export const selectEnterpriseCertificationList = (data) => {
return post('users/enterprise/certification/selectEnterpriseCertificationList', data)
}

@ -22,6 +22,24 @@ export const businessLicensePictureVerification = (imgFile) => {
export const creditCodeAuthentication = (data) => {
return post(`users/users/autonym/creditCodeAuthentication`, data)
}
export const organizationCertification = (data) => {
return post(`users/users/autonym/organizationCertification`, data)
}
export const updateTeamInfo = (data) => {
return post(`nakadai/kindergarten/platformTeamAccount/updateTeamInfo`, data)
}
export const queryTeamInfo = (data) => {
return get(`nakadai/kindergarten/platformTeamAccount/queryTeamInfo`, data)
}
export const viewUserDetails = (data) => {
return get(`users/users/userAccount/viewUserDetails`, data)
}
export const enterpriseCertificationStatus = (openId) => {
return post(`users/enterprise/certification/enterpriseCertificationStatus?openId=${openId}`)
}
export const saveCertification = (data) => {
return post(`users/enterprise/certification/save`, data)
}
@ -33,10 +51,13 @@ export const queryCity = (data) => {
return get('nakadai/nakadai/city/queryCity', data)
}
export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url)
export const updateAvatars = data => {
return post(`users/users/user/updateAvatars?openId=${data.openId}&url=${data.url}&userName=${data.userName}`)
}
export const sendPhoneOrEmailCode = (data) => {
return post('users/users/userAccount/sendPhoneOrEmailCode', data)
}
export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}

@ -69,7 +69,6 @@
</template>
<script>
import { courseDiscipline, courseProfessionalClass, courseProfessional } from '@/apis/modules/product.js'
import Popup from './components/popup.vue';
export default {
components:{

@ -0,0 +1,51 @@
/**
/**
* 通用配置
* @author yujialong
*/
export default {
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
// 角色
platformSource: [
{
id: '',
name: '不限'
},
{
id: 7,
name: '个人'
},
{
id: 5,
name: '幼儿园'
},
{
id: 6,
name: '供应商'
},
],
// 认证状态
auditStatus: [
{
id: null,
name: '不限'
},
{
id: 0,
name: '未认证'
},
{
id: 1,
name: '审核中'
},
{
id: 2,
name: '已认证'
},
{
id: 3,
name: '不通过'
},
],
}

@ -1,10 +0,0 @@
/**
/**
* 产品 配置文件
* @author yujialong
*/
export default {
normalIcon: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220609/png/1534733700683030528.png', // 通用图标
dataIcon: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220627/png/1541256164447641600.png' // 数据图标
}

@ -5,8 +5,9 @@ import Util from '@/libs/util'
import {Base64} from './base64.js';
let date=new Date()
date=date.setHours(date.getHours() + 1)
date=date.setHours(date.getHours() + 24)
let extime=""+new Date(date).toISOString()
console.log(33, extime)
var policyText = {
"expiration": extime, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了
"conditions": [

@ -1,4 +1,3 @@
import Product from '@/config/product'
import { getCurrentTime } from '@/apis/modules/activity.js'
const files = [
@ -69,10 +68,6 @@ export default {
getBmName(val) {
return uni.getStorageSync('team').partnerClassificationName
},
// 返回图标。如果有图标,则直接返回
getIcon(e) {
return e.appletIcon || Product.normalIcon
},
// 判断文件类型是否能够通过uni.openDocument打开(doc, xls, ppt, pdf, docx, xlsx, pptx)
isDoc(ext) {
return docExts.includes(ext)

@ -18,7 +18,7 @@
<view class="title">公司简介</view>
</view>
<view v-else class="list">
<view class="item">
<!-- <view class="item">
<image class="pic" src="@/static/image/info-bg.jpg"></image>
<view class="texts">
<view class="name">测试标题</view>
@ -45,13 +45,12 @@
<view class="name">测试标题</view>
<view class="price">12.8</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { detailsOfGoods, addToShoppingCart, shoppingCartList, productCategoryList } from '@/apis/modules/product.js'
export default {
data() {
return {

@ -12,7 +12,7 @@
"path" : "pages/index/index",
"style" :
{
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{
@ -20,7 +20,7 @@
"style" :
{
"navigationBarTitleText": "供应商",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{
@ -126,7 +126,7 @@
"path" : "userName/userName",
"style" :
{
"navigationBarTitleText" : "用户名修改",
"navigationBarTitleText" : "名修改",
"enablePullDownRefresh" : false
}
},

@ -31,7 +31,7 @@
<image class="pic" :src="item.coverUrl"></image>
<view class="texts">
<view class="name ell">{{ item.competitionName }}</view>
<view class="meta">举办时间{{ item.playStartTime + ' ~ ' + item.playEndTime }}</view>
<view class="meta">报名时间{{ item.signUpStartTime }}</view>
<view class="meta ell">主办方{{ item.sponsor }}</view>
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view>
<view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view>
@ -120,13 +120,6 @@
this.initList()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false
}
this.getProducts()
},
initList() {
this.page = 1
this.reachBottom = 0
@ -255,7 +248,7 @@
}
.hot {
width: 100%;
height: 200rpx;
height: 300rpx;
}
.module {
margin: 20rpx;
@ -284,8 +277,8 @@
overflow: hidden;
}
.pic {
width: 320rpx;
height: 240rpx;
width: 280rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 8px;
}
@ -299,7 +292,7 @@
}
.meta {
margin: 10rpx 0;
font-size: 26rpx;
font-size: 24rpx;
color: #999;
}
.sign {

@ -56,7 +56,7 @@
</template>
<script>
import { login, userBinding, getSessionKey, kindergartenWeChatApplication } from '@/apis/modules/user.js'
import { login, userBinding, getSessionKey, kindergartenWeChatApplication, saveCertification } from '@/apis/modules/user.js'
import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
export default {
data() {
@ -73,7 +73,8 @@
unionid: '',
code: '',
phone: '',
submiting: false
submiting: false,
teamName: ''
}
},
onShow() {
@ -203,9 +204,21 @@
platformId,
phone: this.phone
})
this.teamName = data.teamName
uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', platformId)
uni.setStorageSync('openId', data.sessionKey.openid)
uni.setStorageSync('openId', data.openId)
uni.setStorageSync('teamId', data.teamId)
//
if (platformId === 5 || platformId === 6) {
await saveCertification({
openId: data.openId,
auditStatus: 0,
platformSource: platformId,
companyName: this.teamName
})
}
this.toIndex()
},
toAgreement(id) {

@ -3,8 +3,8 @@
<view class="status-bar"></view>
<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">
<view class="team-wrap" :style="{paddingTop: headerTop}">
<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>
</view>
</view>
@ -12,17 +12,16 @@
<view class="wrap">
<view class="info">
<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>
<view class="text">
<view class="name">{{ info.realName || userName }}</view>
<view class="phone">1369641301</view>
<view class="name">{{ curAccount.account || userName }}</view>
<view class="phone">{{ curAccount.phone }}</view>
</view>
<view class="auth" @click="toAuth">
{{ isAuth ? '' : '待' }}实名认证
{{ info.authentication }}
<uni-icons class="icon" type="right" size="16" color="#4876f9"></uni-icons>
</view>
<view v-if="!disabled" class="tag">团队负责人</view>
</view>
<view class="block" style="padding-bottom: 0;">
@ -57,7 +56,7 @@
</view>
<template v-if="platformId === 7">
<view class="types">
<view class="types" @click="toEnterAuth(6)">
<view class="item">
<view class="left">
<view class="icon">
@ -65,10 +64,10 @@
</view>
<view class="text">我是供应商</view>
</view>
<view class="btn" @click="tips">供应商认证</view>
<view class="btn">供应商认证</view>
</view>
</view>
<view class="types">
<view class="types" @click="toEnterAuth(5)">
<view class="item item2">
<view class="left">
<view class="icon">
@ -76,7 +75,7 @@
</view>
<view class="text">我是幼儿园</view>
</view>
<view class="btn" @click="tips">幼儿园认证</view>
<view class="btn">幼儿园认证</view>
</view>
</view>
</template>
@ -84,9 +83,10 @@
<view v-else class="block" style="padding-bottom: 0;">
<view class="identity">
<view class="title">我是{{ platformName }}</view>
<view class="badge">{{ platformName }}负责人</view>
<view class="auth" @click="toPage('/team/certified/certified')">未认证</view>
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view>
<view class="auth">{{ auditStatus }}</view>
</view>
<view v-if="enterInfo.companyName" class="company-name">{{ enterInfo.companyName }}</view>
<view class="identity-bg">
<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" />
@ -99,7 +99,7 @@
<view class="title">工作台</view>
<ul class="func">
<li @click="toPage('/team/auth/auth')">
<li @click="toEnterAuth(platformId)">
<image src="https://occupationlab.com/images/preschoolEdu/icon7.png" />
<view class="text ell">{{ platformName }}认证</view>
</li>
@ -159,23 +159,25 @@
<script>
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 Common from '@/config/common'
export default {
data() {
return {
per: true, //
teamId: uni.getStorageSync('teamId') || '',
platformId: uni.getStorageSync('platformId'),
openId: uni.getStorageSync('openId'),
userName: uni.getStorageSync('userName'),
teams: [],
info: {},
// avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
userName: uni.getStorageSync('userName'),
hasOwnTeam: 0, //
disabled: true,
isAuth: false,
headerTop: 0
enterInfo: {},
headerTop: 0,
auditStatus: '',
isMember: true, //
organizationName: '',
curAccount: {}
}
},
computed: {
@ -197,24 +199,39 @@
this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px'
// #endif
this.per = true
this.getAuthOrNot()
this.platformId === 7 || this.getTeams()
this.getInfo()
if (this.platformId !== 7) {
this.getTeams()
}
this.getEnterInfo()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('我的')) {
this.per = false
} else {
this.getInfo()
//
async getInfo() {
const { result } = await viewUserDetails({
openId: this.openId
})
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() {
const res = await authenticationOrNot()
if (res.authenticationInformation) {
this.isAuth = true
this.info = res.authenticationInformation
//
async getEnterInfo() {
const { data } = await enterpriseCertificationStatus(this.openId)
if (data) {
this.auditStatus = Common.auditStatus.find(e => e.id === data.auditStatus).name
this.enterInfo = data
}
},
//
@ -239,6 +256,7 @@
uni.setStorageSync('team', data[0])
}
}
this.isMember = uni.getStorageSync('team').isTeam == 0 //
this.teams = data
},
//
@ -248,48 +266,39 @@
uni.setStorageSync('team', e)
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) {
OSS(e.detail.avatarUrl, (name) => {
updateAvatars(name).then(res => {
// this.getInfo()
OSS(e.detail.avatarUrl, ({ url }) => {
updateAvatars({
url,
userName: '',
openId: this.openId
}).then(res => {
this.getInfo()
}).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) {
this.$util.to(href)
},
//
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() {
@ -309,7 +318,7 @@
}
.team {
position: relative;
width: 300rpx;
max-width: 70%;
/deep/.selected-item text {
font-size: 30rpx;
font-weight: 600;
@ -352,6 +361,7 @@
margin-right: 20rpx;
}
.name {
max-width: 49vw;
margin-bottom: 10rpx;
font-size: 32rpx;
font-weight: 600;
@ -367,6 +377,7 @@
padding: 4rpx 16rpx;
font-size: 24rpx;
color: $uni-primary;
white-space: nowrap;
border: 1px solid #8ca5eb;
border-radius: 20px;
.icon {
@ -428,6 +439,11 @@
color: #9c9c9c;
}
}
.company-name {
margin-top: 20rpx;
font-size: 24rpx;
color: #333;
}
.identity-bg {
position: relative;
margin: 20rpx 0 50rpx;

@ -2,7 +2,7 @@
<view :class="[{oh: !per}]">
<view class="page">
<view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" />
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" @clear="clearKeyword" />
</view>
<image class="banner" src="https://occupationlab.com/images/preschoolEdu/supplier-banner.jpg" mode="widthFix"></image>
@ -12,20 +12,12 @@
<view class="list">
<view class="item" v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<view class="pro-name">
<image class="icon" src="@/static/image/info-bg.jpg"></image>
{{ item.productName }}
<image class="icon" :src="item.logoUrl ? item.logoUrl : 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png'"></image>
{{ item.companyName }}
</view>
<view class="info">
<view class="line">
<text class="name">产品简介</text>
<view class="val ell-wrap">
<view class="ell">{{ item.productIntroduction }}</view>
</view>
</view>
<view class="line">
<text class="name">产品类型</text>
<text class="val">{{ item.typeName }}</text>
</view>
<view class="meta">{{ item.briefIntroduction }}</view>
<view class="meta">{{ item.province }}-{{ item.city }}</view>
</view>
</view>
</view>
@ -36,9 +28,7 @@
</template>
<script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { tagsList, listOfGoods, shoppingCartList } from '@/apis/modules/product.js'
import { getTeamsByAccountId } from '@/apis/modules/client.js'
import { selectEnterpriseCertificationList } from '@/apis/modules/supplier.js'
export default {
data() {
return {
@ -79,10 +69,14 @@
},
],
list: [],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
keyword: '',
tags: [],
hotProducts: [],
offcialProducts: [],
page: 1,
pageSize: 5,
total: 0,
curTab: 0,
tabs: [
@ -97,51 +91,57 @@
],
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.keyword = ''
this.per = true
// this.getInfo()
// this.getProducts()
this.initList()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false
}
// this.getProducts()
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
getProducts() {
//
listOfGoods({
pageNum: 1,
pageSize: 5,
sort: 1,
isShelves: 0,
hotTag: 1
}).then(({ page }) => {
page.records.forEach(e => {
e.productIntroduction = this.$util.removeTag(e.productIntroduction)
})
this.hotProducts = page.records
//
getList() {
selectEnterpriseCertificationList({
auditStatus: null,
authenticationStatus: 2,
pageNum: this.page,
pageSize: this.pageSize,
platformSource: 6,
keyWord: this.keyword,
}).then(async ({ data }) => {
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {})
},
//
searchConfirm(e) {
},
//
toHot(item) {
this.$util.to(`/order/products/products?tagId=${item.tagsId}&tagsName=${item.tagsName}`)
},
//
toProduct() {
this.$util.to('/order/products/products')
// keyword
clearKeyword() {
this.keyword = ''
this.initList()
},
//
toDetail(item) {
this.$util.to('/other/supplierDetail/supplierDetail?id=')
this.$util.to('/other/supplierDetail/supplierDetail?id=' + item.id)
},
// tab
tabChange(tab) {
@ -198,8 +198,7 @@
font-size: 28rpx;
color: #999;
}
.val {
max-width: 70%;
.meta {
font-size: 28rpx;
color: #333;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

@ -164,8 +164,8 @@ ul {
}
}
.picker-input .input-value-border {
line-height: 1;
border: 0;
line-height: 1 !important;
border: 0 !important;
}
.tab {
display: flex;

@ -2,12 +2,12 @@
<view class="page">
<view class="block">
<view class="title">上传营业执照</view>
<image class="credential" :src="businessLicensePicture" mode="widthFix" @click="uploadBusinessLicense"></image>
<image class="credential" :src="businessLicensePicture || 'https://occupationlab.com/images/preschoolEdu/credentials1.png'" mode="widthFix" @click="uploadBusinessLicense"></image>
</view>
<view v-if="isPreschool" class="block">
<view class="title">上传办学许可证</view>
<image class="credential" :src="licenseForRunningSchool" mode="widthFix" @click="uploadSchoolLicense"></image>
<image class="credential" :src="licenseForRunningSchool || 'https://occupationlab.com/images/preschoolEdu/credentials2.png'" mode="widthFix" @click="uploadSchoolLicense"></image>
</view>
<view class="block">
@ -37,33 +37,36 @@
</template>
<script>
import { creditCodeAuthentication, businessLicensePictureVerification } from '@/apis/modules/user.js'
import { creditCodeAuthentication, businessLicensePictureVerification, updateTeamInfo, organizationCertification, kindergartenWeChatApplication } from '@/apis/modules/user.js'
import OSS from '@/libs/Oss/upload'
export default {
data() {
return {
openId: uni.getStorageSync('openId'),
form: {
companyName: '',
creditCode: '',
legalPerson: '',
},
platformId: uni.getStorageSync('platformId'),
businessLicensePicture: 'https://occupationlab.com/images/preschoolEdu/credentials1.png',
licenseForRunningSchool: 'https://occupationlab.com/images/preschoolEdu/credentials2.png'
platformId: '',
businessLicensePicture: '',
licenseForRunningSchool: ''
}
},
computed: {
//
isPreschool() {
return this.platformId === 5
return this.platformId == 5
},
//
platformName() {
return this.platformId === 6 ? '供应商' : this.platformId === 5 ? '幼儿园' : ''
return this.platformId == 6 ? '供应商' : this.platformId == 5 ? '幼儿园' : ''
},
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.platformId = +options.platformId
},
methods: {
//
@ -86,7 +89,7 @@
establishDate: data.establish_date,
type: data.type,
validPeriod: data.valid_period,
platformsOurce: uni.getStorageSync('platformId'),
platformSource: this.platformId,
}
}
})
@ -99,29 +102,57 @@
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.licenseForRunningSchool = name
OSS(file, async ({ url }) => {
that.licenseForRunningSchool = url
})
}
});
},
submit() {
async submit() {
if (this.submiting) return false
const { form } = this
if (!form.companyName) return this.$util.errMsg(`请输入${platformName}名称!`)
if (!form.creditCode) return this.$util.errMsg('请输入统一社会信用代码!')
if (!form.legalPerson) return this.$util.errMsg('请输入法人!')
creditCodeAuthentication({
this.submiting = false
const data = {
...form,
auditStatus: 1,
authenticationStatus: 1,
businessLicensePicture: this.businessLicensePicture,
licenseForRunningSchool: this.licenseForRunningSchool,
}).then(res => {
this.$util.sucMsg('认证成功!')
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
openId: this.openId
}
try {
//
if (uni.getStorageSync('platformId') === 7) {
//
const res = await kindergartenWeChatApplication({
openId: this.openId,
platformId: this.platformId,
organizationName: form.companyName
})
data.accountId = res.data.registerId
await organizationCertification(data)
} else { // /
await creditCodeAuthentication(data)
//
await updateTeamInfo({
id: uni.getStorageSync('teamId'),
classificationName: form.companyName
})
}, 1500)
}).catch(e => {})
}
} catch(e) {
this.submiting = false
}
this.$util.sucMsg('提交成功,请重新登录!')
setTimeout(() => {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
},
}
}

@ -3,20 +3,20 @@
<view class="block">
<view class="certified">
<image class="icon" src="https://occupationlab.com/images/preschoolEdu/icon7.png" mode="widthFix" />
<view class="text">您已经通过幼儿园认证</view>
<view class="text">您已经通过{{ info.platformSource === '5' ? '幼儿园' : '供应商' }}认证</view>
</view>
<view class="form-list">
<view class="line">
<view class="name">幼儿园名称</view>
<view class="val">梅林一村幼儿园</view>
<view class="val">{{ info.companyName }}</view>
</view>
<view class="line">
<view class="name">统一社会信用代码</view>
<view class="val">124403004557455223O</view>
<view class="val">{{ info.creditCode }}</view>
</view>
<view class="line">
<view class="name">法人</view>
<view class="val">谢韵</view>
<view class="val">{{ info.legalPerson }}</view>
</view>
</view>
</view>
@ -28,26 +28,22 @@
</template>
<script>
import { my } from '@/apis/modules/parner.js'
import { enterpriseCertificationStatus } from '@/apis/modules/user.js'
export default {
data() {
return {
openId: uni.getStorageSync('openId'),
info: {}
}
},
onShow() {
// this.getInfo()
this.getInfo()
},
methods: {
//
getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId,
teamId
}).then(({ my }) => {
this.info = my.info
}).catch(e => {})
//
async getInfo() {
const { data } = await enterpriseCertificationStatus(this.openId)
this.info = data
},
//
back() {

@ -1,69 +1,103 @@
<template>
<view>
<view class="page">
<view class="block">
<view class="form-list">
<view class="line">
<view class="name">LOGO</view>
<view class="val">
<image class="avatar" src="@/static/image/info-bg.jpg"></image>
<image class="avatar" :src="info.logoUrl"></image>
</view>
</view>
<view class="line">
<view class="name">幼儿园名称</view>
<view class="val">测试测试</view>
<view class="val">{{ info.classificationName }}</view>
</view>
<view class="line">
<view class="name">标签</view>
<view class="val">测试测试</view>
</view>
<view class="line textarea-line">
<view class="name">幼儿园slogan</view>
<view class="val">测试测试</view>
<view class="val">{{ info.slogan }}</view>
</view>
<view class="line">
<view class="name">省份</view>
<view class="val">{{ info.province }}</view>
</view>
<view class="line textarea-line">
<view class="line">
<view class="name">城市</view>
<view class="val">{{ info.city }}</view>
</view>
<view class="line">
<view class="name">地址</view>
<view class="val">测试测试</view>
<view class="val">{{ info.address }}</view>
</view>
<view class="line textarea-line">
<view class="line">
<view class="name">联系电话</view>
<view class="val">{{ info.phone }}</view>
</view>
<view class="line no-bd">
<view class="name">幼儿园简介</view>
<view class="val">测试测试</view>
<view class="val">{{ info.briefIntroduction }}</view>
</view>
<view class="py">
<image v-for="(item, i) in pictureUrl" :key="i" class="pic" :src="item"></image>
</view>
<view class="line">
<view class="name">二维码描述一</view>
<view class="val">{{ info.qrCodeOneName }}</view>
</view>
<view class="line">
<view class="name">二维码一</view>
<image v-if="info.qrCodeOneUrl" class="qrcode" :src="info.qrCodeOneUrl" mode="widthFix"></image>
</view>
<view class="line">
<view class="name">二维码描述二</view>
<view class="val">{{ info.qrCodeTwoName }}</view>
</view>
<view class="line">
<view class="name">二维码二</view>
<image v-if="info.qrCodeTwoUrl" class="qrcode" :src="info.qrCodeTwoUrl" mode="widthFix"></image>
</view>
<view class="line">
<view class="name">二维码描述三</view>
<view class="val">{{ info.qrCodeThreeName }}</view>
</view>
<view class="line">
<view class="name">二维码三</view>
<image v-if="info.qrCodeThreeUrl" class="qrcode" :src="info.qrCodeThreeUrl" mode="widthFix"></image>
</view>
</view>
</view>
<view class="block info">
<view class="title">联系我们</view>
<view class="line">地址测试测试</view>
<view class="line">联系电话测试测试</view>
<image class="qrcode" src="@/static/image/info-bg.jpg"></image>
</view>
<view class="btn-wrap">
<view v-if="isTeam" class="btn-wrap">
<view class="btn" @click="toEdit">编辑</view>
</view>
</view>
</template>
<script>
import { my } from '@/apis/modules/parner.js'
import { queryTeamInfo } from '@/apis/modules/user.js'
import Common from '@/config/common'
export default {
data() {
return {
isTeam: uni.getStorageSync('team').isTeam == 1, //
teamId: uni.getStorageSync('teamId'),
info: {},
pictureUrl: []
}
},
onShow() {
// this.getInfo()
this.getInfo()
},
methods: {
//
getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId,
teamId
}).then(({ my }) => {
this.info = my.info
queryTeamInfo({
teamId: this.teamId
// teamId: 281
}).then(res => {
const data = res.teamInfo
if (!data.logoUrl) data.logoUrl = Common.avatar
if (data.pictureUrl) this.pictureUrl = data.pictureUrl.split(',')
this.info = data
}).catch(e => {})
},
//
@ -75,26 +109,24 @@
</script>
<style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.avatar {
width: 80rpx;
height: 80rpx;
border: 0;
border-radius: 50%;
}
.info {
position: relative;
padding: 24rpx;
.line {
margin: 20rpx 0;
font-size: 26rpx;
color: #333;
.form-list {
.pic {
width: 200rpx;
height: 200rpx;
margin-right: 10rpx;
}
.qrcode {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 120rpx;
height: 120rpx;
width: 300rpx;
}
}
</style>

@ -4,40 +4,42 @@
<view class="form-list edit-form">
<view class="line with-arrow">
<view class="name">LOGO</view>
<image class="avatar" :src="logo" @click="uploadLogo"></image>
<image class="avatar" :src="form.logoUrl" @click="uploadLogo"></image>
</view>
<view class="line with-arrow">
<view class="name">幼儿园名称</view>
<input type="text" placeholder="请输入幼儿园名称" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">标签</view>
<input type="text" placeholder="请输入标签" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
<view class="name">{{ platformName }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '幼儿园名称'" v-model="form.classificationName" :disabled="info.authenticationStatus !== 0" />
</view>
<view class="line textarea-line">
<view class="name">幼儿园slogan</view>
<textarea placeholder="请输入幼儿园slogan"></textarea>
<view class="name">{{ platformName }}slogan</view>
<textarea :placeholder="'请输入' + platformName + 'slogan'" v-model="form.slogan"></textarea>
</view>
<view class="line with-arrow">
<view class="name">省份</view>
<view class="inline">
<text v-if="disabled" class="name">{{ provinceName }}</text>
<uni-data-picker v-else class="picker-input" :clear-icon="false" :readonly="disabled" placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="provinceId" @change="getCity"></uni-data-picker>
<uni-data-picker class="picker-input" :clear-icon="false" placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceName'}" v-model="form.province" @change="getCity"></uni-data-picker>
</view>
</view>
<view class="line with-arrow">
<view class="name">城市</view>
<view class="inline">
<uni-data-picker class="picker-input" :clear-icon="false" :readonly="!form.province" placeholder="请选择城市" popup-title="请选择城市" preload :localdata="cities" :map="{text: 'cityName', value: 'cityName'}" v-model="form.city"></uni-data-picker>
</view>
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line textarea-line">
<view class="name">地址</view>
<textarea placeholder="请输入地址"></textarea>
<textarea placeholder="请输入详细地址" v-model="form.address"></textarea>
</view>
<view class="line with-arrow">
<view class="name">联系电话</view>
<input type="text" placeholder="请输入联系电话" v-model="form.phone" />
</view>
<view class="line textarea-line no-bd">
<view class="name">幼儿园简介</view>
<textarea placeholder="请输入幼儿园简介"></textarea>
<view class="name">{{ platformName }}简介</view>
<textarea :placeholder="'请输入' + platformName + '简介'" v-model="form.briefIntroduction"></textarea>
</view>
<view class="py">
<uni-file-picker v-model="desPics" limit="3" title="最多选择3张图片" :auto-upload="false" @select="select" ></uni-file-picker>
<uni-file-picker v-model="desPics" limit="3" title="最多选择3张图片" :auto-upload="false" @select="uploadDes"></uni-file-picker>
</view>
</view>
</view>
@ -45,17 +47,39 @@
<view class="block">
<view class="form-list edit-form">
<view class="line textarea-line">
<view class="name">地址</view>
<textarea placeholder="请输入地址"></textarea>
<view class="line with-arrow no-bd">
<view class="name">二维码描述一</view>
<input type="text" placeholder="输入二维码描述一" v-model="form.qrCodeOneName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">联系电话</view>
<input type="text" placeholder="请输入联系电话" />
<view class="py">
<uni-file-picker v-model="qrCodeOne" limit="1" title="上传二维码一" :auto-upload="false" @select="e => uploadQrcode(e, 'qrCodeOne')" ></uni-file-picker>
</view>
</view>
</view>
<view class="block">
<view class="form-list edit-form">
<view class="line with-arrow no-bd">
<view class="name">二维码描述二</view>
<input type="text" placeholder="输入二维码描述二" v-model="form.qrCodeTwoName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="py">
<uni-file-picker v-model="desPics" limit="3" title="请上传二维码,最多选择3张图片" :auto-upload="false" @select="select" ></uni-file-picker>
<uni-file-picker v-model="qrCodeTwo" limit="1" title="上传二维码二" :auto-upload="false" @select="e => uploadQrcode(e, 'qrCodeTwo')" ></uni-file-picker>
</view>
</view>
</view>
<view class="block">
<view class="form-list edit-form">
<view class="line with-arrow no-bd">
<view class="name">二维码描述三</view>
<input type="text" placeholder="输入二维码描述三" v-model="form.qrCodeThreeName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="py">
<uni-file-picker v-model="qrCodeThree" limit="1" title="上传二维码三" :auto-upload="false" @select="e => uploadQrcode(e, 'qrCodeThree')" ></uni-file-picker>
</view>
</view>
</view>
@ -67,76 +91,113 @@
</template>
<script>
import { my } from '@/apis/modules/parner.js'
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { queryProvince, queryCity, queryTeamInfo, updateTeamInfo, enterpriseCertificationStatus } from '@/apis/modules/user.js'
import OSS from '@/libs/Oss/upload'
import Common from '@/config/common'
export default {
data() {
return {
logo: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
disabled: true,
openId: uni.getStorageSync('openId'),
info: {},
form: {
address: '',
briefIntroduction: '',
city: '',
classificationName: '',
id: uni.getStorageSync('teamId'),
logoUrl: '',
pictureUrl: '',
province: '',
qrCodeOneName: '',
qrCodeOneUrl: '',
qrCodeThreeName: '',
qrCodeThreeUrl: '',
qrCodeTwoName: '',
qrCodeTwoUrl: '',
slogan: '',
},
qrCodeOne: [],
qrCodeTwo: [],
qrCodeThree: [],
qrcodeLen: 1,
provinces: [],
cities: [],
provinceId: '',
cityId: '',
provinceName: '',
cityName: '',
desPics: []
desPics: [],
}
},
computed: {
//
platformName() {
return this.info.platformSource === '6' ? '供应商' : this.info.platformSource === '5' ? '幼儿园' : ''
},
},
onShow() {
// this.getInfo()
this.getEnterInfo()
this.getProvince()
},
methods: {
//
async getEnterInfo() {
const { data } = await enterpriseCertificationStatus(this.openId)
if (data) {
this.info = data
}
},
//
getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId,
teamId
}).then(({ my }) => {
this.info = my.info
queryTeamInfo({
teamId: this.form.id
}).then(res => {
const data = res.teamInfo
if (!data.logoUrl) data.logoUrl = Common.avatar
if (data.pictureUrl) {
const pics = data.pictureUrl.split(',')
const result = []
pics.forEach(url => {
result.push({
url
})
})
this.desPics = result
}
//
if (data.qrCodeOneUrl) {
this.qrCodeOne = [{
url: data.qrCodeOneUrl
}]
}
if (data.qrCodeTwoUrl) {
this.qrCodeTwo = [{
url: data.qrCodeTwoUrl
}]
}
if (data.qrCodeThreeUrl) {
this.qrCodeThree = [{
url: data.qrCodeThreeUrl
}]
}
this.form = data
this.$nextTick(() => {
data.province && this.getCity()
})
}).catch(e => {})
},
//
getProvince() {
queryProvince().then(({ list }) => {
if (this.disabled) {
const { provinceId } = this
if (provinceId) this.provinceName = list.find(e => e.provinceId == provinceId).provinceName
} else {
this.provinces = list
}
}).catch(res => {})
async getProvince() {
const { list } = await queryProvince()
this.provinces = list
this.getInfo()
},
//
getCity(val) {
if (this.provinceId) {
queryCity({
provinceId: this.provinceId
}).then(({ list }) => {
if (this.disabled) {
const { cityId } = this
if (cityId) this.cityName = list.find(e => e.cityId == cityId).cityName
} else {
this.cities = list
}
}).catch(res => {})
} else {
this.cities = []
}
if (val) this.cityId = ''
},
select(e){
console.log('选择文件:',e)
OSS(e.tempFilePaths[0], (res) => {
this.desPics.push({
name: res.name,
extname: res.ext,
url: res.url,
})
async getCity() {
const { list } = await queryCity({
provinceId: this.provinces.find(e => e.provinceName == this.form.province).provinceId
})
this.cities = list
this.cityId = ''
},
// logo
uploadLogo() {
@ -145,19 +206,45 @@
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, ({ url }) => {
that.logo = url
that.form.logoUrl = url
})
}
});
},
onEditorReady() {
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
//
uploadDes(e){
OSS(e.tempFilePaths[0], (res) => {
this.desPics.push({
name: res.name,
extname: res.ext,
url: res.url,
})
})
},
//
uploadQrcode(e, field){
OSS(e.tempFilePaths[0], (res) => {
this[field].push({
name: res.name,
extname: res.ext,
url: res.url,
})
})
},
//
submit() {
async submit() {
const { form } = this
if (!form.classificationName) return this.$util.errMsg(`请输入幼儿园名称!`)
form.pictureUrl = this.desPics.map(e => e.url).join()
form.qrCodeOneUrl = this.qrCodeOne.length ? this.qrCodeOne[0].url : ''
form.qrCodeTwoUrl = this.qrCodeTwo.length ? this.qrCodeTwo[0].url : ''
form.qrCodeThreeUrl = this.qrCodeThree.length ? this.qrCodeThree[0].url : ''
await updateTeamInfo(form)
this.$util.sucMsg('保存成功!')
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
}
}
@ -174,20 +261,9 @@
border: 0;
border-radius: 50%;
}
.info {
position: relative;
padding: 24rpx;
.line {
margin: 20rpx 0;
font-size: 26rpx;
color: #333;
}
.qrcode {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 120rpx;
height: 120rpx;
/deep/.picker-input {
.arrow-area {
display: none;
}
}
</style>

@ -99,10 +99,10 @@
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.reverseOfIDCard = name
OSS(file, async ({ url }) => {
that.reverseOfIDCard = url
const { data } = await faceAuthentication({
imgFile: name,
imgFile: url,
side: 'back'
})
that.backData = data

@ -3,7 +3,7 @@
<view class="wrap">
<view class="inner">
<view class="info">
<image class="avatar" :src="avatar" mode=""></image>
<image class="avatar" :src="info.userAvatars" mode=""></image>
<view class="text">
<view class="invite">
<text class="name">{{ my.info.userName }}</text> 邀请你加入城市合伙人计划
@ -23,14 +23,15 @@
</template>
<script>
import { generateInvitationCode, my } from '@/apis/modules/parner.js'
import { generateInvitationCode } from '@/apis/modules/parner.js'
import { viewUserDetails } from '@/apis/modules/user.js'
export default {
data() {
return {
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
my: {
info: {},
},
teamId: uni.getStorageSync('teamId'),
openId: uni.getStorageSync('openId'),
platformId: uni.getStorageSync('platformId'),
info: {},
expireTime: '',
qrcode: '',
link: '',
@ -43,36 +44,33 @@
this.getInfo()
},
methods: {
//
getInfo() {
const team = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
this.my = my
this.$nextTick(() => {
this.getQrcode()
})
}).catch(e => {})
//
async getInfo() {
const { result } = await viewUserDetails({
openId: this.openId
})
if (result.hrUserInfo) {
this.info = result.hrUserInfo
this.getQrcode()
}
},
//
getQrcode() {
const { team } = this
//
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
generateInvitationCode(this.platformId).then(({ expireTime }) => {
const date = new Date(Date.now() + expireTime * 1000) // *1000
this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}`
this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
// this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
// this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${this.teamId}&isTeam=0&teamName=${this.info.userName}`
this.link = `http://192.168.31.125:8098/#/join?accountId=${team.accountId}&id=${this.teamId}&isTeam=0&teamName=${this.info.userName}`
}).catch(e => {})
},
// imageimage
qrcodeComplete() {
this.$refs.qrcode.toTempFilePath({
success: res => {
this.qrcodeImg = res.tempFilePath
}
success: res => {
this.qrcodeImg = res.tempFilePath
}
});
},
previewImage(e){

@ -1,7 +1,7 @@
<template>
<view>
<uni-list>
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="姓名" :rightText="realName" clickable @click="toPage('../userName/userName')" />
<uni-list-item :show-extra-icon="true" :showArrow="info.authentication !== '已认证'" :extra-icon="accountIcon" title="姓名" :rightText="info.userName" clickable @click="toEditUserName" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="phoneIcon" title="手机号" :rightText="info.phone" clickable @click="toPage('../phone/phone')" />
</uni-list>
@ -10,10 +10,11 @@
</template>
<script>
import { authenticationOrNot } from '@/apis/modules/user.js'
import { viewUserDetails } from '@/apis/modules/user.js'
export default {
data() {
return {
openId: uni.getStorageSync('openId'),
phoneIcon: {
color: '#007eff',
size: '22',
@ -33,16 +34,22 @@
}
},
onShow() {
// this.getInfo()
this.getInfo()
},
methods: {
//
//
async getInfo() {
const res = await authenticationOrNot()
if (res.authenticationInformation) {
this.realName = res.authenticationInformation.realName
const { result } = await viewUserDetails({
openId: this.openId
})
if (result.hrUserInfo) {
this.info = result.hrUserInfo
}
},
//
toEditUserName() {
this.info.authentication !== '已认证' && this.toPage('/team/userName/userName')
},
toPage(path) {
this.$util.to(path)
},

@ -7,7 +7,8 @@
<template v-if="list.length">
<ul class="list">
<li v-for="item in list">
<image class="avatar" :src="item.userAvatars || require('@/static/image/avatar.png')" mode=""></image>
<image v-if="item.userAvatars" class="avatar" :src="item.userAvatars" mode=""></image>
<image v-else class="avatar" src="https://occupationlab.com/images/preschoolEdu/avatar.png" mode=""></image>
<view class="info">
<view class="c-name">{{ item.userName }}</view>
<view class="line">

@ -1,34 +1,48 @@
<template>
<view class="page">
<view class="input">
<uni-easyinput v-model.trim="account" placeholder="请输入姓名"></uni-easyinput>
<uni-easyinput v-model.trim="info.userName" placeholder="请输入姓名"></uni-easyinput>
</view>
<button type="primary" @click="submit">确认</button>
</view>
</template>
<script>
import { checkIfAnAccountExists, changeAccount } from '@/apis/modules/user.js'
import { viewUserDetails, updateAvatars } from '@/apis/modules/user.js'
export default {
data() {
return {
account: '',
repeat: false
info: {
userName: ''
},
openId: uni.getStorageSync('openId'),
}
},
onShow() {
this.getInfo()
},
methods: {
submit() {
const { account } = this
if(!account) return this.$util.errMsg('请输入姓名')
changeAccount(account).then(res => {
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
//
async getInfo() {
const { result } = await viewUserDetails({
openId: this.openId
})
if (result.hrUserInfo) {
this.info = result.hrUserInfo
}
},
async submit() {
const { userName } = this.info
if(!userName) return this.$util.errMsg('请输入姓名')
await updateAvatars({
url: '',
userName,
openId: this.openId
})
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
}
}

Loading…
Cancel
Save