Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
79e88b49
Commit
79e88b49
authored
Mar 11, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加金额限制,不能为0
parent
54d5e857
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
landkeybord.js
pages/components/landkeybord/landkeybord.js
+18
-14
No files found.
pages/components/landkeybord/landkeybord.js
View file @
79e88b49
Component
({
mixins
:
[],
data
:
{
showresult
:
""
,
showresult
:
""
,
result
:
""
,
scenes
:
2
,
errMsg
:
""
...
...
@@ -24,7 +24,7 @@ Component({
this
.
setData
({
result
:
''
,
errMsg
:
''
,
showresult
:
''
showresult
:
''
});
}
...
...
@@ -71,7 +71,7 @@ Component({
}
this
.
setData
({
result
:
cur
,
showresult
:
shownewresult
});
}
else
{
this
.
setData
({
result
:
''
,
showresult
:
''
});
this
.
setData
({
result
:
''
,
showresult
:
''
});
}
},
finish
(
e
)
{
this
.
setData
({
errMsg
:
""
})
...
...
@@ -83,6 +83,10 @@ Component({
this
.
setData
({
errMsg
:
"金额格式有误"
})
return
}
if
(
parseInt
(
this
.
data
.
result
*
100
)
<=
0
)
{
this
.
setData
({
errMsg
:
"金额格式有误"
})
return
;
}
}
else
if
(
this
.
data
.
scenes
==
2
)
{
if
(
this
.
data
.
result
==
null
||
this
.
data
.
result
.
length
!=
11
)
{
this
.
setData
({
errMsg
:
"会员号格式有误"
})
...
...
@@ -94,13 +98,13 @@ Component({
this
.
props
.
onKeyBordClose
();
},
//处理输入的内容
addInputContont
(
content
)
{
addInputContont
(
content
)
{
let
newresult
=
this
.
data
.
result
+
content
;
let
shownewresult
=
newresult
if
(
newresult
.
length
>
13
)
{
shownewresult
=
"..."
+
newresult
.
substring
(
newresult
.
length
-
11
,
newresult
.
length
)
if
(
newresult
.
length
>
13
)
{
shownewresult
=
"..."
+
newresult
.
substring
(
newresult
.
length
-
11
,
newresult
.
length
)
}
this
.
setData
({
result
:
newresult
,
showresult
:
shownewresult
});
this
.
setData
({
result
:
newresult
,
showresult
:
shownewresult
});
}
},
...
...
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