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
7ea3b03b
Commit
7ea3b03b
authored
Mar 13, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
383f804d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
login.js
pages/login/login.js
+2
-4
No files found.
pages/login/login.js
View file @
7ea3b03b
...
@@ -147,7 +147,6 @@ Page({
...
@@ -147,7 +147,6 @@ Page({
},
},
loginCallback
(
res
)
{
loginCallback
(
res
)
{
console
.
log
(
"业务层登录 success==>"
+
JSON
.
stringify
(
res
));
console
.
log
(
"业务层登录 success==>"
+
JSON
.
stringify
(
res
));
my
.
hideLoading
();
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
//本地存储账户信息
//本地存储账户信息
my
.
setStorageSync
({
my
.
setStorageSync
({
...
@@ -157,9 +156,6 @@ Page({
...
@@ -157,9 +156,6 @@ Page({
//登陆信息设置到全局变量
//登陆信息设置到全局变量
getApp
().
globalData
.
localAccountInfo
=
res
.
data
;
getApp
().
globalData
.
localAccountInfo
=
res
.
data
;
console
.
info
(
`localAccountInfo:
${
JSON
.
stringify
(
getApp
().
globalData
.
localAccountInfo
)}
`
);
console
.
info
(
`localAccountInfo:
${
JSON
.
stringify
(
getApp
().
globalData
.
localAccountInfo
)}
`
);
//todo 临时跳转到扫商品页面 跳转广告页
//通知后屏登录成功
//通知后屏登录成功
this
.
sendLoginOkToBackScreen
();
this
.
sendLoginOkToBackScreen
();
...
@@ -167,6 +163,7 @@ Page({
...
@@ -167,6 +163,7 @@ Page({
errHidden
:
true
errHidden
:
true
});
});
}
else
{
}
else
{
my
.
hideLoading
();
//提示登录失败
//提示登录失败
my
.
showToast
({
my
.
showToast
({
type
:
'fail'
,
type
:
'fail'
,
...
@@ -199,6 +196,7 @@ Page({
...
@@ -199,6 +196,7 @@ Page({
data
:
commonRequest
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
"登录成功通知后屏 成功 ===》"
+
JSON
.
stringify
(
res
));
console
.
log
(
"登录成功通知后屏 成功 ===》"
+
JSON
.
stringify
(
res
));
my
.
hideLoading
();
my
.
reLaunch
({
my
.
reLaunch
({
url
:
"/pages/home/home"
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