Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
2017-09-04 10:47:39 +0800
Commit
a3afbe4cea8ecc8c7aca0df7410f1af644ea1ea0
1 parent
e319b5e9
baidu_is_login
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
doraemon/middleware/user.js
doraemon/views/partial/analysis.hbs
doraemon/middleware/user.js
View file @
a3afbe4
...
...
@@ -79,6 +79,7 @@ module.exports = () => {
}
}
res
.
locals
.
isLogin
=
Boolean
(
req
.
user
.
uid
);
// 用户是否登录
next
();
};
};
...
...
doraemon/views/partial/analysis.hbs
View file @
a3afbe4
...
...
@@ -72,6 +72,10 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
{{#if
@root
.
isLogin
}}
_hmt.push(['_setCustomVar', 1, 'login', true, 2]);
{{/if}}
}, 1000);
}());
...
...
Please
register
or
login
to post a comment