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
3bdaf5be
Commit
3bdaf5be
authored
Feb 24, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知后屏登录成功
parent
1b0a4998
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
actioncmd.js
const/actioncmd.js
+4
-1
login.js
pages/login/login.js
+33
-6
No files found.
const/actioncmd.js
View file @
3bdaf5be
...
...
@@ -36,3 +36,6 @@ export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT";
//兑换券
export
const
ACTION_CONVERT_COUPON
=
"ACTION_CONVERT_COUPON"
;
//登录完成
export
const
ACTION_LOGIN_OK
=
"ACTION_LOGIN_OK"
;
\ No newline at end of file
pages/login/login.js
View file @
3bdaf5be
import
{
ACTION_LOGIN_OK
}
from
'../../const/actioncmd'
Page
({
data
:
{
name
:
""
,
...
...
@@ -34,11 +35,11 @@ Page({
console
.
log
(
"localLoginInfo==>"
+
JSON
.
stringify
(
localLoginInfo
));
if
(
localLoginInfo
.
success
!=
false
&&
localLoginInfo
.
data
!=
null
)
{
//赋值
this
.
setData
({
name
:
localLoginInfo
.
data
.
name
,
password
:
localLoginInfo
.
data
.
password
,
sn
:
localLoginInfo
.
data
.
sn
})
//
this.setData({
//
name: localLoginInfo.data.name,
//
password: localLoginInfo.data.password,
//
sn: localLoginInfo.data.sn
//
})
}
},
onNameClear
()
{
...
...
@@ -157,6 +158,10 @@ Page({
content
:
'登录成功'
,
duration
:
3000
});
//通知后屏登录成功
this
.
sendLoginOkToBackScreen
();
this
.
setData
({
errHidden
:
true
});
...
...
@@ -174,6 +179,28 @@ Page({
errHidden
:
false
});
}
},
// 登录完成通知后屏
sendLoginOkToBackScreen
(){
let
context
=
this
;
var
commonRequest
=
{
action
:
ACTION_LOGIN_OK
,
data
:
null
};
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
backScreenAppId
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"登录成功通知后屏 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"登录成功通知后屏 失败 ===》 "
+
JSON
.
stringify
(
res
));
//发送失败重试
context
.
sendLoginOkToBackScreen
();
}
})
}
});
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