Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
129e053b
Commit
129e053b
authored
Nov 28, 2022
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请加盟部分接口对接
parent
3376ea39
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
530 additions
and
86 deletions
+530
-86
api/api.ts
+4
-0
common/common.ts
+150
-1
pages/application-process/applyCommon.scss
+17
-0
pages/application-process/basic-info.vue
+163
-37
pages/application-process/id-card.vue
+76
-8
pages/application-process/work-experience.vue
+112
-35
pages/myPoints/myPoints.vue
+1
-1
util/interceptor.ts
+3
-3
util/request.ts
+4
-1
No files found.
api/api.ts
View file @
129e053b
...
@@ -268,5 +268,9 @@ export default {
...
@@ -268,5 +268,9 @@ export default {
// 认证--上传就个人信息
// 认证--上传就个人信息
uploadSignUpUserInfo
(
params
){
uploadSignUpUserInfo
(
params
){
return
request
(
`
${
cffpURL
}
/user/uploadSignUpUserInfo`
,
"POST"
,
params
)
return
request
(
`
${
cffpURL
}
/user/uploadSignUpUserInfo`
,
"POST"
,
params
)
},
//查询申请加盟信息
queryById
(
params
){
return
request
(
`
${
cffpURL
}
/partner/queryById/
${
params
}
`
,
"GET"
)
}
}
}
}
common/common.ts
View file @
129e053b
...
@@ -39,6 +39,154 @@ export default {
...
@@ -39,6 +39,154 @@ export default {
}
else
{
}
else
{
return
;
return
;
}
}
}
},
/**
* 身份证号码校验,并获取生日、性别、年龄
* @param code
* @returns {{pass: boolean, msg: string, birthDay: number, gender: null, age: null, ageUnit: string}}
* @constructor
*/
IdCodeValid
(
code
)
{
if
(
code
)
{
// 身份证号合法性验证
// 支持15位和18位身份证号
// 支持地址编码、出生日期、校验位验证
const
city
=
{
11
:
'北京'
,
12
:
'天津'
,
13
:
'河北'
,
14
:
'山西'
,
15
:
'内蒙古'
,
21
:
'辽宁'
,
22
:
'吉林'
,
23
:
'黑龙江 '
,
31
:
'上海'
,
32
:
'江苏'
,
33
:
'浙江'
,
34
:
'安徽'
,
35
:
'福建'
,
36
:
'江西'
,
37
:
'山东'
,
41
:
'河南'
,
42
:
'湖北 '
,
43
:
'湖南'
,
44
:
'广东'
,
45
:
'广西'
,
46
:
'海南'
,
50
:
'重庆'
,
51
:
'四川'
,
52
:
'贵州'
,
53
:
'云南'
,
54
:
'西藏 '
,
61
:
'陕西'
,
62
:
'甘肃'
,
63
:
'青海'
,
64
:
'宁夏'
,
65
:
'新疆'
,
81
:
'香港'
,
82
:
'澳门'
,
83
:
'台湾'
,
91
:
'国外 '
};
// 出生年月日校验 前正则限制起始年份为1900;
const
year
=
code
.
substr
(
6
,
4
);
// 身份证年
const
month
=
code
.
substr
(
10
,
2
);
// 身份证月
const
date
=
code
.
substr
(
12
,
2
);
// 身份证日
const
birth
=
new
Date
(
year
+
'-'
+
month
+
'-'
+
date
);
const
time
=
Date
.
parse
(
year
+
'-'
+
month
+
'-'
+
date
);
// 身份证日期时间戳date
const
now_time
=
Date
.
parse
(
new
Date
().
toDateString
());
const
dates
=
(
new
Date
(
year
,
month
,
0
)).
getDate
();
// 身份证当月天数
const
gender
=
code
.
substr
(
16
,
1
);
let
row
=
{
'pass'
:
true
,
'msg'
:
'验证成功'
,
'birthDay'
:
time
,
'gender'
:
null
,
};
if
(
parseInt
(
gender
%
2
+
''
,
0
)
===
1
)
{
row
.
gender
=
'1'
;
}
else
{
row
.
gender
=
'2'
;
}
if
(
!
code
||
!
/^
\d{6}(
19|20
)?\d{2}(
0
[
1-9
]
|1
[
012
])(
0
[
1-9
]
|
[
12
]\d
|3
[
01
])\d{3}(\d
|
[
xX
])
$/
.
test
(
code
))
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号格式错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
};
}
else
if
(
!
city
[
code
.
substr
(
0
,
2
)])
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号地址编码错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
};
}
else
if
(
time
>
now_time
||
date
>
dates
)
{
row
=
{
'pass'
:
false
,
'msg'
:
'出生日期不合规'
,
'birthDay'
:
null
,
'gender'
:
null
,
}
}
else
{
// 18位身份证需要验证最后一位校验位
if
(
code
.
length
==
18
)
{
code
=
code
.
split
(
''
);
// ∑(ai×Wi)(mod 11)
// 加权因子
const
factor
=
[
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
];
// 校验位
const
parity
=
[
1
,
0
,
'X'
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
];
let
sum
=
0
;
let
ai
=
0
;
let
wi
=
0
;
for
(
let
i
=
0
;
i
<
17
;
i
++
)
{
ai
=
code
[
i
];
wi
=
factor
[
i
];
sum
+=
ai
*
wi
;
}
if
(
parity
[
sum
%
11
]
!=
code
[
17
].
toUpperCase
())
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号校验位错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
};
}
}
}
return
row
;
}
},
/**
* 姓名正则(包含公司名)
*/
nameValid
(
name
)
{
const
NAME_REGEXP
=
/
(
^
[\u
4e00-
\u
9fa5
]{1}[\u
4e00-
\u
9fa5
\.
·()()。
]{0,48}[\u
4e00-
\u
9fa5
]{1}
$
)
|
(
^
[
a-zA-Z
]{1}[
a-zA-Z
\s]{0,48}[
a-zA-Z
]{1}
$
)
/
;
return
NAME_REGEXP
.
test
(
name
);
},
/**
* 邮箱正则
*/
emailValid
(
email
)
{
const
EMAIL_REGEXP
=
/^
(\w
-*
\.
*
)
+@
(\w
-
?)
+
(\.\w{2,})
+$/
;
return
EMAIL_REGEXP
.
test
(
email
);
},
//检测字符串是否只有中文、英文、数字
checkCEN
(
val
)
{
const
cen_reg
=
/^
[
A-Za-z0-9
\u
4e00-
\u
9fa5
]
+$/
;
return
cen_reg
.
test
(
val
);
},
/**
* 检测统一社会信用代码只能是数字和字母
* @param val
* @returns {boolean}
*/
checkTaxNo
(
val
)
{
const
taxNo_reg
=
/
[
a-zA-Z0-9
]{5,20}
/
;
return
taxNo_reg
.
test
(
val
);
}
}
}
\ No newline at end of file
pages/application-process/applyCommon.scss
View file @
129e053b
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
font-size
:
36rpx
;
font-size
:
36rpx
;
background
:
#fff
;
background
:
#fff
;
min-height
:
100%
;
min-height
:
100%
;
overflow
:
auto
;
padding-bottom
:
80rpx
;
.title
{
.title
{
padding
:
20rpx
30rpx
0
30rpx
;
padding
:
20rpx
30rpx
0
30rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -75,6 +77,21 @@
...
@@ -75,6 +77,21 @@
font-size
:
12px
;
font-size
:
12px
;
text-align
:
center
;
text-align
:
center
;
}
}
.upLoadMore
{
width
:
20%
;
border
:
2rpx
#EEEBEB
dashed
;
text-align
:
center
;
padding
:
20rpx
0
;
margin
:
20rpx
auto
;
.iconfont
{
font-size
:
36rpx
;
margin-bottom
:
20rpx
;
}
view
:nth-child
(
2
)
{
font-size
:
18rpx
;
color
:
#999999
;
}
}
.icon-weibiaoti553
{
.icon-weibiaoti553
{
font-size
:
120rpx
;
font-size
:
120rpx
;
color
:
#627AB5
;
color
:
#627AB5
;
...
...
pages/application-process/basic-info.vue
View file @
129e053b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
申请身份
</text>
<text>
申请身份
</text>
<picker
@
change=
"changeIdentity"
:value=
"
name
"
:range=
"identityArr"
<picker
@
change=
"changeIdentity"
:value=
"
identityIdx
"
:range=
"identityArr"
range-key=
"name"
>
range-key=
"name"
>
<view
class=
"uni-input"
>
{{
identityArr
[
identityIdx
][
'name'
]
}}
<view
class=
"uni-input"
>
{{
identityArr
[
identityIdx
][
'name'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
<text
class=
"iconfont icon-youjiantou"
></text>
...
@@ -24,17 +24,26 @@
...
@@ -24,17 +24,26 @@
</view>
</view>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
所属组织
</text>
<text>
所属组织
</text>
<view
class=
""
>
<picker
@
change=
"changeArea"
:value=
"areaIdIdx"
:range=
"cffpAreaQuerys"
银盾工作室
range-key=
"areaName"
>
</view>
<view
class=
"uni-input"
>
{{
cffpAreaQuerys
[
areaIdIdx
][
'areaName'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</picker>
</view>
</view>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
姓名
</text>
<text>
姓名
</text>
<input
type=
"text"
class=
"form-control"
v-model=
"applyParam.name"
placeholder=
"请输入姓名"
/>
<input
type=
"text"
class=
"form-control"
v-model=
"applyParam.name"
placeholder=
"请输入姓名"
auto-blur=
true
@
blur=
"checkInput(1,applyParam.name)"
/>
</view>
</view>
<view
class=
"contentItem"
>
<text>
手机号
</text>
<input
type=
"text"
class=
"form-control"
v-model=
"applyParam.mobileNumber"
placeholder=
"请输入手机号"
maxlength=
"11"
auto-blur=
true
@
blur=
"checkInput(2,applyParam.mobileNumber)"
/>
</view>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
证件类型
</text>
<text>
证件类型
</text>
<picker
@
change=
"changeIdType"
:value=
"
name
"
:range=
"idTypesList"
<picker
@
change=
"changeIdType"
:value=
"
idTypeIdx
"
:range=
"idTypesList"
range-key=
"name"
>
range-key=
"name"
>
<view
class=
"uni-input"
>
{{
idTypesList
[
idTypeIdx
][
'name'
]
}}
<view
class=
"uni-input"
>
{{
idTypesList
[
idTypeIdx
][
'name'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
<text
class=
"iconfont icon-youjiantou"
></text>
...
@@ -44,7 +53,8 @@
...
@@ -44,7 +53,8 @@
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
证件号码
</text>
<text>
证件号码
</text>
<view>
<view>
<input
type=
"text"
class=
"form-control"
v-model=
"applyParam.idNo"
placeholder=
"请输入证件号码"
/>
<input
type=
"text"
class=
"form-control"
v-model=
"applyParam.idNo"
placeholder=
"请输入证件号码"
auto-blur=
true
@
blur=
"checkInput(3,applyParam.idNo)"
/>
</view>
</view>
</view>
</view>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
...
@@ -69,15 +79,18 @@
...
@@ -69,15 +79,18 @@
<
script
>
<
script
>
import
api
from
"@/api/api"
;
import
api
from
"@/api/api"
;
import
common
from
'@/common/common.ts'
;
import
util
from
'@/util/dataHandling'
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
identityIdx
:
0
,
identityIdx
:
0
,
identityArr
:[{
partnerLevel
:
null
,
name
:
'请选择'
},{
partnerLevel
:
'A
'
,
name
:
'事业伙伴'
},{
partnerLevel
:
'B1'
,
name
:
'工作室'
}],
identityArr
:[{
partnerLevel
:
'A1
'
,
name
:
'事业伙伴'
},{
partnerLevel
:
'B1'
,
name
:
'工作室'
}],
applyParam
:{
applyParam
:{
inviterInvitationCode
:
''
,
inviterInvitationCode
:
''
,
name
:
''
,
name
:
''
,
partnerLevel
:
''
,
mobileNumber
:
''
,
partnerLevel
:
'A1'
,
idType
:
''
,
idType
:
''
,
idNo
:
''
,
idNo
:
''
,
birthday
:
''
,
birthday
:
''
,
...
@@ -87,11 +100,14 @@
...
@@ -87,11 +100,14 @@
idTypesList
:[{
id
:
null
,
name
:
'请选择'
}],
idTypesList
:[{
id
:
null
,
name
:
'请选择'
}],
idTypeIdx
:
0
,
idTypeIdx
:
0
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
cffpAreaQuerys
:[{
areaId
:
null
,
areaName
:
"请选择所属组织"
,
levelOrder
:
null
}],
areaIdIdx
:
0
}
}
},
},
components
:{},
components
:{},
onLoad
(){
onLoad
(){
this
.
erpInitialize
();
this
.
erpInitialize
();
this
.
queryOrgList
();
},
},
methods
:{
methods
:{
erpInitialize
(){
erpInitialize
(){
...
@@ -102,10 +118,24 @@
...
@@ -102,10 +118,24 @@
}
}
})
})
},
},
queryOrgList
(){
const
param
=
{
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
// userId:1,
partnerLevel
:
this
.
applyParam
.
partnerLevel
}
console
.
log
(
param
)
api
.
queryOrgList
(
param
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
this
.
cffpAreaQuerys
=
this
.
cffpAreaQuerys
.
concat
(
res
[
'data'
][
'cffpAreaQuerys'
])
}
})
},
changeIdentity
:
function
(
e
)
{
changeIdentity
:
function
(
e
)
{
this
.
identityIdx
=
e
.
detail
.
value
;
this
.
identityIdx
=
e
.
detail
.
value
;
this
.
applyParam
.
partnerLevel
=
this
.
identityArr
[
this
.
identityIdx
][
'partnerLevel'
];
this
.
applyParam
.
partnerLevel
=
this
.
identityArr
[
this
.
identityIdx
][
'partnerLevel'
];
console
.
log
(
this
.
partnerLevel
)
console
.
log
(
this
.
applyParam
.
partnerLevel
)
},
},
changeIdType
:
function
(
e
){
changeIdType
:
function
(
e
){
this
.
idTypeIdx
=
e
.
detail
.
value
;
this
.
idTypeIdx
=
e
.
detail
.
value
;
...
@@ -115,34 +145,130 @@
...
@@ -115,34 +145,130 @@
bindBirthday
:
function
(
e
)
{
bindBirthday
:
function
(
e
)
{
this
.
applyParam
.
birthday
=
e
.
detail
.
value
;
this
.
applyParam
.
birthday
=
e
.
detail
.
value
;
},
},
changeArea
:
function
(
e
){
this
.
areaIdIdx
=
e
.
detail
.
value
;
this
.
applyParam
.
areaId
=
this
.
cffpAreaQuerys
[
this
.
areaIdIdx
][
'areaId'
];
console
.
log
(
this
.
applyParam
.
areaId
)
},
checkInput
(
type
,
code
){
if
(
type
==
1
){
if
(
code
&&
!
common
.
nameValid
(
code
)){
uni
.
showToast
({
title
:
'请输入真实的姓名!'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
if
(
type
==
2
){
if
(
code
&&
!
common
.
mobileNoValid
(
code
)){
uni
.
showToast
({
title
:
'请输入正确的手机号码!'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
if
(
type
==
3
){
if
(
this
.
applyParam
.
idType
===
'身份证'
){
if
(
code
&&
!
common
.
IdCodeValid
(
code
).
pass
){
uni
.
showToast
({
title
:
`
${
common
.
IdCodeValid
(
code
).
msg
}
`
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
this
.
applyParam
.
birthday
=
util
.
dateFormat
(
common
.
IdCodeValid
(
code
).
birthDay
,
'yyyy-MM-dd'
);
console
.
log
(
this
.
applyParam
)
}
else
{
if
(
code
&&
!
common
.
checkTaxNo
(
code
)){
uni
.
showToast
({
title
:
'证件号码只能是5-20位的数字字母组合'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
}
},
saveInfo
(){
saveInfo
(){
// if(!this.applyParam.name){
if
(
!
this
.
applyParam
.
name
){
// uni.showToast({
uni
.
showToast
({
// title: '请输入姓名',
title
:
'请输入姓名'
,
// duration: 2000,
duration
:
2000
,
// icon: 'none'
icon
:
'none'
// })
})
// return;
return
;
// }
}
// if(!this.applyParam.idType){
if
(
!
this
.
applyParam
.
mobileNumber
){
// uni.showToast({
uni
.
showToast
({
// title: '请选择证件类型',
title
:
'请输入手机号'
,
// duration: 2000,
duration
:
2000
,
// icon: 'none'
icon
:
'none'
// })
})
// return;
return
;
// }
}
// if(!this.applyParam.idNo){
if
(
!
this
.
applyParam
.
partnerLevel
){
// uni.showToast({
uni
.
showToast
({
// title: '请输入证件号',
title
:
'请选择申请身份!'
,
// duration: 2000,
duration
:
2000
,
// icon: 'none'
icon
:
'none'
// })
})
// return;
return
;
// }
}
uni
.
setStorageSync
(
'applyParam'
,
JSON
.
stringify
(
this
.
applyParam
))
if
(
!
this
.
applyParam
.
idType
){
uni
.
navigateTo
({
uni
.
showToast
({
url
:
'work-experience'
title
:
'请选择证件类型'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
if
(
!
this
.
applyParam
.
idNo
){
uni
.
showToast
({
title
:
'请输入证件号'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
if
(
!
this
.
applyParam
.
birthday
){
uni
.
showToast
({
title
:
'请选择出生日期'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
this
.
applyParam
=
{
...
this
.
applyParam
,
applyType
:
2
,
operatStep
:
1
,
// userId:uni.getStorageSync('cffp_userId'),
userId
:
42
,
hasCrossDistrict
:
0
,
id
:
17
}
api
.
saveApplyInfo
(
this
.
applyParam
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
uni
.
navigateTo
({
// url:`work-experience?id=${res['data']['id']}`
url
:
`work-experience`
});
uni
.
setStorageSync
(
'applyId'
,
String
(
res
[
'data'
][
'id'
]))
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
duration
:
2000
,
icon
:
'none'
})
return
;
}
})
})
}
}
}
}
...
...
pages/application-process/id-card.vue
View file @
129e053b
...
@@ -8,44 +8,58 @@
...
@@ -8,44 +8,58 @@
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"content_wrapper"
>
<view
class=
"content_wrapper"
>
<view
class=
"photo"
>
<view
class=
"photo"
v-if=
"!applyParam.idFrontPageOssPath"
@
click=
"upLoadPhoto('front')"
>
<image
src=
"../../static/front.png"
alt=
"身份证正面"
mode=
"widthFix"
></image>
<image
src=
"../../static/front.png"
alt=
"身份证正面"
mode=
"widthFix"
></image>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<view
class=
"choseBtn"
>
点击添加身份证正面
</view>
<view
class=
"choseBtn"
>
点击添加身份证正面
</view>
</view>
</view>
<!--
<image
class=
"showimage"
></image>
-->
<view
class=
"showimage"
v-if=
"applyParam.idFrontPageOssPath"
>
<image
:src=
"applyParam.idFrontPageOssPath"
mode=
"widthFix"
></image>
</view>
<view
class=
"tips"
>
<view
class=
"tips"
>
<view>
(正确示例:身份证正面,字体清晰)
</view>
<view>
(正确示例:身份证正面,字体清晰)
</view>
<view>
(jpg,png 文件大小不大于1mb)
</view>
<view>
(jpg,png 文件大小不大于1mb)
</view>
</view>
</view>
</view>
</view>
<view
class=
"content_wrapper"
style=
"margin-top: 25px;"
>
<view
class=
"content_wrapper"
style=
"margin-top: 25px;"
>
<view
class=
"photo"
>
<view
class=
"photo"
v-if=
"!applyParam.idBackPageOssPath"
@
click=
"upLoadPhoto('back')"
>
<image
src=
"../../static/back.png"
alt=
"身份证反面面"
mode=
"widthFix"
></image>
<image
src=
"../../static/back.png"
alt=
"身份证反面面"
mode=
"widthFix"
></image>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<view
class=
"choseBtn"
>
点击添加身份证反面
</view>
<view
class=
"choseBtn"
>
点击添加身份证反面
</view>
</view>
</view>
<!--
<image
class=
"showimage"
></image>
-->
<view
class=
"showimage"
v-if=
"applyParam.idBackPageOssPath"
>
<image
:src=
"applyParam.idBackPageOssPath"
mode=
"widthFix"
></image>
</view>
<view
class=
"tips"
>
<view
class=
"tips"
>
<view>
(正确示例:身份证反面,字体清晰)
</view>
<view>
(正确示例:身份证反面,字体清晰)
</view>
<view>
(jpg,png 文件大小不大于1mb)
</view>
<view>
(jpg,png 文件大小不大于1mb)
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<
navigator
class=
"fixed"
url=
"education
"
@
click=
"saveInfo()"
>
<
view
class=
"fixed
"
@
click=
"saveInfo()"
>
保存并下一步
保存并下一步
</
navigator
>
</
view
>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
CommonUpload
}
from
'@/util/uploaderFile'
;
import
api
from
'../../api/api'
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
applyParam
:{
applyParam
:{
idFrontPageOssPath
:
''
,
idFrontPageOssPath
:
''
,
idBackPageOssPath
:
''
idBackPageOssPath
:
''
}
},
dataForm
:{
loginId
:
uni
.
getStorageSync
(
'cffp_userId'
),
targetType
:
"5"
,
targetId
:
uni
.
getStorageSync
(
'cffp_userId'
),
targetNo
:
""
,
targetUseFor
:
"12"
,
targetSeq
:
"0"
},
}
}
},
},
components
:{},
components
:{},
...
@@ -53,8 +67,62 @@
...
@@ -53,8 +67,62 @@
},
},
methods
:{
methods
:{
upLoadPhoto
(
type
){
if
(
type
==
'front'
){
this
.
dataForm
.
targetNo
=
2
;
}
if
(
type
==
'back'
){
this
.
dataForm
.
targetNo
=
3
;
}
CommonUpload
(
that
.
dataForm
).
then
(
res
=>
{
if
(
type
==
'front'
){
this
.
applyParam
.
idFrontPageOssPath
=
res
.
data
.
filePath
;
}
if
(
type
==
'back'
){
this
.
applyParam
.
idBackPageOssPath
=
res
.
data
.
filePath
;
}
})
},
saveInfo
(){
saveInfo
(){
uni
.
setStorageSync
(
'applyParam'
,
JSON
.
stringify
(
this
.
applyParam
))
if
(
!
this
.
applyParam
.
idFrontPageOssPath
){
uni
.
showToast
({
title
:
'请上传身份证正面照片'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
if
(
!
this
.
applyParam
.
idBackPageOssPath
){
uni
.
showToast
({
title
:
'请上传身份证反面照片'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
this
.
applyParam
=
{
...
this
.
applyParam
,
applyType
:
2
,
operatStep
:
3
,
// userId:uni.getStorageSync('cffp_userId'),
userId
:
42
,
id
:
17
,
}
api
.
saveApplyInfo
(
this
.
applyParam
).
then
(()
=>
{
if
(
res
[
'success'
]){
uni
.
navigateTo
({
// url:`id-card?id=${res['data']['id']}`
url
:
`education`
});
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
duration
:
2000
,
icon
:
'none'
})
return
;
}
})
}
}
}
}
}
}
...
...
pages/application-process/work-experience.vue
View file @
129e053b
...
@@ -6,52 +6,60 @@
...
@@ -6,52 +6,60 @@
</view>
</view>
<text
class=
"page_mark"
>
2/8
</text>
<text
class=
"page_mark"
>
2/8
</text>
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"contentDetail employ"
>
<view
class=
"contentDetail employ"
>
<view
class=
"contentItem"
>
<view
class=
"contentItem"
>
<text>
职业类型
</text>
<text>
职业类型
</text>
<picker
@
change=
"changeIndustry"
:value=
"industry
Name
"
:range=
"industry"
<picker
@
change=
"changeIndustry"
:value=
"industry
Idx
"
:range=
"industry"
range-key=
"industryName"
>
range-key=
"industryName"
>
<view
class=
"uni-input"
>
{{
industry
[
industryIdx
][
'industryName'
]
}}
<view
class=
"uni-input"
>
{{
industry
[
industryIdx
][
'industryName'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</view>
</picker>
</picker>
</view>
</view>
<view
class=
"contentItem"
>
<text>
最近一次工作单位
</text>
<input
type=
"text"
class=
"form-control"
placeholder=
"非必填"
v-model=
"applyParam.workingCompany"
/>
</view>
<view
class=
"contentItem"
>
<text>
职位
</text>
<input
type=
"text"
class=
"form-control"
placeholder=
"非必填"
v-model=
"applyParam.position"
/>
</view>
<view
class=
"contentItem"
>
<text>
任职开始时间
</text>
<picker
mode=
"date"
:value=
"applyParam.workingStart"
@
change=
"bindWorkingStart"
>
<view
v-if=
"!applyParam.workingStart"
>
请选择
<text
class=
"iconfont icon-youjiantou"
></text></view>
<view
class=
"uni-input"
v-if=
"applyParam.workingStart"
>
{{
applyParam
.
workingStart
}}
<text
class=
"iconfont icon-youjiantou"
></text></view>
</picker>
</view>
<view
class=
"contentItem"
>
<text>
结束时间
</text>
<picker
mode=
"date"
:value=
"applyParam.workingEnd"
@
change=
"bindWorkingEnd"
>
<view
v-if=
"!applyParam.workingEnd"
>
请选择
<text
class=
"iconfont icon-youjiantou"
></text></view>
<view
class=
"uni-input"
v-if=
"applyParam.workingEnd"
>
{{
applyParam
.
workingEnd
}}
<text
class=
"iconfont icon-youjiantou"
></text></view>
</picker>
</view>
<view
class=
"contentItem"
style=
"border: 0;"
>
<text>
荣誉证书
</text>
</view>
</view>
</view>
<view
class=
"contentDetail employ"
>
<view
class=
"photo_wrapper"
@
click=
"upLoadPhoto()"
v-if=
"!applyParam.certificate"
>
<view
class=
"contentItem"
>
<text>
最近一次工作单位
</text>
<input
type=
"text"
class=
"form-control"
placeholder=
"非必填"
v-model=
"applyParam.workingCompany"
/>
</view>
<view
class=
"contentItem"
>
<text>
职位
</text>
<input
type=
"text"
class=
"form-control"
placeholder=
"非必填"
v-model=
"applyParam.position"
/>
</view>
<view
class=
"contentItem"
>
<text>
任职开始时间
</text>
<picker
mode=
"date"
:value=
"applyParam.workingStart"
@
change=
"bindWorkingStart"
>
<view
v-if=
"!applyParam.workingStart"
>
请选择
<text
class=
"iconfont icon-youjiantou"
></text></view>
<view
class=
"uni-input"
v-if=
"applyParam.workingStart"
>
{{
applyParam
.
workingStart
}}
<text
class=
"iconfont icon-youjiantou"
></text></view>
</picker>
</view>
<view
class=
"contentItem"
>
<text>
结束时间
</text>
<picker
mode=
"date"
:value=
"applyParam.workingEnd"
@
change=
"bindWorkingEnd"
>
<view
v-if=
"!applyParam.workingEnd"
>
请选择
<text
class=
"iconfont icon-youjiantou"
></text></view>
<view
class=
"uni-input"
v-if=
"applyParam.workingEnd"
>
{{
applyParam
.
workingEnd
}}
<text
class=
"iconfont icon-youjiantou"
></text></view>
</picker>
</view>
<view
class=
"contentItem"
style=
"border: 0;"
>
<text>
荣誉证书
</text>
</view>
</view>
<view
class=
"photo_wrapper"
>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<text
class=
"iconfont icon-weibiaoti553"
></text>
<view
style=
"margin-top: 10px;"
>
点击添加荣誉证书照片
</view>
<view
style=
"margin-top: 10px;"
>
点击添加荣誉证书照片
</view>
</view>
</view>
<view
v-if=
"applyParam.certificate"
>
<view
class=
"pic_list"
v-for=
"picItem in picList"
>
<image
:src=
"picItem"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"tips"
>
<view
class=
"tips"
>
<view>
(jpg,png 文件大小不大于1mb)
</view>
<view>
(jpg,png 文件大小不大于1mb)
</view>
</view>
</view>
<view
class=
"upLoadMore"
v-if=
"applyParam.certificate"
@
click=
"upLoadPhoto()"
>
<view
class=
"iconfont icon-jiahao"
></view>
<view>
上传更多
</view>
</view>
</view>
</view>
<view
class=
"fixed"
@
click=
"saveInfo()"
>
<view
class=
"fixed"
@
click=
"saveInfo()"
>
保存并下一步
保存并下一步
...
@@ -61,6 +69,7 @@
...
@@ -61,6 +69,7 @@
<
script
>
<
script
>
import
api
from
'../../api/api'
;
import
api
from
'../../api/api'
;
import
{
CommonUpload
}
from
'@/util/uploaderFile'
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
...
@@ -73,12 +82,26 @@
...
@@ -73,12 +82,26 @@
workingStart
:
''
,
workingStart
:
''
,
workingEnd
:
''
,
workingEnd
:
''
,
certificate
:
''
,
certificate
:
''
,
}
},
dataForm
:{
loginId
:
uni
.
getStorageSync
(
'cffp_userId'
),
targetType
:
"5"
,
targetId
:
uni
.
getStorageSync
(
'cffp_userId'
),
targetNo
:
"1"
,
targetUseFor
:
"12"
,
targetSeq
:
"0"
},
picList
:[]
}
}
},
},
components
:{},
components
:{},
onLoad
(){
onLoad
(
options
){
this
.
occupationQry
();
this
.
occupationQry
();
// console.log(options)
// if(options.id){
// this.queryById(options.id)
// }
},
},
methods
:{
methods
:{
changeIndustry
:
function
(
e
){
changeIndustry
:
function
(
e
){
...
@@ -102,11 +125,65 @@
...
@@ -102,11 +125,65 @@
}
}
})
})
},
},
upLoadPhoto
(
event
){
let
that
=
this
;
CommonUpload
(
that
.
dataForm
).
then
(
res
=>
{
this
.
applyParam
.
certificate
=
res
.
data
.
filePath
;
this
.
picList
.
push
(
this
.
applyParam
.
certificate
);
});
},
saveInfo
(){
saveInfo
(){
uni
.
setStorageSync
(
'applyParam'
,
JSON
.
stringify
(
this
.
applyParam
))
if
(
!
this
.
applyParam
.
workingCategoryId
){
uni
.
navigateTo
({
uni
.
showToast
({
url
:
'id-card'
title
:
'请选择职业类型'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
this
.
applyParam
=
{
...
this
.
applyParam
,
applyType
:
2
,
operatStep
:
2
,
// userId:uni.getStorageSync('cffp_userId'),
userId
:
42
,
id
:
17
,
certificate
:
this
.
picList
.
join
(
','
)
}
console
.
log
(
this
.
applyParam
)
api
.
saveApplyInfo
(
this
.
applyParam
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
uni
.
navigateTo
({
// url:`id-card?id=${res['data']['id']}`
url
:
`id-card`
});
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
duration
:
2000
,
icon
:
'none'
})
return
;
}
})
})
},
queryById
(
id
){
api
.
queryById
(
id
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
this
.
applyParam
=
res
[
'data'
][
'data'
];
if
(
this
.
applyParam
.
certificate
){
this
.
picList
=
this
.
applyParam
.
certificate
.
split
(
','
);
console
.
log
(
this
.
picList
)
}
console
.
log
(
this
.
picList
)
}
})
}
},
mounted
()
{
if
(
uni
.
getStorageSync
(
'applyId'
)){
this
.
queryById
(
uni
.
getStorageSync
(
'applyId'
))
}
}
}
}
}
}
...
...
pages/myPoints/myPoints.vue
View file @
129e053b
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
},
},
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
this
.
fortuneDate
=
e
.
detail
.
value
;
this
.
fortuneDate
=
e
.
detail
.
value
;
this
.
findByUserIdForFortuneStatistic
();
},
},
findByUserIdForFortuneStatistic
(){
findByUserIdForFortuneStatistic
(){
// const param = {
// const param = {
...
@@ -102,7 +103,6 @@
...
@@ -102,7 +103,6 @@
"userId"
:
1
,
"userId"
:
1
,
"fortuneDate"
:
"2022-11-01"
,
"fortuneDate"
:
"2022-11-01"
,
"timeFlag"
:
"D"
"timeFlag"
:
"D"
}
}
api
.
findByUserIdForFortuneStatistic
(
param
).
then
((
res
)
=>
{
api
.
findByUserIdForFortuneStatistic
(
param
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
...
util/interceptor.ts
View file @
129e053b
...
@@ -9,9 +9,9 @@ export const interceptor = () => {
...
@@ -9,9 +9,9 @@ export const interceptor = () => {
invoke
(
args
)
{
invoke
(
args
)
{
// console.log('请求拦截器',args);
// console.log('请求拦截器',args);
// 加载loading
// 加载loading
uni
.
showLoading
({
//
uni.showLoading({
title
:
'加载中...'
//
title: '加载中...'
});
//
});
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
if
(
!
uni
.
getStorageSync
(
'uni-token'
)
&&
!
whiteApiList
.
includes
(
args
.
url
))
{
if
(
!
uni
.
getStorageSync
(
'uni-token'
)
&&
!
whiteApiList
.
includes
(
args
.
url
))
{
...
...
util/request.ts
View file @
129e053b
...
@@ -4,6 +4,9 @@ import {interceptor} from "./interceptor";
...
@@ -4,6 +4,9 @@ import {interceptor} from "./interceptor";
export
default
(
url
:
string
,
method
:
any
,
params
?:
any
)
=>
{
export
default
(
url
:
string
,
method
:
any
,
params
?:
any
)
=>
{
interceptor
();
interceptor
();
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
showLoading
({
title
:
'加载中...'
});
uni
.
request
({
uni
.
request
({
url
:
url
,
url
:
url
,
method
:
method
,
method
:
method
,
...
@@ -17,7 +20,7 @@ export default (url:string, method:any, params?:any) => {
...
@@ -17,7 +20,7 @@ export default (url:string, method:any, params?:any) => {
reject
(
err
);
reject
(
err
);
},
},
complete
()
{
complete
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
}
}
});
});
});
});
...
...
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