我的资料等

master
yujialong 3 days ago
parent 1695a4c4d4
commit 6618757af3
  1. 24
      apis/modules/user.js
  2. 26
      components/notAuth/notAuth.vue
  3. 60
      components/realName/realName.vue
  4. 8
      libs/Oss/upload.js
  5. 17
      pages.json
  6. 41
      pages/achievement/achievement.vue
  7. 38
      pages/index/index.vue
  8. 360
      pages/orders/orders.vue
  9. 116
      pages/person/person.vue
  10. 144
      styles/common.scss
  11. 354
      user/article/article.vue
  12. 733
      user/info/info.vue

@ -18,6 +18,10 @@ export const checkUserNameOrWorkNumber = (data) => {
return post('users/users/batchProcessing/checkUserNameOrWorkNumber', data)
}
export const updateUserNameOrWorkNumber = (data) => {
return post(`users/users/batchProcessing/updateUserNameOrWorkNumber?userName=${data.userName}&workNumber=${data.workNumber}`)
}
export const captcha = Config.baseURL + `users/users/user/captcha`
export const queryProvince = () => {
@ -28,6 +32,22 @@ export const queryCity = (data) => {
return get('nakadai/nakadai/city/queryCity', data)
}
export const querySchool = () => {
return get('nakadai/nakadai/school/querySchool')
}
export const courseDiscipline = () => {
return get('nakadai/nakadai/subject/courseDiscipline')
}
export const courseProfessionalClass = data => {
return get('nakadai/nakadai/subject/courseProfessionalClass', data)
}
export const courseProfessional = data => {
return get('nakadai/nakadai/subject/courseProfessional', data)
}
export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url)
}
@ -55,6 +75,10 @@ export const queryUserInfoDetails = () => {
return get('users/users/userAccount/queryUserInfoDetails')
}
export const deleteProfile = id => {
return post(`users/users/userInfo/deleteProfile?personalFileIds=` + id)
}
export const searchAllAccountsByPhone = data => {
return get('users/users/user/searchAllAccountsByPhone', data)
}

@ -1,26 +0,0 @@
<template>
<view class="per-mask">
<view class="mask"></view>
<view class="texts">
<view class="text">权限审核中可联系下方平台运营加快审核进度</view>
<image class="qrcode" :src="src" mode="widthFix"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
src: uni.getSystemInfoSync().uniPlatform === 'mp-toutiao' ? 'https://occupationlab.com/images/dyQrcode.jpg' : 'https://occupationlab.com/images/customer.png'
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,60 @@
<template>
<uni-popup ref="alertDialog">
<view class="realname-wrap">
<uni-forms>
<uni-forms-item label="真实姓名" required>
<uni-easyinput type="text" v-model.trim="realNameForm.userName" placeholder="请输入真实姓名" />
</uni-forms-item>
<uni-forms-item label="学号">
<uni-easyinput type="text" v-model.trim="realNameForm.workNumber" placeholder="请输入学号" />
</uni-forms-item>
</uni-forms>
<button class="btn" type="primary" @click="realNameSubmit">确认</button>
</view>
</uni-popup>
</template>
<script>
import { checkUserNameOrWorkNumber, updateUserNameOrWorkNumber } from '@/apis/modules/user.js'
export default {
data() {
return {
src: uni.getSystemInfoSync().uniPlatform === 'mp-toutiao' ? 'https://occupationlab.com/images/dyQrcode.jpg' : 'https://occupationlab.com/images/customer.png'
}
},
onShow() {
console.log(3333)
this.handleRealName()
},
methods: {
//
async handleRealName () {
const res = await checkUserNameOrWorkNumber()
//
if (!res.hasName) this.$refs.alertDialog.open()
},
//
async realNameSubmit() {
const form = this.realNameForm
if (!form.userName) return this.$util.errMsg('请输入真实姓名!')
await updateUserNameOrWorkNumber({
userName: form.userName,
workNumber: form.workNumber
})
},
}
}
</script>
<style scoped lang="scss">
.realname-wrap {
width: 460rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.btn {
line-height: 2.2;
}
}
</style>

@ -15,8 +15,8 @@ var policyText = {
]
};
var config={
accessid:'LTAI4FzqQHnk4rozqLZ8jCNj',
accesskey:'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq',
accessid:'LTAI5tAyVqtz2ZTQwVBmGgfW',
accesskey:'S744EFNUPpcCcXM6ivGRz5qquKYHrF',
osshost:'https://huoran.oss-cn-shenzhen.aliyuncs.com',
policyBase64:Base64.encode(JSON.stringify(policyText))
}
@ -45,8 +45,8 @@ export default function(tempFilePaths, callback) {
const ext = Util.getFileExt(tempFilePaths)
const fileName = Date.now() + '.' + ext
uni.uploadFile({
   url: OSS.host,
   filePath: tempFilePaths,
   url: OSS.host,
   filePath: tempFilePaths,
fileType: '',
name: 'file',
formData: {

@ -82,6 +82,15 @@
"enablePullDownRefresh": false
}
},
{
"path" : "info/info",
"style" :
{
"navigationBarTitleText": "我的资料",
"enablePullDownRefresh": false
}
},
{
"path" : "setting/setting",
"style" :
@ -148,14 +157,6 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "scheme/scheme",
"style" :
{
"navigationBarTitleText": "方案详情",
"enablePullDownRefresh": false
}
}
]
}
],

