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
91e88fcb
Commit
91e88fcb
authored
Feb 27, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动登录;添加onback事件回调;
parent
dfdf1a77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
balance.js
pages/balance/balance.js
+19
-15
login.js
pages/login/login.js
+5
-5
No files found.
pages/balance/balance.js
View file @
91e88fcb
...
@@ -18,23 +18,27 @@ Page({
...
@@ -18,23 +18,27 @@ Page({
},
},
//回退到上一个页面
//回退到上一个页面
onBack
(
e
)
{
events
:
{
my
.
ix
.
sendBuddyMessage
({
onBack
(
e
)
{
// 填入目标小程序的 AppID
console
.
log
(
'onBack触发'
);
target
:
getApp
().
globalData
.
backScreenAppId
,
my
.
ix
.
sendBuddyMessage
({
data
:
{
// 填入目标小程序的 AppID
action
:
ACTION_BALANCE_BACK_GOODS
,
target
:
getApp
().
globalData
.
backScreenAppId
,
data
:
null
data
:
{
},
action
:
ACTION_BALANCE_BACK_GOODS
,
success
:
(
res
)
=>
{
data
:
null
e
.
preventDefault
();
},
},
success
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
e
.
preventDefault
();
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
},
}
fail
:
(
res
)
=>
{
});
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
}
});
}
},
},
onReady
()
{
onReady
()
{
if
(
my
.
canIUse
(
'hideBackHome'
))
{
if
(
my
.
canIUse
(
'hideBackHome'
))
{
my
.
hideBackHome
();
my
.
hideBackHome
();
...
...
pages/login/login.js
View file @
91e88fcb
...
@@ -43,11 +43,11 @@ Page({
...
@@ -43,11 +43,11 @@ Page({
console
.
log
(
"localLoginInfo==>"
+
JSON
.
stringify
(
localLoginInfo
));
console
.
log
(
"localLoginInfo==>"
+
JSON
.
stringify
(
localLoginInfo
));
if
(
localLoginInfo
.
success
!=
false
&&
localLoginInfo
.
data
!=
null
)
{
if
(
localLoginInfo
.
success
!=
false
&&
localLoginInfo
.
data
!=
null
)
{
//赋值
//赋值
//
this.setData({
this
.
setData
({
//
name: localLoginInfo.data.name,
name
:
localLoginInfo
.
data
.
name
,
//
password: localLoginInfo.data.password,
password
:
localLoginInfo
.
data
.
password
,
//
sn: localLoginInfo.data.sn
sn
:
localLoginInfo
.
data
.
sn
//
})
})
}
}
},
},
onNameClear
()
{
onNameClear
()
{
...
...
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