|
@@ -189,24 +189,23 @@ var globalHead = new Vue({
|
|
|
this.GetProductClassify(1);
|
|
|
this.GetProductClassify(2);
|
|
|
// this.GetNavigationMenu();
|
|
|
- // 判断登录状态
|
|
|
- if (globalUserData.token) {
|
|
|
- this.loginStatus = true;
|
|
|
- this.userData = globalUserData;
|
|
|
- if(this.userData.userId){
|
|
|
- // 获取头部购物车数据
|
|
|
- this.getHeadCart(this.userData.userId);
|
|
|
- }
|
|
|
- }
|
|
|
// 信息中心
|
|
|
this.articleType = getUrlParam("type");
|
|
|
},
|
|
|
mounted:function(){
|
|
|
var _self = this;
|
|
|
- var userData = JSON.parse(window.localStorage.getItem('userInfo'));
|
|
|
- if(userData!=null){
|
|
|
- this.userIdentity = userData.userIdentity;
|
|
|
- this.shopId = userData.shopId;
|
|
|
+ // 判断登录状态
|
|
|
+ if (GLOBAL_TOKEN) {
|
|
|
+ _self.loginStatus = true;
|
|
|
+ _self.userIdentity = GLOBAL_USER_IDENTITY;
|
|
|
+ _self.shopId = GLOBAL_SHOP_ID;
|
|
|
+ _self.userData = globalUserData;
|
|
|
+ if(GLOBAL_USER_ID){
|
|
|
+ // 获取头部购物车数据
|
|
|
+ setTimeout(function(){
|
|
|
+ _self.getHeadCart(GLOBAL_USER_ID);
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if($(window).width() > 1400){
|
|
|
$(window).on('scroll', function() {
|