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
4138b3e6
Commit
4138b3e6
authored
Feb 19, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加home跳转到scan页面的操作
parent
e52078b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
index.axml
pages/index/index.axml
+1
-1
index.js
pages/index/index.js
+26
-1
No files found.
pages/index/index.axml
View file @
4138b3e6
...
...
@@ -14,7 +14,7 @@
</view>
<view class="homeBodyView">
<!-- 还需要加一层swiper -->
<view class="homeGridItem" onTap="
c
ollections">
<view class="homeGridItem" onTap="
sendGoToC
ollections">
<image mode="aspectFit" src="/images/collections.png" class="homeItemImage"/>
<view class="homeItemText">收银</view>
</view>
...
...
pages/index/index.js
View file @
4138b3e6
...
...
@@ -5,6 +5,7 @@ import { ACTION_GO_BALANCE } from '../../const/actioncmd'
import
{
ACTION_REQUEST_GOOD_INFO
}
from
'../../const/actioncmd'
import
{
ACTION_PRINT_RESULT
}
from
'../../const/actioncmd'
import
{
ACTION_REPRINT
}
from
'../../const/actioncmd'
import
{
ACTION_GO_SCAN
}
from
'../../const/actioncmd'
Page
({
data
:
{
...
...
@@ -80,7 +81,10 @@ Page({
totalDisc
:
viewGoodsInfo
.
totalDisc
,
})
}
}
else
if
(
res
.
action
==
ACTION
){
}
else
if
(
res
.
action
==
ACTION_GO_SCAN
){
//跳转到
context
.
goPage
(
"landscan"
);
}
else
{
//未知指令
}
}
...
...
@@ -132,6 +136,27 @@ Page({
});
},
//跳转到收银页面
sendGoToCollections
(){
var
commonRequest
=
{
action
:
ACTION_GO_SCAN
,
data
:
null
};
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"发送收银事件到前屏小程序 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"发送收银事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
//发送失败重试
// context.sendGoToCollections();
}
})
},
/**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏
...
...
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