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
a4b5e9b8
Commit
a4b5e9b8
authored
Feb 14, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前屏扫商品前后联动
parent
7974e4e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
actioncmd.js
const/actioncmd.js
+5
-1
scan.js
pages/scan/scan.js
+12
-3
No files found.
const/actioncmd.js
View file @
a4b5e9b8
...
...
@@ -8,4 +8,8 @@ export const ACTION_REPRINT = "ACTION_REPRINT";
export
const
ACTION_GOODS
=
"ACTION_GOODS"
;
//去结算页面
export
const
ACTION_GOODS
=
"ACTION_GO_BALANCE"
;
export
const
ACTION_GO_BALANCE
=
"ACTION_GO_BALANCE"
;
//请求商品条码
export
const
ACTION_REQUEST_GOOD_INFO
=
"ACTION_REQUEST_GOOD_INFO"
;
pages/scan/scan.js
View file @
a4b5e9b8
...
...
@@ -50,7 +50,11 @@ Page({
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
){
//去结算页面
context
.
goBalance
();
}
else
if
(
res
.
action
==
ACTION_REQUEST_GOOD_INFO
){
//去结算页面
context
.
getGoodInfoByBarcode
(
res
.
data
);
}
}
});
},
...
...
@@ -178,9 +182,14 @@ Page({
//把所有的商品数据发送到后屏
sendGoodInfoToBack
()
{
let
context
=
this
;
var
commonRequest
=
{
action
:
ACTION_GOODS
,
data
:
this
.
data
};
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
backScreenAppId
,
data
:
co
ntext
.
data
,
data
:
co
mmonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"发送商品数据到后屏小程序成功 ===》"
+
JSON
.
stringify
(
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