@jx3box/jx3box-common-ui 7.1.0 → 7.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/LeftSidebar.vue +14 -14
- package/src/author/AuthorHonor.vue +16 -17
- package/src/header/manage.vue +1 -1
package/package.json
CHANGED
package/src/LeftSidebar.vue
CHANGED
|
@@ -78,25 +78,25 @@ export default {
|
|
|
78
78
|
if (!this.user_id) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
let decoration_sidebar = sessionStorage.getItem(DECORATION_SIDEBAR + this.user_id);
|
|
81
|
+
let decoration_sidebar = sessionStorage.getItem(DECORATION_SIDEBAR + this.user_id) || "";
|
|
82
82
|
if (decoration_sidebar == "no") return;
|
|
83
83
|
//已有缓存,读取解析
|
|
84
|
-
|
|
84
|
+
try {
|
|
85
85
|
let sidebar = JSON.parse(decoration_sidebar);
|
|
86
86
|
this.bg = this.showDecoration(sidebar.val, "sidebar");
|
|
87
|
-
|
|
87
|
+
} catch (err) {
|
|
88
|
+
getDecoration({ using: 1, user_id: this.user_id, type: "sidebar" }).then((data) => {
|
|
89
|
+
let res = data.data.data || [];
|
|
90
|
+
if (res.length == 0) {
|
|
91
|
+
//空 则为无主题,不再加载接口,界面设No
|
|
92
|
+
sessionStorage.setItem(DECORATION_SIDEBAR + this.user_id, "no");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
let sidebar = res[0];
|
|
96
|
+
this.bg = this.showDecoration(sidebar.val, "sidebar");
|
|
97
|
+
sessionStorage.setItem(DECORATION_SIDEBAR + this.user_id, JSON.stringify(sidebar));
|
|
98
|
+
});
|
|
88
99
|
}
|
|
89
|
-
getDecoration({ using: 1, user_id: this.user_id, type: "sidebar" }).then((data) => {
|
|
90
|
-
let res = data.data.data;
|
|
91
|
-
if (res.length == 0) {
|
|
92
|
-
//空 则为无主题,不再加载接口,界面设No
|
|
93
|
-
sessionStorage.setItem(DECORATION_SIDEBAR + this.user_id, "no");
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
let sidebar = res[0];
|
|
97
|
-
this.bg = this.showDecoration(sidebar.val, "sidebar");
|
|
98
|
-
sessionStorage.setItem(DECORATION_SIDEBAR + this.user_id, JSON.stringify(sidebar));
|
|
99
|
-
});
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
102
|
mounted: function () {
|
|
@@ -35,24 +35,23 @@ export default {
|
|
|
35
35
|
getHonor() {
|
|
36
36
|
let user_id = this.uid;
|
|
37
37
|
if (!user_id) return;
|
|
38
|
-
let honor_local = sessionStorage.getItem(HONOR_IMG_KEY + user_id);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
let honor_local = sessionStorage.getItem(HONOR_IMG_KEY + user_id) || "";
|
|
39
|
+
//解析本地缓存
|
|
40
|
+
if (honor_local == "no") return;
|
|
41
|
+
try {
|
|
42
|
+
this.honor = JSON.parse(honor_local);
|
|
43
|
+
} catch (err) {
|
|
44
|
+
getDecoration({ using: 1, user_id: user_id, type: "honor" }).then((data) => {
|
|
45
|
+
let res = data.data.data || [];
|
|
46
|
+
if (res.length == 0) {
|
|
47
|
+
//空 则为无主题,不再加载接口,界面设No
|
|
48
|
+
sessionStorage.setItem(HONOR_IMG_KEY + user_id, "no");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
let honor = res[0];
|
|
52
|
+
this.getHonorStyle(honor);
|
|
53
|
+
});
|
|
45
54
|
}
|
|
46
|
-
getDecoration({ using: 1, user_id: user_id, type: "honor" }).then((data) => {
|
|
47
|
-
let res = data.data.data;
|
|
48
|
-
if (res.length == 0) {
|
|
49
|
-
//空 则为无主题,不再加载接口,界面设No
|
|
50
|
-
sessionStorage.setItem(HONOR_IMG_KEY + user_id, "no");
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
let honor = res[0];
|
|
54
|
-
this.getHonorStyle(honor);
|
|
55
|
-
});
|
|
56
55
|
},
|
|
57
56
|
//有称号后,获取样式配置
|
|
58
57
|
getHonorStyle(data) {
|
package/src/header/manage.vue
CHANGED
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
const isTeamMember = JSON.parse(localStorage.getItem("BoxTeam3"));
|
|
84
84
|
|
|
85
85
|
if (isTeamMember) {
|
|
86
|
-
this.isTeamMember = isTeamMember === "true";
|
|
86
|
+
this.isTeamMember = isTeamMember === "true" || isTeamMember;
|
|
87
87
|
} else {
|
|
88
88
|
checkTeamMember().then((res) => {
|
|
89
89
|
this.isTeamMember = res.data.data;
|