diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/.env b/.env index 2417381..791d440 100644 --- a/.env +++ b/.env @@ -1,5 +1,3 @@ -VITE_TITLE = '捷兑通 - 平台端' +VITE_TITLE='捷兑通 - 平台端' -VITE_PORT = 4000 - -VITE_GAME_API = 'https://www.jdt168.com' \ No newline at end of file +VITE_PORT=4000 diff --git a/.env.development b/.env.development index 47e9719..6b41a80 100644 --- a/.env.development +++ b/.env.development @@ -1,17 +1,19 @@ # 资源公共路径,需要以 /开头和结尾 -VITE_PUBLIC_PATH = '/' +VITE_PUBLIC_PATH='/' # 是否启用MOCK -VITE_USE_MOCK = false +VITE_USE_MOCK=false # 是否启用代理 -VITE_USE_PROXY = true +VITE_USE_PROXY=true # base api -VITE_BASE_API = 'https://test.wanzhuanyongcheng.cn/admin' +VITE_BASE_API='https://test.wanzhuanyongcheng.cn/admin' +VITE_WS1_URL='game.wanzhuanyongcheng.cn/dice/home' -VITE_WS1_URL = 'game.wanzhuanyongcheng.cn/dice/home' -VITE_WS_URL = 'test.wanzhuanyongcheng.cn/admin/data' +VITE_WS_URL='test.wanzhuanyongcheng.cn/admin/data' -VITE_MER_LOGIN_URL = '//localhost:3100/#/login' \ No newline at end of file +VITE_MER_LOGIN_URL='//localhost:3100/#/login' + +VITE_GAME_API='https://www.jdt168.com' diff --git a/.env.github b/.env.github deleted file mode 100644 index beca876..0000000 --- a/.env.github +++ /dev/null @@ -1,13 +0,0 @@ -# 自定义域名CNAME -# VITE_CNAME = 'template.qszone.com' - -# 资源公共路径,需要以 /开头和结尾 -VITE_PUBLIC_PATH = '/vue-naive-admin/' - -VITE_USE_HASH = true - -# 是否启用MOCK -VITE_USE_MOCK = true - -# base api -VITE_BASE_API = '/api' \ No newline at end of file diff --git a/.env.production b/.env.production index 15f845c..2149ebf 100644 --- a/.env.production +++ b/.env.production @@ -1,23 +1,21 @@ # 资源公共路径,需要以 /开头和结尾 -VITE_PUBLIC_PATH = '/static/admin' +VITE_PUBLIC_PATH='/' # 是否启用MOCK -VITE_USE_MOCK = false +VITE_USE_MOCK=false # base api -VITE_BASE_API = 'https://www.wanzhuanyongcheng.cn/admin' - -# VITE_GAME_API = 'http://www.wanzhuanyongcheng.cn/admin' +VITE_BASE_API='https://www.wanzhuanyongcheng.cn/admin' # 是否启用压缩 -VITE_USE_COMPRESS = true +VITE_USE_COMPRESS=true # 压缩类型 -VITE_COMPRESS_TYPE = gzip +VITE_COMPRESS_TYPE=gzip -VITE_WS1_URL = 'www.jdt168.com/dice/home' +VITE_WS1_URL='www.jdt168.com/dice/home' -VITE_WS_URL = 'www.wanzhuanyongcheng.cn/admin/data' +VITE_WS_URL='www.wanzhuanyongcheng.cn/admin/data' -VITE_MER_LOGIN_URL = '//www.wanzhuanyongcheng.cn/static/mer/#/login' \ No newline at end of file +VITE_MER_LOGIN_URL='//www.wanzhuanyongcheng.cn/static/mer/#/login' diff --git a/.env.sentry-build-plugin b/.env.sentry-build-plugin deleted file mode 100644 index d6ecddd..0000000 --- a/.env.sentry-build-plugin +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT commit this file to your repository! -# The SENTRY_AUTH_TOKEN variable is picked up by the Sentry Build Plugin. -# It's used for authentication when uploading source maps. -# You can also set this env variable in your own `.env` files and remove this file. -SENTRY_AUTH_TOKEN="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" diff --git a/.env.test b/.env.test index faaba34..0e99be0 100644 --- a/.env.test +++ b/.env.test @@ -1,18 +1,20 @@ # 资源公共路径,需要以 /开头和结尾 -VITE_PUBLIC_PATH = '/static/admin' +VITE_PUBLIC_PATH='/' # 是否启用MOCK -VITE_USE_MOCK = false +VITE_USE_MOCK=false # 是否启用代理 -VITE_USE_PROXY = false +VITE_USE_PROXY=false # base api -VITE_BASE_API = '/admin' +VITE_BASE_API='/admin' -VITE_WS1_URL = 'game.wanzhuanyongcheng.cn/dice/home' -VITE_WS_URL = 'test.wanzhuanyongcheng.cn/admin/data' -VITE_GAME_API = 'https://game.wanzhuanyongcheng.cn' +VITE_WS1_URL='game.wanzhuanyongcheng.cn/dice/home' -VITE_MER_LOGIN_URL = '//test.wanzhuanyongcheng.cn/static/mer/#/login' \ No newline at end of file +VITE_WS_URL='test.wanzhuanyongcheng.cn/admin/data' + +VITE_GAME_API='https://game.wanzhuanyongcheng.cn' + +VITE_MER_LOGIN_URL='//test.wanzhuanyongcheng.cn/static/mer/#/login' diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..63326a8 --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4a1a803 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:latest AS builder + +COPY dist/ /usr/share/nginx/html + +COPY default.conf /etc/nginx/conf.d/default.conf diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8883cd4..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Ronnie Zhang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.EN.md b/README.EN.md deleted file mode 100644 index 05eb320..0000000 --- a/README.EN.md +++ /dev/null @@ -1,203 +0,0 @@ -

