Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
Project
Project
Details
Activity
Releases
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
和慭琛
take_order
Commits
ba5e49ea
Commit
ba5e49ea
authored
Feb 23, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入驻资料页 接口对接 100%
parent
a3f57b0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
231 additions
and
20 deletions
+231
-20
settled.js
take-order/common/api/settled.js
+4
-4
pages.json
take-order/pages.json
+18
-13
file.vue
take-order/pages/settle/file.vue
+209
-3
No files found.
take-order/common/api/settled.js
View file @
ba5e49ea
...
@@ -5,13 +5,13 @@ let settledApiFun = function(vm){
...
@@ -5,13 +5,13 @@ let settledApiFun = function(vm){
/* 查询用户基本信息 */
/* 查询用户基本信息 */
let
getSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
codeApiUrl
+
'/v1/settled/get-settled-info'
,
params
);
let
getSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
codeApiUrl
+
'/v1/settled/get-settled-info'
,
params
);
/* 获取认证区域信息 */
/* 获取认证区域信息 */
let
getSettleArea
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/v1/
h5/
settled/area'
,
params
);
let
getSettleArea
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/v1/settled/area'
,
params
);
/* 提交用户基本信息 */
/* 提交用户基本信息 */
let
submitSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/v1/
h5/
settled/save-info'
,
params
);
let
submitSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/v1/settled/save-info'
,
params
);
/* 校验身份证正面 */
/* 校验身份证正面 */
let
checkSettleIDCardFront
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
codeApiUrl
+
'/v1/
h5/
settled/card-front'
,
params
);
let
checkSettleIDCardFront
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
codeApiUrl
+
'/v1/settled/card-front'
,
params
);
/* 校验身份证反面 */
/* 校验身份证反面 */
let
checkSettleIDCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
codeApiUrl
+
'/v1/
h5/
settled/card-back'
,
params
);
let
checkSettleIDCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
codeApiUrl
+
'/v1/settled/card-back'
,
params
);
/* 缴纳保证金 */
/* 缴纳保证金 */
const
token
=
'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
const
token
=
'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
const
url
=
codeApiUrl
+
'/v1/settled/pay-deposit?access-token='
+
token
const
url
=
codeApiUrl
+
'/v1/settled/pay-deposit?access-token='
+
token
...
...
take-order/pages.json
View file @
ba5e49ea
...
@@ -8,6 +8,23 @@
...
@@ -8,6 +8,23 @@
{
{
"path"
:
"pages/settle/file"
,
"style"
:
{
"navigationBarTitleText"
:
"入驻资料"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"下单"
}
},
{
"path"
:
"pages/settle/index"
,
"path"
:
"pages/settle/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
"navigationBarTitleText"
:
"充电桩安装招募"
...
@@ -40,12 +57,6 @@
...
@@ -40,12 +57,6 @@
},
},
{
{
"path"
:
"pages/settle/file"
,
"style"
:
{
"navigationBarTitleText"
:
"入驻资料"
}
},{
"path"
:
"pages/settle/file-upload"
,
"path"
:
"pages/settle/file-upload"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"图片上传"
"navigationBarTitleText"
:
"图片上传"
...
@@ -78,13 +89,7 @@
...
@@ -78,13 +89,7 @@
}
}
},
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"下单"
}
},
{
{
"path"
:
"pages/sign/index"
,
"path"
:
"pages/sign/index"
,
...
...
take-order/pages/settle/file.vue
View file @
ba5e49ea
...
@@ -162,6 +162,12 @@
...
@@ -162,6 +162,12 @@
title
:
'加载中'
title
:
'加载中'
})
})
this
.
newCheckSettleIDCard
(
type
)
return
//*/
// checkSettleIDCardFront
// checkSettleIDCardFront
// checkSettleIDCardBack
// checkSettleIDCardBack
let
request
=
{
let
request
=
{
...
@@ -173,33 +179,139 @@
...
@@ -173,33 +179,139 @@
front
:
this
.
fileInfo
.
id_card_front
,
front
:
this
.
fileInfo
.
id_card_front
,
back
:
this
.
fileInfo
.
id_card_back
,
back
:
this
.
fileInfo
.
id_card_back
,
};
};
console
.
log
(
'url111111:'
)
console
.
log
(
url
)
const
params
=
{
const
params
=
{
[
"id_card_"
+
type
]:
url
[
type
],
[
"id_card_"
+
type
]:
url
[
type
],
id
:
this
.
fileInfo
.
id
||
0
,
id
:
this
.
fileInfo
.
id
||
0
,
}
}
console
.
log
(
'params111111:'
)
console
.
log
(
params
)
const
res
=
await
request
[
type
](
params
);
const
res
=
await
request
[
type
](
params
);
console
.
log
(
'1111111111111111'
)
console
.
log
(
'res:'
)
console
.
log
(
res
)
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
if
(
type
===
"front"
)
{
if
(
type
===
"front"
)
{
console
.
log
(
'front11111111111111'
)
this
.
fileInfo
.
id_card_name
=
this
.
fileInfo
.
id_card_name
=
res
.
data
.
id_card_name
||
""
;
res
.
data
.
id_card_name
||
""
;
this
.
fileInfo
.
id_card_number
=
this
.
fileInfo
.
id_card_number
=
res
.
data
.
id_card_number
||
""
;
res
.
data
.
id_card_number
||
""
;
}
else
{
}
else
{
console
.
log
(
'22222222222222'
)
this
.
fileInfo
.
id_card_back_check
=
true
;
this
.
fileInfo
.
id_card_back_check
=
true
;
}
}
}
else
{
}
else
{
if
(
type
===
"front"
)
{
if
(
type
===
"front"
)
{
console
.
log
(
'front333333333333'
)
this
.
fileInfo
.
id_card_name
=
""
;
this
.
fileInfo
.
id_card_name
=
""
;
this
.
fileInfo
.
id_card_number
=
""
;
this
.
fileInfo
.
id_card_number
=
""
;
}
else
{
}
else
{
console
.
log
(
'44444444444444444'
)
this
.
fileInfo
.
id_card_back_check
=
false
;
this
.
fileInfo
.
id_card_back_check
=
false
;
}
}
}
}
},
},
//新身份证 正反面上传
newCheckSettleIDCard
:
function
(
type
)
{
let
url
=
{
front
:
this
.
fileInfo
.
id_card_front
,
back
:
this
.
fileInfo
.
id_card_back
,
};
let
that
=
this
uni
.
request
({
url
:
'http://rest-u.yunya.com/v1/settled/card-'
+
type
,
method
:
'POST'
,
header
:{
Authorization
:
'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
,
token
:
getApp
().
globalData
.
token
},
data
:
{
[
"id_card_"
+
type
]:
url
[
type
],
id
:
this
.
fileInfo
.
id
||
0
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'上传 正面 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
if
(
res
.
statusCode
==
200
){
console
.
log
(
'statusCode == 200'
)
if
(
type
===
"front"
)
{
console
.
log
(
'front11111111111111'
)
this
.
fileInfo
.
id_card_name
=
res
.
data
.
id_card_name
||
""
;
this
.
fileInfo
.
id_card_number
=
res
.
data
.
id_card_number
||
""
;
}
else
{
console
.
log
(
'22222222222222'
)
this
.
fileInfo
.
id_card_back_check
=
true
;
}
}
else
{
console
.
log
(
'statusCode != 200'
)
if
(
type
===
"front"
)
{
console
.
log
(
'front333333333333'
)
this
.
fileInfo
.
id_card_name
=
""
;
this
.
fileInfo
.
id_card_number
=
""
;
}
else
{
console
.
log
(
'44444444444444444'
)
this
.
fileInfo
.
id_card_back_check
=
false
;
}
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'上传正面失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
checkFileInfo
()
{
checkFileInfo
()
{
let
formFlag
=
true
;
let
formFlag
=
true
;
const
fileInfo
=
this
.
fileInfo
;
const
fileInfo
=
this
.
fileInfo
;
console
.
log
(
'fileInfo:'
)
console
.
log
(
fileInfo
)
let
checkFunc
=
function
(
item
)
{
let
checkFunc
=
function
(
item
)
{
const
value
=
fileInfo
[
item
.
filedName
];
const
value
=
fileInfo
[
item
.
filedName
];
const
tips
=
"请上传您的"
+
item
.
label
;
const
tips
=
"请上传您的"
+
item
.
label
;
...
@@ -241,6 +353,10 @@
...
@@ -241,6 +353,10 @@
return
formFlag
;
return
formFlag
;
},
},
submitFileInfo
()
{
submitFileInfo
()
{
this
.
newSubmitFileInfo
()
return
if
(
!
this
.
checkFileInfo
())
{
if
(
!
this
.
checkFileInfo
())
{
return
;
return
;
}
}
...
@@ -250,7 +366,7 @@
...
@@ -250,7 +366,7 @@
}
}
submitInfoData
.
other_certificates
=
fileInfo
.
other_certificates
&&
submitInfoData
.
other_certificates
=
fileInfo
.
other_certificates
&&
fileInfo
.
other_certificates
.
join
(
","
),
fileInfo
.
other_certificates
.
join
(
","
),
Indicator
.
open
();
//
Indicator.open();
this
.
$u
.
api
.
post
(
"@u/v1/h5/settled/submit-info"
,
submitInfoData
)
this
.
$u
.
api
.
post
(
"@u/v1/h5/settled/submit-info"
,
submitInfoData
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -267,9 +383,98 @@
...
@@ -267,9 +383,98 @@
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
Indicator
.
close
();
//
Indicator.close();
});
});
},
},
//新 提交请求
newSubmitFileInfo
:
function
(){
if
(
!
this
.
checkFileInfo
())
{
return
;
}
const
fileInfo
=
this
.
fileInfo
;
let
submitInfoData
=
{
...
fileInfo
,
}
submitInfoData
.
other_certificates
=
fileInfo
.
other_certificates
&&
fileInfo
.
other_certificates
.
join
(
","
),
//let that = this
uni
.
request
({
url
:
'http://rest-u.yunya.com/v1/settled/submit-info'
,
method
:
'POST'
,
header
:{
Authorization
:
'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
,
token
:
getApp
().
globalData
.
token
},
data
:
{
id_card_name
:
submitInfoData
.
id_card_name
,
id_card_number
:
submitInfoData
.
id_card_number
,
id_card_front
:
submitInfoData
.
id_card_front
,
id_card_back
:
submitInfoData
.
id_card_back
,
electrician_certificate
:
submitInfoData
.
electrician_certificate
,
vehicle_photos
:
submitInfoData
.
other_certificates
,
other_certificates
:
submitInfoData
.
other_certificates
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'提交 证件信息 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
if
(
res
.
statusCode
==
200
){
console
.
log
(
'statusCode=200'
)
if
(
res
.
data
)
{
uni
.
showToast
({
title
:
'工作人员2个工作日内审核回复'
,
icon
:
'none'
})
this
.
submitSuccess
=
true
;
}
let
timer
=
setTimeout
(()
=>
{
clearTimeout
(
timer
)
uni
.
navigateTo
({
url
:
'/pages/settle/prompt'
+
'?promptType=step1'
})
},
2000
)
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
"提交失败"
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'提交证件信息失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
submitBaseInfo
()
{
submitBaseInfo
()
{
const
baseInfo
=
this
.
baseInfo
;
const
baseInfo
=
this
.
baseInfo
;
...
@@ -301,7 +506,8 @@
...
@@ -301,7 +506,8 @@
let
timer
=
setTimeout
(()
=>
{
let
timer
=
setTimeout
(()
=>
{
clearTimeout
(
timer
)
clearTimeout
(
timer
)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/settle/file'
url
:
'/pages/settle/prompt'
+
'?promptType=step1'
})
})
},
2000
)
},
2000
)
},
},
...
...
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