n20-common-lib 2.6.82 → 2.6.84

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/src/utils/auth.js CHANGED
@@ -51,7 +51,7 @@ const auth = {
51
51
  }
52
52
  },
53
53
  setReqLang() {
54
- let langMap = { 'zh-cn': 'zh_CN', en: 'en_US', 'zh-hk': 'zh_TW', th: 'th_TH' }
54
+ let langMap = { 'zh-cn': 'zh_CN', en: 'en_US', 'zh-hk': 'zh_TW', th: 'th_TH', vi: 'vi_VI' }
55
55
  let langKey = window.localStorage.getItem('pageLang') || 'zh-cn'
56
56
  reqLang = langMap[langKey]
57
57
  },
@@ -99,7 +99,7 @@ function errorFn(status, msg, noMsg, isErr, res) {
99
99
  if (navigator.userAgent.includes('NSTC-WebEntry')) {
100
100
  localStorage.clear()
101
101
  sessionStorage.clear()
102
- window.top.webQuit()
102
+ // window.top.webQuit()
103
103
  } else {
104
104
  auth.removeToken()
105
105
  }
@@ -1,6 +1,7 @@
1
1
  import locale from 'element-ui/lib/locale'
2
2
  import langEn from 'element-ui/lib/locale/lang/en'
3
3
  import langTh from 'element-ui/lib/locale/lang/th'
4
+ import langVi from 'element-ui/lib/locale/lang/vi'
4
5
  import langTw from 'element-ui/lib/locale/lang/zh-TW'
5
6
 
6
7
  import i18n_map_corelib from '../../i18n.json'
@@ -51,6 +52,8 @@ directive.install = (Vue, map = {}) => {
51
52
  locale.use(langTw)
52
53
  } else if (pageLang === 'th') {
53
54
  locale.use(langTh)
55
+ } else if (pageLang === 'vi') {
56
+ locale.use(langVi)
54
57
  }
55
58
 
56
59
  $i18n_map_root = map