@ -2,7 +2,7 @@
<view class="page">
<view class="wrap">
<view class="p-title">
<image class="icon" src="https://izhixinyun.com/images/record5.png" mode="widthFix"></image> 成绩概览
<image class="icon" src="https://eduvessel.com/images/occupationlab/record5.png" mode="widthFix"></image> 成绩概览
</view>
<view class="stat">
<view class="item">
@ -30,7 +30,7 @@
<view class="wrap">
<view class="p-title">
<image class="icon" src="https://izhixinyun.com/images/record6.png" mode="widthFix"></image> 成绩记录明细
<image class="icon" src="https://eduvessel.com/images/occupationlab/record6.png" mode="widthFix"></image> 成绩记录明细
</view>
<view class="tab-wrap">
@ -62,6 +62,8 @@
</view>
</view>
</view>
<realName />
</view>
</template>
@ -155,10 +157,10 @@
this.curTab = id
this.initList()
},
//
toPanel(i) {
this.$util.errMsg('功能暂未开放!')
}
//
toPrac(row) {
this.$util.to(`../practiceDetail/practiceDetail?cid=${this.cid}&projectId=${row.projectId || ''}&paperId=${row.paperId || ''}`)
},
}
}
</script>
@ -170,17 +172,6 @@
margin-bottom: 30rpx;
background-color: #fff;
}
.p-title {
display: flex;
align-items: center;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
.icon {
width: 44rpx;
margin-right: 8rpx;
}
}
.tab-wrap {
display: flex;
justify-content: space-between;
@ -224,24 +215,24 @@
gap: 32rpx;
.item:nth-child(1) {
background: url(https://izhixinyun.com/images/record1.png) (88% 25px) / auto no-repeat,
url(https://izhixinyun.com/images/record1.png) 0 0/100% 100% no-repeat;
background: url(https://eduvessel.com/images/occupationlab/record1.png) (88% 25px) / auto no-repeat,
url(https://eduvessel.com/images/occupationlab/record1.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(2) {
background: url(https://izhixinyun.com/images/record2-1.png) (88% 15px) / auto no-repeat,
url(https://izhixinyun.com/images/record2.png) 0 0/100% 100% no-repeat;
background: url(https://eduvessel.com/images/occupationlab/record2-1.png) (88% 15px) / auto no-repeat,
url(https://eduvessel.com/images/occupationlab/record2.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(3) {
background: url(https://izhixinyun.com/images/record3-1.png) (88% 20px) / auto no-repeat,
url(https://izhixinyun.com/images/record3.png) 0 0/100% 100% no-repeat;
background: url(https://eduvessel.com/images/occupationlab/record3-1.png) (88% 20px) / auto no-repeat,
url(https://eduvessel.com/images/occupationlab/record3.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(4) {
margin-right: 0;
background: url(https://izhixinyun.com/images/record4-1.png) (88% 18px) / auto no-repeat,
url(https://izhixinyun.com/images/record4.png) 0 0/100% 100% no-repeat;
background: url(https://eduvessel.com/images/occupationlab/record4-1.png) (88% 18px) / auto no-repeat,
url(https://eduvessel.com/images/occupationlab/record4.png) 0 0/100% 100% no-repeat;
}
.item {

@ -18,24 +18,15 @@
</li>
</ul>
<uni-popup ref="alertDialog">
<uni-forms>
<uni-forms-item label="真实姓名">
<uni-easyinput type="text" v-model.trim="form.account" placeholder="请输入真实姓名" />
</uni-forms-item>
<uni-forms-item label="学号">
<uni-easyinput type="text" v-model.trim="form.account" placeholder="请输入学号" />
</uni-forms-item>
</uni-forms>
<button class="btn" type="primary" @click="realNameSubmit">确认</button>
</uni-popup>
<RealName />
</view>
</template>
<script>
import { schoolCourse, recentUse, getSchoolCourseAuthority } from '@/apis/modules/course.js'
import { checkUserNameOrWorkNumber } from '@/apis/modules/user.js'
import RealName from '@/components/realName/realName.vue'
export default {
components: { RealName },
data() {
return {
curTab: 0,
@ -52,6 +43,7 @@
total: 0,
realNameForm: {
userName: '',
workNumber: '',
},
}
},
@ -72,7 +64,6 @@
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6Ik5vcTB1UlNEZ0V0UExOUzBSUWtSZHlVVGsxOFYycnpNIiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.-YiaJdr5H2j6TGezs1eDS1EX5bNYCWGGghRw6eD3jk4')
this.handleRealName()
this.getTab()
},
methods: {
@ -115,32 +106,11 @@
]
this.getList()
},
//
async handleRealName () {
const res = await checkUserNameOrWorkNumber()
//
if (!res.hasName) this.$refs.alertDialog.open()
},
// tab
tabChange(id) {
this.curTab = id
this.initList()
},
//
async realNameSubmit() {
const form = this.realNameForm
if (!form.userName) return this.$util.errMsg('请输入真实姓名!')
const { token, teamId } = await weChatToken({
...form,
openid: this.openid,
phone: this.phone
})
uni.removeStorageSync('realNameTiped')
uni.setStorageSync('token', data.token)
uni.reLaunch({
url: '../index/index'
})
},
//
toDetail(item) {
this.$util.to(`/course/courseDetail/courseDetail?cid=${item.cid}&mallId=${item.mallId}`)

@ -1,360 +0,0 @@
<template>
<view>
<view :class="[{'not-auth': !per}]">
<view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入学校名称,商务经理,订单号" v-model="keyword" clearButton="auto" cancelButton="none" />
<view :class="['sort', sort]" @click="switchSort"></view>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<template v-if="list.length">
<view class="list">
<uni-swipe-action>
<uni-swipe-action-item
v-for="item in list"
:threshold="0"
:right-options="delOption"
@click="del(item)"
>
<view class="item" @click="toDetail(item)">
<view class="c-name">{{ item.orderNumber }}</view>
<view class="info">
<view class="left">
<view v-if="curTab" class="line">
<text class="name">商务经理</text>
<text class="val">{{ item.businessManagerName }}</text>
</view>
<view class="line">
<text class="name">客户名称</text>
<text class="val">{{ item.customerName }}</text>
</view>
<view class="line">
<text class="name">订单金额</text>
<text class="val">{{ item.orderAmount }}</text>
</view>
<view class="line">
<text class="name">订单内容</text>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}">{{ item.orderContent }}</view>
<view v-if="item.orderContent && item.orderContent.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
</view>
</view>
<view class="line">
<text class="name">下单日期</text>
<text class="val">{{ item.createTime }}</text>
</view>
</view>
<view :class="['type', 'type' + item.orderStatus]">
{{ filterData[0].data.find(e => e.value === item.orderStatus).title }}
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('/order/orderDetail/orderDetail')"></uni-icons>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
</view>
<notAuth v-if="!per"></notAuth>
</view>
</template>
<script>
import { queryCustomer } from '@/apis/modules/client.js'
import { list, del } from '@/apis/modules/order.js'
export default {
data() {
return {
per: true, //
popup: false,
//
filterData: [
{
children: false,//
title: "订单状态",
key: "orderStatus", //
keyValue: "value", //
isRadio: true, //
data: [
{
title: "待发货",
value: 0
},
{
title: "已完成",
value: 1
},
{
title: "已取消",
value: 2
},
],
}
],
filterForm: {},
curTab: 0,
tabs: [
{
name: '我的订单',
id: 0
},
{
name: '团队全部订单',
id: 1
}
],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
orderStatus: '',
sort: 'desc',
keyword: '',
list: [],
page: 1,
pageSize: 10,
delOption: [{
text: '删除',
style: {
backgroundColor: '#F56C6C'
}
}],
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.per = true
//
try {
uni.removeStorageSync('orderForm')
uni.removeStorageSync('courses')
} catch (e) {}
this.initRole()
this.$uma.trackEvent('order') //
},
methods: {
//
initRole() {
const auth = uni.getStorageSync('auth')
if (!auth.includes('订单')) {
this.per = false
this.list = [
{
businessManagerName: '智信云',
customerName: '智信云师资培训班',
orderContent: 'python实训系统',
createTime: '2023-08-08'
},
{
businessManagerName: '智信云智信云智信云',
customerName: '智信云师资培训班',
orderContent: 'python实训系统',
createTime: '2023-08-08'
},
{
businessManagerName: '智信云智信云',
customerName: '智信云师资培训班',
orderContent: 'python系统',
createTime: '2023-08-08'
},
{
businessManagerName: '智信云',
customerName: '智信云师资培训班智信云师资培训班',
orderContent: 'python实训系统,实训系统',
createTime: '2023-08-08'
},
{
businessManagerName: '智信云',
customerName: '智信云师资培训班',
orderContent: 'python实训系统',
createTime: '2023-08-08'
}
]
}
this.tabs = []
auth.includes('订单:我的订单') && this.tabs.push({
name: '我的订单',
id: 0
})
auth.includes('订单:团队全部订单') && this.tabs.push({
name: '团队全部订单',
id: 1
})
const len = this.tabs.length
// tab
if (len === 1) {
this.curTab = this.tabs[0].id
this.tabs = []
}
this.per && this.initList()
},
getList() {
const data = {
businessManagerId: this.$util.getBmId(),
teamId: uni.getStorageSync('team').id,
keywords: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
sort: this.sort,
orderStatus: this.orderStatus,
type: this.curTab
}
uni.showLoading({
title: '加载中'
})
list(data).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
list.map(e => {
if (e.orderContent) e.toggle = e.orderContent.length < 14 // 14
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
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 => {
uni.hideLoading()
})
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
toggle(item) {
item.toggle = !item.toggle
},
//
subFinsh(val) {
const { orderStatus } = val
this.orderStatus = orderStatus.length ? orderStatus[0] : ''
this.initList()
},
//
switchSort() {
this.sort = this.sort === 'desc' ? 'asc' : 'desc'
this.initList()
},
// tab
tabChange(tab) {
this.curTab = tab.id
this.initList()
},
//
toDetail(item) {
this.$util.to(`/order/orderDetail/orderDetail?orderId=${item.orderId}&show=1`)
},
//
del(e) {
const that = this
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
del({
ids: [e.orderId]
}).then(res => {
that.$util.sucMsg('删除成功')
that.initList()
}).catch(res => {})
}
}
})
},
}
}
</script>
<style scoped lang="scss">
.list {
margin-top: 20rpx;
background-color: #fff;
.item {
width: 100%;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
box-sizing: border-box;
}
.c-name {
font-size: 30rpx;
color: #333;
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
}
.left {
max-width: 70%;
}
.line {
display: flex;
padding: 10rpx 0;
}
.name {
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
}
.val {
max-width: 88%;
font-size: 28rpx;
color: #333;
}
.ell {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-top: 10rpx;
white-space: nowrap;
font-size: 24rpx;
color: #0e92ef;
}
.type {
margin-left: 20rpx;
font-size: 28rpx;
color: #ff7b2d;
white-space: nowrap;
}
.type1 {
color: #bdbdbd;
}
}
</style>

@ -4,9 +4,7 @@
<image class="bg" src="@/static/image/person-bg.png"></image>
<view class="wrap">
<view class="info">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="info.avatar" mode=""></image>
</button>
<image class="avatar" :src="info.avatar" mode=""></image>
<view class="text">
<view class="name">{{ info.userName }}</view>
<view class="dep-wrap">
@ -16,7 +14,7 @@
</view>
</view>
<view class="list">
<view class="item" @click="$util.to('/team/teams/teams')">
<view class="item" @click="$util.to('/user/info/info')">
<view class="left">
<image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">我的资料</text>
@ -38,6 +36,25 @@
</view>
</view>
</view>
<uni-popup ref="logout">
<view class="logout-wrap">
<view class="tips">退出当前账号</view>
<view class="user">
<image class="avatar" :src="info.avatar" mode=""></image>
<view class="text">
<view class="name">{{ info.userName }}</view>
<view class="dep">{{ info.schoolName }}</view>
</view>
</view>
<view class="btns">
<view class="btn" @click="$refs.logout.close()">取消</view>
<view class="btn" @click="logoutSubmit">确认</view>
</view>
</view>
</uni-popup>
<realName />
</view>
</template>
@ -70,38 +87,27 @@
schoolName: r.schoolName || ''
}
},
//
onChooseAvatar(e) {
OSS(e.detail.avatarUrl, ({ url }) => {
updateAvatars(url).then(res => {
this.getInfo()
}).catch(e => {})
})
},
//
createTeam() {
this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}&my=1`)
},
//
toSet() {
this.$util.to(`/team/setting/setting`)
},
// 退
logout() {
this.$refs.logout.open()
return
const that = this
uni.showModal({
title: '提示',
content: '确定要退出账号吗?',
success(res) {
if (res.confirm) {
uni.clearStorageSync()
uni.reLaunch({
url: '/pages/login/login'
})
that.logoutSubmit()
}
}
})
},
logoutSubmit() {
uni.clearStorageSync()
uni.reLaunch({
url: '/pages/login/login'
})
},
}
}
</script>
@ -129,19 +135,12 @@
padding: 26rpx 34rpx;
background-color: #fff;
border-radius: 16rpx;
.avatar-btn {
padding: 0;
margin: 0 28rpx 0 0;
line-height: 0;
border: 0 !important;
background-color: transparent;
outline: none;
border-radius: 50%;
}
.avatar {
width: 120rpx;
height: 120rpx;
margin-right: 30rpx;
border: 0;
border-radius: 50%;
}
.text {
margin-right: 20rpx;
@ -195,13 +194,48 @@
color: #333;
}
}
.location {
margin-top: 30rpx;
}
.picker-wrap {
margin-top: 4px;
}
.name {
font-size: 24rpx;
.logout-wrap {
width: 520rpx;
padding-top: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.user {
display: flex;
justify-content: center;
align-items: center;
padding: 30rpx 20rpx;
.avatar {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
}
.name {
font-size: 24rpx;
}
.dep {
max-width: 500rpx;
font-size: 24rpx;
}
}
.tips {
font-size: 32rpx;
text-align: center;
}
.btns {
display: flex;
text-align: center;
border-top: 1px solid #eee;
.btn {
flex: 1;
padding: 16rpx;
font-size: 24rpx;
color: #007EFF;
&:first-child {
border-right: 1px solid #eee;
}
}
}
}
</style>

@ -15,9 +15,8 @@ ul {
}
}
.block {
padding: 0 24rpx;
margin: 20rpx 24rpx;
border-radius: 16rpx;
padding: 24rpx 24rpx 0;
margin-bottom: 20rpx;
background-color: #fff;
}
.ell {
@ -40,6 +39,17 @@ ul {
background-color: #4876F9;
}
}
.p-title {
display: flex;
align-items: center;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333;
.icon {
width: 44rpx;
margin-right: 8rpx;
}
}
@mixin sort {
margin: 0 20rpx 0 10rpx;
&:before {
@ -78,10 +88,9 @@ ul {
}
}
.form-list {
border-top: 1px solid #E6E8ED;
.line {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 28rpx 0;
border-bottom: 1px solid #E6E8ED;
@ -93,14 +102,17 @@ ul {
font-size: 28rpx;
color: #999;
}
.name, .val, input {
.name {
width: 200rpx;
font-size: 26rpx;
color: #616161;
}
.val, input {
font-size: 28rpx;
color: #333;
}
input {
flex: 1;
margin-left: 20rpx;
text-align: right;
}
.req {
.name:after {
@ -123,9 +135,30 @@ ul {
margin-right: 10rpx;
}
}
.arrow {
position: absolute;
top: 24rpx;
right: 20rpx;
}
.action {
position: absolute;
top: 24rpx;
right: 20rpx;
font-size: 26rpx;
color: #3394f7;
}
}
.picker-input .input-value-border {
line-height: 1;
.picker-input {
.input-value-border {
padding-left: 0;
line-height: 1;
border: 0;
}
.selected-list {
padding-left: 0;
}
}
.picker-date .uni-date-x--border {
border: 0;
}
.tab {
@ -148,11 +181,6 @@ ul {
@include sort;
}
}
.plus {
position: fixed;
bottom: 40rpx;
right: 40rpx;
}
.popup-mask {
z-index: 9;
@ -194,49 +222,6 @@ ul {
}
}
}
.type-popup {
z-index: 10;
position: fixed;
top: 100%;
left: 0;
width: 100%;
height: 100%;
padding: 10rpx;
background-color: #fff;
transition: .3s;
overflow: auto;
&.active {
top: 0;
}
.close {
position: absolute;
top: 50rpx;
right: 50rpx;
}
.title {
margin: 150rpx 20rpx 30rpx;
font-size: 30rpx;
color: #333;
}
.types {
display: flex;
flex-wrap: wrap;
}
.item {
width: calc((100% - 80rpx) / 3);
margin: 10rpx;
font-size: 28rpx;
line-height: 3;
text-align: center;
color: #1f1f1f;
background-color: #dbebff;
border-radius: 2px;
&.active {
color: #fff;
background-color: #007EFF;
}
}
}
.btn-wrap {
z-index: 10;
position: fixed;
@ -260,46 +245,3 @@ ul {
background-color: #007EFF;
}
}
.per-mask {
z-index: 1000;
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
-webkit-user-drag: none;
-webkit-user-select: none;
user-select: none;
.mask {
position: relative;
width: 100%;
height: 100%;
filter: blur(10px);
}
.texts {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
text-align: center;
}
.text {
margin-bottom: 40rpx;
font-size: 28rpx;
color: #333;
}
.qrcode {
width: 78%;
}
}
.not-auth {
height: 100vh;
padding-bottom: 0 !important;
overflow: hidden;
filter: blur(10px);
}

@ -1,212 +1,222 @@
<template>
<view>
<image class="banner" :src="form.bannerImg" mode="widthFix"></image>
<view class="wrap">
<view class="title">{{ form.title }}</view>
<view class="metas">
<template v-if="isInfo">
<view class="meta">{{ form.source }}</view>
<view class="meta">{{ form.releaseTime }}</view>
</template>
<view v-else class="meta">
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons>
{{ form.totalBrowsing }}人学过
</view>
<!-- <view class="meta" @click.stop="collect">
<uni-icons class="icon" :type="form.collectionStatus ? 'star-filled' : 'star'" size="22" color="#007eff"></uni-icons>
</view> -->
<view v-if="form.labelNameList" class="labels">
<view v-for="(label, j) in form.labelNameList" :key="j" class="label">{{ label }}</view>
</view>
</view>
<view class="page">
<view class="block">
<view class="title">上传营业执照</view>
<image class="credential" :src="businessLicensePicture || 'http://124.71.79.122/images/miniProgram/credentials1.png'" mode="widthFix" @click="uploadBusinessLicense"></image>
</view>
<view class="text">
<mp-html :content="form.mainBody"/>
</view>
<view v-if="isPreschool" class="block">
<view class="title">上传办学许可证</view>
<image class="credential" :src="licenseForRunningSchool || 'http://124.71.79.122/images/miniProgram/credentials2.png'" mode="widthFix" @click="uploadSchoolLicense"></image>
</view>
<view v-if="form.fileList" class="files">
<view v-for="(file, i) in form.fileList" :key="i" class="item" @click="download(file)">
<view class="file">{{ file.fileName }}</view>
<view class="download">下载</view>
<view class="block">
<view class="form-list">
<view class="line with-arrow">
<view class="name">{{ isPreschool ? '幼儿园' : '企业' }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.companyName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">统一社会信用代码</view>
<input type="text" placeholder="请输入证件号码" v-model="form.creditCode" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">法人</view>
<input type="text" placeholder="请输入法人" v-model="form.legalPerson" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" @click="submit">认证信息</view>
</view>
</view>
</template>
<script>
import { findById, collectCourse } from '@/apis/modules/article.js'
import OSS from '@/libs/Oss/upload'
export default {
data() {
return {
id: '',
isInfo: 0, //
openId: uni.getStorageSync('openId'),
form: {
totalBrowsing: ''
}
companyName: '',
creditCode: '',
legalPerson: '',
},
platformId: '',
businessLicensePicture: '',
licenseForRunningSchool: '',
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.isInfo = options.info
options.info && uni.setNavigationBarTitle({
title: '资讯'
})
this.getInfo()
// this.getEnterInfo()
},
methods: {
//
getInfo() {
uni.showLoading({
title: '加载中'
})
findById(this.id).then(({ message }) => {
const str = message.mainBody
const newStyle = 'width: 85% !important; height: auto;';
const regex = /(<img[^>]*?\s+style=")([^"]*)("[^>]*?>)/g;
const newStr = str.replace(regex, `$1${newStyle}$3`);
const videoStr = this.replaceAllVideoTagStyles(str, "width: 95%; height: 450rpx;display: block;margin:0 auto")
const imgStr = this.addImgStyle(videoStr)
message.mainBody = imgStr
this.form = message
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
getAllVideoTagIndices(str) {
const regex = /<video.*?>.*?<\/video>/gs;
const indices = [];
let match;
while ((match = regex.exec(str)) !== null) {
indices.push(match.index);
}
return indices;
//
async getEnterInfo() {
const res = await enterpriseCertificationStatus(this.openId)
if (res.data) {
const { data } = res
this.businessLicensePicture = data.businessLicensePicture || ''
this.licenseForRunningSchool = data.licenseForRunningSchool || ''
this.form.companyName = data.companyName || ''
this.form.creditCode = data.creditCode || ''
this.form.legalPerson = data.legalPerson || ''
this.form.address = data.address || ''
this.form.business = data.business || ''
this.form.capital = data.capital || ''
this.form.establishDate = data.establishDate || ''
this.form.type = data.type || ''
this.form.validPeriod = data.validPeriod || ''
this.form.platformSource = this.platformId
}
},
// videostyle
replaceVideoTagStyle(str, index, newStyle) {
const startIndex = str.indexOf("<video", index);
const endIndex = str.indexOf("</video>", startIndex) + 7;
const videoTag = str.substring(startIndex, endIndex);
const newVideoTag = videoTag.replace(/style="(.*?)"/, `style="${newStyle}"`);
return str.substring(0, startIndex) + newVideoTag + str.substring(endIndex);
//
uploadBusinessLicense() {
const that = this
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async ({ url }) => {
that.businessLicensePicture = url
const { data } = await businessLicensePictureVerification(url)
if (data) {
that.form = {
companyName: data.name,
creditCode: data.reg_num,
legalPerson: data.person,
address: data.address,
business: data.business,
capital: data.capital,
establishDate: data.establish_date,
type: data.type,
validPeriod: data.valid_period,
platformSource: this.platformId,
}
}
})
}
});
},
// videostyle
replaceAllVideoTagStyles(str, newStyle) {
const indices = this.getAllVideoTagIndices(str);
let newStr = str;
for (let i = indices.length - 1; i >= 0; i--) {
newStr = this.replaceVideoTagStyle(newStr, indices[i], newStyle);
}
return newStr;
//
uploadSchoolLicense() {
const that = this
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async ({ url }) => {
that.licenseForRunningSchool = url
})
}
});
},
addImgStyle(str) {
      return str.replace(/<(img).*?(\/>|<\/img>)/g, function (a) {
        if (a.indexOf('style') < 0) {
          // style
          return a.replace(/<\s*img/, '<img style="width:100%"');
        } else {
          // style
          return a.replace(/style=("|')/, 'style=$1width: 85% !important; height: auto;')
        }
      });
    },
//
download(item) {
uni.setStorageSync('files', {
copyWriting: this.form.title,
fileName: [item.fileName],
urls: [item.filePath]
//
publicNotice() {
const that = this
uni.requestSubscribeMessage({
tmplIds: ['ZB6wTenlv13mivxXwi-DWwjgVoNJ6eUr1vBvNdQGbJw'],
success: (res) => {
uni.setStorageSync('platformId', that.platformId)
const name = that.platformId == 6 ? '供应商' : '幼儿园'
that.$util.errMsg(`您已成功提交${name}认证,现在为您切换到${name}端。`)
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
})
}, 2000)
},
fail: function(err) {
uni.showToast({
title: err,
duration: 2000,
icon: 'error'
});
}
})
this.$util.to(`/team/send/send`)
},
//
collect() {
const state = this.form.collectionStatus ? 0 : 1
collectCourse(this.form.id, state).then(({ data }) => {
this.form.collectionStatus = state
}).catch(e => {})
//
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('请输入法人!')
this.submiting = true
uni.showLoading({
title: '提交中'
})
const data = {
...form,
auditStatus: 1,
authenticationStatus: 1,
businessLicensePicture: this.businessLicensePicture,
licenseForRunningSchool: this.licenseForRunningSchool,
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
})
}
uni.hideLoading()
this.publicNotice()
} catch(e) {
setTimeout(() => {
uni.hideLoading()
}, 1500)
this.submiting = false
}
},
}
}
</script>
<style scoped lang="scss">
.wrap {
padding: 30rpx;
background-color: #fff;
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.banner {
width: 100%;
.avatar {
width: 80rpx;
height: 80rpx;
border: 0;
border-radius: 50%;
}
.title {
font-size: 34rpx;
font-weight: 600;
color: #333;
.block {
padding: 24rpx;
}
.metas {
display: flex;
justify-content: space-between;
margin: 20rpx 0;
.labels {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
margin: 15rpx;
}
.label {
padding: 2px 6px;
margin: 0 20rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
border-radius: 4px;
}
.meta {
display: inline-flex;
align-items: center;
white-space: nowrap;
font-size: 24rpx;
color: #ccc;
}
.icon {
margin-right: 8rpx;
}
}
.text {
.title {
margin-bottom: 20rpx;
font-size: 28rpx;
line-height: 1.6;
text-align: justify;
p{
width: 100%;
}
img,image{
width: 100% !important;
}
/deep/ image,img {
margin: 0 auto;
}
}
.files {
margin-top: 20rpx;
.item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.file {
margin-right: 20rpx;
font-size: 26rpx;
color: #5a5a5a;
}
.download {
font-size: 26rpx;
color: #007EFF;
.credential {
width: 100%;
}
.form-list {
.name {
min-width: 250rpx;
}
}
</style>

@ -1,285 +1,546 @@
<template>
<view>
<view class="search-wrap">
<image class="bg" src="@/static/image/info.png"></image>
<view class="info">
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" bgColor="#fff" />
<view class="page">
<view class="block">
<view class="p-title">
<image class="icon" src="https://eduvessel.com/images/occupationlab/user.svg" mode="widthFix"></image> 账号信息
</view>
<view class="form-list">
<view class="line">
<view class="name">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="hrUserInfo.avatar" mode=""></image>
</button>
</view>
<view class="val">修改头像</view>
<uni-icons class="arrow" type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line">
<view class="name">学号</view>
<view class="val">{{ userAccount.workNumber }}</view>
</view>
<view class="line">
<view class="name">手机号</view>
<view class="val">{{ userAccount.phone }}</view>
<view class="action" @click="$util.to('/user/phone/phone')">更换</view>
</view>
<view class="line">
<view class="name">邮箱</view>
<view class="val">{{ hrUserInfo.email }}</view>
<view class="action" @click="$util.to('/user/email/email')">{{ hrUserInfo.email ? '更换' : '添加'}}</view>
</view>
<view class="line">
<view class="name">密码</view>
<view class="val">xxxxxx</view>
<view class="action" @click="$util.to('/user/password/password')">更换</view>
</view>
</view>
</view>
<view class="type">
<view v-for="(item, i) in classifications.slice(0, 4)" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item, 1)">{{ item.classificationName }}</view>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = true"></uni-icons>
<view class="block">
<view class="p-title">
<image class="icon" src="https://eduvessel.com/images/occupationlab/basic.svg" mode="widthFix"></image> 基本信息
</view>
<view class="form-list">
<view class="line">
<view class="name">姓名</view>
<input type="text" placeholder="请输入姓名" v-model="hrUserInfo.userName" />
</view>
<view class="line">
<view class="name">性别</view>
<uni-data-picker class="picker-input" placeholder="请选择性别" popup-title="请选择性别" preload :clear-icon="false" :localdata="sex" v-model="hrUserInfo.sex"></uni-data-picker>
</view>
<view class="line">
<view class="name">出生日期</view>
<uni-datetime-picker class="picker-date" type="date" placeholder="请选择出生日期" :clear-icon="false" v-model="hrUserInfo.dateBirth" />
<!-- <uni-icons class="arrow" type="right" size="18" color="#ababab"></uni-icons> -->
</view>
<view class="line">
<view class="name">身份证号</view>
<input type="text" placeholder="请输入身份证号" v-model="hrUserInfo.idNumber" />
<uni-icons class="arrow" type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line">
<view class="name">所在国家</view>
<view class="val">中国</view>
</view>
<view class="line">
<view class="name">所在省份</view>
<uni-data-picker class="picker-input" placeholder="请选择省份" popup-title="请选择省份" preload :clear-icon="false" :localdata="provinces" v-model="hrUserInfo.provinceId" @change="getCity"></uni-data-picker>
</view>
<view class="line">
<view class="name">所在城市</view>
<uni-data-picker class="picker-input" placeholder="请选择城市" popup-title="请选择城市" preload :clear-icon="false" :localdata="cities" v-model="hrUserInfo.cityId"></uni-data-picker>
</view>
<view class="line">
<view class="name">受教育程度</view>
<uni-data-picker class="picker-input" placeholder="请选择受教育程度" popup-title="请选择受教育程度" preload :clear-icon="false" :localdata="educationDegreeList" v-model="hrUserInfo.educationDegree"></uni-data-picker>
</view>
<view class="line">
<view class="name">当前所在学校</view>
<view class="val">{{ hrUserInfo.schoolName }}</view>
</view>
</view>
</view>
<template v-if="list.length">
<view class="list">
<view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)">
<view class="title ell">{{ item.title }}</view>
<view class="texts">
<view class="left">
<view class="des">{{ item.mainBody }}</view>
<view class="metas">
<text class="date">{{ item.releaseTime }}</text>
<view v-if="item.labelName" class="labels">
<view v-for="(label, j) in item.labelName" :key="j" class="label">{{ label }}</view>
</view>
</view>
</view>
<image class="pic" :src="item.bannerImg"></image>
</view>
<view class="block">
<view class="arch-title">
<view class="p-title">
<image class="icon" src="https://eduvessel.com/images/occupationlab/files.svg" mode="widthFix"></image> &nbsp;个人档案
</view>
<uni-icons class="plus" type="plus" size="20" color="#007EFF" @click="addArch"></uni-icons>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<view :class="['type-popup', {active: typeVisible}]">
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons>
<view class="title">所属分类</view>
<view class="types">
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view>
<view class="archives">
<view v-for="(archive, i) in archivesList" :key="i" class="form-list archive" v-show="!i || showArch">
<view class="line">
<view class="name">职业</view>
<uni-data-picker class="picker-input" placeholder="请选择职业" popup-title="请选择职业" preload :clear-icon="false" :localdata="occupationList" v-model="archive.personalCareerId"></uni-data-picker>
</view>
<view class="line">
<view class="name">所在国家</view>
<view class="val">中国</view>
</view>
<view class="line">
<view class="name">学校名称</view>
<uni-data-picker class="picker-input" placeholder="请选择学校" popup-title="请选择学校" preload :clear-icon="false" :localdata="schoolList" v-model="archive.schoolId"></uni-data-picker>
</view>
<view class="line">
<view class="name">专业学科</view>
<uni-data-picker class="picker-input" placeholder="请选择专业学科" popup-title="请选择专业学科" preload :clear-icon="false" :localdata="subjectList" v-model="archive.disciplineId" @change="e => getItemProfessionalClass(e, i)"></uni-data-picker>
</view>
<view class="line">
<view class="name">专业类</view>
<uni-data-picker class="picker-input" placeholder="请选择专业类" popup-title="请选择专业类" preload :clear-icon="false" :localdata="archive.ProfessionalClassList" v-model="archive.professionalClassId" @change="e => getItemProfessional(e, i)"></uni-data-picker>
</view>
<view class="line">
<view class="name">专业</view>
<uni-data-picker class="picker-input" placeholder="请选择专业" popup-title="请选择专业" preload :clear-icon="false" :localdata="archive.ProfessionalList" v-model="archive.professionalId"></uni-data-picker>
</view>
<uni-icons class="del" type="trash" size="20" color="#ccc" @click="delArchive(i)"></uni-icons>
</view>
</view>
<view class="fold" v-if="archivesList.length > 1">
<view :class="{ active: showArch }" @click="showArch = !showArch">
展开更多
<uni-icons class="plus" type="bottom" size="20" color="#007EFF"></uni-icons>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" @click="submit">保存</view>
</view>
</view>
</template>
<script>
import { partnerOperatingList, queryClassificationByType } from '@/apis/modules/article.js'
import OSS from '@/libs/Oss/upload'
import { queryProvince, queryCity, querySchool, queryUserInfoDetails, updateAvatars, courseDiscipline, courseProfessionalClass, courseProfessional, updatePersonCenter, deleteProfile } from '@/apis/modules/user.js'
export default {
data() {
return {
classifications: [],
active: '',
typeVisible: false,
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
articleNameSort: '',
keyword: '',
list: [],
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
this.active = ''
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
hrUserInfo: {
name:'',
workNumber:'',
password:"",
phone:'',
email:'',
provinceName:'',
cityName:'',
schoolName:'',
professionalName:'',
experimentName:'',
sex: 1,
dateBirth: '',
educationDegree: ''
},
userAccount: {},
sex: [{
text: '男',
value: 1
}, {
text: '女',
value: 2
}],
occupationList: [{
value: 1,
text: '学生'
},{
value: 2,
text: '老师'
}],
provinces:[],
cities: [],
educationDegreeList: [
{
text: '专科',
value: 1
},
{
text: '本科',
value: 2
},
{
text: '硕士',
value: 3
},
{
text: '博士',
value: 4
},
{
text: '其他',
value: 5
}
],
subjectList: [], //
schoolList: [],
showArch: false,
archivesList: [],
archivesForm: {
personalCareerId: '',
schoolId: '',
schoolName: '',
ProfessionalClassList: [],
professionalClassId: '',
professionalClassName: '',
ProfessionalList: [],
disciplineId: '',
disciplineName: '',
professionalId: '',
professionalName: '',
},
}
},
onShow() {
this.keyword = ''
this.active = ''
this.typeVisible = false
this.initRole()
this.getInfo()
this.getProvince()
this.getSchool()
this.getSubject()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('资讯')) {
this.per = false
//
async getInfo() {
const { result } = await queryUserInfoDetails()
const { hrUserInfo: u, personalFileList: p } = result
u.avatar = u.userAvatars || 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
this.hrUserInfo = u
this.userAccount = result.userAccount
u.provinceId && this.getCity()
if (p.length) {
p.forEach(async (e, k) => {
e.ProfessionalClassList = []
e.ProfessionalList = []
this.$set(e, 'subjectList', this.subjectList)
this.$set(e, 'disciplineId', e.disciplineId ? e.disciplineId : '')
this.$set(e, 'disciplineName', e.disciplineName ? e.disciplineName : '')
this.$set(e, 'professionalClassId', e.professionalClassId ? e.professionalClassId : '')
this.$set(e, 'professionalClassName', e.professionalClassName ? e.professionalClassName : '')
this.$set(e, 'professionalId', e.professionalId ? e.professionalId : '')
this.$set(e, 'professionalName', e.professionalName ? e.professionalName : '')
this.$set(e, 'schoolId', e.schoolId ? e.schoolId : '')
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : '')
if (e.disciplineId) {
const { list } = await courseProfessionalClass({ disciplineId: e.disciplineId })
list.forEach(e => {
e.value = e.professionalClassId
e.text = e.professionalClassName
})
this.$set(e, 'ProfessionalClassList', list)
}
if (e.professionalClassId) {
const { list } = await courseProfessional({ professionalClassId: e.professionalClassId })
list.forEach(e => {
e.value = e.professionalId
e.text = e.professionalName
})
this.$set(e, 'ProfessionalList', list)
}
})
this.archivesList = p
} else {
this.concatArch()
}
this.initList()
this.getClassification()
},
getList() {
const data = {
keyWord: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
querySource: 4,
typeId: 2,
articleNameSort: this.articleNameSort,
classificationId: this.active
}
uni.showLoading({
title: '加载中'
//
async getProvince() {
const { list } = await queryProvince()
list.forEach(e => {
e.value = e.provinceId
e.text = e.provinceName
})
partnerOperatingList(data).then(({ page, total }) => {
uni.hideLoading()
// list
const list = page
this.provinces = list
},
//
async getCity(val) {
if (this.hrUserInfo.provinceId) {
const { list } = await queryCity({
provinceId: this.hrUserInfo.provinceId
})
list.forEach(e => {
if (e.labelName) e.labelName = e.labelName.split(',').slice(0, 2) //
e.mainBody = (e.summary || e.mainBody).replace(/(<[^>]+>)|((&nbsp;)+)/g , '')
e.value = e.cityId
e.text = e.cityName
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
uni.hideLoading()
this.cities = list
} else {
this.cities = []
}
if (val) this.hrUserInfo.cityId = ''
},
//
async getSchool(){
const { list } = await querySchool()
list.forEach(e => {
e.value = e.schoolId
e.text = e.schoolName
})
this.schoolList = list
},
//
onChooseAvatar(e) {
OSS(e.detail.avatarUrl, ({ url }) => {
updateAvatars(url).then(res => {
this.getInfo()
}).catch(e => {})
})
},
foldArch() {
this.showArch = !this.showArch
},
//
async getSubject(){
const { list } = await courseDiscipline()
list.forEach(e => {
e.value = e.disciplineId
e.text = e.disciplineName
})
this.subjectList = list
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
//
clearClass(){
this.archivesForm.professionalClassId = '',
this.archivesForm.professionalId = ''
},
//
getClassification() {
queryClassificationByType(2).then(({ data }) => {
this.classifications = [
{
id: '',
classificationName: '不限'
clearItemClass(index){
this.archivesList[index].professionalClassId = ''
this.archivesList[index].professionalClassName = ''
this.archivesList[index].professionalId = ''
this.archivesList[index].professionalName = ''
},
async getItemProfessionalClass(e, index){
this.clearItemClass(index)
if(e.detail.value.length){
const id = e.detail.value[0].value
let obj = {}
obj = this.subjectList.find(r =>{
return r.disciplineId === id
});
const { list } = await courseProfessionalClass({ disciplineId: id })
list.forEach(e => {
e.value = e.professionalClassId
e.text = e.professionalClassName
})
this.archivesList.map(e =>{
if(e.disciplineId == id){
e.ProfessionalClassList = list
e.disciplineName = obj.disciplineName
}
]
this.classifications.push(...data)
}).catch(e => {})
})
}
},
//
classificationClick(item, query) {
this.active = item.id
query && this.initList()
//
clearProfess(){
this.archivesForm.professionalId = ''
},
//
closeType() {
this.typeVisible = false
this.initList()
clearItemProfess(index){
this.archivesList[index].professionalId = ''
this.archivesList[index].professionalName = ''
},
//
toggle(item) {
item.toggle = !item.toggle
async getItemProfessional(e, index){
this.clearItemProfess(index)
if(e.detail.value.length){
const id = e.detail.value[0].value
const { list } = await courseProfessional({ professionalClassId: id })
list.forEach(e => {
e.value = e.professionalId
e.text = e.professionalName
})
this.archivesList.map(e =>{
if(e.professionalClassId == id){
let obj = {}
obj = e.ProfessionalClassList.find(r =>{
return r.professionalClassId === id
})
e.ProfessionalList = list
e.professionalClassName = obj.professionalClassName
}
})
}
},
getItemStuGrade(item){
if(item){
this.archivesList.map(e =>{
if(e.professionalId == item){
let obj = {}
obj = e.ProfessionalList.find(r =>{
return r.professionalId === item;
})
e.professionalName = obj.professionalName
}
})
}
},
concatArch() {
this.archivesList = this.archivesList.concat({
countries: '中国',
personalCareerId: '',
schoolId: '',
schoolName: '',
subjectList: this.subjectList,
disciplineId: '',
disciplineName: '',
ProfessionalClassList: [],
professionalClassId: '',
professionalClassName: '',
ProfessionalList: [],
professionalId: '',
professionalName: '',
personalFileId: ''
})
},
//
switchSort() {
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
this.initList()
addArch() {
let isEmpty = false
this.archivesList.forEach((n,k) => {
if(!n.personalCareerId) isEmpty = true
})
if(isEmpty) return this.$util.errMsg('请选择职业')
this.showArch = true
this.concatArch()
},
//
toDetail(item) {
this.$util.to(`/team/article/article?info=1&id=` + item.id)
delArchive(i) {
const that = this
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
const id = that.archivesList[i].personalFileId
that.archivesList.splice(i, 1)
id && deleteProfile(id)
}
}
})
},
//
async submit() {
const { hrUserInfo: u, userAccount: a } = this
if (u.idNumber && !/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)/.test(u.idNumber)) return this.$util.errMsg('请输入正确的身份证号码!')
let personalFileList = []
this.archivesList.forEach((n,k) => {
n.personalCareerId && personalFileList.push({
disciplineId: n.disciplineId,
disciplineName: n.disciplineName,
personalCareerId: n.personalCareerId,
personalFileId: n.personalFileId,
professionalClassId: n.professionalClassId,
professionalClassName: n.professionalClassName,
professionalId: n.professionalId,
professionalName: n.professionalName,
provinceId: n.provinceId,
provinceName: n.provinceName,
schoolId: n.schoolId,
schoolName: n.schoolName,
userId: u.userId
})
})
const data = {
userId: u.userId,
userAccountList: [{
id: a.accountId,
account: a.account,
userId: a.userId,
}],
hrUserInfo: {
provinceId: u.provinceId,
cityId: u.cityId,
countries: '中国',
dateBirth: u.dateBirth,
educationDegree: u.educationDegree,
idNumber: u.idNumber,
schoolId: u.schoolId,
sex: u.sex,
userId: u.userId,
userName: u.userName,
wechatId: u.wechatId
},
personalFileList,
}
updatePersonCenter(data)
this.$util.sucMsg('保存成功')
},
}
}
</script>
<style scoped lang="scss">
.search-wrap {
position: relative;
height: 300rpx;
padding: 120rpx 10px 0;
.bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.info {
position: relative;
margin-top: 160rpx;
}
.text {
margin: 0 10px 10rpx;
font-size: 50rpx;
color: #fff;
.page {
padding-bottom: 130rpx;
}
.avatar-btn {
display: inline-block;
padding: 0;
margin: 0 28rpx 0 0;
line-height: 0;
border: 0 !important;
background-color: transparent;
outline: none;
border-radius: 50%;
.avatar {
width: 50rpx;
height: 50rpx;
border: 0;
}
}
.type {
position: relative;
.arch-title {
display: flex;
padding: 30rpx;
background-color: #fff;
.item {
padding: 0 15rpx;
line-height: 1.6;
font-size: 28rpx;
color: #333;
white-space: nowrap;
&.active {
color: #007FFF;
font-weight: 600;
}
}
.icon {
position: absolute;
right: 40rpx;
width: 40rpx;
}
justify-content: space-between;
align-items: center;
}
.list {
background-color: #fff;
.item {
margin-bottom: 10rpx;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.texts {
display: flex;
justify-content: space-between;
align-items: center;
}
.pic {
width: 260rpx;
height: 180rpx;
border-radius: 8px;
}
.left {
width: calc(100% - 280rpx);
}
.title {
margin-bottom: 20rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.des {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
overflow: hidden;
}
.metas {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.date {
font-size: 24rpx;
color: #ccc;
white-space: nowrap;
}
.labels {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
margin-top: 15rpx;
}
.label {
width: 90rpx;
padding: 2px 6px;
margin: 0 10rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
background-color: #ccc;
border-radius: 4px;
}
.archive {
position: relative;
padding: 30rpx;
margin-bottom: 30rpx;
border: 1px dashed #d2d2d2;
border-radius: 20rpx;
.del {
position: absolute;
top: 10rpx;
right: 10rpx;
}
}
.fold {
padding-bottom: 20rpx;
text-align: center;
font-size: 24rpx;
color: #006EFF;
span {
cursor: pointer;
i {
transition: .5s;
}
&.active i {
transform: rotate(180deg);
}
}
}
</style>

Loading…
Cancel
Save