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
ac5c7a50
authored
Sep 27, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
670d518b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
18 deletions
utils/WebIM.js
utils/chat.js
utils/util.js
utils/WebIM.js
View file @
ac5c7a50
...
@@ -220,7 +220,7 @@ WebIM.conn = new WebIM.connection({
...
@@ -220,7 +220,7 @@ WebIM.conn = new WebIM.connection({
https
:
typeof
WebIM
.
config
.
https
===
"boolean"
?
WebIM
.
config
.
https
:
location
.
protocol
===
"https:"
,
https
:
typeof
WebIM
.
config
.
https
===
"boolean"
?
WebIM
.
config
.
https
:
location
.
protocol
===
"https:"
,
url
:
WebIM
.
config
.
xmppURL
,
url
:
WebIM
.
config
.
xmppURL
,
apiUrl
:
WebIM
.
config
.
apiURL
,
apiUrl
:
WebIM
.
config
.
apiURL
,
isAutoLogin
:
fals
e
,
isAutoLogin
:
tru
e
,
heartBeatWait
:
WebIM
.
config
.
heartBeatWait
,
heartBeatWait
:
WebIM
.
config
.
heartBeatWait
,
autoReconnectNumMax
:
WebIM
.
config
.
autoReconnectNumMax
,
autoReconnectNumMax
:
WebIM
.
config
.
autoReconnectNumMax
,
autoReconnectInterval
:
WebIM
.
config
.
autoReconnectInterval
autoReconnectInterval
:
WebIM
.
config
.
autoReconnectInterval
...
...
utils/chat.js
View file @
ac5c7a50
...
@@ -129,7 +129,7 @@ const webimListen = () => {
...
@@ -129,7 +129,7 @@ const webimListen = () => {
duration
:
2000
duration
:
2000
});
});
}
}
WebIM
.
conn
.
setPresence
();
//
WebIM.conn.setPresence();
},
},
onReconnect
()
{
onReconnect
()
{
// wx.showToast({
// wx.showToast({
...
...
utils/util.js
View file @
ac5c7a50
...
@@ -326,22 +326,13 @@ const interval = (usedTime) => {
...
@@ -326,22 +326,13 @@ const interval = (usedTime) => {
}
}
const
fourPoint
=
(
num
)
=>
{
//检测价格是否是数字或者是不大于四位小数点的小数
const
fourPoint
=
(
num
)
=>
{
//检测价格是否是数字或者是不大于四位小数点的小数
let
price
=
num
.
trim
();
let
price
=
num
.
trim
();
if
(
!
price
.
length
)
{
console
.
log
(
price
)
tips
(
'请填写价格'
);
let
reg
=
/^
(([
1-9
][
0-9
]
*
)
|
(([
0
]\.\d{1,4}
|
[
1-9
][
0-9
]
*
\.\d{1,4})))
$/
;
return
false
if
(
!
reg
.
test
(
price
)){
}
else
{
tips
(
'价格为整数或不超过4位小数'
);
if
(
isNaN
(
price
))
{
return
false
;
tips
(
'价格必须为数字'
);
}
else
{
return
false
return
true
;
}
else
{
let
strArr
=
price
.
split
(
'.'
);
if
((
strArr
.
length
==
1
)
||
(
strArr
.
length
==
2
&&
strArr
[
1
].
length
<
5
))
{
return
true
}
else
{
tips
(
'价格最多4位小数点'
);
return
false
}
}
}
}
}
}
const
matchReg
=
(
str
)
=>
{
const
matchReg
=
(
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