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
69076a08
Commit
69076a08
authored
Feb 24, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格校验&商品码校验
parent
f606d418
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
landkeybord.js
pages/components/landkeybord/landkeybord.js
+13
-2
index.js
pages/index/index.js
+1
-1
No files found.
pages/components/landkeybord/landkeybord.js
View file @
69076a08
...
@@ -56,7 +56,9 @@ Component({
...
@@ -56,7 +56,9 @@ Component({
},
add0
(
e
)
{
},
add0
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"0"
});
this
.
setData
({
result
:
this
.
data
.
result
+
"0"
});
},
addpoint
(
e
)
{
},
addpoint
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"."
});
if
(
this
.
data
.
scenes
==
3
||
this
.
data
.
scenes
==
4
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"."
});
}
},
delete
(
e
)
{
},
delete
(
e
)
{
if
(
this
.
data
.
result
.
length
>
1
)
{
if
(
this
.
data
.
result
.
length
>
1
)
{
let
cur
=
this
.
data
.
result
;
let
cur
=
this
.
data
.
result
;
...
@@ -66,7 +68,16 @@ Component({
...
@@ -66,7 +68,16 @@ Component({
this
.
setData
({
result
:
''
});
this
.
setData
({
result
:
''
});
}
}
},
finish
(
e
)
{
},
finish
(
e
)
{
this
.
props
.
onKeyBordFinished
(
this
.
data
.
result
);
if
(
this
.
data
.
scenes
==
3
||
this
.
data
.
scenes
==
4
)
{
//判断价格是否参数合法
var
priceReg
=
/
(
^
[
1-9
]\d
*
(\.\d{1,2})?
$
)
|
(
^0
(\.\d{1,2})?
$
)
/
;
if
(
!
priceReg
.
test
(
this
.
data
.
result
))
{
//错误提示
return
}
}
this
.
props
.
onKeyBordFinished
(
this
.
data
.
result
);
},
closeKeybord
(
e
){
},
closeKeybord
(
e
){
this
.
props
.
onKeyBordClose
();
this
.
props
.
onKeyBordClose
();
}
}
...
...
pages/index/index.js
View file @
69076a08
...
@@ -443,7 +443,7 @@ Page({
...
@@ -443,7 +443,7 @@ Page({
//键盘完成
//键盘完成
onKeyBordFinished
(
result
)
{
onKeyBordFinished
(
result
)
{
if
(
this
.
data
.
scene
==
3
){
if
(
this
.
data
.
scene
==
3
){
this
.
sendPaymentToFront
(
result
)
this
.
sendPaymentToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
1
){
}
else
if
(
this
.
data
.
scene
==
1
){
this
.
sendGoodsInfoToFront
(
result
)
this
.
sendGoodsInfoToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
4
){
}
else
if
(
this
.
data
.
scene
==
4
){
...
...
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