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
d2b7b72c
Commit
d2b7b72c
authored
Feb 25, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
3e1c9855
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
actioncmd.js
const/actioncmd.js
+2
-1
index.js
pages/index/index.js
+10
-4
No files found.
const/actioncmd.js
View file @
d2b7b72c
...
...
@@ -55,7 +55,8 @@ export const ACTION_PRINT_LAST_ORDER = "ACTION_PRINT_LAST_ORDER";
const
FLOW_IDLE
=
"idle"
;
const
FLOW_COLLECTIONS
=
"collections"
;
//收款
const
FLOW_REFUND
=
"refund"
;
//退款
const
FLOW_DIRECT_PAYMENT
=
"direct_payment"
export
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
}
pages/index/index.js
View file @
d2b7b72c
...
...
@@ -17,7 +17,7 @@ import { ACTION_REFUND } from '../../const/actioncmd'
import
{
ACTION_REFUND_SUCCESS
}
from
'../../const/actioncmd'
import
{
ACTION_REFUND_FAILED
}
from
'../../const/actioncmd'
import
{
ACTION_PRINT_LAST_ORDER
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
}
from
'../../const/actioncmd'
Page
({
...
...
@@ -288,6 +288,10 @@ Page({
},
success
:
(
res
)
=>
{
context
.
goPage
(
'home'
);
context
.
setData
({
flowType
:
FLOW_IDLE
,
operateContext
:
{},
//重新初始化
})
console
.
log
(
"通知前屏回到首页 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
...
...
@@ -324,7 +328,8 @@ Page({
/**首页相关 */
/**立即收款 */
onHomeCashierImmediatelyClicked
()
{
this
.
setData
({
scene
:
3
})
this
.
setData
({
scene
:
3
,
flowType
:
FLOW_DIRECT_PAYMENT
})
},
/**
...
...
@@ -720,7 +725,7 @@ Page({
//直接返回到扫码页面,并且通知前屏返回
if
(
this
.
data
.
flowType
==
FLOW_REFUND
)
{
this
.
operateResultClose
();
}
else
{
}
else
if
(
this
.
data
.
flowType
==
FLOW_COLLECTIONS
)
{
this
.
goPage
(
'landscan'
);
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
...
...
@@ -742,6 +747,8 @@ Page({
});
}
})
}
else
if
(
this
.
data
.
flowType
==
FLOW_DIRECT_PAYMENT
)
{
this
.
goHome
();
}
},
...
...
@@ -785,7 +792,6 @@ Page({
},
fail
:
(
fres
)
=>
{
console
.
log
(
"兑换券通知前屏 失败 ===》 "
+
JSON
.
stringify
(
fres
));
context
.
sendConvertCouponToFront
(
res
)
}
})
},
...
...
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