doway-coms 2.0.1 → 2.0.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/packages/utils/common.js +10 -10
- package/packages/utils/store.js +27 -18
package/package.json
CHANGED
package/packages/utils/common.js
CHANGED
|
@@ -248,16 +248,16 @@ export function replaceParamString(
|
|
|
248
248
|
alert('防呆,子应用没有路由缓存键:'+JSON.stringify(to))
|
|
249
249
|
}
|
|
250
250
|
if (to.meta.moduleCode && !store.getters.moduleViewInfo[to.meta.moduleCode]) {
|
|
251
|
-
axios.all([store.dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode }),
|
|
252
|
-
store.dispatch('moduleLoadLangInfo', { moduleCode: to.meta.moduleCode,moduleLangCacheHash:to.meta.moduleLangCacheHash })])
|
|
253
|
-
.then(axios.spread(function() {
|
|
254
|
-
|
|
255
|
-
}))
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
251
|
+
// axios.all([store.dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode }),
|
|
252
|
+
// store.dispatch('moduleLoadLangInfo', { moduleCode: to.meta.moduleCode,moduleLangCacheHash:to.meta.moduleLangCacheHash })])
|
|
253
|
+
// .then(axios.spread(function() {
|
|
254
|
+
// next()
|
|
255
|
+
// }))
|
|
256
|
+
store
|
|
257
|
+
.dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode })
|
|
258
|
+
.then(() => {
|
|
259
|
+
next()
|
|
260
|
+
})
|
|
261
261
|
.catch((err) => {
|
|
262
262
|
console.debug(err)
|
|
263
263
|
})
|
package/packages/utils/store.js
CHANGED
|
@@ -225,30 +225,39 @@ export default new Vuex.Store({
|
|
|
225
225
|
moduleCode: dataInfo.moduleCode,
|
|
226
226
|
info: reponseData.content
|
|
227
227
|
})
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return new Promise((resolve, reject) => {
|
|
238
|
-
loadLangInfo(dataInfo.moduleCode)
|
|
239
|
-
.then(reponseData => {
|
|
240
|
-
commit('SET_MODULE_LANG_INFO', {
|
|
241
|
-
moduleCode: dataInfo.moduleCode,
|
|
242
|
-
info: reponseData.data
|
|
228
|
+
loadLangInfo(dataInfo.moduleCode,reponseData.content.moduleLangCacheHash)
|
|
229
|
+
.then(langData=>{
|
|
230
|
+
commit('SET_MODULE_LANG_INFO', {
|
|
231
|
+
moduleCode: dataInfo.moduleCode,
|
|
232
|
+
info: langData.data
|
|
233
|
+
})
|
|
234
|
+
resolve()
|
|
235
|
+
}).catch(()=>{
|
|
236
|
+
resolve()
|
|
243
237
|
})
|
|
244
|
-
resolve()
|
|
245
238
|
})
|
|
246
239
|
.catch(error => {
|
|
247
|
-
|
|
248
|
-
resolve()
|
|
240
|
+
reject(error)
|
|
249
241
|
})
|
|
250
242
|
})
|
|
251
243
|
},
|
|
244
|
+
// moduleLoadLangInfo({ commit, state }, dataInfo) {
|
|
245
|
+
// let vm = this
|
|
246
|
+
// return new Promise((resolve, reject) => {
|
|
247
|
+
// loadLangInfo(dataInfo.moduleCode)
|
|
248
|
+
// .then(reponseData => {
|
|
249
|
+
// commit('SET_MODULE_LANG_INFO', {
|
|
250
|
+
// moduleCode: dataInfo.moduleCode,
|
|
251
|
+
// info: reponseData.data
|
|
252
|
+
// })
|
|
253
|
+
// resolve()
|
|
254
|
+
// })
|
|
255
|
+
// .catch(error => {
|
|
256
|
+
// console.debug(error)
|
|
257
|
+
// resolve()
|
|
258
|
+
// })
|
|
259
|
+
// })
|
|
260
|
+
// },
|
|
252
261
|
// 固定返回工作台,并根据条件决定是否关闭其余标签
|
|
253
262
|
goWorkbench({ commit }, tabsAllClose) {
|
|
254
263
|
if(window.$wujie){
|