api模块化
This commit is contained in:
parent
12a5f10a0c
commit
548de49e4b
|
|
@ -11,16 +11,16 @@
|
|||
*/
|
||||
|
||||
// 导入用户相关 API
|
||||
export * from './api/user';
|
||||
export * from './user';
|
||||
|
||||
// 导入仪表板相关 API
|
||||
export * from './api/dashboard';
|
||||
export * from './dashboard';
|
||||
|
||||
// 导入任务相关 API
|
||||
export * from './api/task';
|
||||
export * from './task';
|
||||
|
||||
// 导入客户相关 API
|
||||
export * from './api/customer';
|
||||
export * from './customer';
|
||||
|
||||
// 导入通用 API
|
||||
export * from './api/common';
|
||||
export * from './common';
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getTaskStatusType, getTaskStatusStyle, getStatusText } from '@/utils/taskConfig.js';
|
||||
import { getDashboardBrief, getTaskList } from '@/common/api';
|
||||
import { getDashboardBrief, getTaskList } from '@/api';
|
||||
import { useUserStore } from '@/store/user';
|
||||
import {truncateText} from "@/utils/textSolve/truncateText";
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ import { ref, computed, onMounted, onUnmounted, watch } from 'vue';
|
|||
import FabPlus from '@/components/FabPlus.vue';
|
||||
import CustomerSummaryBrief from '@/components/customer/CustomerSummaryBrief.vue';
|
||||
import { usePagination } from '@/composables/usePagination';
|
||||
import { getCustomerList, deleteCustomer } from '@/common/api/customer';
|
||||
import { getCustomerList, deleteCustomer } from '@/api/customer';
|
||||
import{useUserStore} from "@/store/user";
|
||||
import {
|
||||
getStatusListByFilter
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { logout } from '@/common/api/user'
|
||||
import { logout } from '@/api/user'
|
||||
|
||||
const loading = ref(false)
|
||||
const userStore = useUserStore()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
getCustomerTypeDict,
|
||||
getCustomerStatusDict,
|
||||
getWechatList
|
||||
} from '@/common/api';
|
||||
} from '@/api';
|
||||
|
||||
/**
|
||||
* 客户表单共享逻辑
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { createCustomer } from '@/common/api';
|
||||
import { createCustomer } from '@/api';
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useCustomerForm } from '@/composables/useCustomerForm';
|
||||
import CustomerFormNavbar from '@/components/customer/customer-form/CustomerFormNavbar.vue';
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { getCustomerDetail, getCustomerFollowupList, getCustomerProjects, deleteCustomer } from '@/common/api';
|
||||
import { getCustomerDetail, getCustomerFollowupList, getCustomerProjects, deleteCustomer } from '@/api';
|
||||
import FollowupTab from '@/components/customer/customer-detail/FollowupTab.vue';
|
||||
import ProjectsTab from '@/components/customer/customer-detail/ProjectsTab.vue';
|
||||
import InfoTab from '@/components/customer/customer-detail/InfoTab.vue';
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, nextTick } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { updateCustomer, getCustomerDetail } from '@/common/api';
|
||||
import { updateCustomer, getCustomerDetail } from '@/api';
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useCustomerForm } from '@/composables/useCustomerForm';
|
||||
import CustomerFormNavbar from '@/components/customer/customer-form/CustomerFormNavbar.vue';
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ import {
|
|||
getCustomerStatusDict,
|
||||
getCustomerIntentLevelDict,
|
||||
getCustomerFollowTypeDict
|
||||
} from '@/common/api/customer.js';
|
||||
} from '@/api/customer.js';
|
||||
import FollowupPickers from '@/components/customer/followup-form/FollowupPickers.vue';
|
||||
import {
|
||||
getCustomerStatusText,
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { getFollowupDetail, getCustomerFollowTypeDict, deleteFollowup } from '@/common/api/customer';
|
||||
import { getFollowupDetail, getCustomerFollowTypeDict, deleteFollowup } from '@/api/customer';
|
||||
import {
|
||||
getCustomerStatusText,
|
||||
getCustomerStatusClass,
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ import {
|
|||
getCustomerStatusDict,
|
||||
getCustomerIntentLevelDict,
|
||||
getCustomerFollowTypeDict
|
||||
} from '@/common/api/customer.js';
|
||||
} from '@/api/customer.js';
|
||||
import FollowupPickers from '@/components/customer/followup-form/FollowupPickers.vue';
|
||||
import {
|
||||
getCustomerStatusText,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { getUserInfo } from '@/common/api';
|
||||
import { getUserInfo } from '@/api';
|
||||
|
||||
import FabPlus from '@/components/FabPlus.vue';
|
||||
import AddEventModal from '@/components/scheduleEditor/AddEventModal.vue';
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<script setup>
|
||||
import { reactive, ref, computed, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { login, getCaptchaImage, getUserInfo } from '@/common/api/user';
|
||||
import { login, getCaptchaImage, getUserInfo } from '@/api/user';
|
||||
import { useUserStore } from '@/store/user';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ import { ref, onMounted, } from 'vue';
|
|||
import { onLoad,onShow } from '@dcloudio/uni-app';
|
||||
import { getStatusFromTagText, getTaskStatusType, getTaskStatusStyle } from '@/utils/taskConfig.js';
|
||||
import { useTaskStore } from '@/store/task';
|
||||
import { getTaskDetail } from '@/common/api.js';
|
||||
import { getTaskDetail } from '@/api';
|
||||
|
||||
// 当前激活的标签
|
||||
const activeTab = ref('info');
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { getStatusText, getTaskStatusType, getTaskStatusStyle } from '@/utils/taskConfig.js';
|
||||
import { getTaskList } from '@/common/api';
|
||||
import { getTaskList } from '@/api';
|
||||
import { useTaskStore } from '@/store/task';
|
||||
import {truncateText} from "@/utils/textSolve/truncateText";
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
import { ref, computed, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { chooseAndUploadImages, uploadFileToQiniu, batchUploadFilesToQiniu } from '@/utils/qiniu.js';
|
||||
import { submitTask } from '@/common/api.js';
|
||||
import { submitTask } from '@/api';
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { getCustomerList } from '@/common/api/customer'
|
||||
import { getCustomerList } from '@/api/customer'
|
||||
|
||||
/**
|
||||
* 客户管理 Store
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* 提供图片和文件上传到七牛云的功能
|
||||
*/
|
||||
|
||||
import { getQiniuUploadToken } from '@/common/api.js'
|
||||
import { getQiniuUploadToken } from '@/api'
|
||||
|
||||
/**
|
||||
* 上传文件到七牛云
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user