leisure-core 0.4.39 → 0.4.41

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.
@@ -224,7 +224,14 @@ export default {
224
224
  this.$store.getters.userinfo.nick || this.$store.getters.userinfo.account;
225
225
  let tab_top_dom = document.getElementsByClassName("el-tabs_");
226
226
  tab_top_dom[0].oncontextmenu = this.openContextMenu;
227
- this.$store.commit("setCname", this.companyInfo.name);
227
+ if (
228
+ this.companyInfo &&
229
+ this.companyInfo.name &&
230
+ this.companyInfo.name.length > 0
231
+ ) {
232
+ this.$store.commit("setCname", this.companyInfo.name);
233
+ }
234
+
228
235
  let dict = [
229
236
  {
230
237
  title: "是",
@@ -141,8 +141,11 @@ export default {
141
141
 
142
142
  loginAfter(res) {
143
143
  if (res.data.code == "10000") {
144
- this.$store.commit("setCid", res.data.data.cid??"");
145
- this.$store.commit("setUserInfo", res.data.data);
144
+ let data = res.data.data;
145
+ if (data && data.cid && data.cid.length > 0) {
146
+ this.$store.commit("setCid", data.cid);
147
+ }
148
+ this.$store.commit("setUserInfo", data);
146
149
  setToken(res.data.data.token);
147
150
  }
148
151
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.4.39",
3
+ "version": "0.4.41",
4
4
  "description": "leisure-core是leisure-ui-core的简称,是京心数据基于vue2.0开发的一套后台系统框架与js库,包含登录,首页框架等",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",