吴sir 4 mesi fa
parent
commit
28c890be2e

+ 1 - 16
src/App.vue

@@ -13,7 +13,7 @@
 import { ref, onMounted, nextTick, provide } from "vue"
 import { useDarkThemeHook, useLang } from '@/hooks'
 import { useSystemStore } from '@/store/modules/systemStore'
-import { dictionaryList } from "@/api/path/dict"
+
 
 const isRouterActive = ref(true)
 // 全局语言
@@ -37,21 +37,6 @@ onMounted(async () => {
   if (getLoadingNode) {
     body.removeChild(getLoadingNode)
   }
-
-  if (systemStore?.token) {
-    try {
-      const res = await dictionaryList({
-        size: 99999,
-        current: 1,
-      })
-      if (res.code == 200) {
-        window.localStorage.setItem('dictList', JSON.stringify(res.data.records))
-      }
-    }
-    catch (error){
-      console.error(error)
-    }
-  }
 })
 </script>
 

+ 1 - 1
src/api/path/dict.js

@@ -2,7 +2,7 @@ import service from '../axios'
 
 // 字典列表
 export function dictionaryList(param) {
-    return service.post('/admin/system/dicList', param)
+    return service.post('admin/system/dicList', param)
 }
 
 // 获取字典

+ 0 - 1
src/views/flowPool/index.vue

@@ -669,7 +669,6 @@ const handleDictValue = () => {
   const dictList = JSON.parse(window.localStorage.getItem('dictList')) ?? []
   sourceList.value = dictList.filter((item) => item.typeKey == enum_dict.SOURCE)
   trafficList.value = dictList.filter((item) => item.typeKey == enum_dict.TRAFFIC_PACKET_STATUS)
-  console.log(trafficList.value)
   typeList.value = dictList.filter((item) => item.typeKey == enum_dict.TRAFFIC_POOL_TYPE)
 }
 

+ 16 - 1
src/views/login/login-form.vue

@@ -42,7 +42,7 @@ import { loginApi } from "@/api/path/login.api"
 import { useSystemStore } from "@/store/modules/systemStore"
 import { useRouter } from 'vue-router'
 import { updateRouteByMenu } from '@/router/router.update'
-
+import { dictionaryList } from "@/api/path/dict"
 
 const router = useRouter()
 const formData = ref({
@@ -79,6 +79,21 @@ const handleSubmit = async () => {
   router.push({
     path: "/",
   })
+
+  if (systemStore?.token) {
+    try {
+      const res = await dictionaryList({
+        size: 99999,
+        current: 1,
+      })
+      if (res.code == 200) {
+        window.localStorage.setItem('dictList', JSON.stringify(res.data))
+      }
+    }
+    catch (error){
+      console.error(error)
+    }
+  }
 }
 
 const setRememberPassword = (e) => {

+ 1 - 1
src/views/order/BuyCard/index.vue

@@ -111,7 +111,7 @@
           </a-select>
         </a-form-item>
 
-        
+
         <a-form-item label="沉默期">
           <a-select v-model="formState.silencePeriod" :style="{ width: '380px' }" placeholder="请选择沉默期">
             <a-option v-for="item of silenceOptions" :value="item.value" :label="item.label" />

+ 17 - 16
src/views/system/dict/index.vue

@@ -34,15 +34,15 @@
         <a-form-item label="字典类型" field="typeKey">
           <a-input v-model="formState.typeKey"/>
         </a-form-item>
-        <a-form-item label="数据标签" field="label">
-          <a-input v-model="formState.label"/>
-        </a-form-item>
+<!--        <a-form-item label="数据标签" field="label">-->
+<!--          <a-input v-model="formState.label"/>-->
+<!--        </a-form-item>-->
         <a-form-item label="数据键值" field="value">
           <a-input v-model="formState.value"/>
         </a-form-item>
-        <a-form-item label="备注" field="remark">
-          <a-textarea v-model="formState.remark"/>
-        </a-form-item>
+<!--        <a-form-item label="备注" field="remark">-->
+<!--          <a-textarea v-model="formState.remark"/>-->
+<!--        </a-form-item>-->
         <a-form-item>
           <a-button type="primary" html-type="submit" style="margin-right: 10px;">确定</a-button>
           <a-button @click="resetForm">取消</a-button>
@@ -67,17 +67,18 @@ const formData = ref({
 
 });
 const columns = ref([
-  {title: '数据键值', dataIndex: 'value', align: 'center', width: 120},
-  {title: '数据标签', dataIndex: 'label', align: 'center', width: 120},
+
+  // {title: '数据标签', dataIndex: 'label', align: 'center', width: 120},
   {title: '字典名称', dataIndex: 'typeLabel', align: 'center', width: 120},
   {title: '字典类型', dataIndex: 'typeKey', align: 'center', width: 150},
-  {
-    title: '备注',
-    dataIndex: 'remark',
-    align: 'center',
-    width: 180
-  },
-  {title: '创建时间', dataIndex: 'created_at', align: 'center', width: 200},
+  {title: '数据键值', dataIndex: 'value', align: 'center', width: 120},
+  // {
+  //   title: '备注',
+  //   dataIndex: 'remark',
+  //   align: 'center',
+  //   width: 180
+  // },
+  // {title: '创建时间', dataIndex: 'created_at', align: 'center', width: 200},
   {
     title: '操作',
     dataIndex: 'id',
@@ -138,7 +139,7 @@ const intData = async () => {
     ...formData.value
   }
   const {data} = await dictionaryList(param)
-  dataSource.value = data.records.reduce((acc, res) => {
+  dataSource.value = data.reduce((acc, res) => {
     let existingItem = acc.find(item => item.typeKey === res.typeKey);
 
     if (existingItem) {

+ 2 - 1
vite.config.js

@@ -66,8 +66,9 @@ export default defineConfig({
     hmr: true,
     proxy: {
       '/api': {
-        target: "http://sim.nanodreamtech.com",
+        // target: "http://sim.nanodreamtech.com",
         // target: "http://127.0.0.1:3001",
+        target:'http://sim.ainets.net',
         changeOrigin: true,
         ws: true,
         secure: true,