Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
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
hel-guide
app
Commits
8c246bee
Commit
8c246bee
authored
Sep 08, 2017
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates angular/hlsUtil.md
Auto commit by GitBook Editor
parent
4923f0d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
hlsUtil.md
angular/hlsUtil.md
+10
-0
No files found.
angular/hlsUtil.md
View file @
8c246bee
...
...
@@ -4,6 +4,7 @@ APP开发会出现很多功能相同的函数和组件,现封装了很多公
-
函数参数为
`( 身份证号码 )`
。
-
返回值为
`( 身份证校验结果 )`
,通过返回空,不通过返回具体内容。
-
调用如下
```
javascript
function
checkIdCard
(){
var
result
=
hlsUtil
.
isCardID
(
342623198712122312
);
...
...
@@ -17,6 +18,7 @@ APP开发会出现很多功能相同的函数和组件,现封装了很多公
-
函数参数为
`( 格式字符串 )`
如
`yyyy-MM-dd`
-
返回值为
`( 格式化后的时间 )`
如
`2017-09-08`
-
调用实例如下
```
javascript
function
dataFormat
()
{
var
date
=
new
Date
;
...
...
@@ -28,6 +30,7 @@ function dataFormat() {
-
函数参数为
`( 数组下标 )`
-
返回
`( 新的数组 )`
-
调用实例如下
```
javascript
function
arrayRemove
()
{
var
array
=
[
'1'
,
'2'
,
'3'
];
...
...
@@ -39,6 +42,7 @@ function arrayRemove() {
-
函数参数为
`( 对象 )`
-
返回
`( 字符串 )`
-
调用实例如下
```
javascript
function
objToString
(){
var
obj
=
{
...
...
@@ -53,6 +57,7 @@ function objToString(){
-
函数参数为
`( 数组、元素 )`
-
返回
`true of false`
-
调用实例如下
```
javascript
function
inArray
(){
var
array
=
[
'1'
,
'2'
,
'3'
];
...
...
@@ -65,6 +70,7 @@ function objToString(){
-
参数为
`( 手机号 )`
-
通过正则表达式校验 返回
`true of false`
-
调用实例如下
```
javascript
function
phoneNumber
(){
alert
(
hlsUtil
.
phoneNumber
(
18325379820
));
...
...
@@ -75,6 +81,7 @@ function phoneNumber(){
-
参数为
`( 手机号 )`
-
通过正则表达式校验 返回
`true of false`
-
调用实例如下
```
javascript
function
phoneNumber86
(){
alert
(
hlsUtil
.
phoneNumber86
(
'+8618325379820'
));
...
...
@@ -85,6 +92,7 @@ function phoneNumber(){
-
参数为
`( 邮箱地址 )`
-
通过正则表达式校验 返回
`true of false`
-
调用实例如下
```
javascript
function
isEmailAddress
(){
alert
(
hlsUtil
.
isEmailAddress
(
'jingchao.wu@hand-china.com'
));
...
...
@@ -95,6 +103,7 @@ function isEmailAddress(){
-
参数为
`( 图片地址,回调函数 )`
**第二个参数为回调函数 **
-
在回电函数中
`( 返回图片的base64 )`
-
调用实例如下
```
javascript
vm
.
imageTo64
=
function
()
{
hlsUtil
.
getImageToBase64
(
'build/img/login/icon.png'
,
function
(
imgdata
)
{
...
...
@@ -107,3 +116,4 @@ function isEmailAddress(){
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