我的资料等

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. 4
      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. 106
      pages/person/person.vue
  10. 142
      styles/common.scss
  11. 344
      user/article/article.vue
  12. 697
      user/info/info.vue

@ -18,6 +18,10 @@ export const checkUserNameOrWorkNumber = (data) => {
return post('users/users/batchProcessing/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 captcha = Config.baseURL + `users/users/user/captcha`
export const queryProvince = () => { export const queryProvince = () => {
@ -28,6 +32,22 @@ export const queryCity = (data) => {
return get('nakadai/nakadai/city/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 => { export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url) return post(`users/users/user/updateAvatars?url=` + url)
} }
@ -55,6 +75,10 @@ export const queryUserInfoDetails = () => {
return get('users/users/userAccount/queryUserInfoDetails') return get('users/users/userAccount/queryUserInfoDetails')
} }
export const deleteProfile = id => {
return post(`users/users/userInfo/deleteProfile?personalFileIds=` + id)
}
export const searchAllAccountsByPhone = data => { export const searchAllAccountsByPhone = data => {
return get('users/users/user/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={ var config={
accessid:'LTAI4FzqQHnk4rozqLZ8jCNj', accessid:'LTAI5tAyVqtz2ZTQwVBmGgfW',
accesskey:'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq', accesskey:'S744EFNUPpcCcXM6ivGRz5qquKYHrF',
osshost:'https://huoran.oss-cn-shenzhen.aliyuncs.com', osshost:'https://huoran.oss-cn-shenzhen.aliyuncs.com',
policyBase64:Base64.encode(JSON.stringify(policyText)) policyBase64:Base64.encode(JSON.stringify(policyText))
} }

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

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

@ -18,24 +18,15 @@
</li> </li>
</ul> </ul>
<uni-popup ref="alertDialog"> <RealName />
<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>
</view> </view>
</template> </template>
<script> <script>
import { schoolCourse, recentUse, getSchoolCourseAuthority } from '@/apis/modules/course.js' 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 { export default {
components: { RealName },
data() { data() {
return { return {
curTab: 0, curTab: 0,
@ -52,6 +43,7 @@
total: 0, total: 0,
realNameForm: { realNameForm: {
userName: '', userName: '',
workNumber: '',
}, },
} }
}, },
@ -72,7 +64,6 @@
}, },
onShow() { onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6Ik5vcTB1UlNEZ0V0UExOUzBSUWtSZHlVVGsxOFYycnpNIiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.-YiaJdr5H2j6TGezs1eDS1EX5bNYCWGGghRw6eD3jk4') // uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6Ik5vcTB1UlNEZ0V0UExOUzBSUWtSZHlVVGsxOFYycnpNIiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.-YiaJdr5H2j6TGezs1eDS1EX5bNYCWGGghRw6eD3jk4')
this.handleRealName()
this.getTab() this.getTab()
}, },
methods: { methods: {
@ -115,32 +106,11 @@
] ]
this.getList() this.getList()
}, },
//
async handleRealName () {
const res = await checkUserNameOrWorkNumber()
//
if (!res.hasName) this.$refs.alertDialog.open()
},
// tab // tab
tabChange(id) { tabChange(id) {
this.curTab = id this.curTab = id
this.initList() 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) { toDetail(item) {
this.$util.to(`/course/courseDetail/courseDetail?cid=${item.cid}&mallId=${item.mallId}`) 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> <image class="bg" src="@/static/image/person-bg.png"></image>
<view class="wrap"> <view class="wrap">
<view class="info"> <view class="info">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="info.avatar" mode=""></image> <image class="avatar" :src="info.avatar" mode=""></image>
</button>
<view class="text"> <view class="text">
<view class="name">{{ info.userName }}</view> <view class="name">{{ info.userName }}</view>
<view class="dep-wrap"> <view class="dep-wrap">
@ -16,7 +14,7 @@
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" @click="$util.to('/team/teams/teams')"> <view class="item" @click="$util.to('/user/info/info')">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person4.png" mode=""></image> <image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">我的资料</text> <text class="name">我的资料</text>
@ -38,6 +36,25 @@
</view> </view>
</view> </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> </view>
</template> </template>
@ -70,37 +87,26 @@
schoolName: r.schoolName || '' 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() { logout() {
this.$refs.logout.open()
return
const that = this const that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要退出账号吗?', content: '确定要退出账号吗?',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
that.logoutSubmit()
}
}
})
},
logoutSubmit() {
uni.clearStorageSync() uni.clearStorageSync()
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login' url: '/pages/login/login'
}) })
}
}
})
}, },
} }
} }
@ -129,19 +135,12 @@
padding: 26rpx 34rpx; padding: 26rpx 34rpx;
background-color: #fff; background-color: #fff;
border-radius: 16rpx; 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 { .avatar {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
margin-right: 30rpx;
border: 0; border: 0;
border-radius: 50%;
} }
.text { .text {
margin-right: 20rpx; margin-right: 20rpx;
@ -195,13 +194,48 @@
color: #333; color: #333;
} }
} }
.location {
margin-top: 30rpx; .logout-wrap {
} width: 520rpx;
.picker-wrap { padding-top: 30rpx;
margin-top: 4px; 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 { .name {
font-size: 24rpx; 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> </style>

@ -15,9 +15,8 @@ ul {
} }
} }
.block { .block {
padding: 0 24rpx; padding: 24rpx 24rpx 0;
margin: 20rpx 24rpx; margin-bottom: 20rpx;
border-radius: 16rpx;
background-color: #fff; background-color: #fff;
} }
.ell { .ell {
@ -40,6 +39,17 @@ ul {
background-color: #4876F9; 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 { @mixin sort {
margin: 0 20rpx 0 10rpx; margin: 0 20rpx 0 10rpx;
&:before { &:before {
@ -78,10 +88,9 @@ ul {
} }
} }
.form-list { .form-list {
border-top: 1px solid #E6E8ED;
.line { .line {
position: relative;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
padding: 28rpx 0; padding: 28rpx 0;
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
@ -93,14 +102,17 @@ ul {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
} }
.name, .val, input { .name {
width: 200rpx;
font-size: 26rpx;
color: #616161;
}
.val, input {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} }
input { input {
flex: 1; flex: 1;
margin-left: 20rpx;
text-align: right;
} }
.req { .req {
.name:after { .name:after {
@ -123,11 +135,32 @@ ul {
margin-right: 10rpx; 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 { }
.picker-input {
.input-value-border {
padding-left: 0;
line-height: 1; line-height: 1;
border: 0; border: 0;
} }
.selected-list {
padding-left: 0;
}
}
.picker-date .uni-date-x--border {
border: 0;
}
.tab { .tab {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
@ -148,11 +181,6 @@ ul {
@include sort; @include sort;
} }
} }
.plus {
position: fixed;
bottom: 40rpx;
right: 40rpx;
}
.popup-mask { .popup-mask {
z-index: 9; 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 { .btn-wrap {
z-index: 10; z-index: 10;
position: fixed; position: fixed;
@ -260,46 +245,3 @@ ul {
background-color: #007EFF; 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> <template>
<view> <view class="page">
<image class="banner" :src="form.bannerImg" mode="widthFix"></image> <view class="block">
<view class="wrap"> <view class="title">上传营业执照</view>
<view class="title">{{ form.title }}</view> <image class="credential" :src="businessLicensePicture || 'http://124.71.79.122/images/miniProgram/credentials1.png'" mode="widthFix" @click="uploadBusinessLicense"></image>
<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>
<view class="text"> <view v-if="isPreschool" class="block">
<mp-html :content="form.mainBody"/> <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>
<view v-if="form.fileList" class="files"> <view class="block">
<view v-for="(file, i) in form.fileList" :key="i" class="item" @click="download(file)"> <view class="form-list">
<view class="file">{{ file.fileName }}</view> <view class="line with-arrow">
<view class="download">下载</view> <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> </view>
<view class="btn-wrap">
<view class="btn" @click="submit">认证信息</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { findById, collectCourse } from '@/apis/modules/article.js' import OSS from '@/libs/Oss/upload'
export default { export default {
data() { data() {
return { return {
id: '', openId: uni.getStorageSync('openId'),
isInfo: 0, //
form: { form: {
totalBrowsing: '' companyName: '',
} creditCode: '',
legalPerson: '',
},
platformId: '',
businessLicensePicture: '',
licenseForRunningSchool: '',
} }
}, },
onShow() { onShow() {
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.id = options.id // this.getEnterInfo()
this.isInfo = options.info
options.info && uni.setNavigationBarTitle({
title: '资讯'
})
this.getInfo()
}, },
methods: { methods: {
// //
getInfo() { async getEnterInfo() {
uni.showLoading({ const res = await enterpriseCertificationStatus(this.openId)
title: '加载中' 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
}
},
//
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,
}
}
}) })
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`); uploadSchoolLicense() {
const videoStr = this.replaceAllVideoTagStyles(str, "width: 95%; height: 450rpx;display: block;margin:0 auto") const that = this
const imgStr = this.addImgStyle(videoStr) uni.chooseImage({
message.mainBody = imgStr success: (res) => {
this.form = message const file = res.tempFilePaths[0];
uni.hideLoading() OSS(file, async ({ url }) => {
}).catch(e => { that.licenseForRunningSchool = url
uni.hideLoading()
}) })
}
});
}, },
getAllVideoTagIndices(str) { //
const regex = /<video.*?>.*?<\/video>/gs; publicNotice() {
const indices = []; const that = this
let match; uni.requestSubscribeMessage({
while ((match = regex.exec(str)) !== null) { tmplIds: ['ZB6wTenlv13mivxXwi-DWwjgVoNJ6eUr1vBvNdQGbJw'],
indices.push(match.index); success: (res) => {
} uni.setStorageSync('platformId', that.platformId)
return indices; const name = that.platformId == 6 ? '供应商' : '幼儿园'
that.$util.errMsg(`您已成功提交${name}认证,现在为您切换到${name}端。`)
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
})
}, 2000)
}, },
fail: function(err) {
// videostyle uni.showToast({
replaceVideoTagStyle(str, index, newStyle) { title: err,
const startIndex = str.indexOf("<video", index); duration: 2000,
const endIndex = str.indexOf("</video>", startIndex) + 7; icon: 'error'
const videoTag = str.substring(startIndex, endIndex); });
const newVideoTag = videoTag.replace(/style="(.*?)"/, `style="${newStyle}"`); }
return str.substring(0, startIndex) + newVideoTag + str.substring(endIndex); })
}, },
//
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
})
// videostyle data.accountId = res.data.registerId
replaceAllVideoTagStyles(str, newStyle) { await organizationCertification(data)
const indices = this.getAllVideoTagIndices(str); } else { // /
let newStr = str; await creditCodeAuthentication(data)
for (let i = indices.length - 1; i >= 0; i--) {
newStr = this.replaceVideoTagStyle(newStr, indices[i], newStyle); //
} await updateTeamInfo({
return newStr; id: uni.getStorageSync('teamId'),
}, classificationName: form.companyName
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]
}) })
this.$util.to(`/team/send/send`) }
}, uni.hideLoading()
// this.publicNotice()
collect() { } catch(e) {
const state = this.form.collectionStatus ? 0 : 1 setTimeout(() => {
collectCourse(this.form.id, state).then(({ data }) => { uni.hideLoading()
this.form.collectionStatus = state }, 1500)
}).catch(e => {}) this.submiting = false
}
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.wrap { .page {
padding: 30rpx; padding-bottom: 170rpx;
background-color: #fff; -webkit-overflow-scrolling: touch;
} }
.banner { .avatar {
width: 100%; width: 80rpx;
} height: 80rpx;
.title { border: 0;
font-size: 34rpx; border-radius: 50%;
font-weight: 600;
color: #333;
}
.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 {
font-size: 28rpx;
line-height: 1.6;
text-align: justify;
p{
width: 100%;
} }
img,image{ .block {
width: 100% !important; padding: 24rpx;
} }
/deep/ image,img { .title {
margin: 0 auto;
}
}
.files {
margin-top: 20rpx;
.item {
display: flex;
align-items: center;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 28rpx;
} }
.file { .credential {
margin-right: 20rpx; width: 100%;
font-size: 26rpx;
color: #5a5a5a;
} }
.download { .form-list {
font-size: 26rpx; .name {
color: #007EFF; min-width: 250rpx;
} }
} }
</style> </style>

@ -1,285 +1,546 @@
<template> <template>
<view> <view class="page">
<view class="search-wrap"> <view class="block">
<image class="bg" src="@/static/image/info.png"></image> <view class="p-title">
<view class="info"> <image class="icon" src="https://eduvessel.com/images/occupationlab/user.svg" mode="widthFix"></image> 账号信息
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" bgColor="#fff" /> </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>
<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> </view>
<template v-if="list.length"> <view class="block">
<view class="list"> <view class="p-title">
<view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)"> <image class="icon" src="https://eduvessel.com/images/occupationlab/basic.svg" mode="widthFix"></image> 基本信息
<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 class="form-list">
<view class="line">
<view class="name">姓名</view>
<input type="text" placeholder="请输入姓名" v-model="hrUserInfo.userName" />
</view> </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>
<image class="pic" :src="item.bannerImg"></image> <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>
<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>
<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>
<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> </view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<view :class="['type-popup', {active: typeVisible}]"> <view class="archives">
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons> <view v-for="(archive, i) in archivesList" :key="i" class="form-list archive" v-show="!i || showArch">
<view class="title">所属分类</view> <view class="line">
<view class="types"> <view class="name">职业</view>
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</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> </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> </view>
</template> </template>
<script> <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 { export default {
data() { data() {
return { return {
classifications: [], hrUserInfo: {
active: '', name:'',
typeVisible: false, workNumber:'',
reachBottom: 0, // 0->,1->,-1-> password:"",
status: 'more', // more|loading|noMore phone:'',
searchTimer: null, email:'',
articleNameSort: '', provinceName:'',
keyword: '', cityName:'',
list: [], schoolName:'',
page: 1, professionalName:'',
pageSize: 10, experimentName:'',
} sex: 1,
dateBirth: '',
educationDegree: ''
}, },
watch: { userAccount: {},
keyword () { sex: [{
this.active = '' text: '男',
clearTimeout(this.searchTimer) value: 1
this.searchTimer = setTimeout(() => { }, {
this.initList() text: '女',
}, 500) value: 2
} }],
occupationList: [{
value: 1,
text: '学生'
},{
value: 2,
text: '老师'
}],
provinces:[],
cities: [],
educationDegreeList: [
{
text: '专科',
value: 1
},
{
text: '本科',
value: 2
},
{
text: '硕士',
value: 3
}, },
// {
onPullDownRefresh() { text: '博士',
this.initList() value: 4
setTimeout(() => { },
uni.stopPullDownRefresh() {
}, 1500) text: '其他',
value: 5
}
],
subjectList: [], //
schoolList: [],
showArch: false,
archivesList: [],
archivesForm: {
personalCareerId: '',
schoolId: '',
schoolName: '',
ProfessionalClassList: [],
professionalClassId: '',
professionalClassName: '',
ProfessionalList: [],
disciplineId: '',
disciplineName: '',
professionalId: '',
professionalName: '',
}, },
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
} }
}, },
onShow() { onShow() {
this.keyword = '' this.getInfo()
this.active = '' this.getProvince()
this.typeVisible = false this.getSchool()
this.initRole() this.getSubject()
}, },
methods: { methods: {
// //
initRole() { async getInfo() {
if (!uni.getStorageSync('auth').includes('资讯')) { const { result } = await queryUserInfoDetails()
this.per = false 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)
} }
this.initList() if (e.professionalClassId) {
this.getClassification() const { list } = await courseProfessional({ professionalClassId: e.professionalClassId })
}, list.forEach(e => {
getList() { e.value = e.professionalId
const data = { e.text = e.professionalName
keyWord: this.keyword, })
pageNum: this.page, this.$set(e, 'ProfessionalList', list)
pageSize: this.pageSize,
querySource: 4,
typeId: 2,
articleNameSort: this.articleNameSort,
classificationId: this.active
} }
uni.showLoading({
title: '加载中'
}) })
partnerOperatingList(data).then(({ page, total }) => { this.archivesList = p
uni.hideLoading() } else {
// list this.concatArch()
const list = page }
},
//
async getProvince() {
const { list } = await queryProvince()
list.forEach(e => { list.forEach(e => {
if (e.labelName) e.labelName = e.labelName.split(',').slice(0, 2) // e.value = e.provinceId
e.mainBody = (e.summary || e.mainBody).replace(/(<[^>]+>)|((&nbsp;)+)/g , '') e.text = e.provinceName
}) })
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.provinces = list
this.page++ // page+1 },
const noMore = this.list.length === total // //
this.status = noMore ? 'noMore' : 'more' // noMore async getCity(val) {
this.reachBottom = noMore ? -1 : 0 // -1 if (this.hrUserInfo.provinceId) {
}).catch(e => { const { list } = await queryCity({
uni.hideLoading() provinceId: this.hrUserInfo.provinceId
}) })
list.forEach(e => {
e.value = e.cityId
e.text = e.cityName
})
this.cities = list
} else {
this.cities = []
}
if (val) this.hrUserInfo.cityId = ''
}, },
initList() { //
this.page = 1 async getSchool(){
this.reachBottom = 0 const { list } = await querySchool()
this.getList() list.forEach(e => {
e.value = e.schoolId
e.text = e.schoolName
})
this.schoolList = list
}, },
// //
getClassification() { onChooseAvatar(e) {
queryClassificationByType(2).then(({ data }) => { OSS(e.detail.avatarUrl, ({ url }) => {
this.classifications = [ updateAvatars(url).then(res => {
{ this.getInfo()
id: '',
classificationName: '不限'
}
]
this.classifications.push(...data)
}).catch(e => {}) }).catch(e => {})
})
}, },
//
classificationClick(item, query) {
this.active = item.id foldArch() {
query && this.initList() this.showArch = !this.showArch
},
//
closeType() {
this.typeVisible = false
this.initList()
}, },
// //
toggle(item) { async getSubject(){
item.toggle = !item.toggle const { list } = await courseDiscipline()
list.forEach(e => {
e.value = e.disciplineId
e.text = e.disciplineName
})
this.subjectList = list
}, },
// //
switchSort() { clearClass(){
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc' this.archivesForm.professionalClassId = '',
this.initList() this.archivesForm.professionalId = ''
}, },
// clearItemClass(index){
toDetail(item) { this.archivesList[index].professionalClassId = ''
this.$util.to(`/team/article/article?info=1&id=` + item.id) 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
} }
})
} }
</script> },
//
<style scoped lang="scss"> clearProfess(){
.search-wrap { this.archivesForm.professionalId = ''
position: relative; },
height: 300rpx; clearItemProfess(index){
padding: 120rpx 10px 0; this.archivesList[index].professionalId = ''
.bg { this.archivesList[index].professionalName = ''
position: absolute; },
top: 0; async getItemProfessional(e, index){
left: 0; this.clearItemProfess(index)
width: 100%; if(e.detail.value.length){
height: 100%; const id = e.detail.value[0].value
} const { list } = await courseProfessional({ professionalClassId: id })
.info { list.forEach(e => {
position: relative; e.value = e.professionalId
margin-top: 160rpx; e.text = e.professionalName
} })
.text { this.archivesList.map(e =>{
margin: 0 10px 10rpx; if(e.professionalClassId == id){
font-size: 50rpx; let obj = {}
color: #fff; obj = e.ProfessionalClassList.find(r =>{
return r.professionalClassId === id
})
e.ProfessionalList = list
e.professionalClassName = obj.professionalClassName
} }
})
} }
.type { },
position: relative; getItemStuGrade(item){
display: flex; if(item){
padding: 30rpx; this.archivesList.map(e =>{
background-color: #fff; if(e.professionalId == item){
.item { let obj = {}
padding: 0 15rpx; obj = e.ProfessionalList.find(r =>{
line-height: 1.6; return r.professionalId === item;
font-size: 28rpx; })
color: #333; e.professionalName = obj.professionalName
white-space: nowrap;
&.active {
color: #007FFF;
font-weight: 600;
} }
})
} }
.icon { },
position: absolute; concatArch() {
right: 40rpx; this.archivesList = this.archivesList.concat({
width: 40rpx; countries: '中国',
personalCareerId: '',
schoolId: '',
schoolName: '',
subjectList: this.subjectList,
disciplineId: '',
disciplineName: '',
ProfessionalClassList: [],
professionalClassId: '',
professionalClassName: '',
ProfessionalList: [],
professionalId: '',
professionalName: '',
personalFileId: ''
})
},
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()
},
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)
} }
} }
.list { })
background-color: #fff; },
.item {
margin-bottom: 10rpx; //
padding: 20rpx 40rpx; async submit() {
border-bottom: 1px solid #f1f1f1; 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,
} }
.texts { updatePersonCenter(data)
display: flex; this.$util.sucMsg('保存成功')
justify-content: space-between; },
align-items: center;
} }
.pic {
width: 260rpx;
height: 180rpx;
border-radius: 8px;
} }
.left { </script>
width: calc(100% - 280rpx);
<style scoped lang="scss">
.page {
padding-bottom: 130rpx;
} }
.title { .avatar-btn {
margin-bottom: 20rpx; display: inline-block;
font-size: 32rpx; padding: 0;
font-weight: 600; margin: 0 28rpx 0 0;
color: #333; line-height: 0;
border: 0 !important;
background-color: transparent;
outline: none;
border-radius: 50%;
.avatar {
width: 50rpx;
height: 50rpx;
border: 0;
} }
.des {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
overflow: hidden;
} }
.metas { .arch-title {
margin-top: 10rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.date {
font-size: 24rpx; .archive {
color: #ccc; position: relative;
white-space: nowrap; padding: 30rpx;
margin-bottom: 30rpx;
border: 1px dashed #d2d2d2;
border-radius: 20rpx;
.del {
position: absolute;
top: 10rpx;
right: 10rpx;
} }
.labels {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
margin-top: 15rpx;
} }
.label { .fold {
width: 90rpx; padding-bottom: 20rpx;
padding: 2px 6px; text-align: center;
margin: 0 10rpx 15rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #006EFF;
text-overflow: ellipsis;
white-space: nowrap; span {
overflow: hidden; cursor: pointer;
background-color: #ccc; i {
border-radius: 4px; transition: .5s;
}
&.active i {
transform: rotate(180deg);
}
} }
} }
</style> </style>

Loading…
Cancel
Save