Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2fe21eb
authored
Sep 27, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
11
parent
719bf102
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
app.js
utils/util.js
app.js
View file @
b2fe21eb
...
@@ -51,9 +51,7 @@ App({
...
@@ -51,9 +51,7 @@ App({
if
(
this
.
globalData
.
auth
)
{
if
(
this
.
globalData
.
auth
)
{
//是否登录
//是否登录
if
(
judgeToken
())
{
if
(
judgeToken
())
{
// wx.switchTab({
// url: '/pages/tab/home/home'
// });
}
else
{
}
else
{
wx
.
reLaunch
({
wx
.
reLaunch
({
url
:
'/pages/person/login/index'
url
:
'/pages/person/login/index'
...
...
utils/util.js
View file @
b2fe21eb
...
@@ -324,21 +324,21 @@ const interval = (usedTime) => {
...
@@ -324,21 +324,21 @@ const interval = (usedTime) => {
}
}
}
}
}
}
const
fourPoint
=
(
num
)
=>
{
//检测价格是否是数字或者是四位小数点的小数
const
fourPoint
=
(
num
)
=>
{
//检测价格是否是数字或者是
不大于
四位小数点的小数
let
price
=
num
.
trim
();
let
price
=
num
.
trim
();
if
(
!
price
.
length
)
{
if
(
!
price
.
length
)
{
tips
(
'请填写价格'
);
tips
(
'请填写价格'
);
return
false
return
false
}
else
{
}
else
{
if
(
isNaN
(
Number
(
price
)
))
{
if
(
isNaN
(
price
))
{
tips
(
'价格必须为数字'
);
tips
(
'价格必须为数字'
);
return
false
return
false
}
else
{
}
else
{
let
strArr
=
price
.
split
(
'.'
);
let
strArr
=
price
.
split
(
'.'
);
if
((
strArr
.
length
==
1
)
||
(
strArr
.
length
==
2
&&
strArr
[
1
].
length
==
4
))
{
if
((
strArr
.
length
==
1
)
||
(
strArr
.
length
==
2
&&
strArr
[
1
].
length
<
5
))
{
return
true
return
true
}
else
{
}
else
{
tips
(
'价格
只支持
4位小数点'
);
tips
(
'价格
最多
4位小数点'
);
return
false
return
false
}
}
}
}
...
...
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