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
e0824c0c
Commit
e0824c0c
authored
Feb 21, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Plain Diff
merge fix
parents
558e1348
aa0dfba9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
actioncmd.js
const/actioncmd.js
+2
-0
balance.js
pages/balance/balance.js
+2
-1
home.js
pages/home/home.js
+26
-4
No files found.
const/actioncmd.js
View file @
e0824c0c
...
@@ -28,3 +28,5 @@ export const ACTION_ON_PAY_FAILED = "ACTION_ON_PAY_FAILED";
...
@@ -28,3 +28,5 @@ export const ACTION_ON_PAY_FAILED = "ACTION_ON_PAY_FAILED";
//去首页
//去首页
export
const
ACTION_GO_HOME
=
"ACTION_GO_HOME"
;
export
const
ACTION_GO_HOME
=
"ACTION_GO_HOME"
;
//获取账户信息
export
const
ACTION_GET_ACCOUNT
=
"ACTION_GET_ACCOUNT"
;
pages/balance/balance.js
View file @
e0824c0c
...
@@ -63,8 +63,9 @@ Page({
...
@@ -63,8 +63,9 @@ Page({
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
.
navigateBack
();
}
else
{
}
else
{
//未知指令
//未知指令
}
}
...
...
pages/home/home.js
View file @
e0824c0c
import
{
API_USE_COUPON
}
from
'../../const/apiurl'
<<<<<<<
HEAD
=======
var
api
=
require
(
"../../utils/api.js"
);
var
api
=
require
(
"../../utils/api.js"
);
import
{
Page
}
from
'../../utils/scan'
;
>>>>>>>
aa0dfba9ee3f14735718232a68135631a24f8e7c
import
{
API_USE_COUPON
}
from
'../../const/apiurl'
import
{
ACTION_GO_SCAN
}
from
'../../const/actioncmd'
import
{
ACTION_GO_SCAN
}
from
'../../const/actioncmd'
import
{
ACTION_GET_ACCOUNT
}
from
'../../const/actioncmd'
Page
({
Page
({
data
:
{
data
:
{
...
@@ -35,8 +39,26 @@ Page({
...
@@ -35,8 +39,26 @@ Page({
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
}
}
});
});
}
else
{
}
else
if
(
res
.
action
==
ACTION_GET_ACCOUNT
){
//未知指令
var
message
=
{
data
:
getApp
().
globalData
.
localAccountInfo
,
action
:
ACTION_GET_ACCOUNT
}
my
.
ix
.
sendBuddyMessage
({
// 填入目标小程序的 AppID
target
:
getApp
().
globalData
.
backScreenAppId
,
data
:
{
action
:
ACTION_GET_ACCOUNT
,
data
:
message
},
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
},
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
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