Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-front
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-front
Commits
3148b44c
Commit
3148b44c
authored
Feb 27, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付为真实价格
parent
fdc651fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
balance.js
pages/balance/balance.js
+3
-10
scan.js
utils/scan.js
+5
-5
No files found.
pages/balance/balance.js
View file @
3148b44c
...
...
@@ -98,13 +98,6 @@ Page({
},
onReady
()
{
if
(
my
.
canIUse
(
'hideBackHome'
))
{
my
.
hideBackHome
();
}
},
onShow
()
{
my
.
ix
.
onBuddyMessage
({
success
:
(
res
)
=>
{
...
...
@@ -138,7 +131,7 @@ Page({
//获取order
var
payAmount
=
payUtils
.
yuan2Fen
(
this
.
data
.
payPrice
);
payUtils
.
getOrder
(
/*payAmount*/
1
,
this
.
data
.
list
,
function
(
res
)
{
payUtils
.
getOrder
(
payAmount
,
this
.
data
.
list
,
function
(
res
)
{
if
(
res
!=
null
)
{
console
.
log
(
"callback调用,res="
+
JSON
.
stringify
(
res
));
...
...
@@ -227,7 +220,7 @@ Page({
this
.
setData
({
isPaying
:
true
});
//使用barCode来当面付
var
payAmount
=
payUtils
.
yuan2Fen
(
this
.
data
.
payPrice
);
payUtils
.
startPay
(
orderNo
,
payCode
,
/*payAmount*/
1
,
this
.
data
.
list
,
function
(
res
)
{
payUtils
.
startPay
(
orderNo
,
payCode
,
payAmount
,
this
.
data
.
list
,
function
(
res
)
{
my
.
hideLoading
();
console
.
log
(
"支付回调 ===>"
+
JSON
.
stringify
(
res
));
this
.
setData
({
isPaying
:
false
});
...
...
@@ -251,7 +244,7 @@ Page({
my
.
ix
.
offCashierEventReceive
();
this
.
saveData
(
this
.
data
.
list
,
res
.
data
);
my
.
redirectTo
({
url
:
'/pages/paysuccess/paysuccess
'
,
url
:
'/pages/paysuccess/paysuccess
?totalGoodsNum='
+
this
.
data
.
goodsNum
,
});
//发送支付成功到后屏
...
...
utils/scan.js
View file @
3148b44c
...
...
@@ -9,11 +9,11 @@ export default class scan {
if
(
!
page
.
_keyEventListener
)
{
//摄像头
my
.
ix
.
onCodeScan
((
r
)
=>
{
if
(
r
.
success
){
let
cur
=
getCurrentPages
().
slice
(
-
1
)[
0
];
cur
.
onKeyPress
.
call
(
cur
,
code
);
if
(
r
.
success
)
{
let
cur
=
getCurrentPages
().
slice
(
-
1
)[
0
];
cur
.
onKeyPress
.
call
(
cur
,
code
);
}
console
.
log
(
'code: '
+
r
.
code
);
console
.
log
(
'code: '
+
r
.
code
);
});
//物理扫码枪
...
...
@@ -27,7 +27,7 @@ export default class scan {
//兼容扫描枪
cur
.
onKeyPress
.
call
(
cur
,
code
);
isScaning
=
false
},
7
00
);
},
10
00
);
}
else
{
//特殊处理 keycode需要减7
if
(
r
.
keyCode
>=
7
&&
r
.
keyCode
<=
16
)
{
...
...
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