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
f5e4d947
Commit
f5e4d947
authored
Feb 19, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改index首页交互逻辑;
parent
54036739
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
index.js
pages/index/index.js
+17
-10
No files found.
pages/index/index.js
View file @
f5e4d947
...
...
@@ -113,24 +113,22 @@ Page({
totalDisc
:
viewGoodsInfo
.
totalDisc
,
})
}
}
else
if
(
res
.
action
==
ACTION
)
{
}
else
if
(
res
.
action
==
ACTION_GO_SCAN
)
{
//跳转到
context
.
goPage
(
"landscan"
);
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
//跳转
this
.
goPage
(
"waitoperate"
)
context
.
goPage
(
'waitoperate'
)
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
setData
({
context
.
setData
({
isPaySuccess
:
true
})
this
.
goPage
(
"payresult"
);
})
;
context
.
goPage
(
'payresult'
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_FAILED
)
{
setData
({
context
.
setData
({
isPaySuccess
:
false
})
this
.
goPage
(
"payresult"
);
})
;
context
.
goPage
(
"payresult"
);
}
else
{
//未知指令
}
...
...
@@ -199,16 +197,25 @@ Page({
action
:
ACTION_GO_SCAN
,
data
:
null
};
my
.
showToast
({
content
:
"首页发送数据"
});
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
my
.
showToast
({
content
:
"首页发送数据成功"
});
console
.
log
(
"发送收银事件到前屏小程序 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"发送收银事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
//发送失败重试
// context.sendGoToCollections();
my
.
showToast
({
content
:
"首页发送数据失败"
});
}
});
},
...
...
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