Ver código fonte

目录创建+类型约束

hlp 1 ano atrás
pai
commit
052dd751ae
27 arquivos alterados com 12 adições e 7 exclusões
  1. 1 6
      fhKeeper/formulahousekeeper/customerBuler-crm/src/App.vue
  2. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/api.ts
  3. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/index.vue
  4. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts
  5. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue
  6. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/api.ts
  7. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/index.vue
  8. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/api.ts
  9. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/index.vue
  10. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/api.ts
  11. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue
  12. 6 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/login.vue
  13. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts
  14. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue
  15. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/api.ts
  16. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/index.vue
  17. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/api.ts
  18. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/dictionary/api.ts
  19. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/dictionary/index.vue
  20. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/index.vue
  21. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/role/api.ts
  22. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/role/index.vue
  23. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/api.ts
  24. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue
  25. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/api.ts
  26. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/index.vue
  27. 5 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/type.d.ts

+ 1 - 6
fhKeeper/formulahousekeeper/customerBuler-crm/src/App.vue

@@ -5,18 +5,13 @@
 <script setup lang="ts">
 import { onMounted, ref, provide, inject } from 'vue'
 import { useStore } from '@/store/index'
-interface GlobalPopup {
-  showSuccess: (msg: string, time: number) => void
-  showError: (msg: string, time: number) => void
-  showWarning: (msg: string, time: number) => void
-}
 const { setAsyncRoutesMark } = useStore()
 window.addEventListener('beforeunload', () => beforeunloadFn())
 const beforeunloadFn = (() => {
   setAsyncRoutesMark(false)
 })
 
-provide('globalPopup', {
+provide<GlobalPopup>('globalPopup', {
   showSuccess: (msg: string, time: number) => { console.log(msg, '执行成功', time) }, //!SECTION 成功
   showError: (msg: string, time: number) => { console.log(msg, '执行成功'), time }, //!SECTION 失败
   showWarning: (msg: string, time: number) => { console.log(msg, '执行成功'), time }, //!SECTION 警告

+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue


+ 6 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/login.vue

@@ -51,6 +51,11 @@ import { post } from "@/utils/request";
 import { LOGIN } from "./api";
 const { setRouters } = useStore()
 const router = useRouter();
+// type GlobalPopup = {
+//   showSuccess: (msg: string, time: number) => void
+//   showError: (msg: string, time: number) => void
+//   showWarning: (msg: string, time: number) => void
+// }
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const ruleFormRef = ref<FormInstance>();
 const ruleForm = ref({
@@ -76,7 +81,7 @@ const login = (formEl: FormInstance | undefined) => {
     console.log(ruleForm.value);
     post(LOGIN, { ...ruleForm.value }).then(res => {
       console.log(res);
-      globalPopup.showSuccess('登录成功')
+      globalPopup?.showSuccess('登录成功',1000)
       // if(res.code == 'error') {
       //   ElMessage.error({
       //     message: "登录失败",

+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/dictionary/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/dictionary/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/role/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/system/role/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/api.ts


+ 0 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/index.vue


+ 5 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/type.d.ts

@@ -0,0 +1,5 @@
+type GlobalPopup = {
+  showSuccess: (msg: string, time: number) => void;
+  showError: (msg: string, time: number) => void;
+  showWarning: (msg: string, time: number) => void;
+};