Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
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
xugong
hls-xcmg-vue-app
Commits
f4a7758d
Commit
f4a7758d
authored
Nov 21, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'input组件'
parent
f9ac0642
Pipeline
#3630
canceled with stages
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
13 deletions
+101
-13
currencyInput.vue
src/components/currencyInput.vue
+72
-0
login.vue
src/pages/login.vue
+23
-8
enterprise.vue
src/pages/userBind/org/enterprise.vue
+4
-3
hlsUtil.js
src/scripts/hlsUtil.js
+2
-2
No files found.
src/components/currencyInput.vue
0 → 100644
View file @
f4a7758d
/**
* @Author Sean
* @Date 2019/11/21
*/
<
template
>
<input
:value=
"formatValue"
:readonly=
"disable"
type=
"text"
@
input=
"onInput($event.target.value)"
@
focus=
"onFocus"
@
blur=
"onBlur"
>
</
template
>
<
script
>
export
default
{
name
:
'CurrencyInput'
,
props
:
{
value
:
{
type
:
Number
,
default
:
0
,
},
disable
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
focused
:
false
,
}
},
filter
:
{
uncurrency
(
val
)
{
if
(
!
val
)
return
null
return
(
Number
((
val
).
replace
(
/,/gi
,
''
)))
===
0
?
null
:
Number
((
val
).
replace
(
/,/gi
,
''
))
},
},
computed
:
{
formatValue
()
{
let
currency
=
this
.
$options
.
filters
[
'currency'
]
if
(
!
this
.
focused
)
{
return
currency
(
this
.
value
)
}
else
{
return
this
.
value
}
},
},
methods
:
{
onInput
:
function
(
value
)
{
if
(
this
.
disable
)
return
let
uncurrency
=
this
.
$options
.
filter
[
'uncurrency'
]
this
.
currencyValue
=
uncurrency
(
value
)
this
.
$emit
(
'input'
,
this
.
currencyValue
)
},
onFocus
(
event
)
{
if
(
this
.
disable
)
return
this
.
focused
=
true
setTimeout
(
function
()
{
event
.
target
.
type
=
'number'
event
.
target
.
focus
()
},
0
)
},
onBlur
(
event
)
{
if
(
this
.
disable
)
return
event
.
target
.
type
=
'text'
this
.
focused
=
false
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
src/pages/login.vue
View file @
f4a7758d
...
...
@@ -36,6 +36,7 @@ var CryptoJS = require('crypto-js')
export
default
{
data
()
{
return
{
money
:
234567
,
pwdType
:
'password'
,
// 密码类型
openEye
:
require
(
'@/assets/login/pwd.png'
),
// 图片地址
username
:
window
.
localStorage
.
username
...
...
@@ -45,6 +46,17 @@ export default {
currentVersion
:
process
.
env
.
currentVersion
,
routeName
:
this
.
$route
.
params
.
routeName
||
''
,
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
fullPath
===
'/tab/my-info'
||
from
.
fullPath
===
'/margin-first-pay'
)
{
// 绑定查询入口
next
(
vm
=>
{
vm
.
getAccessToken
()
})
}
next
()
},
created
()
{
},
mounted
()
{
window
.
addEventListener
(
'native.keyboardhide'
,
function
()
{
...
...
@@ -87,6 +99,16 @@ export default {
// 极光推送
})
},
getAccessToken
()
{
let
vm
=
this
let
url
=
process
.
env
.
loginPath
+
'admin'
let
param
=
{}
// vm.hlsPopup.showLoading('请稍等')
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
// vm.hlsPopup.hideLoading()
window
.
localStorage
.
setItem
(
'access_token'
,
res
.
access_token
)
})
},
access
:
function
()
{
document
.
getElementById
(
'passwordInput'
).
blur
()
let
vm
=
this
...
...
@@ -95,14 +117,7 @@ export default {
}
else
if
(
!
vm
.
password
||
vm
.
password
===
undefined
)
{
vm
.
hlsPopup
.
showLongCenter
(
'请输入密码'
)
}
else
{
let
url
=
process
.
env
.
loginPath
+
'admin'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍等'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
window
.
localStorage
.
setItem
(
'access_token'
,
res
.
access_token
)
vm
.
login
()
})
vm
.
login
()
}
},
registerNew
:
function
()
{
...
...
src/pages/userBind/org/enterprise.vue
View file @
f4a7758d
...
...
@@ -537,7 +537,7 @@ export default {
legal_personMsg
:
{
id_card_no
:
null
,
// legal_person: '',
cell_phone
:
''
,
cell_phone
:
window
.
localStorage
.
getItem
(
'user_phone'
)
,
living_address
:
''
,
id_card_date_from
:
''
,
// 法定代表人身份证有效期从
id_card_date_to
:
''
,
// 法定代表人身份证有效期到
...
...
@@ -795,10 +795,10 @@ export default {
this
.
hlsPopup
.
showLongCenter
(
'请输入正确银行卡号!'
)
}
// 验证账户名称与承租人名称一致
if
(
this
.
bank_lists
.
bank_account_name
!==
this
.
saveInfo
.
bp_name
)
{
/*
if (this.bank_lists.bank_account_name !== this.saveInfo.bp_name) {
this.bank_card_flag = false
this.hlsPopup.showLongCenter('企业名称与账户名称不一致')
}
}
*/
if
(
this
.
bank_card_flag
)
{
this
.
hlsPopup
.
showLoading
(
'请稍后'
)
let
id
...
...
@@ -1464,6 +1464,7 @@ export default {
vm
.
baseInfo
.
legal_person
=
result
.
法人
.
words
vm
.
baseInfo
.
registered_place
=
result
.
地址
.
words
vm
.
baseInfo
.
organization_code
=
result
.
社会信用代码
.
words
vm
.
baseInfo
.
business_address
=
vm
.
baseInfo
.
registered_place
// 经营地址默认为注册地址,支持修改
})
},
load_picture
(
check_id
,
index
,
cdd_item
)
{
...
...
src/scripts/hlsUtil.js
View file @
f4a7758d
...
...
@@ -236,7 +236,7 @@ export default {
phoneNumber
:
function
(
str
)
{
// ^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$
let
reg
=
/^
((
13
[
0-9
]{1})
|
(
14
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
17
[
0-9
]{1})
|
(
18
[
0-9
]{1})
|166|198|199|
(
147
))
+
\d{8}
$/
let
reg
=
/^
((
13
[
0-9
]{1})
|
(
14
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
17
[
0-9
]{1})
|
(
1
9
[
0-9
]{1})
|
(
1
8
[
0-9
]{1})
|166|198|199|
(
147
))
+
\d{8}
$/
return
reg
.
test
(
str
)
},
/**
...
...
@@ -245,7 +245,7 @@ export default {
* @returns {boolean}
*/
phoneNumber86
:
function
(
str
)
{
let
reg
=
/^
(\+
86|
\+
86+
\s)
+
(((
13
[
0-9
]{1})
|
(
14
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
17
[
0-9
]{1})
|
(
18
[
0-9
]{1})
|166|198|199|
(
147
))
+
\d{8})
$/
let
reg
=
/^
(\+
86|
\+
86+
\s)
+
(((
13
[
0-9
]{1})
|
(
14
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
17
[
0-9
]{1})
|
(
1
9
[
0-9
]{1})
|
(
1
8
[
0-9
]{1})
|166|198|199|
(
147
))
+
\d{8})
$/
return
reg
.
test
(
str
)
},
/**
...
...
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