cloud-web-corejs 1.0.54-dev.447 → 1.0.54-dev.448

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.447",
4
+ "version": "1.0.54-dev.448",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
package/src/App.vue CHANGED
@@ -16,32 +16,42 @@ export default {
16
16
  };
17
17
  },
18
18
  created() {
19
- /* if (process.env.NODE_ENV !== "development") {
19
+ if (process.env.NODE_ENV !== "development") {
20
20
  window.addEventListener(
21
- 'hashchange',
22
- event => {
23
- var currentPath = window.location.hash.slice(1).split('?')[0]; // 获取输入的路由
24
- if (currentPath != '/404' && currentPath != '/login' && this.$router.path !== currentPath) {
25
- this.$store.dispatch('tagsView/delAllViews').then(visitedViews => {
26
- this.$router.replace({path: '/redirect' + '/home'});
21
+ "hashchange",
22
+ (event) => {
23
+ var currentPath = window.location.hash.slice(1).split("?")[0]; // 获取输入的路由
24
+ if (
25
+ currentPath != "/404" &&
26
+ currentPath != "/login" &&
27
+ this.$router.path !== currentPath
28
+ ) {
29
+ this.$store.dispatch("tagsView/delAllViews").then((visitedViews) => {
30
+ this.$router.replace({ path: "/redirect" + "/home" });
27
31
  });
28
32
  }
29
33
  },
30
34
  false
31
35
  );
32
36
 
33
- window.addEventListener('beforeunload', async event => {
37
+ window.addEventListener("beforeunload", async (event) => {
34
38
  // 如果按下的键是 F5,则执行相应的操作
35
- var currentPath = window.location.hash.slice(1).split('?')[0]; // 获取输入的路由
36
- if (currentPath != '/home' && currentPath != '/' && currentPath != '/login' && currentPath != '/404') {
37
- sessionStorage.setItem('toHome', '1');
39
+ var currentPath = window.location.hash.slice(1).split("?")[0]; // 获取输入的路由
40
+ if (
41
+ currentPath != "/home" &&
42
+ currentPath != "/" &&
43
+ currentPath != "/login" &&
44
+ currentPath != "/404"
45
+ ) {
46
+ sessionStorage.setItem("toHome", "1");
38
47
  }
39
48
  });
40
- } */
49
+ }
41
50
 
42
51
  window.addEventListener("load", async (event) => {
43
52
  // 滚动事件变为 scroll
44
- let title = settting.title;
53
+ let title = this.$store.getters.loginConfig?.system_name || settting.title;
54
+
45
55
  if (
46
56
  location.host.indexOf("pcp.sc.5mall.com") == 0 ||
47
57
  location.host.indexOf("pipuat.bears.com.cn") == 0
@@ -110,7 +110,6 @@ export default {
110
110
  methods: {
111
111
  handleLoginConfig(){
112
112
  let loginConfig = this.$store.getters.loginConfig;
113
- debugger
114
113
  this.loginConfig = loginConfig;
115
114
  this.initImage();
116
115
  this.initLoginMethod();