wangcz 7 жил өмнө
parent
commit
b4375ee02e

+ 2 - 1
pages/mobile/center/vendor/outOfStorage/_id.vue

@@ -40,7 +40,8 @@
     layout: 'mobile',
     fetch({route, store}) {
       return Promise.all([
-        store.dispatch('product/getLoadStorageId', {id:route.params.id})
+        store.dispatch('product/getLoadStorageId', {id:route.params.id}),
+        store.dispatch('loadCurrencyData')
       ])
     },
     data () {

+ 3 - 1
pages/mobile/center/vendor/outOfStorage/purchase/_storeid.vue

@@ -87,9 +87,11 @@
     fetch({route, store}) {
       return route.query.type === 'INBOUND' ? Promise.all([
         store.dispatch('product/getLoadEnterpriseId', {id:route.params.storeid}),
+        store.dispatch('loadCurrencyData')
       ]) : Promise.all([
         store.dispatch('product/getLoadPurchaseId', {id:route.params.storeid}),
-        store.dispatch('product/getLoadLogistics', {count:30, page: 1})
+        store.dispatch('product/getLoadLogistics', {count:30, page: 1}),
+        store.dispatch('loadCurrencyData')
       ])
     },
     data () {

+ 0 - 11
store/index.js

@@ -23,14 +23,6 @@ function loadBrandComponent({ commit }, params = {}) {
     })
 }
 
-// 获取币别信息
-function loadCurrencyData ({commit}) {
-  return axios.get('/basic/enterprise/currency')
-    .then(res => {
-      commit('option/SET_CURRENCY', res.data)
-    })
-}
-
 export const actions = {
   // 全局服务初始化
   nuxtServerInit(store, { params, route, isDev, req }) {
@@ -86,9 +78,6 @@ export const actions = {
           }
         }
         commit('option/REQUEST_USER_INFO_SUCCESS', response.data)
-        return Promise.all([
-          loadCurrencyData({commit})
-        ])
       }, err => {
         commit('option/REQUEST_USER_INFO_FAILURE', err)
       })