Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp-enterprise-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-enterprise-people-recruitment-h5
Commits
1b2b1be9
Commit
1b2b1be9
authored
Oct 14, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
招聘会
parent
14c8c24a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
274 additions
and
85 deletions
+274
-85
article.js
src/api/article.js
+3
-0
index.vue
src/components/articleList/index.vue
+2
-0
pages.json
src/pages.json
+2
-1
index.vue
src/pages/articleDetails/index.vue
+41
-1
index.vue
src/pages/dynamic/index.vue
+11
-2
addPost.vue
src/pages/signUp/addPost.vue
+118
-28
index.vue
src/pages/signUp/index.vue
+10
-8
store.js
src/pages/signUp/store.js
+20
-8
fillIn.vue
src/pages/user/businessLicense/fillIn.vue
+13
-8
store.js
src/pages/user/businessLicense/store.js
+12
-12
submit.vue
src/pages/user/businessLicense/submit.vue
+1
-0
index.vue
src/pages/user/index.vue
+14
-13
communityActive.png
src/static/image/tabBar/communityActive.png
+0
-0
request.js
src/utils/request.js
+27
-4
No files found.
src/api/article.js
View file @
1b2b1be9
...
@@ -7,6 +7,9 @@ export const getArticleDetailApi = id => instance.post(`/article/detail/${id}`);
...
@@ -7,6 +7,9 @@ export const getArticleDetailApi = id => instance.post(`/article/detail/${id}`);
//获取文章i详情
//获取文章i详情
export
const
getArticleTypesApi
=
type
=>
instance
.
post
(
`/article/category/list/
${
type
}
`
);
export
const
getArticleTypesApi
=
type
=>
instance
.
post
(
`/article/category/list/
${
type
}
`
);
//招聘会报名状态
export
const
registerStatus
=
articleId
=>
instance
.
post
(
`/jobFair/register/status/
${
articleId
}
`
);
// 参加招聘会
// 参加招聘会
export
const
jobFairRegisterApi
=
params
=>
instance
.
post
(
`/jobFair/register`
,
params
);
export
const
jobFairRegisterApi
=
params
=>
instance
.
post
(
`/jobFair/register`
,
params
);
src/components/articleList/index.vue
View file @
1b2b1be9
...
@@ -67,6 +67,7 @@ function navigateTo(url) {
...
@@ -67,6 +67,7 @@ function navigateTo(url) {
width
:
202rpx
;
width
:
202rpx
;
height
:
114rpx
;
height
:
114rpx
;
margin-left
:
24rpx
;
margin-left
:
24rpx
;
border-radius
:
8rpx
;
}
}
.title
{
.title
{
margin-bottom
:
16rpx
;
margin-bottom
:
16rpx
;
...
@@ -92,6 +93,7 @@ function navigateTo(url) {
...
@@ -92,6 +93,7 @@ function navigateTo(url) {
.video-img
{
.video-img
{
height
:
100%
;
height
:
100%
;
height
:
294rpx
;
height
:
294rpx
;
border-radius
:
8rpx
;
z-index
:
0
;
z-index
:
0
;
}
}
.play-icon
{
.play-icon
{
...
...
src/pages.json
View file @
1b2b1be9
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
"path"
:
"pages/recommend/index"
,
"path"
:
"pages/recommend/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"推荐"
,
"navigationBarTitleText"
:
"推荐"
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
,
"disableSwipeBack"
:
true
}
}
},
},
{
{
...
...
src/pages/articleDetails/index.vue
View file @
1b2b1be9
...
@@ -14,21 +14,50 @@
...
@@ -14,21 +14,50 @@
</div>
</div>
</div>
</div>
<div
class=
"content"
v-html=
"data.content"
></div>
<div
class=
"content"
v-html=
"data.content"
></div>
<wd-tabbar
v-if=
"data.type == 3"
custom-style=
"display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<wd-button
@
tap=
"next"
:disabled=
"data.bmStutas || !data.bm"
round=
"false"
class=
"foot-btn"
>
{{
!
data
.
bmStutas
&&
data
.
bm
?
"立即报名"
:
data
.
bmStutas
?
"已报名"
:
"报名结束"
}}
</wd-button>
</wd-tabbar>
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
getArticleDetailApi
}
from
"@/api/article.js"
;
import
{
getArticleDetailApi
,
registerStatus
}
from
"@/api/article.js"
;
import
evn
from
"@/utils/config.js"
;
import
evn
from
"@/utils/config.js"
;
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
const
data
=
ref
({});
const
data
=
ref
({});
let
articleId
=
ref
(
null
);
onLoad
(({
id
})
=>
{
onLoad
(({
id
})
=>
{
articleId
.
value
=
id
;
const
currentTime
=
Date
.
now
();
getArticleDetailApi
(
id
).
then
(
res
=>
{
getArticleDetailApi
(
id
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
data
.
value
=
res
.
data
;
data
.
value
=
res
.
data
;
// 选择 btnTxt 的值
if
(
currentTime
>=
res
.
data
.
registerStartTime
&&
currentTime
<=
res
.
data
.
registerEndTime
)
{
data
.
value
.
bm
=
true
;
// 当前时间在开始时间和结束时间之间
}
else
{
data
.
value
.
bm
=
false
;
}
});
registerStatus
(
id
).
then
(
Res
=>
{
data
.
value
.
bmStutas
=
Res
.
data
;
});
});
});
});
function
next
()
{
xma
.
navigateTo
({
url
:
`/pages/signUp/index?articleId=
${
articleId
.
value
}
`
});
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -67,5 +96,16 @@ onLoad(({ id }) => {
...
@@ -67,5 +96,16 @@ onLoad(({ id }) => {
}
}
}
}
}
}
.foot-btn
{
position
:
fixed
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
622rpx
;
height
:
80rpx
;
color
:
#ffffff
;
background
:
#1f86ff
;
border-radius
:
12rpx
;
}
}
}
</
style
>
</
style
>
src/pages/dynamic/index.vue
View file @
1b2b1be9
...
@@ -19,13 +19,23 @@ import { getArticleListApi, getArticleTypesApi } from "@/api/article.js";
...
@@ -19,13 +19,23 @@ import { getArticleListApi, getArticleTypesApi } from "@/api/article.js";
import
{
reactive
,
ref
}
from
"vue"
;
import
{
reactive
,
ref
}
from
"vue"
;
const
contentHeight
=
ref
(
"100rpx"
);
const
contentHeight
=
ref
(
"100rpx"
);
const
active
=
ref
(
""
);
const
active
=
ref
(
""
);
const
typeList
=
ref
([{
id
:
""
,
name
:
"全部"
}]);
const
typeList
=
ref
([
{
id
:
""
,
name
:
"全部"
},
{
id
:
"aaaa"
,
name
:
"招聘会"
}
]);
getArticleTypesApi
(
2
).
then
(
res
=>
{
getArticleTypesApi
(
2
).
then
(
res
=>
{
typeList
.
value
.
push
(...
res
.
data
);
typeList
.
value
.
push
(...
res
.
data
);
});
});
const
changeType
=
type
=>
{
const
changeType
=
type
=>
{
active
.
value
=
type
.
id
;
active
.
value
=
type
.
id
;
refresh
().
then
(
res
=>
{
refresh
().
then
(
res
=>
{
if
(
type
.
name
==
"招聘会"
)
{
params
.
value
.
type
=
3
;
params
.
value
.
categoryId
=
""
;
}
else
{
params
.
value
.
type
=
2
;
params
.
value
.
categoryId
=
type
.
id
;
}
feedbackListFn
();
feedbackListFn
();
});
});
};
};
...
@@ -95,7 +105,6 @@ onPullDownRefresh(() => {
...
@@ -95,7 +105,6 @@ onPullDownRefresh(() => {
onReachBottom
(()
=>
{
onReachBottom
(()
=>
{
feedbackListFn
();
feedbackListFn
();
});
});
changeType
({
id
:
""
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/signUp/addPost.vue
View file @
1b2b1be9
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"title"
>
添加岗位信息
{{
formData
.
positionList
.
length
+
1
}}
</div>
<div
class=
"title"
>
添加岗位信息
{{
pinias
.
formData
.
positionList
.
length
+
1
}}
</div>
<div
class=
"form"
>
<div
class=
"form"
>
<div
class=
"grid"
>
<div
class=
"grid"
>
<formItem
full
title=
"岗位名称"
>
<formItem
full
title=
"岗位名称"
>
...
@@ -79,8 +79,8 @@
...
@@ -79,8 +79,8 @@
<view
class=
"wrapper flex-center"
>
<view
class=
"wrapper flex-center"
>
<view
class=
"block"
@
click
.
stop=
""
>
<view
class=
"block"
@
click
.
stop=
""
>
<img
src=
"@/static/image/signUp.png"
alt=
""
/>
<img
src=
"@/static/image/signUp.png"
alt=
""
/>
<p>
您已填写
{{
formData
.
companyName
}}
</p>
<p>
您已填写
{{
pinias
.
formData
.
companyName
}}
</p>
<p>
招聘岗位
{{
formData
.
positionList
.
length
}}
类
</p>
<p>
招聘岗位
{{
pinias
.
formData
.
positionList
.
length
}}
类
</p>
<div
class=
"btn"
>
<div
class=
"btn"
>
<button
class=
"b1"
@
click=
"show = false"
>
继续提交
</button>
<button
class=
"b1"
@
click=
"show = false"
>
继续提交
</button>
<button
class=
"b2"
@
click=
"submit"
>
提交报名
</button>
<button
class=
"b2"
@
click=
"submit"
>
提交报名
</button>
...
@@ -100,8 +100,9 @@ import { ref } from "vue";
...
@@ -100,8 +100,9 @@ import { ref } from "vue";
import
{
getEumData
}
from
"@/utils/utils"
;
import
{
getEumData
}
from
"@/utils/utils"
;
import
formItem
from
"./formItem.vue"
;
import
formItem
from
"./formItem.vue"
;
import
{
useStore
}
from
"./store"
;
import
{
useStore
}
from
"./store"
;
const
pinias
=
useStore
();
import
{
jobFairRegisterApi
}
from
"@/api/article"
;
import
{
jobFairRegisterApi
}
from
"@/api/article"
;
const
{
formData
}
=
useStore
();
const
show
=
ref
(
false
);
const
show
=
ref
(
false
);
const
postItem
=
ref
({
const
postItem
=
ref
({
jobName
:
""
,
jobName
:
""
,
...
@@ -117,12 +118,12 @@ const postItem = ref({
...
@@ -117,12 +118,12 @@ const postItem = ref({
});
});
/* 年龄 */
/* 年龄 */
const
age
=
ref
([]);
const
age
=
ref
([]);
const
ageText
=
ref
(
""
);
const
ageText
=
ref
(
"
不限
"
);
const
ageColumns
=
ref
([]);
const
ageColumns
=
ref
([]);
const
changeAge
=
({
selectedItem
,
resolve
,
finish
})
=>
{
const
changeAge
=
({
selectedItem
,
resolve
,
finish
})
=>
{
if
(
selectedItem
.
next
)
{
if
(
selectedItem
.
next
)
{
const
temp
=
[];
const
temp
=
[];
for
(
let
i
=
1
;
i
<
50
;
i
++
)
{
for
(
let
i
=
1
6
;
i
<
50
;
i
++
)
{
temp
.
push
({
temp
.
push
({
value
:
i
+
selectedItem
.
value
,
value
:
i
+
selectedItem
.
value
,
label
:
i
+
selectedItem
.
value
+
"岁"
,
label
:
i
+
selectedItem
.
value
+
"岁"
,
...
@@ -131,6 +132,9 @@ const changeAge = ({ selectedItem, resolve, finish }) => {
...
@@ -131,6 +132,9 @@ const changeAge = ({ selectedItem, resolve, finish }) => {
resolve
(
temp
);
resolve
(
temp
);
}
}
}
else
{
}
else
{
postItem
.
value
.
minAgeRequirement
=
0
;
postItem
.
value
.
maxAgeRequirement
=
0
;
ageText
.
value
=
"不限"
;
finish
();
finish
();
}
}
};
};
...
@@ -143,18 +147,19 @@ const confirmAge = ({ value, selectedItems }) => {
...
@@ -143,18 +147,19 @@ const confirmAge = ({ value, selectedItems }) => {
}
else
{
}
else
{
postItem
.
value
.
minAgeRequirement
=
0
;
postItem
.
value
.
minAgeRequirement
=
0
;
postItem
.
value
.
maxAgeRequirement
=
0
;
postItem
.
value
.
maxAgeRequirement
=
0
;
ageText
.
value
=
"不限"
;
}
}
ageText
.
value
=
selectedItems
.
map
(
v
=>
v
.
label
).
join
(
"~"
);
ageText
.
value
=
selectedItems
.
map
(
v
=>
v
.
label
).
join
(
"~"
);
};
};
const
initAgeColumns
=
()
=>
{
const
initAgeColumns
=
()
=>
{
const
temp
=
[
const
temp
=
[
{
{
value
:
"不限"
,
value
:
0
,
label
:
"不限"
,
label
:
"不限"
,
next
:
false
next
:
false
}
}
];
];
for
(
let
i
=
1
;
i
<
50
;
i
++
)
{
for
(
let
i
=
1
6
;
i
<
50
;
i
++
)
{
temp
.
push
({
temp
.
push
({
value
:
i
,
value
:
i
,
label
:
i
+
"岁"
,
label
:
i
+
"岁"
,
...
@@ -167,7 +172,7 @@ initAgeColumns();
...
@@ -167,7 +172,7 @@ initAgeColumns();
/* 学历 */
/* 学历 */
const
educationColumns
=
ref
([]);
const
educationColumns
=
ref
([]);
const
educationText
=
ref
(
""
);
const
educationText
=
ref
(
"
不限
"
);
const
initEducationColumns
=
async
()
=>
{
const
initEducationColumns
=
async
()
=>
{
educationColumns
.
value
=
await
getEumData
(
"EnumEducationRequirement"
);
educationColumns
.
value
=
await
getEumData
(
"EnumEducationRequirement"
);
};
};
...
@@ -203,6 +208,7 @@ const confirmSalary = ({ value, selectedItems }) => {
...
@@ -203,6 +208,7 @@ const confirmSalary = ({ value, selectedItems }) => {
}
else
{
}
else
{
postItem
.
value
.
minSalary
=
0
;
postItem
.
value
.
minSalary
=
0
;
postItem
.
value
.
maxSalary
=
0
;
postItem
.
value
.
maxSalary
=
0
;
salaryText
.
value
=
"面议"
;
}
}
salaryText
.
value
=
selectedItems
.
map
(
v
=>
v
.
label
).
join
(
"~"
);
salaryText
.
value
=
selectedItems
.
map
(
v
=>
v
.
label
).
join
(
"~"
);
};
};
...
@@ -255,17 +261,25 @@ const addPost = () => {
...
@@ -255,17 +261,25 @@ const addPost = () => {
});
});
return
;
return
;
}
}
formData
.
positionList
.
push
(
postItem
.
value
);
if
(
pinias
.
formData
.
positionList
.
length
==
0
)
{
let
arr
=
[];
arr
.
push
(
postItem
.
value
);
pinias
.
setFormDataKey
(
"positionList"
,
arr
);
}
else
{
pinias
.
setFormDataKey
(
"positionList"
,
[...
pinias
.
formData
.
positionList
,
postItem
.
value
]);
}
/* 数据清空 */
/* 数据清空 */
postItem
.
value
=
{
postItem
.
value
=
{
jobName
:
""
,
jobName
:
""
,
recruitmentNumber
:
""
,
recruitmentNumber
:
1
,
educationRequirement
:
""
,
minAgeRequirement
:
0
,
socialInsurance
:
""
,
maxAgeRequirement
:
0
,
accommodation
:
""
,
educationRequirement
:
"0"
,
skills
:
""
,
minSalary
:
0
,
ageText
:
""
,
maxSalary
:
0
,
salaryText
:
""
socialInsurance
:
"1"
,
accommodation
:
"0"
,
skills
:
""
};
};
ageText
.
value
=
""
;
ageText
.
value
=
""
;
salaryText
.
value
=
""
;
salaryText
.
value
=
""
;
...
@@ -275,20 +289,96 @@ const addPost = () => {
...
@@ -275,20 +289,96 @@ const addPost = () => {
};
};
/* 提交 */
/* 提交 */
const
openMask
=
()
=>
{
const
openMask
=
()
=>
{
if
(
formData
.
positionList
.
length
<
1
)
{
console
.
log
(
"postItem.value"
,
postItem
.
value
);
uni
.
showToast
({
title
:
"请添加职位信息"
,
if
(
icon
:
"none"
validateForm
(
postItem
.
value
,
[
});
"accommodation"
,
return
;
"educationRequirement"
,
"jobName"
,
"maxAgeRequirement"
,
"maxSalary"
,
"minAgeRequirement"
,
"minSalary"
,
"recruitmentNumber"
,
"skills"
,
"socialInsurance"
])
)
{
if
(
pinias
.
formData
.
positionList
.
length
==
0
)
{
let
arr
=
[];
arr
.
push
(
postItem
.
value
);
pinias
.
setFormDataKey
(
"positionList"
,
arr
);
show
.
value
=
true
;
}
else
{
pinias
.
setFormDataKey
(
"positionList"
,
[...
pinias
.
formData
.
positionList
,
postItem
.
value
]);
show
.
value
=
true
;
}
}
};
const
validateForm
=
(
formData
,
requiredFields
)
=>
{
for
(
const
field
of
requiredFields
)
{
const
value
=
formData
[
field
];
// 排除 0 和 "0" 的值,不作为空值校验
if
(
value
===
undefined
||
value
===
null
||
value
===
""
)
{
uni
.
showToast
({
title
:
`请填写完整`
,
icon
:
"none"
,
duration
:
2000
});
return
false
;
}
}
}
show
.
value
=
true
;
return
true
;
};
};
const
submit
=
()
=>
{
const
submit
=
()
=>
{
console
.
log
(
formData
);
console
.
log
(
pinias
.
formData
);
jobFairRegisterApi
(
formData
).
then
(
res
=>
{
if
(
console
.
log
(
res
);
validateForm
(
postItem
.
value
,
[
});
"accommodation"
,
"educationRequirement"
,
"jobName"
,
"maxAgeRequirement"
,
"maxSalary"
,
"minAgeRequirement"
,
"minSalary"
,
"recruitmentNumber"
,
"skills"
,
"socialInsurance"
])
)
{
console
.
log
(
"pinias"
,
pinias
);
pinias
.
resetForm
();
return
;
jobFairRegisterApi
(
pinias
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
postItem
.
value
=
{
jobName
:
""
,
recruitmentNumber
:
1
,
minAgeRequirement
:
0
,
maxAgeRequirement
:
0
,
educationRequirement
:
"0"
,
minSalary
:
0
,
maxSalary
:
0
,
socialInsurance
:
"1"
,
accommodation
:
"0"
,
skills
:
""
};
ageText
.
value
=
""
;
salaryText
.
value
=
""
;
age
.
value
=
[];
salary
.
value
=
[];
pinias
.
resetForm
();
xma
.
reLaunch
({
url
:
"/pages/recommend/index"
});
}
console
.
log
(
res
);
});
}
};
};
</
script
>
</
script
>
...
...
src/pages/signUp/index.vue
View file @
1b2b1be9
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<NavBar
:showIcon=
"true"
:showTitle=
"true"
title=
"岗位信息"
backgroundBox=
"#FFFFFF"
></NavBar>
<div
class=
"title"
>
填写企业信息
</div>
<div
class=
"title"
>
填写企业信息
</div>
<div
class=
"form"
>
<div
class=
"form"
>
<formItem
title=
"企业(单位)名称"
>
<formItem
title=
"企业(单位)名称"
>
<input
type=
"text"
v-model=
"formData.companyName"
placeholder=
"请填写单位名称"
/>
<input
type=
"text"
v-model=
"
pinias.
formData.companyName"
placeholder=
"请填写单位名称"
/>
</formItem>
</formItem>
<formItem
title=
"单位联系人"
>
<formItem
title=
"单位联系人"
>
<input
type=
"text"
v-model=
"formData.contactPerson"
placeholder=
"请填写联系人"
/>
<input
type=
"text"
v-model=
"
pinias.
formData.contactPerson"
placeholder=
"请填写联系人"
/>
</formItem>
</formItem>
<formItem
title=
"联系电话"
>
<formItem
title=
"联系电话"
>
<input
type=
"text"
v-model=
"formData.contactPhone"
placeholder=
"请填联系电话"
/>
<input
type=
"text"
v-model=
"
pinias.
formData.contactPhone"
placeholder=
"请填联系电话"
/>
</formItem>
</formItem>
<formItem
title=
"企业(单位)简介"
>
<formItem
title=
"企业(单位)简介"
>
<textarea
type=
"text"
v-model=
"formData.companyIntro"
placeholder=
"请输入简介"
/>
<textarea
type=
"text"
v-model=
"
pinias.
formData.companyIntro"
placeholder=
"请输入简介"
/>
</formItem>
</formItem>
</div>
</div>
<div
class=
"footer"
>
<div
class=
"footer"
>
...
@@ -25,11 +26,12 @@
...
@@ -25,11 +26,12 @@
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
formItem
from
"./formItem.vue"
;
import
formItem
from
"./formItem.vue"
;
import
{
useStore
}
from
"./store"
;
import
{
useStore
}
from
"./store"
;
const
{
formData
,
setFormDataKey
}
=
useStore
();
const
pinias
=
useStore
();
setFormDataKey
(
"articleId"
,
"580953961662623744"
);
onLoad
(
options
=>
{
pinias
.
setFormDataKey
(
"articleId"
,
options
.
articleId
);
});
const
next
=
()
=>
{
const
next
=
()
=>
{
const
{
companyName
,
contactPerson
,
contactPhone
,
companyIntro
}
=
formData
;
const
{
companyName
,
contactPerson
,
contactPhone
,
companyIntro
}
=
pinias
.
formData
;
if
(
companyName
&&
contactPerson
&&
contactPhone
&&
companyIntro
)
{
if
(
companyName
&&
contactPerson
&&
contactPhone
&&
companyIntro
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/signUp/addPost"
url
:
"/pages/signUp/addPost"
...
...
src/pages/signUp/store.js
View file @
1b2b1be9
import
{
defineStore
}
from
"pinia"
;
import
{
defineStore
}
from
"pinia"
;
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
export
const
useStore
=
defineStore
(
"signUpStore"
,
{
export
const
useStore
=
defineStore
(
"useStore"
,()
=>
{
state
:
()
=>
({
let
formData
=
ref
({
formData
:
{
articleId
:
""
,
articleId
:
""
,
companyName
:
""
,
companyName
:
""
,
companyIntro
:
""
,
companyIntro
:
""
,
contactPerson
:
""
,
contactPerson
:
""
,
contactPhone
:
""
,
contactPhone
:
""
,
positionList
:
[]
positionList
:
[]
})
function
setFormDataKey
(
key
,
data
)
{
console
.
log
(
'keykeykey'
,
key
,
data
);
formData
.
value
[
key
]
=
data
;
}
}
}),
actions
:
{
function
resetForm
()
{
setFormDataKey
(
key
,
data
)
{
formData
.
value
.
articleId
=
""
this
.
formData
[
key
]
=
data
;
formData
.
value
.
companyName
=
""
formData
.
value
.
companyIntro
=
""
formData
.
value
.
contactPerson
=
""
formData
.
value
.
contactPhone
=
""
formData
.
value
.
positionList
=
[]
}
return
{
formData
,
setFormDataKey
,
resetForm
}
}
}
});
});
src/pages/user/businessLicense/fillIn.vue
View file @
1b2b1be9
...
@@ -18,22 +18,22 @@
...
@@ -18,22 +18,22 @@
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"name"
v-if=
"step === 1"
>
<view
class=
"name"
v-if=
"step === 1"
>
<view
class=
"t1"
>
企业信息
</view>
<view
class=
"t1"
>
企业信息
</view>
<input
type=
"text"
v-model=
"formData.name"
placeholder=
"请输入企业名称"
/>
<input
type=
"text"
v-model=
"
pinias.
formData.name"
placeholder=
"请输入企业名称"
/>
</view>
</view>
<view
class=
"name"
v-if=
"step === 2"
>
<view
class=
"name"
v-if=
"step === 2"
>
<view
class=
"t1"
>
信用代码
</view>
<view
class=
"t1"
>
信用代码
</view>
<input
type=
"text"
v-model=
"formData.creditCode"
placeholder=
"请输入信用代码"
/>
<input
type=
"text"
v-model=
"
pinias.
formData.creditCode"
placeholder=
"请输入信用代码"
/>
</view>
</view>
<view
class=
"image-upload"
v-if=
"step === 3"
>
<view
class=
"image-upload"
v-if=
"step === 3"
>
<view
class=
"t1"
>
营业执照照片
</view>
<view
class=
"t1"
>
营业执照照片
</view>
<view
class=
"t2"
>
注:执照信息清晰可见,照片内容真实有效,不做任何修改,大小不超过10M
</view>
<view
class=
"t2"
>
注:执照信息清晰可见,照片内容真实有效,不做任何修改,大小不超过10M
</view>
<image
v-if=
"
formData.licensePath"
:src=
"evn.APP_IMAGE_BASE_API +
formData.licensePath"
mode=
""
/>
<image
v-if=
"
pinias.formData.licensePath"
:src=
"evn.APP_IMAGE_BASE_API + pinias.
formData.licensePath"
mode=
""
/>
<image
v-else
@
click=
"showPopout = true"
src=
"@/static/image/businessLicense/businessLicenseUpload.png"
mode=
""
/>
<image
v-else
@
click=
"showPopout = true"
src=
"@/static/image/businessLicense/businessLicenseUpload.png"
mode=
""
/>
</view>
</view>
</view>
</view>
<view
class=
"btn-wrap flex-center"
>
<view
class=
"btn-wrap flex-center"
>
<button
v-if=
"step
<
3
"
class=
"bottom-btn"
@
tap=
"nextStep"
>
下一步
</button>
<button
v-if=
"step
<
3
"
class=
"bottom-btn"
@
tap=
"nextStep"
>
下一步
</button>
<template
v-if=
"step === 3 && !!formData.licensePath"
>
<template
v-if=
"step === 3 && !!
pinias.
formData.licensePath"
>
<button
class=
"reupload"
@
tap=
"showPopout = true"
>
重新上传
</button>
<button
class=
"reupload"
@
tap=
"showPopout = true"
>
重新上传
</button>
<button
class=
"next"
@
tap=
"nextStep"
>
下一步
</button>
<button
class=
"next"
@
tap=
"nextStep"
>
下一步
</button>
</
template
>
</
template
>
...
@@ -66,22 +66,27 @@
...
@@ -66,22 +66,27 @@
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
evn
from
"@/utils/config"
;
import
evn
from
"@/utils/config"
;
import
{
uploadFiles
}
from
"@/utils/fileUpload"
;
import
{
uploadFiles
}
from
"@/utils/fileUpload"
;
import
{
useDefineStore
}
from
"./store"
;
import
{
useDefineStore
}
from
"./store"
;
const
pinias
=
useDefineStore
();
onLoad
(()
=>
{
onLoad
(()
=>
{
console
.
log
(
uni
);
console
.
log
(
uni
);
});
});
const
{
formData
,
setFormDataKey
}
=
useDefineStore
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
const
name
=
ref
(
""
);
const
name
=
ref
(
""
);
const
showPopout
=
ref
(
false
);
const
showPopout
=
ref
(
false
);
onShow
(()
=>
{
step
.
value
=
1
;
});
const
nextStep
=
()
=>
{
const
nextStep
=
()
=>
{
let
flag
=
false
;
let
flag
=
false
;
switch
(
step
.
value
)
{
switch
(
step
.
value
)
{
case
1
:
case
1
:
if
(
!
formData
.
name
)
flag
=
true
;
if
(
!
pinias
.
formData
.
name
)
flag
=
true
;
break
;
break
;
case
2
:
case
2
:
if
(
!
formData
.
creditCode
)
flag
=
true
;
if
(
!
pinias
.
formData
.
creditCode
)
flag
=
true
;
break
;
break
;
case
3
:
case
3
:
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -107,7 +112,7 @@ const chooseImage = sourceType => {
...
@@ -107,7 +112,7 @@ const chooseImage = sourceType => {
count
:
1
,
count
:
1
,
success
:
async
({
tempFiles
})
=>
{
success
:
async
({
tempFiles
})
=>
{
const
res
=
await
uploadFiles
(
tempFiles
);
const
res
=
await
uploadFiles
(
tempFiles
);
setFormDataKey
(
"licensePath"
,
res
[
0
].
key
);
pinias
.
setFormDataKey
(
"licensePath"
,
res
[
0
].
key
);
showPopout
.
value
=
false
;
showPopout
.
value
=
false
;
}
}
});
});
...
...
src/pages/user/businessLicense/store.js
View file @
1b2b1be9
import
{
defineStore
}
from
"pinia"
;
import
{
defineStore
}
from
"pinia"
;
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
export
const
useDefineStore
=
defineStore
(
"businessLicense"
,
{
export
const
useDefineStore
=
defineStore
(
"useDefineStore"
,
()
=>
{
state
:
()
=>
({
let
formData
=
ref
({
formData
:
{
name
:
""
,
name
:
""
,
creditCode
:
""
,
creditCode
:
""
,
licensePath
:
""
,
licensePath
:
""
,
licenseValidityPeriod
:
""
licenseValidityPeriod
:
""
})
}
function
setFormDataKey
(
key
,
data
)
{
}),
actions
:
{
setFormDataKey
(
key
,
data
)
{
this
.
formData
[
key
]
=
data
;
this
.
formData
[
key
]
=
data
;
}
}
}
return
{
formData
,
setFormDataKey
}
});
});
src/pages/user/businessLicense/submit.vue
View file @
1b2b1be9
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<NavBar
backgroundBox=
"#FFFFFF"
:showIcon=
"true"
:showTitle=
"true"
title=
"企业信息"
></NavBar>
<view
class=
"image-wrap"
>
<view
class=
"image-wrap"
>
<image
v-if=
"formData.licensePath"
:src=
"evn.APP_IMAGE_BASE_API + formData.licensePath"
mode=
""
/>
<image
v-if=
"formData.licensePath"
:src=
"evn.APP_IMAGE_BASE_API + formData.licensePath"
mode=
""
/>
<view>
注:接受拍摄复印件,黑白复印需要加盖公章,大小不超过10M
</view>
<view>
注:接受拍摄复印件,黑白复印需要加盖公章,大小不超过10M
</view>
...
...
src/pages/user/index.vue
View file @
1b2b1be9
...
@@ -98,20 +98,21 @@ const navList = reactive([
...
@@ -98,20 +98,21 @@ const navList = reactive([
removeToken
();
removeToken
();
},
},
text
:
"退出登录"
text
:
"退出登录"
},
{
icon
:
new
URL
(
"@/static/image/user/loginout.png"
,
import
.
meta
.
url
).
href
,
url
:
"/pages/login/test"
,
fn
:
()
=>
{
removeToken
();
},
text
:
"退出登录(去测试登录)"
},
{
icon
:
new
URL
(
"@/static/image/user/loginout.png"
,
import
.
meta
.
url
).
href
,
url
:
"/pages/user/businessLicense/fillIn"
,
text
:
"企业认证"
}
}
// {
//
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/user/businessLicense/fillIn",
// text: "企业认证"
// },
// {
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/login/test",
// fn: () => {
// removeToken();
// },
// text: "退出登录(去测试登录)"
// }
]);
]);
/* 个人信息 */
/* 个人信息 */
const
userInfo
=
ref
({});
const
userInfo
=
ref
({});
...
...
src/static/image/tabBar/communityActive.png
View replaced file @
14c8c24a
View file @
1b2b1be9
1.94 KB
|
W:
|
H:
2.19 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/utils/request.js
View file @
1b2b1be9
import
axios
from
"axios"
;
import
axios
from
"axios"
;
import
{
getToken
}
from
"@/utils/token"
;
import
{
getToken
,
removeToken
}
from
"@/utils/token"
;
const
baseURL
=
"https://lygsh-api.wjzpgz.com/"
;
//
const baseURL = "https://lygsh-api.wjzpgz.com/";
//
const baseURL = "http://192.168.11.179:8080/";
const
baseURL
=
"http://192.168.11.179:8080/"
;
// 创建一个 axios 实例
// 创建一个 axios 实例
const
instance
=
axios
.
create
({
const
instance
=
axios
.
create
({
baseURL
,
// 设置基础 URL
baseURL
,
// 设置基础 URL
...
@@ -38,7 +38,30 @@ instance.interceptors.request.use(
...
@@ -38,7 +38,30 @@ instance.interceptors.request.use(
instance
.
interceptors
.
response
.
use
(
instance
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
// 在这里可以对响应数据进行预处理
// 在这里可以对响应数据进行预处理
return
response
.
data
;
function
handleError
(
message
)
{
removeToken
();
xma
.
showToast
({
title
:
message
,
icon
:
"none"
,
duration
:
1900
,
});
setTimeout
(()
=>
{
xma
.
reLaunch
({
url
:
"/pages/login/index"
,
});
},
2000
);
}
let
{
code
}
=
response
.
data
;
console
.
log
(
'response.data'
,
response
.
data
);
if
(
code
==
200
)
{
return
response
.
data
;
}
else
if
(
code
==
9
)
{
// handleError("登录已过期");
}
else
if
(
code
==
2
)
{
handleError
(
"登录超时"
);
}
},
},
error
=>
{
error
=>
{
// 处理响应错误
// 处理响应错误
...
...
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