Commit 6612f1f4 authored by Mac's avatar Mac

首页跳转不判断登录

parent 3bf3b47b
...@@ -49,19 +49,13 @@ ...@@ -49,19 +49,13 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) { if (item.linkUrl) {
uni.navigateTo({ uni.navigateTo({
url: item.linkUrl, url: item.linkUrl,
}); });
} }
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -53,19 +53,13 @@ ...@@ -53,19 +53,13 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) { if (item.linkUrl) {
uni.navigateTo({ uni.navigateTo({
url: item.linkUrl, url: item.linkUrl,
}); });
} }
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -47,19 +47,13 @@ ...@@ -47,19 +47,13 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) { if (item.linkUrl) {
uni.navigateTo({ uni.navigateTo({
url: item.linkUrl, url: item.linkUrl,
}); });
} }
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -46,19 +46,13 @@ ...@@ -46,19 +46,13 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) { if (item.linkUrl) {
uni.navigateTo({ uni.navigateTo({
url: item.linkUrl, url: item.linkUrl,
}); });
} }
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -51,15 +51,9 @@ ...@@ -51,15 +51,9 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id }); uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id });
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -49,16 +49,10 @@ ...@@ -49,16 +49,10 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id }); uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id });
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
...@@ -52,16 +52,10 @@ ...@@ -52,16 +52,10 @@
methods: { methods: {
openGood(item) { openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id }); uni.navigateTo({ url: "/pages/school/articleDetails?ID=" + item.id });
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync('mall_UserInfo');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment