This commit is contained in:
gyq
2025-12-02 16:09:12 +08:00
14 changed files with 60 additions and 34 deletions

View File

@@ -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 服务

View File

@@ -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 服务

View File

@@ -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抖音美团正式环境

View File

@@ -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

View File

@@ -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"
}
}

BIN
src/assets/icons/douyin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1764569105489" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5330" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M203.072 0h617.856C956.288 0 1024 67.68 1024 203.072v617.856C1024 956.288 956.32 1024 820.928 1024H203.072C67.712 1024 0 956.32 0 820.928V203.072C0 67.712 67.68 0 203.072 0z" fill="#FFC300" p-id="5331"></path><path d="M431.2 322.56h-41.184c-7.488 22.176-10.016 31.072-10.016 31.072h-160.32s-2.4-8.896-10.016-31.072H168.576v31.072H119.456v37.152h156.928v30.688H127.168v39.968h149.216v28.256H127.168v39.968h149.216v28.864H119.456v39.36H261.76s-40.096 51.36-144 56.064v41.952s112.832 10.88 182.08-79.232c0 0 47.2 77.632 180.384 79.36v-43.584s-89.408 2.688-141.216-54.656h141.216v-39.36H324.48v-28.768h148.224v-39.968H324.48v-28.256h148.224v-40H324.48v-30.656h155.744v-37.152h-49.12l0.096-31.072z m191.52 303.04h47.904a502.816 502.816 0 0 0 50.88-160.672h41.696v100.992a400.864 400.864 0 0 1-6.72 59.968h44.224c3.328-19.84 5.024-39.872 5.12-59.968V464.96h28.736V425.92h-28.672V393.6h-42.56v32.576h-154.144v38.944h67.36a426.4 426.4 0 0 1-53.824 160.448z" fill="#000000" p-id="5332"></path><path d="M542.72 332.8v368.64h310.944a52.736 52.736 0 0 0 52.576-52.8V332.8H542.72z m323.008 315.84a12.8 12.8 0 0 1-12.768 12.864h-270.112v-289.184h282.88v276.32z" fill="#000000" p-id="5333"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1764569119518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6376" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M911.984876 511.989901c0 287.092902-112.902043 400.025181-399.994945 400.025181-287.062666 0-399.994945-112.932279-399.994945-400.025181 0-287.062666 112.932279-399.994945 400.025182-399.994945 287.062666 0 399.964709 112.932279 399.964708 400.025181z" fill="#1A1A1A" p-id="6377"></path><path d="M530.192135 343.33227v247.090384a55.42299 55.42299 0 0 1-55.937005 55.997478 55.42299 55.42299 0 0 1-55.937006-55.997478c0-31.324723 24.642519-55.937006 55.937006-55.937006v-71.962202a128.44346 128.44346 0 0 0-127.899208 127.899208c0 70.238737 57.690706 127.989916 127.899208 127.989916 70.238737 0 127.989916-57.751179 127.989916-127.989916v-151.63464c26.245038 10.824567 53.82047 17.718424 78.765351 17.718425v-71.992438c-20.439684 0-44.507715-4.626142-59.172281-12.457323-14.63433-7.861417-19.59307-12.910866-19.59307-28.724408z" fill="#FF0000" fill-opacity=".6" p-id="6378"></path><path d="M516.5556 315.968491v247.120621c0 31.324723-24.672755 55.937006-55.997478 55.937005a55.362518 55.362518 0 0 1-55.937005-55.937005c0-31.324723 24.612282-55.937006 55.937005-55.937006v-72.022674c-70.208501 0-127.899208 57.751179-127.899207 127.95968a128.44346 128.44346 0 0 0 127.899207 127.899207c70.238737 0 127.989916-57.66047 127.989917-127.899207v-151.725349c26.245038 10.885039 53.82047 17.778897 78.765351 17.778897v-72.022674c-20.439684 0-44.507715-4.626142-59.172281-12.487559-14.664566-7.831181-19.59307-12.880629-19.59307-28.694172z" fill="#028080" fill-opacity=".486" p-id="6379"></path><path d="M516.5556 329.635263v247.150856c0 31.324723-24.672755 55.937006-55.997478 55.937006a55.362518 55.362518 0 0 1-55.937005-55.937006c0-31.324723 24.612282-55.967242 55.937005-55.967242v-71.992438c-70.208501 0-127.899208 57.751179-127.899207 127.95968a128.44346 128.44346 0 0 0 127.899207 127.899208c70.238737 0 127.989916-57.66047 127.989917-127.899208V425.121243c26.245038 10.824567 53.82047 17.718424 78.765351 17.718425v-71.992439c-20.439684 0-44.507715-4.626142-59.172281-12.457322-14.664566-7.861417-19.59307-12.910866-19.59307-28.724408z" fill="#FFFFFF" p-id="6380"></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -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,
},

View File

@@ -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) {

View File

@@ -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;
},

View File

@@ -0,0 +1,3 @@
<template>
<view>团购设置</view>
</template>

View File

@@ -2,22 +2,27 @@
<div>
<el-dialog width="400px" :title="title" v-model="show" @close="reset">
<div class="u-p-15">
<div v-if="openSwitch">
<div v-if="openSwitch" class="openSwitch">
<el-button
size="large"
@click="changeKey('paysSel', index)"
v-for="(item, index) in pays"
:key="index"
:type="paysSel == index ? 'primary' : ''"
>
{{ item.text }}
<img :src="item.icon" alt="" style="width: 30px; height: 30px; margin-right: 10px" />
<span>
{{ item.text }}
</span>
</el-button>
</div>
<div class="u-m-t-20">
<div class="u-m-t-20 flex flex-col">
<el-alert :closable="false" v-if="tips" :title="tips" type="warning" show-icon></el-alert>
</div>
<div class="u-m-t-20">
<div class="u-m-t-20 flex justify-center">
<el-form label-width="90px" label-position="left">
<el-form-item label="券码">
<el-form-item label="" label-width="0">
<el-input
v-model="form.code"
@change="codeInputChange"
@@ -41,6 +46,8 @@
<script>
import { useUserStore } from "@/store/modules/user";
import { getDouyinToken, setDouyinToken } from "@/utils/auth";
import meituanIcon from "@/assets/icons/meituan.png";
import tiktokIcon from "@/assets/icons/douyin.png";
const user = useUserStore();
import * as $Api from "@/api/coup/index.js";
@@ -87,9 +94,11 @@ export default {
pays: [
{
text: "美团",
icon: meituanIcon,
},
{
text: "抖音",
icon: tiktokIcon,
},
],
show: false,
@@ -232,4 +241,23 @@ export default {
height: 164px;
overflow: hidden;
}
</style>
.openSwitch {
display: flex;
justify-content: center;
}
.flex {
display: flex;
}
.justify-center {
justify-content: center;
}
:deep(.el-form) {
width: 200px;
}
:deep(.el-alert) {
width: inherit;
}
.flex-col {
flex-direction: column;
}
</style>