- - Vue Naive Admin Logo - -

-

- stars - forks - -

- -

- 英文 | - 中文 -

- -### Introduction - -[Vue Naive Admin](https://github.com/zclzone/vue-naive-admin) is a **completely open source free and commercially allowed ** admin template,Based on the latest technology stack of front-end such as `Vue3、Vite3、Pinia、Unocss and Naive UI`. Compared with other more popular backend management templates, this project is more concise, lightweight, fresh style, very low learning costs, ideal for small and medium-sized projects or personal projects. - -### Features - -- 🍒 Integrated [Naive UI](https://www.naiveui.com),recommended by Evan You. -- 🍑 Integrated login, logout and permission verification. -- 🍐 Integrated multi-environment configuration, dev, test, production and github pages environments. -- 🍎 Integrated `eslint + prettier`. -- 🍌 Integrated `husky + commitlint`. -- 🍉 Integrated `Mock`. -- 🍍 Integrated `pinia`,lightweight, simple and easy to use alternative to vuex. -- 📦 Integrated `unplugin` auto import. -- 🤹 Integrated `iconify` icon,support custom svg icons. -- 🍇 Integrated `unocss`. - -### Preview - -[https://template.qszone.com](https://template.qszone.com) - -[https://base.isme.top](https://base.isme.top) - -### Docs - -[Vue Naive Admin Docs](https://zclzone.github.io/vue-naive-admin-docs) - -### Getting Started - -```shell -# Recommended setup git autocrlf 为 false -git config --global core.autocrlf false - -# Clone Project -git clone https://github.com/zclzone/vue-naive-admin.git - -cd vue-naive-admin - -# Install dependencies(Recommended use pnpm: https://pnpm.io/zh/installation) -npm i -g pnpm # Installed and can be ignored -pnpm i # or npm i - -# Start -pnpm dev -``` - -### Build and Release - -```shell -# Test Environment -pnpm build:test - -# Github Environment -pnpm build:github - -# Prod Environment -pnpm build -``` - -### Other - -```shell -# eslint check -pnpm lint - -# eslint check and fix -pnpm lint:fix - -# Preview(Need to build first) -pnpm preview - -# Commit(husky+commitlint) -pnpm cz -``` - -### Directory description - -``` -Vue Naive Admin -|-- .github // github相关,如推送github仓库后自动部署gh pages -|-- .husky // git commit钩子 -|-- .vscode // vscode编辑器相关 -| |-- extensions.json // 插件推荐 -| |-- settings.json // 项目级别的vscode配置,优先级大于全局vscode配置 -|-- build // 构建相关配置 -| |-- constant.js // 构建相关的常量 -| |-- utils.js // 构建相关的工具方法 -| |-- config -| | |-- define.js // 注入全局常量,启动或打包后将添加到window中 -| | |-- proxy.js // 代理配置 -| |-- plugin -| | |-- html.js // vite-plugin-html插件,用于注入变量或者html标签 -| | |-- mock.js // vite-plugin-mock插件,处理mock -| | |-- unplugin.js // unplugin相关插件,包含DefineOptions和自动导入 -| |-- script // 打包完成后执行的一些node脚本(不重要) -| |-- build-cname.js // 自动生成cname -|-- mock // mock -| |-- utils.js // mock请求需要用到的工具方法 -| |-- api // mock接口 -|-- public // 公共资源,文件夹下的文件会在打包后会直接加到dist根目录下 -|-- settings // 项目配置 -| |-- proxy-config.js // 代理配置文件 -| |-- theme.json // 主题配置项,主题色等 -|-- src -| |-- api // 公共api -| |-- assets // 静态资源 -| | |-- images // 图片 -| | |-- svg // svg图标 -| |-- components // 全局组件 -| | |-- common // 公共组件 -| | |-- icon // icon相关组件 -| | |-- page // 页面组件 -| | |-- query-bar // 查询选项 -| | |-- table // 封装的表格组件 -| |-- composables // 封装的组合式函数 -| |-- layout // 布局相关组件 -| | |-- components -| | |-- AppMain.vue // 主体内容 -| | |-- header // 头部 -| | |-- sidebar // 侧边菜单栏 -| | |-- tags // 多页签栏 -| |-- router // 路由 -| | |-- guard // 路由守卫 -| | |-- routes // 路由列表 -| |-- store // 状态管理(pinia) -| | |-- modules // 模块 -| | |-- app // 管理页面重新加载、折叠菜单栏和keepAlive等 -| | |-- permission // 权限相关,管理权限菜单 -| | |-- tags // 管理多页签 -| | |-- user // 用户模块,管理用户信息、登录登出 -| |-- styles // 样式 -| |-- utils // 封装的工具方法 -| | |-- auth // 权限相关,如token、跳转登录页等 -| | |-- common // 通用 -| | |-- http // 封装axios -| | |-- storage // 封装localStorage和sessionStorage -| |-- views // 页面 -| | |-- demo // 示例 -| | |-- error-page // 错误页 -| | |-- login // 登录页 -| | |-- workbench // 首页 -| |-- App.vue -| |-- main.js -|-- .cz-config.js // git提交配置 -|-- .editorconfig // 编辑器配置 -|-- .env // 环境文件,所有环境都会载入 -|-- .env.development // 开发环境文件 -|-- .env.production // 生产环境文件 -|-- .env.test // 测试环境文件 -|-- .eslintignore // eslint忽略 -|-- .eslintrc.js // eslint配置 -|-- .gitignore // git忽略 -|-- .prettierignore // prettier格式化忽略 -|-- commitlint.config.js // commitlint规范配置 -|-- index.html -|-- jsconfig.json // js配置 -|-- LICENSE // 协议 -|-- package.json // 依赖描述文件 -|-- pnpm-lock.yaml // 依赖锁定文件 -|-- prettier.config.js // prettier格式化配置 -|-- README.md // 项目描述文档(英文) -|-- README.zh-CN.md // 项目描述文档(中文) -|-- unocss.config.js // unocss配置 -|-- vite.config.js // vite配置 -``` - -### TS version: Qs Admin - -#### source code - -- github: [https://github.com/zclzone/qs-admin](https://github.com/zclzone/qs-admin) -- gitee: [https://gitee.com/zclzone/qs-admin-ts](https://gitee.com/zclzone/qs-admin-ts) - -#### preview - -- [https://admin.qszone.com](https://admin.qszone.com) -- [https://zclzone.github.io/qs-admin](https://zclzone.github.io/qs-admin) - -### Open source projects that use this project: - -- [gin-vue-blog](https://github.com/szluyu99/gin-vue-blog): A full-stack blog project in Golang, the frontend of the blog backend is based on vue-naive-admin and integrates with a real backend service, implementing features such as backend-controlled routing. - -### Communication group & About the author - - - - diff --git a/build/plugin/index.js b/build/plugin/index.js index c35aecc..6bf9897 100644 --- a/build/plugin/index.js +++ b/build/plugin/index.js @@ -14,6 +14,7 @@ import viteCompression from 'vite-plugin-compression' import { configHtmlPlugin } from './html' import { configMockPlugin } from './mock' import unplugin from './unplugin' +import { sentryVitePlugin } from '@sentry/vite-plugin' export function createVitePlugins(viteEnv, isBuild) { const plugins = [vue(), ...unplugin, configHtmlPlugin(viteEnv, isBuild), Unocss()] @@ -32,6 +33,13 @@ export function createVitePlugins(viteEnv, isBuild) { open: false, gzipSize: true, brotliSize: true, + }), + sentryVitePlugin({ + authToken: + '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', + org: 'sentry', + project: 'jdt-admin', + url: 'https://w.huakk.top', }) ) } diff --git a/build/plugin/unplugin.js b/build/plugin/unplugin.js index 54450cc..3277682 100644 --- a/build/plugin/unplugin.js +++ b/build/plugin/unplugin.js @@ -4,7 +4,6 @@ import Components from 'unplugin-vue-components/vite' import { NaiveUiResolver } from 'unplugin-vue-components/resolvers' import { FileSystemIconLoader } from 'unplugin-icons/loaders' import IconsResolver from 'unplugin-icons/resolver' -// import { sentryVitePlugin } from '@sentry/vite-plugin' /** * * unplugin-icons插件,自动引入iconify图标 @@ -44,10 +43,4 @@ export default [ inject: 'body-last', customDomId: '__CUSTOM_SVG_ICON__', }), - // sentryVitePlugin({ - // authToken: process.env.SENTRY_AUTH_TOKEN, - // org: 'sentry', - // project: 'jdt-admin', - // url: 'https://w.huakk.top', - // }), ] diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..0c8f0f9 --- /dev/null +++ b/default.conf @@ -0,0 +1,18 @@ +server { + # 监听ipv4 + listen 80; + # 监听ipv6 + listen [::]:80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} diff --git a/docs/使用unocss.md b/docs/使用unocss.md deleted file mode 100644 index e8af115..0000000 --- a/docs/使用unocss.md +++ /dev/null @@ -1,3 +0,0 @@ -推荐阅读作者在掘金的文章: - -[保熟的 UnoCSS 使用指北,优雅使用 antfu 大佬的原子化 CSS](https://juejin.cn/post/7142466784971456548) diff --git a/docs/使用图标.md b/docs/使用图标.md deleted file mode 100644 index 791f3f1..0000000 --- a/docs/使用图标.md +++ /dev/null @@ -1,40 +0,0 @@ -## 使用 iconify 图标 - -首先去图标库地址:[icones](https://icones.js.org/) 找合适的图标 - -### 1. 结合 unocss 使用 - -```html - - -``` - -### 2. 结合插件 unplugin-icons 自定义标签使用 - -` - -``` - -这种方式还支持自定义 svg 图标,本项目自定义 svg 图标固定放在 src/assets/svg 下 - -` -``` - -具体配置参看 build/plugin/unplugin.js - -### 3. 结合 Naive UI 的 NIcon 组件封装使用 - -```html - - - - -``` - -封装组件参看 src/components/icon diff --git a/docs/安装pnpm.md b/docs/安装pnpm.md deleted file mode 100644 index 2dbf349..0000000 --- a/docs/安装pnpm.md +++ /dev/null @@ -1,34 +0,0 @@ -## 安装 pnpm - -### 使用 Corepack 安装(推荐) - -从 v16.13 开始,Node.js 发布了 Corepack 来管理包管理器。 这是一项实验性功能,需要通过运行如下脚本来启用它: - -``` -npx corepack enable // 可能需要管理员权限 -``` - -这将自动在您的系统上安装 pnpm。 但是,它可能不是最新版本的 pnpm。 若要升级,请检查[最新的 pnpm 版本](https://github.com/pnpm/pnpm/releases/latest) 并运行,如 7.14.0 - -``` -corepack prepare pnpm@7.14.0 --activate -``` - -如果是 Node.js v16.17 或者更新的版本,可以直接安装最新版本的 pnpm - -``` -corepack prepare pnpm@latest --activate -``` - -### 使用 npm 安装 - -``` -npm i -g pnpm -``` - -更新,卸了重新装 - -``` -npm uninstall -g pnpm -npm i -g pnpm -``` diff --git a/package.json b/package.json index cda5370..fa1d144 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "1.0.0", "scripts": { "build": "vite build", - "build:github": "vite build --mode github && esno ./build/script", "build:test": "vite build --mode test", "cz": "cz", "dev": "vite", diff --git a/src/router/index.js b/src/router/index.js index dd1a7ef..f5cce34 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,7 +5,7 @@ import { getToken, isNullOrWhitespace } from '@/utils' import { usePermissionStore } from '@/store' import * as Sentry from '@sentry/vue' -const isHash = true +const isHash = false export const router = createRouter({ history: isHash ? createWebHashHistory('/') : createWebHistory('/'), routes: basicRoutes, @@ -17,20 +17,17 @@ export async function setupRouter(app) { setupRouterGuard(router) Sentry.init({ app, - dsn: 'https://589c2c58683b4e8fa87a87609fd95e3b@w.huakk.top/2', + dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6', integrations: [ new Sentry.BrowserTracing({ - // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/], + tracePropagationTargets: ['localhost'], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), new Sentry.Replay(), ], - // Performance Monitoring - tracesSampleRate: 1.0, // Capture 100% of the transactions - // Session Replay - replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. - replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur. + tracesSampleRate: 1.0, + replaysSessionSampleRate: 0.1, + replaysOnErrorSampleRate: 1.0, }) app.use(router) } diff --git a/src/views/order/index/index.vue b/src/views/order/index/index.vue index 45c0dab..5678b3c 100644 --- a/src/views/order/index/index.vue +++ b/src/views/order/index/index.vue @@ -33,6 +33,28 @@ + +
+ 支付方式: + + + +
+
关键字搜索:
@@ -88,6 +110,7 @@ const queryData = ref({ time: null, word: '', selectKey: null, + pay_type: null, }) const cardData = ref({ @@ -293,7 +316,8 @@ const getList = async () => { loading.value = true try { const query_data = { - Status: queryData.value.status || '', + Status: queryData.value.status, + PayType: queryData.value.pay_type || '', StartTime: queryData.value.time === null ? '' : queryData.value.time[0] || '', EndTime: queryData.value.time === null ? '' : queryData.value.time[1] || '', } diff --git a/src/views/user/index/index.vue b/src/views/user/index/index.vue index 5082db3..6bc1629 100644 --- a/src/views/user/index/index.vue +++ b/src/views/user/index/index.vue @@ -238,7 +238,7 @@