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
97f9d805
Commit
97f9d805
authored
Feb 19, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
a6a972cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
home.js
pages/home/home.js
+5
-5
paysuccess.js
pages/paysuccess/paysuccess.js
+6
-2
No files found.
pages/home/home.js
View file @
97f9d805
...
@@ -13,15 +13,11 @@ Page({
...
@@ -13,15 +13,11 @@ Page({
},
},
on
s
how
(){
on
S
how
(){
my
.
ix
.
onBuddyMessage
({
my
.
ix
.
onBuddyMessage
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
info
(
`onBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`onBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
if
(
res
.
action
==
ACTION_GO_SCAN
){
if
(
res
.
action
==
ACTION_GO_SCAN
){
//跳转到扫码页面
my
.
redirectTo
({
url
:
"/pages/scan/scan"
});
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
// 填入目标小程序的 AppID
// 填入目标小程序的 AppID
target
:
getApp
().
globalData
.
backScreenAppId
,
target
:
getApp
().
globalData
.
backScreenAppId
,
...
@@ -31,6 +27,10 @@ Page({
...
@@ -31,6 +27,10 @@ Page({
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
//跳转到扫码页面
my
.
reLaunch
({
url
:
"/pages/scan/scan"
,
});
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
...
...
pages/paysuccess/paysuccess.js
View file @
97f9d805
import
{
ACTION_PRINT_RESULT
}
from
'../../const/actioncmd'
import
{
ACTION_PRINT_RESULT
}
from
'../../const/actioncmd'
import
{
ACTION_REPRINT
}
from
'../../const/actioncmd'
import
{
ACTION_REPRINT
}
from
'../../const/actioncmd'
import
{
ACTION_GO_HOME
}
from
'../../const/actioncmd'
Page
({
Page
({
data
:
{
data
:
{
...
@@ -125,8 +126,11 @@ Page({
...
@@ -125,8 +126,11 @@ Page({
if
(
res
.
action
==
ACTION_REPRINT
)
{
if
(
res
.
action
==
ACTION_REPRINT
)
{
//重新打印
//重新打印
this
.
print
();
this
.
print
();
}
else
{
}
else
if
(
res
.
action
==
ACTION_GO_HOME
)
{
//未知指令
//去首页
my
.
reLaunch
({
url
:
"/pages/home/home"
,
});
}
}
}
}
});
});
...
...
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