Przeglądaj źródła

去除获取常量接口代码

lxf 2 lat temu
rodzic
commit
914b95d22c

+ 0 - 10
src/api/constantAll/index.js

@@ -1,10 +0,0 @@
-import request from '@/router/axios'
-
-// 所有常量方法
-export function constantAll(data) {
-  return request({
-    url: '/saas-system-business/saas/system/business/select/constant/all',
-    method: 'post',
-    data: data,
-  })
-}

+ 0 - 8
src/api/system/dict.js

@@ -94,11 +94,3 @@ export function getDictToWeb() {
     method: 'post',
   })
 }
-
-//获取系统所有常量
-export function getConstantAll() {
-  return request({
-    url: '/saas-system-business/saas/system/business/select/constant/all',
-    method: 'post',
-  })
-}

+ 1 - 12
src/store/modules/user.js

@@ -7,7 +7,7 @@ import website from '@/config/website'
 import { loginByUsername, loginBySocial, getUserInfo, logout, refreshToken, getButtons } from '@/api/user'
 import { getByRoute, getTenantMenuByTenantIdAndRoleId, allByRole } from '@/api/lesseeLogin'
 import { getRoutes } from '@/api/system/menu'
-import { getList, getDictToWeb, getConstantAll } from '@/api/system/dict'
+import { getList, getDictToWeb } from '@/api/system/dict'
 import md5 from 'js-md5'
 import { getUserAll } from '@/api/activiti/taskSetting'
 
@@ -99,13 +99,6 @@ const user = {
           .catch((error) => {
             reject(error)
           })
-        getConstantAll()
-          .then((res) => {
-            commit('SET_CONSTANT_ALL', res.data.data)
-          })
-          .catch((error) => {
-            reject(error)
-          })
       })
     },
     // 获取所有用户
@@ -555,10 +548,6 @@ const user = {
       state.dictTenantData = dictTenantData
       setStore({ name: 'dictTenantData', content: state.dictTenantData })
     },
-    SET_CONSTANT_ALL: (state, constantData) => {
-      state.constantData = constantData
-      setStore({ name: 'constantData', content: state.constantData })
-    },
     SET_MENU_TOP: (state, menuTop) => {
       state.menuTop = menuTop
       setStore({ name: 'menuTop', content: state.menuTop })

+ 5 - 10
src/views/serviceProvider/productCenter/management/addProduct.vue

@@ -66,7 +66,6 @@
 
 <script>
 import { getToken } from '@/util/auth'
-import { constantAll } from '@/api/constantAll/index.js'
 import * as API from '@/api/productCenter/management.js'
 import { menu } from '@/api/menuAll/menu.js'
 export default {
@@ -87,7 +86,6 @@ export default {
       imageUrl: '',
       loading: false,
       textarea: '',
-      statusData: [],
       // 表单校验
       rules: {
         name: [{ required: true, message: '请输入云服务名称', trigger: 'blur' }],
@@ -116,14 +114,11 @@ export default {
   methods: {
     //获取所有常量方法
     constantAll() {
-      constantAll().then((result) => {
-        this.statusData = result.data.data.filter((item) => item.type === 'status')[0].rows
-        if (this.id) {
-          this.getDetails()
-        } else {
-          this.getMenu()
-        }
-      })
+      if (this.id) {
+        this.getDetails()
+      } else {
+        this.getMenu()
+      }
     },
     //获取菜单
     getMenu() {