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
d3d0f3c0
Commit
d3d0f3c0
authored
May 21, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
0b7191b6
c9f79e1b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
114 additions
and
71 deletions
+114
-71
.env.dev.js
.env.dev.js
+1
-0
.env.js
.env.js
+2
-5
.env.prod.js
.env.prod.js
+1
-0
.env.test.js
.env.test.js
+1
-0
XhSelect.vue
src/components/createCom/XhSelect.vue
+3
-0
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+3
-0
complete.vue
src/pages/order/complete.vue
+36
-27
file.vue
src/pages/settle/file.vue
+66
-38
index.js
src/plugins/uploader/index.js
+1
-1
No files found.
.env.dev.js
View file @
d3d0f3c0
...
...
@@ -10,6 +10,7 @@ const UNI_APP = {
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
uc_img_url_pre
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
}
module
.
exports
=
UNI_APP
;
.env.js
View file @
d3d0f3c0
...
...
@@ -12,11 +12,8 @@
}
}
else
if
(
process
.
env
.
NODE_ENV
===
"production"
)
{
if
(
NODE_ENV
===
'test'
)
{
// ENV_VAR = require('./.env.prod.js');
ENV_VAR
=
require
(
'./.env.test.js'
);
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
}
}
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{};
...
...
.env.prod.js
View file @
d3d0f3c0
...
...
@@ -9,6 +9,7 @@ const UNI_APP = {
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
uc_img_url_pre
:
'https://img2.banshouhui.com/'
,
argoDebugMode
:
0
}
...
...
.env.test.js
View file @
d3d0f3c0
...
...
@@ -9,6 +9,7 @@ const UNI_APP = {
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
uc_img_url_pre
:
'https://img2.banshouhui.com/'
,
argoDebugMode
:
1
}
module
.
exports
=
UNI_APP
;
src/components/createCom/XhSelect.vue
View file @
d3d0f3c0
...
...
@@ -120,6 +120,9 @@
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
</
style
>
src/components/createCom/XhServiceMeasure.vue
View file @
d3d0f3c0
...
...
@@ -185,6 +185,9 @@
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.text-view
{
...
...
src/pages/order/complete.vue
View file @
d3d0f3c0
...
...
@@ -5,20 +5,20 @@
<u-navbar
:background=
"
{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold>
</u-navbar>
<u-tabs
class=
"order-tabs"
ref=
"tabs"
:current=
"tabIndex"
name=
"panelName"
:list=
"list"
@
change=
"tabsChange"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"80"
font-size=
"32"
></u-tabs>
<view
class=
"u-menu-wrap"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId"
v-if=
"list[tabIndex].items.length > 1"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
v-if=
"list[tabIndex].items.length > 1"
>
<view
v-for=
"(item,index) in list[tabIndex].items"
:key=
"index"
class=
"u-tab-item"
:class=
"[current == index ? 'u-tab-item-active' : '']"
@
tap
.
stop=
"swichMenu(index)"
>
<text
class=
"u-line-1"
>
{{
item
.
name
}}
</text>
</view>
</scroll-view>
<scroll-view
:scroll-top=
"scrollRightTop"
:enhanced=
"true"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll
"
>
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
:scroll-into-view=
"itemId
"
>
<u-form
:model=
"form"
ref=
"uForm"
>
<template
v-for=
"(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])"
>
<view
class=
"class-item"
:key=
"groupIndex"
>
<view
class=
"title"
v-if=
"groupItem.name !== '基本信息'"
>
{{
groupItem
.
name
}}
</view>
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsId != 200 || show200"
>
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsId != 200 || show200"
:id=
"`item$
{item.fieldsId}`">
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="item.formType!=='location'
&&
item.formType!=='form'
&&
item.formType!=='label'">
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
...
...
@@ -147,6 +147,7 @@
menuHeight
:
0
,
// 左边菜单的高度
menuItemHeight
:
0
,
// 左边菜单item的高度
itemId
:
''
,
// 栏目右边scroll-view用于滚动的id
oldItemId
:
''
,
menuItemPos
:
[],
arr
:
[],
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
...
...
@@ -369,6 +370,7 @@
self
.
waitHandlerPanelIndex
=
panelIndex
self
.
waitHandlerGroupIndex
=
groupIndex
self
.
waitHandlerEleIndex
=
eleIndex
self
.
oldItemId
=
`item
${
ele
.
fieldsId
}
`
}
})
})
...
...
@@ -433,6 +435,7 @@
self
.
waitHandlerPanelIndex
=
panelIndex
self
.
waitHandlerGroupIndex
=
groupIndex
self
.
waitHandlerEleIndex
=
eleIndex
self
.
oldItemId
=
`item
${
ele
.
fieldsId
}
`
}
}
})
...
...
@@ -460,8 +463,8 @@
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
){
// 页面定位到某一项
this
.
tabIndex
=
panelIndex
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
current
=
groupIndex
this
.
scrollRightTop
=
0
;
this
.
current
=
0
;
this
.
$nextTick
(
function
()
{
this
.
swichMenu
(
groupIndex
)
})
...
...
@@ -497,16 +500,6 @@
})
}
},
tabsChange
(
index
){
this
.
tabIndex
=
index
this
.
arr
=
[]
this
.
scrollRightTop
=
0
;
this
.
current
=
0
;
this
.
leftMenuStatus
(
0
)
this
.
$nextTick
(
function
()
{
this
.
getMenuItemTop
()
})
},
calMaterialCraftListAmount
(
arr
){
let
amount
=
0
if
(
arr
){
...
...
@@ -563,13 +556,26 @@
this
.
tabIndex
++
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
current
=
0
this
.
leftMenuStatus
(
0
)
const
itemId
=
this
.
list
[
this
.
tabIndex
].
items
[
0
].
items
[
0
].
fieldsId
this
.
oldItemId
=
`item
${
itemId
}
`
this
.
$nextTick
(
async
()
=>
{
if
(
this
.
oldItemId
)
this
.
itemId
=
this
.
oldItemId
})
}
},
tabsChange
(
index
){
this
.
tabIndex
=
index
this
.
arr
=
[]
this
.
scrollRightTop
=
0
;
this
.
current
=
0
;
this
.
leftMenuStatus
(
0
)
this
.
$nextTick
(
function
()
{
if
(
this
.
oldItemId
)
this
.
itemId
=
this
.
oldItemId
this
.
getMenuItemTop
()
})
}
},
// ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项
selectUpload
(
item
,
groupIndex
,
itemIndex
){
...
...
@@ -661,10 +667,13 @@
if
(
this
.
arr
.
length
==
0
)
{
await
this
.
getMenuItemTop
();
}
console
.
log
(
"index, this.current"
,
index
,
this
.
current
)
if
(
index
==
this
.
current
)
return
;
this
.
scrollRightTop
=
this
.
oldScrollTop
;
this
.
$nextTick
(
function
()
{
this
.
scrollRightTop
=
this
.
arr
[
index
];
this
.
itemId
=
this
.
oldItemId
if
(
!
this
.
oldItemId
)
this
.
scrollRightTop
=
this
.
arr
[
index
];
this
.
oldItemId
=
''
this
.
current
=
index
;
this
.
leftMenuStatus
(
index
);
})
...
...
src/pages/settle/file.vue
View file @
d3d0f3c0
...
...
@@ -89,6 +89,9 @@
import
Settle
from
'@/components/settle/index.vue'
import
base
from
'@/components/upload/index'
;
const
app
=
getApp
()
const
globalUrl
=
process
.
uniEnv
||
{};
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
;
const
uc_img_url_pre
=
globalUrl
.
uc_img_url_pre
;
export
default
{
mixins
:[
base
],
components
:
{
...
...
@@ -184,11 +187,13 @@ export default {
],
submitSuccess
:
false
,
saving
:
false
,
wxToken
:
""
,
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'入驻证件信息上传页'
)
this
.
initSettledInfo
()
this
.
getWxToken
()
},
updated
()
{
// 该方法性能消耗大目前不使用
...
...
@@ -259,6 +264,20 @@ export default {
},
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
()
{
let
self
=
this
...
...
@@ -380,44 +399,53 @@ export default {
uni
.
showLoading
({
title
:
'识别中'
})
let
request
=
{
front
:
this
.
$u
.
api
.
checkSettleIDCardFront
,
back
:
this
.
$u
.
api
.
checkSettleIDCardBack
,
};
let
url
=
{
front
:
this
.
fileInfo
.
id_card_front
,
back
:
this
.
fileInfo
.
id_card_back
,
};
const
params
=
{
[
"id_card_"
+
type
]:
url
[
type
],
id
:
this
.
fileInfo
.
id
||
0
,
}
const
res
=
await
request
[
type
](
params
);
if
(
res
.
code
!==
200
)
{
let
that
=
this
;
// 文字识别
let
access_token
=
this
.
wxToken
;
let
img_pre
=
uc_img_url_pre
;
let
img_url
=
img_pre
+
url
[
type
]
//"tmp/X8XIAJvSt7jp29a97371a466eecab48e7a7c35d92861.jpg";
console
.
log
(
access_token
);
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
;
//url识别图片
wx
.
request
({
url
:
post_url
,
header
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
method
:
'POST'
,
success
(
res
)
{
uni
.
hideLoading
()
let
info
=
res
.
data
;
if
(
info
.
errcode
!=
0
){
if
(
type
===
"front"
)
{
this
.
fileInfo
.
id_card_name
=
""
;
this
.
fileInfo
.
id_card_number
=
""
;
this
.
frontErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
that
.
fileInfo
.
id_card_name
=
""
;
that
.
fileInfo
.
id_card_number
=
""
;
that
.
frontErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
}
else
{
this
.
fileInfo
.
id_card_back_check
=
false
;
this
.
backErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
that
.
fileInfo
.
id_card_back_check
=
false
;
that
.
backErrorMsg
=
res
.
message
||
"识别失败,请重新上传"
}
return
}
uni
.
hideLoading
()
if
(
type
===
"front"
)
{
this
.
fileInfo
.
id_card_name
=
res
.
data
.
id_card_name
||
""
;
this
.
fileInfo
.
id_card_number
=
res
.
data
.
id_card_number
||
""
;
this
.
frontErrorMsg
=
(
!
this
.
fileInfo
.
id_card_name
||
!
this
.
fileInfo
.
id_card_number
)
?
"识别失败,请重新上传"
:
''
}
else
if
(
type
===
"front"
)
{
that
.
fileInfo
.
id_card_name
=
info
.
name
||
""
;
that
.
fileInfo
.
id_card_number
=
info
.
id
||
""
;
that
.
frontErrorMsg
=
(
!
that
.
fileInfo
.
id_card_name
||
!
that
.
fileInfo
.
id_card_number
)
?
"识别失败,请重新上传"
:
''
}
else
{
this
.
fileInfo
.
id_card_expire
=
res
.
data
.
id_card_expir
e
||
""
;
this
.
fileInfo
.
id_card_back_check
=
true
;
this
.
backErrorMsg
=
!
this
.
fileInfo
.
id_card_expire
?
"识别失败,请重新上传"
:
''
that
.
fileInfo
.
id_card_expire
=
info
.
valid_dat
e
||
""
;
that
.
fileInfo
.
id_card_back_check
=
true
;
that
.
backErrorMsg
=
!
that
.
fileInfo
.
id_card_expire
?
"识别失败,请重新上传"
:
''
}
}
})
},
checkFileInfo
()
{
let
formFlag
=
true
;
...
...
src/plugins/uploader/index.js
View file @
d3d0f3c0
...
...
@@ -184,7 +184,7 @@ uploader.requestError = function(e) {
throw
e
;
}
else
{
uni
.
showToast
({
title
:
"
网络错误,请检查一下网络
"
,
title
:
"
当前网络信号较差,请耐心等待;或者尝试切换网络环境
"
,
icon
:
"none"
});
}
...
...
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