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) return post('nakadai/nakadai/partnerAccount/partnerAccountList', data)
} }
export const generateInvitationCode = accountId => { export const generateInvitationCode = platformId => {
return post(`nakadai/nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`) return post(`nakadai/kindergarten/platformTeamAccount/generateInvitationCode?platformId=${platformId}`)
} }
export const treeList = (data) => { 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) => { export const creditCodeAuthentication = (data) => {
return post(`users/users/autonym/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) return get('nakadai/nakadai/city/queryCity', data)
} }
export const updateAvatars = url => { export const updateAvatars = data => {
return post(`users/users/user/updateAvatars?url=` + url) 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) => { export const userBinding = (data) => {
return post('users/users/user/userBinding', data) return post('users/users/user/userBinding', data)
} }

@ -69,7 +69,6 @@
</template> </template>
<script> <script>
import { courseDiscipline, courseProfessionalClass, courseProfessional } from '@/apis/modules/product.js'
import Popup from './components/popup.vue'; import Popup from './components/popup.vue';
export default { export default {
components:{ 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'; import {Base64} from './base64.js';
let date=new Date() let date=new Date()
date=date.setHours(date.getHours() + 1) date=date.setHours(date.getHours() + 24)
let extime=""+new Date(date).toISOString() let extime=""+new Date(date).toISOString()
console.log(33, extime)
var policyText = { var policyText = {
"expiration": extime, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了 "expiration": extime, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了
"conditions": [ "conditions": [

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

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

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

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

@ -56,7 +56,7 @@
</template> </template>
<script> <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' import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
export default { export default {
data() { data() {
@ -73,7 +73,8 @@
unionid: '', unionid: '',
code: '', code: '',
phone: '', phone: '',
submiting: false submiting: false,
teamName: ''
} }
}, },
onShow() { onShow() {
@ -203,9 +204,21 @@
platformId, platformId,
phone: this.phone phone: this.phone
}) })
this.teamName = data.teamName
uni.setStorageSync('token', data.token) uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', platformId) 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() this.toIndex()
}, },
toAgreement(id) { toAgreement(id) {

@ -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;

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

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

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

@ -1,69 +1,103 @@
<template> <template>
<view> <view class="page">
<view class="block"> <view class="block">
<view class="form-list"> <view class="form-list">
<view class="line"> <view class="line">
<view class="name">LOGO</view> <view class="name">LOGO</view>
<view class="val"> <view class="val">
<image class="avatar" src="@/static/image/info-bg.jpg"></image> <image class="avatar" :src="info.logoUrl"></image>
</view> </view>
</view> </view>
<view class="line"> <view class="line">
<view class="name">幼儿园名称</view> <view class="name">幼儿园名称</view>
<view class="val">测试测试</view> <view class="val">{{ info.classificationName }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="name">标签</view>
<view class="val">测试测试</view>
</view>
<view class="line textarea-line">
<view class="name">幼儿园slogan</view> <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>
<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="name">地址</view>
<view class="val">测试测试</view> <view class="val">{{ info.address }}</view>
</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="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>
</view> </view>
<view class="block info"> <view v-if="isTeam" class="btn-wrap">
<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 class="btn" @click="toEdit">编辑</view> <view class="btn" @click="toEdit">编辑</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { my } from '@/apis/modules/parner.js' import { queryTeamInfo } from '@/apis/modules/user.js'
import Common from '@/config/common'
export default { export default {
data() { data() {
return { return {
isTeam: uni.getStorageSync('team').isTeam == 1, //
teamId: uni.getStorageSync('teamId'),
info: {},
pictureUrl: []
} }
}, },
onShow() { onShow() {
// this.getInfo() this.getInfo()
}, },
methods: { methods: {
// //
getInfo() { getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team') queryTeamInfo({
my({ teamId: this.teamId
partnerId, // teamId: 281
teamId }).then(res => {
}).then(({ my }) => { const data = res.teamInfo
this.info = my.info if (!data.logoUrl) data.logoUrl = Common.avatar
if (data.pictureUrl) this.pictureUrl = data.pictureUrl.split(',')
this.info = data
}).catch(e => {}) }).catch(e => {})
}, },
// //
@ -75,26 +109,24 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.avatar { .avatar {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
border: 0; border: 0;
border-radius: 50%; border-radius: 50%;
} }
.info { .form-list {
position: relative; .pic {
padding: 24rpx; width: 200rpx;
.line { height: 200rpx;
margin: 20rpx 0; margin-right: 10rpx;
font-size: 26rpx;
color: #333;
} }
.qrcode { .qrcode {
position: absolute; width: 300rpx;
top: 30rpx;
right: 30rpx;
width: 120rpx;
height: 120rpx;
} }
} }
</style> </style>

@ -4,40 +4,42 @@
<view class="form-list edit-form"> <view class="form-list edit-form">
<view class="line with-arrow"> <view class="line with-arrow">
<view class="name">LOGO</view> <view class="name">LOGO</view>
<image class="avatar" :src="logo" @click="uploadLogo"></image> <image class="avatar" :src="form.logoUrl" @click="uploadLogo"></image>
</view> </view>
<view class="line with-arrow"> <view class="line with-arrow">
<view class="name">幼儿园名称</view> <view class="name">{{ platformName }}名称</view>
<input type="text" placeholder="请输入幼儿园名称" /> <input type="text" :placeholder="'请输入' + platformName + '幼儿园名称'" v-model="form.classificationName" :disabled="info.authenticationStatus !== 0" />
<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> </view>
<view class="line textarea-line"> <view class="line textarea-line">
<view class="name">幼儿园slogan</view> <view class="name">{{ platformName }}slogan</view>
<textarea placeholder="请输入幼儿园slogan"></textarea> <textarea :placeholder="'请输入' + platformName + 'slogan'" v-model="form.slogan"></textarea>
</view> </view>
<view class="line with-arrow"> <view class="line with-arrow">
<view class="name">省份</view> <view class="name">省份</view>
<view class="inline"> <view class="inline">
<text v-if="disabled" class="name">{{ provinceName }}</text> <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>
<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> </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> </view>
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view> </view>
<view class="line textarea-line"> <view class="line textarea-line">
<view class="name">地址</view> <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>
<view class="line textarea-line no-bd"> <view class="line textarea-line no-bd">
<view class="name">幼儿园简介</view> <view class="name">{{ platformName }}简介</view>
<textarea placeholder="请输入幼儿园简介"></textarea> <textarea :placeholder="'请输入' + platformName + '简介'" v-model="form.briefIntroduction"></textarea>
</view> </view>
<view class="py"> <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> </view>
</view> </view>
@ -45,17 +47,39 @@
<view class="block"> <view class="block">
<view class="form-list edit-form"> <view class="form-list edit-form">
<view class="line textarea-line"> <view class="line with-arrow no-bd">
<view class="name">地址</view> <view class="name">二维码描述一</view>
<textarea placeholder="请输入地址"></textarea> <input type="text" placeholder="输入二维码描述一" v-model="form.qrCodeOneName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view> </view>
<view class="line with-arrow"> <view class="py">
<view class="name">联系电话</view> <uni-file-picker v-model="qrCodeOne" limit="1" title="上传二维码一" :auto-upload="false" @select="e => uploadQrcode(e, 'qrCodeOne')" ></uni-file-picker>
<input type="text" placeholder="请输入联系电话" /> </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> <uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view> </view>
<view class="py"> <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> </view>
</view> </view>
@ -67,76 +91,113 @@
</template> </template>
<script> <script>
import { my } from '@/apis/modules/parner.js' import { queryProvince, queryCity, queryTeamInfo, updateTeamInfo, enterpriseCertificationStatus } from '@/apis/modules/user.js'
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } 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 {
logo: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', openId: uni.getStorageSync('openId'),
disabled: true, 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: [], provinces: [],
cities: [], cities: [],
provinceId: '', desPics: [],
cityId: '',
provinceName: '',
cityName: '',
desPics: []
} }
}, },
computed: {
//
platformName() {
return this.info.platformSource === '6' ? '供应商' : this.info.platformSource === '5' ? '幼儿园' : ''
},
},
onShow() { onShow() {
// this.getInfo() this.getEnterInfo()
this.getProvince() this.getProvince()
}, },
methods: { methods: {
//
async getEnterInfo() {
const { data } = await enterpriseCertificationStatus(this.openId)
if (data) {
this.info = data
}
},
// //
getInfo() { getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team') queryTeamInfo({
my({ teamId: this.form.id
partnerId, }).then(res => {
teamId const data = res.teamInfo
}).then(({ my }) => { if (!data.logoUrl) data.logoUrl = Common.avatar
this.info = my.info
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 => {}) }).catch(e => {})
}, },
// //
getProvince() { async getProvince() {
queryProvince().then(({ list }) => { const { list } = await queryProvince()
if (this.disabled) { this.provinces = list
const { provinceId } = this this.getInfo()
if (provinceId) this.provinceName = list.find(e => e.provinceId == provinceId).provinceName
} else {
this.provinces = list
}
}).catch(res => {})
}, },
// //
getCity(val) { async getCity() {
if (this.provinceId) { const { list } = await queryCity({
queryCity({ provinceId: this.provinces.find(e => e.provinceName == this.form.province).provinceId
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,
})
}) })
this.cities = list
this.cityId = ''
}, },
// logo // logo
uploadLogo() { uploadLogo() {
@ -145,19 +206,45 @@
success: (res) => { success: (res) => {
const file = res.tempFilePaths[0]; const file = res.tempFilePaths[0];
OSS(file, ({ url }) => { OSS(file, ({ url }) => {
that.logo = url that.form.logoUrl = url
}) })
} }
}); });
}, },
onEditorReady() { //
uni.createSelectorQuery().select('#editor').context((res) => { uploadDes(e){
this.editorCtx = res.context OSS(e.tempFilePaths[0], (res) => {
}).exec() 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: 0;
border-radius: 50%; border-radius: 50%;
} }
.info { /deep/.picker-input {
position: relative; .arrow-area {
padding: 24rpx; display: none;
.line {
margin: 20rpx 0;
font-size: 26rpx;
color: #333;
}
.qrcode {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 120rpx;
height: 120rpx;
} }
} }
</style> </style>

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

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

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

@ -7,7 +7,8 @@
<template v-if="list.length"> <template v-if="list.length">
<ul class="list"> <ul class="list">
<li v-for="item in 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="info">
<view class="c-name">{{ item.userName }}</view> <view class="c-name">{{ item.userName }}</view>
<view class="line"> <view class="line">

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