diff --git a/.env.development b/.env.development
index 34d306e..5dae739 100644
--- a/.env.development
+++ b/.env.development
@@ -9,12 +9,15 @@ VITE_APP_BASE_API=/dev-api
# VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试
# VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式
VITE_APP_API_URL=http://192.168.1.42/ # 本地
+ VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境
# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws
# VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
# VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式
VITE_APP_WS_ENDPOINT=ws://192.168.1.42:2348 # 本地
+# VITE_APP_API_PHP_URL=https://newblockwlx.sxczgkj.cn #php抖音美团正式环境
+
# 启用 Mock 服务
diff --git a/.env.location b/.env.location
index 8c2f9de..b50434d 100644
--- a/.env.location
+++ b/.env.location
@@ -15,6 +15,7 @@ VITE_APP_API_URL=http://192.168.1.42/ # 本地
# VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
# VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式
VITE_APP_WS_ENDPOINT=ws://192.168.1.42:2348 # 本地
+ VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境
# 启用 Mock 服务
diff --git a/.env.production b/.env.production
index ecf542a..fa80dfe 100644
--- a/.env.production
+++ b/.env.production
@@ -9,6 +9,7 @@ VITE_APP_NAME=production
# 接口地址
VITE_APP_BASE_API = https://cashier.sxczgkj.com/
+VITE_APP_API_PHP_URL=https://newblockwlx.sxczgkj.cn #php抖音美团正式环境
diff --git a/.env.test b/.env.test
deleted file mode 100644
index 3e0ca2b..0000000
--- a/.env.test
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-# WebSocket端点(可选)
-#VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws
-
-# 接口地址
-VITE_APP_BASE_API = 'https://tapi.cashier.sxczgkj.cn/'
-
-
-
-
-# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws
-VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
-
-# 启用 Mock 服务
-VITE_MOCK_DEV_SERVER=false
diff --git a/package.json b/package.json
index a03bf30..a966b42 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit & vite build",
- "build:test": "vue-tsc --noEmit & vite build --mode test",
"build:pro": "vue-tsc --noEmit & vite build --mode production",
"build:local": "vue-tsc --noEmit & vite build --mode location",
"preview": "vite preview",
@@ -126,4 +125,4 @@
"repository": "https://gitee.com/youlaiorg/vue3-element-admin.git",
"author": "有来开源组织",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/src/assets/icons/douyin.png b/src/assets/icons/douyin.png
new file mode 100644
index 0000000..6a6e2ba
Binary files /dev/null and b/src/assets/icons/douyin.png differ
diff --git a/src/assets/icons/meituan.png b/src/assets/icons/meituan.png
new file mode 100644
index 0000000..6eab38b
Binary files /dev/null and b/src/assets/icons/meituan.png differ
diff --git a/src/assets/svg/meituan.svg b/src/assets/svg/meituan.svg
new file mode 100644
index 0000000..e7a56a4
--- /dev/null
+++ b/src/assets/svg/meituan.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/svg/tiktok.svg b/src/assets/svg/tiktok.svg
new file mode 100644
index 0000000..925cb9f
--- /dev/null
+++ b/src/assets/svg/tiktok.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/router/index.ts b/src/router/index.ts
index 1f8e71b..2ab1a11 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -28,7 +28,7 @@ export const constantRoutes: RouteRecordRaw[] = [
component: Layout,
redirect: "/index",
meta: {
- title: "数据统计",
+ title: "数据中心",
icon: "数据统计",
alwaysShow: true,
},
@@ -38,7 +38,7 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import("@/views/data/index.vue"),
name: "",
meta: {
- title: "数据统计",
+ title: "经营数据",
affix: false,
keepAlive: true,
},
@@ -58,7 +58,7 @@ export const constantRoutes: RouteRecordRaw[] = [
name: "",
component: () => import("@/views/data/table.vue"),
meta: {
- title: "桌台统计",
+ title: "台桌统计",
affix: false,
keepAlive: true,
},
@@ -68,7 +68,7 @@ export const constantRoutes: RouteRecordRaw[] = [
name: "workStatistics",
component: () => import("@/views/data/work.vue"),
meta: {
- title: "交班记录",
+ title: "收银交班记录",
affix: false,
keepAlive: true,
},
diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index c8c03d3..b90fc9f 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -135,11 +135,15 @@ const parseDynamicRoutes = (rawRoutes: RouteVO[]): RouteRecordRaw[] => {
} as RouteRecordRaw;
// 处理组件路径
- normalizedRoute.component =
- !normalizedRoute.component
- ? Layout
- : modules[`../../views/${normalizedRoute.component}.vue`] ||
+
+ if (route.pid === null) {
+ normalizedRoute.component = Layout
+ } else {
+ normalizedRoute.component = modules[`../../views/${normalizedRoute.component}.vue`] ||
modules["../../views/error-page/404.vue"];
+ }
+
+
// 递归解析子路由
if (normalizedRoute.children) {
diff --git a/src/utils/request-php.js b/src/utils/request-php.js
index 999020a..3124e1f 100644
--- a/src/utils/request-php.js
+++ b/src/utils/request-php.js
@@ -4,7 +4,7 @@ import { getDouyinToken, getToken } from "@/utils/auth";
// 创建axios实例
const service = axios.create({
- baseURL: "https://newblockwlx.sxczgkj.cn/index.php/api/", // api 的 base_url
+ baseURL: import.meta.env.VITE_APP_API_PHP_URL + "/index.php/api/", // api 的 base_url
timeout: 1000 * 20, // 请求超时时间
});
@@ -15,6 +15,8 @@ service.interceptors.request.use(
config.headers["bausertoken"] = getDouyinToken();
}
config.headers["Content-Type"] = "application/json";
+ //根据当前环境返回不同值,test和production环境返回不同值
+ config.headers["Server"] = process.env.NODE_ENV === "production" ? "production" : "test";
// 添加可取消请求配置
return config;
},
diff --git a/src/views/shop/groupBuying/index.vue b/src/views/shop/groupBuying/index.vue
new file mode 100644
index 0000000..7d23e7f
--- /dev/null
+++ b/src/views/shop/groupBuying/index.vue
@@ -0,0 +1,3 @@
+
+