diff --git a/.env.base b/.env.base
index 2fbe392..e050050 100644
--- a/.env.base
+++ b/.env.base
@@ -10,10 +10,10 @@ VITE_BASE_URL='http://118.31.23.45:48080'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=/dev-api
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
# 打包路径
-VITE_BASE_PATH=/
+VITE_BASE_PATH=/crm
diff --git a/.env.dev b/.env.dev
index d5db008..873f932 100644
--- a/.env.dev
+++ b/.env.dev
@@ -10,13 +10,13 @@ VITE_BASE_URL='http://localhost:48080'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=/dev-api
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
# 打包路径
-VITE_BASE_PATH=/
+VITE_BASE_PATH=/crm
# 是否删除debugger
VITE_DROP_DEBUGGER=false
diff --git a/.env.front b/.env.front
index 31379fb..111418e 100644
--- a/.env.front
+++ b/.env.front
@@ -10,13 +10,13 @@ VITE_BASE_URL='http://118.31.23.45:48080'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=/dev-api
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
# 打包路径
-VITE_BASE_PATH=/
+VITE_BASE_PATH=/crm
# 项目本地运行端口号, 与.vscode/launch.json配合
VITE_PORT=80
diff --git a/.env.pro b/.env.pro
index e0b3180..ef4877a 100644
--- a/.env.pro
+++ b/.env.pro
@@ -4,13 +4,13 @@ VITE_NODE_ENV=production
VITE_DEV=false
# 请求路径
-VITE_BASE_URL='http://localhost:48080'
+VITE_BASE_URL='/crm-api'
# 上传路径
-VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
+VITE_UPLOAD_URL='/crm-api/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
VITE_SOURCEMAP=false
# 打包路径
-VITE_BASE_PATH=/
+VITE_BASE_PATH=/crm
# 输出路径
VITE_OUT_DIR=dist-pro
diff --git a/.env.stage b/.env.stage
index ae34e48..d3f3995 100644
--- a/.env.stage
+++ b/.env.stage
@@ -10,7 +10,7 @@ VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
VITE_SOURCEMAP=false
# 打包路径
-VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
+VITE_BASE_PATH='/crm'
# 输出路径
VITE_OUT_DIR=dist-stage
diff --git a/.env.static b/.env.static
index c0cc560..82f9d57 100644
--- a/.env.static
+++ b/.env.static
@@ -10,7 +10,7 @@ VITE_BASE_URL='http://localhost:48080'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
VITE_SOURCEMAP=false
# 打包路径
-VITE_BASE_PATH=/admin-ui-vue3/
+VITE_BASE_PATH=/crm
# 输出路径
VITE_OUT_DIR=dist-dev
diff --git a/.env.test b/.env.test
index 7af3d84..9d74794 100644
--- a/.env.test
+++ b/.env.test
@@ -10,7 +10,7 @@ VITE_BASE_URL='http://localhost:48080'
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
# 接口前缀
-VITE_API_BASEPATH=
+VITE_API_BASEPATH=/crm-api
# 接口地址
VITE_API_URL=/admin-api
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false
VITE_SOURCEMAP=true
# 打包路径
-VITE_BASE_PATH=/
+VITE_BASE_PATH=/crm
# 输出路径
VITE_OUT_DIR=dist-test
diff --git a/src/api/home/index.js b/src/api/home/index.js
new file mode 100644
index 0000000..ea137e1
--- /dev/null
+++ b/src/api/home/index.js
@@ -0,0 +1,20 @@
+import request from '@/config/axios'
+// 线索情况
+export const getUserClueCount = async (params) => {
+ return await request.get({ url: '/admin-api/crm/home/get-user-count', params })
+}
+
+// 成交率
+export const getClueSignSignRate = async (params) => {
+ return await request.get({ url: '/admin-api/crm/home/get-sign-rate', params })
+}
+
+// 成交率
+export const getClueSignSignRank = async (params) => {
+ return await request.get({ url: '/admin-api/crm/home/get-sign-top10', params })
+}
+
+// 成交率
+export const getClueFollowRank = async (params) => {
+ return await request.get({ url: '/admin-api/crm/home/get-follow-top10', params })
+}
diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts
index f389b86..5382f1e 100644
--- a/src/config/axios/service.ts
+++ b/src/config/axios/service.ts
@@ -255,7 +255,7 @@ const handleAuthorized = () => {
isRelogin.show = false
// 干掉token后再走一次路由让它过router.beforeEach的校验
// window.location.href = window.location.href
- window.location.href = `/login?tenantId=${tenantId}&appId=${appId}`
+ window.location.href = `/crm/login?tenantId=${tenantId}&appId=${appId}`
})
}
return Promise.reject(t('sys.api.timeoutMessage'))
diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue
index 4e22635..348c47c 100644
--- a/src/layout/components/Message/src/Message.vue
+++ b/src/layout/components/Message/src/Message.vue
@@ -24,7 +24,7 @@ const getUnreadCount = async () => {
// 跳转我的站内信
const goMyList = () => {
push({
- name: 'MyNotifyMessage'
+ name: 'NotifyMessage'
})
}
diff --git a/src/router/index.ts b/src/router/index.ts
index 8f66ca3..b818421 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining'
// 创建路由实例
const router = createRouter({
- history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
+ history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带#
strict: true,
routes: remainingRouter as RouteRecordRaw[],
scrollBehavior: () => ({ left: 0, top: 0 })
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index 838081a..326aad7 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -94,8 +94,8 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: 'notify-message',
- component: () => import('@/views/system/notify/my/index.vue'),
- name: 'MyNotifyMessage',
+ component: () => import('@/views/Profile/NotifyMessage.vue'),
+ name: 'NotifyMessage',
meta: {
canTo: true,
hidden: true,
diff --git a/src/views/Basic/dict/DictTypeForm.vue b/src/views/Basic/dict/DictTypeForm.vue
index 7b37ab2..d789785 100644
--- a/src/views/Basic/dict/DictTypeForm.vue
+++ b/src/views/Basic/dict/DictTypeForm.vue
@@ -86,7 +86,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
const submitForm = async () => {
// 校验表单
- if (!formRef) return
+ if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
// 提交请求
diff --git a/src/views/Basic/dict/data/DictDataForm.vue b/src/views/Basic/dict/data/DictDataForm.vue
index 26932e5..5f093d1 100644
--- a/src/views/Basic/dict/data/DictDataForm.vue
+++ b/src/views/Basic/dict/data/DictDataForm.vue
@@ -141,7 +141,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
const submitForm = async () => {
// 校验表单
- if (!formRef) return
+ if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
// 提交请求
diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue
index 0f2b5e4..b362e9f 100644
--- a/src/views/Home/Index.vue
+++ b/src/views/Home/Index.vue
@@ -18,7 +18,7 @@
@@ -129,11 +129,11 @@