Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
be460f14
Commit
be460f14
authored
May 21, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
a0ac102a
f0919a31
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
46 deletions
+77
-46
.env.dev.js
.env.dev.js
+1
-0
.env.prod.js
.env.prod.js
+1
-0
.env.test.js
.env.test.js
+1
-0
complete.vue
src/pages/order/complete.vue
+8
-8
file.vue
src/pages/settle/file.vue
+66
-38
No files found.
.env.dev.js
View file @
be460f14
...
@@ -10,6 +10,7 @@ const UNI_APP = {
...
@@ -10,6 +10,7 @@ const UNI_APP = {
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
uc_img_url_pre
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
argoDebugMode
:
1
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
.env.prod.js
View file @
be460f14
...
@@ -9,6 +9,7 @@ const UNI_APP = {
...
@@ -9,6 +9,7 @@ const UNI_APP = {
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
uc_img_url_pre
:
'https://img2.banshouhui.com/'
,
argoDebugMode
:
0
argoDebugMode
:
0
}
}
...
...
.env.test.js
View file @
be460f14
...
@@ -9,6 +9,7 @@ const UNI_APP = {
...
@@ -9,6 +9,7 @@ const UNI_APP = {
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
uc_img_url_pre
:
'https://img2.banshouhui.com/'
,
argoDebugMode
:
1
argoDebugMode
:
1
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
src/pages/order/complete.vue
View file @
be460f14
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
@
value-change=
"fieldValueChange"
>
@
value-change=
"fieldValueChange"
>
</xh-select>
</xh-select>
<view
v-else-if=
"item.formType==='file'"
>
<view
v-else-if=
"item.formType==='file'"
>
<xh-files
<xh-files
:ref=
"`fileChild$
{itemIndex}`"
:ref=
"`fileChild$
{itemIndex}`"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :categoryId="categoryId" :value='form[item.fieldsName] || []'
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :categoryId="categoryId" :value='form[item.fieldsName] || []'
@value-change="fieldValueChange">
@value-change="fieldValueChange">
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload(JSON.stringify(item), groupIndex, itemIndex)"
:src=
"uploadImage"
></u-image>
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload(JSON.stringify(item), groupIndex, itemIndex)"
:src=
"uploadImage"
></u-image>
</view>
</view>
</
template
>
</
template
>
</xh-files>
</xh-files>
</view>
</view>
<xh-location
v-else-if=
"item.formType==='location'"
<xh-location
v-else-if=
"item.formType==='location'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
@
value-change=
"fieldValueChange"
>
...
@@ -533,7 +533,7 @@
...
@@ -533,7 +533,7 @@
// 更新预计超出金额
// 更新预计超出金额
let
amount
=
this
.
calMaterialCraftListAmount
(
this
.
form
.
materialList
)
let
amount
=
this
.
calMaterialCraftListAmount
(
this
.
form
.
materialList
)
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
craftList
)
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
craftList
)
this
.
$set
(
this
.
form
,
'
overAmoun
t'
,
amount
)
this
.
$set
(
this
.
form
,
'
allExtraAm
t'
,
amount
)
},
},
// 字段的值更新
// 字段的值更新
fieldValueChange
(
data
)
{
fieldValueChange
(
data
)
{
...
@@ -628,7 +628,7 @@
...
@@ -628,7 +628,7 @@
this
.
getWatermark
()
this
.
getWatermark
()
},
},
// 获取拍照规范
// 获取拍照规范
photograph
(){
photograph
(){
let
self
=
this
let
self
=
this
let
param
=
{
"partnerCompanyId"
:
this
.
partnerCompanyId
,
let
param
=
{
"partnerCompanyId"
:
this
.
partnerCompanyId
,
"categoryId"
:
this
.
categoryId
,
"categoryId"
:
this
.
categoryId
,
...
@@ -644,7 +644,7 @@
...
@@ -644,7 +644,7 @@
})
})
},
},
// 获取水印
// 获取水印
getWatermark
(){
getWatermark
(){
if
(
getApp
().
globalData
.
photo
.
waterSetting
){
if
(
getApp
().
globalData
.
photo
.
waterSetting
){
return
return
}
}
...
@@ -658,7 +658,7 @@
...
@@ -658,7 +658,7 @@
});
});
},
},
// ------------------------- 以上方法为上传组件相关 -------------------------
// ------------------------- 以上方法为上传组件相关 -------------------------
// ------------------------- 以下方法为展示滚动切换 -------------------------
// ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换
// 点击左边的栏目切换
async
swichMenu
(
index
)
{
async
swichMenu
(
index
)
{
...
...
src/pages/settle/file.vue
View file @
be460f14
...
@@ -89,6 +89,9 @@
...
@@ -89,6 +89,9 @@
import
Settle
from
'@/components/settle/index.vue'
import
Settle
from
'@/components/settle/index.vue'
import
base
from
'@/components/upload/index'
;
import
base
from
'@/components/upload/index'
;
const
app
=
getApp
()
const
app
=
getApp
()
const
globalUrl
=
process
.
uniEnv
||
{};
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
;
const
uc_img_url_pre
=
globalUrl
.
uc_img_url_pre
;
export
default
{
export
default
{
mixins
:[
base
],
mixins
:[
base
],
components
:
{
components
:
{
...
@@ -184,11 +187,13 @@ export default {
...
@@ -184,11 +187,13 @@ export default {
],
],
submitSuccess
:
false
,
submitSuccess
:
false
,
saving
:
false
,
saving
:
false
,
wxToken
:
""
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'入驻证件信息上传页'
)
getApp
().
trackPage
(
'入驻证件信息上传页'
)
this
.
initSettledInfo
()
this
.
initSettledInfo
()
this
.
getWxToken
()
},
},
updated
()
{
updated
()
{
// 该方法性能消耗大目前不使用
// 该方法性能消耗大目前不使用
...
@@ -259,6 +264,20 @@ export default {
...
@@ -259,6 +264,20 @@ export default {
},
},
methods
:
{
methods
:
{
async
getWxToken
()
{
let
that
=
this
;
wx
.
request
({
url
:
ucenterApiUrl
+
"/v1/settled/wx-token"
,
method
:
'GET'
,
header
:
{
'Authorization'
:
that
.
vuex_token
},
success
(
res
)
{
that
.
wxToken
=
res
.
data
.
access_token
;
console
.
log
(
that
.
wxToken
);
}
})
},
// 初始化入驻信息
// 初始化入驻信息
async
initSettledInfo
()
{
async
initSettledInfo
()
{
let
self
=
this
let
self
=
this
...
@@ -380,44 +399,53 @@ export default {
...
@@ -380,44 +399,53 @@ export default {
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'识别中'
title
:
'识别中'
})
})
let
request
=
{
front
:
this
.
$u
.
api
.
checkSettleIDCardFront
,
let
url
=
{
back
:
this
.
$u
.
api
.
checkSettleIDCardBack
,
front
:
this
.
fileInfo
.
id_card_front
,
};
back
:
this
.
fileInfo
.
id_card_back
,
let
url
=
{
};
front
:
this
.
fileInfo
.
id_card_front
,
let
that
=
this
;
back
:
this
.
fileInfo
.
id_card_back
,
// 文字识别
};
let
access_token
=
this
.
wxToken
;
let
img_pre
=
uc_img_url_pre
;
const
params
=
{
let
img_url
=
img_pre
+
url
[
type
]
//"tmp/X8XIAJvSt7jp29a97371a466eecab48e7a7c35d92861.jpg";
[
"id_card_"
+
type
]:
url
[
type
],
console
.
log
(
access_token
);
id
:
this
.
fileInfo
.
id
||
0
,
console
.
log
(
img_url
);
}
img_url
=
encodeURI
(
img_url
);
let
post_url
=
'https://api.weixin.qq.com/cv/ocr/idcard?type=MODE&img_url='
+
img_url
+
'&access_token='
+
access_token
;
const
res
=
await
request
[
type
](
params
);
//url识别图片
if
(
res
.
code
!==
200
)
{
wx
.
request
({
if
(
type
===
"front"
)
{
url
:
post_url
,
this
.
fileInfo
.
id_card_name
=
""
;
header
:
{
this
.
fileInfo
.
id_card_number
=
""
;
'Content-Type'
:
'application/x-www-form-urlencoded'
this
.
frontErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
},
}
else
{
method
:
'POST'
,
this
.
fileInfo
.
id_card_back_check
=
false
;
success
(
res
)
{
this
.
backErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
uni
.
hideLoading
()
}
let
info
=
res
.
data
;
return
if
(
info
.
errcode
!=
0
){
}
if
(
type
===
"front"
)
{
uni
.
hideLoading
()
that
.
fileInfo
.
id_card_name
=
""
;
if
(
type
===
"front"
)
{
that
.
fileInfo
.
id_card_number
=
""
;
this
.
fileInfo
.
id_card_name
=
that
.
frontErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
res
.
data
.
id_card_name
||
""
;
}
else
{
this
.
fileInfo
.
id_card_number
=
that
.
fileInfo
.
id_card_back_check
=
false
;
res
.
data
.
id_card_number
||
""
;
that
.
backErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
this
.
frontErrorMsg
=
(
!
this
.
fileInfo
.
id_card_name
||
!
this
.
fileInfo
.
id_card_number
)
?
"识别失败,请重新上传"
:
''
}
}
else
{
return
this
.
fileInfo
.
id_card_expire
=
res
.
data
.
id_card_expire
||
""
;
}
else
if
(
type
===
"front"
)
{
this
.
fileInfo
.
id_card_back_check
=
true
;
that
.
fileInfo
.
id_card_name
=
this
.
backErrorMsg
=
!
this
.
fileInfo
.
id_card_expire
?
"识别失败,请重新上传"
:
''
info
.
name
||
""
;
}
that
.
fileInfo
.
id_card_number
=
info
.
id
||
""
;
that
.
frontErrorMsg
=
(
!
that
.
fileInfo
.
id_card_name
||
!
that
.
fileInfo
.
id_card_number
)
?
"识别失败,请重新上传"
:
''
}
else
{
that
.
fileInfo
.
id_card_expire
=
info
.
valid_date
||
""
;
that
.
fileInfo
.
id_card_back_check
=
true
;
that
.
backErrorMsg
=
!
that
.
fileInfo
.
id_card_expire
?
"识别失败,请重新上传"
:
''
}
}
})
},
},
checkFileInfo
()
{
checkFileInfo
()
{
let
formFlag
=
true
;
let
formFlag
=
true
;
...
...
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