Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp-customer-people-recruitment-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
mp-customer-people-recruitment-h5
Commits
6f7917fe
Commit
6f7917fe
authored
Oct 30, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
19509c67
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
22 deletions
+61
-22
user.js
src/api/user.js
+4
-0
pages.json
src/pages.json
+3
-3
index.vue
src/pages/user/resume/index.vue
+43
-19
utils.js
src/utils/utils.js
+11
-0
No files found.
src/api/user.js
View file @
6f7917fe
...
@@ -29,3 +29,7 @@ export const saveEducationExperienceApi = params => instance.post("/user/resume/
...
@@ -29,3 +29,7 @@ export const saveEducationExperienceApi = params => instance.post("/user/resume/
export
const
getApplicationListApi
=
params
=>
instance
.
post
(
"/job/getApplicationList"
,
params
);
export
const
getApplicationListApi
=
params
=>
instance
.
post
(
"/job/getApplicationList"
,
params
);
// 获取面试列表
// 获取面试列表
export
const
getInterviewListApi
=
params
=>
instance
.
post
(
"/job/getInterviewList"
,
params
);
export
const
getInterviewListApi
=
params
=>
instance
.
post
(
"/job/getInterviewList"
,
params
);
//更具code码获取城市名称
export
const
getCityNameByCodeApi
=
code
=>
instance
.
post
(
`/dict/dictProvinceCityDistrict/find/dist/
${
code
}
`
);
src/pages.json
View file @
6f7917fe
...
@@ -7,15 +7,15 @@
...
@@ -7,15 +7,15 @@
},
},
"pages"
:
[
"pages"
:
[
{
{
"path"
:
"pages/
login
/index"
,
"path"
:
"pages/
postionList
/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"职位"
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
},
},
{
{
"path"
:
"pages/
postionList
/index"
,
"path"
:
"pages/
login
/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"职位"
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
},
},
...
...
src/pages/user/resume/index.vue
View file @
6f7917fe
...
@@ -20,46 +20,46 @@
...
@@ -20,46 +20,46 @@
<text
class=
"gradient-title"
>
个人信息
</text>
<text
class=
"gradient-title"
>
个人信息
</text>
<view
class=
"basics-top"
>
<view
class=
"basics-top"
>
<view
class=
"item"
>
<view
class=
"item"
>
<img
v-show=
"
false
"
src=
"@/static/image/user/man.png"
alt=
""
>
<img
v-show=
"
resumeData.sex===1
"
src=
"@/static/image/user/man.png"
alt=
""
>
<img
v-show=
"
true
"
src=
"@/static/image/user/woman.png"
alt=
""
>
<img
v-show=
"
resumeData.sex===2
"
src=
"@/static/image/user/woman.png"
alt=
""
>
<text>
女
</text>
<text>
{{
resumeData
.
sex
===
1
?
'男'
:
'女'
}}
</text>
</view>
</view>
<view
class=
"item"
>
<view
class=
"item"
>
<img
src=
"@/static/image/user/birth.png"
alt=
""
>
<img
src=
"@/static/image/user/birth.png"
alt=
""
>
<text>
1998.05.13
</text>
<text>
{{
resumeData
.
birthday
}}
</text>
</view>
</view>
<view
class=
"item"
>
<view
class=
"item"
>
<img
src=
"@/static/image/user/bag.png"
alt=
""
>
<img
src=
"@/static/image/user/bag.png"
alt=
""
>
<text>
3
年
</text>
<text>
{{
resumeData
.
workExperienceYear
}}
年
</text>
</view>
</view>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
身份
</text>
<text
class=
"label"
>
身份
</text>
<text
class=
"value"
>
应届生 | 吸毒人员
</text>
<text
class=
"value"
>
{{
resumeData
.
identityTypes
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
专业
</text>
<text
class=
"label"
>
专业
</text>
<text
class=
"value"
>
网络工程信息技术
</text>
<text
class=
"value"
>
{{
resumeData
.
major
||
'无'
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
专业技术职称
</text>
<text
class=
"label"
>
专业技术职称
</text>
<text
class=
"value"
>
网络工程师 · 中级
</text>
<text
class=
"value"
>
{{
resumeData
.
positionalTitle
||
'无'
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
职业资格/技能等级证书
</text>
<text
class=
"label"
>
职业资格/技能等级证书
</text>
<text
class=
"value"
>
网络工程师资格证 · 中级
</text>
<text
class=
"value"
>
{{
resumeData
.
professionalCertificates
||
'无'
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
特种作业证
</text>
<text
class=
"label"
>
特种作业证
</text>
<text
class=
"value"
>
高空作业证
</text>
<text
class=
"value"
>
{{
resumeData
.
specialCertificates
||
'无'
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
户籍地
</text>
<text
class=
"label"
>
户籍地
</text>
<text
class=
"value"
>
贵州省贵阳市观山湖区高科一号C栋8楼
</text>
<text
class=
"value"
>
{{
resumeData
.
residenceCodes
}}
</text>
</view>
</view>
<view
class=
"information"
>
<view
class=
"information"
>
<text
class=
"label"
>
常住地
</text>
<text
class=
"label"
>
常住地
</text>
<text
class=
"value"
>
贵州省贵阳市观山湖区高科一号C栋8楼
</text>
<text
class=
"value"
>
{{
resumeData
.
birthCodes
}}
</text>
</view>
</view>
</view>
</view>
<!-- 求职状态 -->
<!-- 求职状态 -->
...
@@ -202,9 +202,10 @@ import {
...
@@ -202,9 +202,10 @@ import {
getLoginUserApi
,
getLoginUserApi
,
saveJobStatusApi
,
saveJobStatusApi
,
saveWorkExperienceApi
,
saveWorkExperienceApi
,
saveEducationExperienceApi
saveEducationExperienceApi
,
getCityNameByCodeApi
}
from
"@/api/user"
;
}
from
"@/api/user"
;
import
{
getEnumText
,
getEumData
}
from
"@/utils/utils.js"
;
import
{
getEnumText
,
getEnumText2
,
getEumData
}
from
"@/utils/utils.js"
;
import
{
useToast
}
from
"wot-design-uni"
;
import
{
useToast
}
from
"wot-design-uni"
;
import
{
navigateTo
}
from
"@/utils/utils.js"
;
import
{
navigateTo
}
from
"@/utils/utils.js"
;
import
evn
from
"@/utils/config.js"
;
import
evn
from
"@/utils/config.js"
;
...
@@ -220,7 +221,7 @@ const resumeData = reactive({
...
@@ -220,7 +221,7 @@ const resumeData = reactive({
workExperience
:
""
,
workExperience
:
""
,
workExperienceYear
:
""
,
workExperienceYear
:
""
,
jobStatusText
:
""
,
jobStatusText
:
""
,
education
Level
:
""
,
education
:
""
,
realName
:
""
,
realName
:
""
,
username
:
""
,
username
:
""
,
avatarPath
:
""
,
avatarPath
:
""
,
...
@@ -239,6 +240,16 @@ function calculateAge(birthday) {
...
@@ -239,6 +240,16 @@ function calculateAge(birthday) {
}
}
return
age
;
return
age
;
}
}
// 时间戳转为年月日
function
formatTimestamp
(
timestampInMilliseconds
)
{
// 创建日期对象
var
date
=
new
Date
(
timestampInMilliseconds
);
// 获取年月日
var
year
=
date
.
getUTCFullYear
();
var
month
=
(
"0"
+
(
date
.
getUTCMonth
()
+
1
)).
slice
(
-
2
);
// 月份是从0开始的,所以加1,并确保两位数
var
day
=
(
"0"
+
date
.
getUTCDate
()).
slice
(
-
2
);
// 确保两位数
return
`
${
year
}
.
${
month
}
.
${
day
}
`
;
}
// 数据回显
// 数据回显
const
getUserResume
=
()
=>
{
const
getUserResume
=
()
=>
{
getUserResumeApi
().
then
(
async
res
=>
{
getUserResumeApi
().
then
(
async
res
=>
{
...
@@ -267,8 +278,8 @@ const getUserResume = () => {
...
@@ -267,8 +278,8 @@ const getUserResume = () => {
{
name
:
preferredDistrictName
,
code
:
preferredDistrictCode
}
{
name
:
preferredDistrictName
,
code
:
preferredDistrictCode
}
];
];
resumeData
.
personalAdvantage
=
personalAdvantages
;
// 求职状态回
resumeData
.
personalAdvantage
=
personalAdvantages
;
// 求职状态回
resumeData
.
preferredPosition
=
preferredPosition
.
split
(
","
).
join
(
"|"
);
//
resumeData.preferredPosition = preferredPosition.split(",").join("|");
resumeData
.
preferredPositionId
=
preferredPositionId
.
split
(
","
);
//
resumeData.preferredPositionId = preferredPositionId.split(",");
resumeData
.
maxSalary
=
maxSalary
&&
maxSalary
/
1000
+
"k"
;
resumeData
.
maxSalary
=
maxSalary
&&
maxSalary
/
1000
+
"k"
;
resumeData
.
minSalary
=
minSalary
&&
minSalary
/
1000
+
"k"
;
resumeData
.
minSalary
=
minSalary
&&
minSalary
/
1000
+
"k"
;
resumeData
.
workExperience
=
JSON
.
parse
(
workExperience
||
"[]"
);
resumeData
.
workExperience
=
JSON
.
parse
(
workExperience
||
"[]"
);
...
@@ -277,7 +288,7 @@ const getUserResume = () => {
...
@@ -277,7 +288,7 @@ const getUserResume = () => {
// 获取用户基本信息
// 获取用户基本信息
getLoginUserApi
().
then
(
async
res
=>
{
getLoginUserApi
().
then
(
async
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
const
{
workAge
,
educationLevel
,
name
,
username
,
avatarPath
,
birthday
,
jobStatus
}
=
res
.
data
;
const
{
residenceCodes
,
birthCodes
,
specialCertificates
,
positionalTitle
,
professionalCertificates
,
major
,
identityTypes
,
sex
,
workAge
,
education
,
name
,
username
,
avatarPath
,
birthday
,
jobStatus
}
=
res
.
data
;
/* this.setData({
/* this.setData({
realName,
realName,
workExperienceYear: workExperience,
workExperienceYear: workExperience,
...
@@ -289,10 +300,23 @@ const getUserResume = () => {
...
@@ -289,10 +300,23 @@ const getUserResume = () => {
}); */
}); */
resumeData
.
realName
=
name
;
resumeData
.
realName
=
name
;
resumeData
.
workExperienceYear
=
workAge
;
resumeData
.
workExperienceYear
=
workAge
;
resumeData
.
educationLevel
=
await
getEnumText
(
"EnumEducation"
,
education
Level
);
resumeData
.
educationLevel
=
await
getEnumText
(
"EnumEducation"
,
education
);
resumeData
.
username
=
username
;
resumeData
.
username
=
username
;
resumeData
.
avatarPath
=
avatarPath
;
resumeData
.
avatarPath
=
avatarPath
;
resumeData
.
age
=
calculateAge
(
birthday
);
resumeData
.
age
=
calculateAge
(
birthday
);
resumeData
.
sex
=
sex
;
resumeData
.
identityTypes
=
await
getEnumText2
(
"EnumIdentityType"
,
identityTypes
.
split
(
","
));;
resumeData
.
birthday
=
formatTimestamp
(
28800000
);
resumeData
.
major
=
major
;
resumeData
.
positionalTitle
=
positionalTitle
;
resumeData
.
professionalCertificates
=
professionalCertificates
;
resumeData
.
specialCertificates
=
specialCertificates
;
getCityNameByCodeApi
(
residenceCodes
.
split
(
","
)[
2
]).
then
(
res
=>
{
resumeData
.
residenceCodes
=
res
.
data
.
provinceName
+
res
.
data
.
cityName
+
res
.
data
.
districtName
;
})
getCityNameByCodeApi
(
birthCodes
.
split
(
","
)[
2
]).
then
(
res
=>
{
resumeData
.
birthCodes
=
res
.
data
.
provinceName
+
res
.
data
.
cityName
+
res
.
data
.
districtName
;
})
}
}
});
});
};
};
...
...
src/utils/utils.js
View file @
6f7917fe
...
@@ -25,6 +25,17 @@ export const getEnumText = async (type, code) => {
...
@@ -25,6 +25,17 @@ export const getEnumText = async (type, code) => {
const
eumData
=
await
getEumData
(
type
);
const
eumData
=
await
getEumData
(
type
);
return
eumData
.
find
(
item
=>
item
.
code
==
code
)?.
text
||
"无"
;
return
eumData
.
find
(
item
=>
item
.
code
==
code
)?.
text
||
"无"
;
};
};
export
const
getEnumText2
=
async
(
type
,
codes
)
=>
{
const
eumData
=
await
getEumData
(
type
);
// 使用 Array.prototype.map 和 .filter 方法来获取所有匹配项的 text
const
texts
=
eumData
.
filter
(
item
=>
codes
.
includes
(
item
.
code
))
.
map
(
item
=>
item
.
text
);
// 将获取到的 text 数组合并成一个字符串,用 "|" 分割
return
texts
.
join
(
'|'
)
||
"无"
;
};
/**
/**
* 将数据存储在本地存储空间中。
* 将数据存储在本地存储空间中。
* @param {string} key 要存储的数据的关键字,用于检索数据。
* @param {string} key 要存储的数据的关键字,用于检索数据。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment