完善功能
This commit is contained in:
@ -5,8 +5,7 @@ const config = {
|
|||||||
// 开发环境使用相对路径(通过代理),生产环境使用完整URL
|
// 开发环境使用相对路径(通过代理),生产环境使用完整URL
|
||||||
baseUrl: import.meta.env.DEV
|
baseUrl: import.meta.env.DEV
|
||||||
? '/'
|
? '/'
|
||||||
// : `${import.meta.env.VITE_APP_BASE_URL || 'https://test1.stnav.com'}/`, //请求接口域名
|
: `${import.meta.env.VITE_APP_BASE_URL}/`, //请求接口域名
|
||||||
: `${import.meta.env.VITE_APP_BASE_URL || 'https://76458.com'}/`, //请求接口域名
|
|
||||||
urlPrefix: 'brokerapi', //请求默认前缀
|
urlPrefix: 'brokerapi', //请求默认前缀
|
||||||
timeout: 10 * 1000 //请求超时时长
|
timeout: 10 * 1000 //请求超时时长
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,10 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<el-button v-perms="['broker_reflect/add']" type="primary" @click="handleAdd">
|
<div class="font-bold mb-4">
|
||||||
|
注:提现时间为每月1号和16号
|
||||||
|
</div>
|
||||||
|
<el-button v-perms="['broker_reflect/add']" type="primary" :disabled="!isWithdrawDay" @click="handleAdd">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon name="el-icon-Plus" />
|
<icon name="el-icon-Plus" />
|
||||||
</template>
|
</template>
|
||||||
@ -50,6 +53,8 @@
|
|||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
|
||||||
|
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="订单编号" prop="order_sn" show-overflow-tooltip />
|
<el-table-column label="订单编号" prop="order_sn" show-overflow-tooltip />
|
||||||
@ -153,8 +158,19 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||||||
params: queryParams
|
params: queryParams
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 计算属性:是否为提现日(1号或16号)
|
||||||
|
const isWithdrawDay = computed(() => {
|
||||||
|
const today = new Date()
|
||||||
|
const day = today.getDate()
|
||||||
|
return day === 1 || day === 16
|
||||||
|
})
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
if (!isWithdrawDay.value) {
|
||||||
|
feedback.msgError('未到提现日期')
|
||||||
|
return
|
||||||
|
}
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('add')
|
editRef.value?.open('add')
|
||||||
|
|||||||
139
vite.config.ts
139
vite.config.ts
@ -6,7 +6,7 @@ import AutoImport from 'unplugin-auto-import/vite'
|
|||||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import { fileURLToPath, URL } from 'url'
|
import { fileURLToPath, URL } from 'url'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||||||
@ -36,78 +36,83 @@ function getElementPlusStylePaths() {
|
|||||||
return stylePaths
|
return stylePaths
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
base: '/broker/',
|
const env = loadEnv(mode, process.cwd())
|
||||||
server: {
|
const targetUrl = env.VITE_APP_BASE_URL || 'https://test1.stnav.com'
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 5177, // 修改端口号,如有需要可调整
|
return {
|
||||||
hmr: true,
|
base: '/broker/',
|
||||||
open: true,
|
server: {
|
||||||
proxy: {
|
host: '0.0.0.0',
|
||||||
'/brokerapi': {
|
port: 5175, // 修改端口号,如有需要可调整
|
||||||
// target: 'https://test1.stnav.com',
|
hmr: true,
|
||||||
target: 'https://76458.com',
|
open: true,
|
||||||
changeOrigin: true,
|
proxy: {
|
||||||
secure: true,
|
'/brokerapi/': {
|
||||||
rewrite: (path) => path
|
target: targetUrl,
|
||||||
|
// target: 'https://76458.com',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: true,
|
||||||
|
rewrite: (path) => path
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
plugins: [
|
||||||
plugins: [
|
vue(),
|
||||||
vue(),
|
vueJsx(),
|
||||||
vueJsx(),
|
AutoImport({
|
||||||
AutoImport({
|
imports: ['vue', 'vue-router'],
|
||||||
imports: ['vue', 'vue-router'],
|
resolvers: [ElementPlusResolver()],
|
||||||
resolvers: [ElementPlusResolver()],
|
eslintrc: {
|
||||||
eslintrc: {
|
enabled: true
|
||||||
enabled: true
|
}
|
||||||
|
}),
|
||||||
|
Components({
|
||||||
|
directoryAsNamespace: true,
|
||||||
|
resolvers: [ElementPlusResolver()]
|
||||||
|
}),
|
||||||
|
createStyleImportPlugin({
|
||||||
|
resolves: [ElementPlusResolve()]
|
||||||
|
}),
|
||||||
|
createSvgIconsPlugin({
|
||||||
|
// 配置路劲在你的src里的svg存放文件
|
||||||
|
iconDirs: [fileURLToPath(new URL('./src/assets/icons', import.meta.url))],
|
||||||
|
symbolId: 'local-icon-[dir]-[name]'
|
||||||
|
}),
|
||||||
|
vueSetupExtend()
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
}),
|
},
|
||||||
Components({
|
css: {
|
||||||
directoryAsNamespace: true,
|
preprocessorOptions: {
|
||||||
resolvers: [ElementPlusResolver()]
|
scss: {
|
||||||
}),
|
api: 'modern-compiler'
|
||||||
createStyleImportPlugin({
|
}
|
||||||
resolves: [ElementPlusResolve()]
|
|
||||||
}),
|
|
||||||
createSvgIconsPlugin({
|
|
||||||
// 配置路劲在你的src里的svg存放文件
|
|
||||||
iconDirs: [fileURLToPath(new URL('./src/assets/icons', import.meta.url))],
|
|
||||||
symbolId: 'local-icon-[dir]-[name]'
|
|
||||||
}),
|
|
||||||
vueSetupExtend()
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
css: {
|
|
||||||
preprocessorOptions: {
|
|
||||||
scss: {
|
|
||||||
api: 'modern-compiler'
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
optimizeDeps: {
|
||||||
optimizeDeps: {
|
// 确保不重复包含这些依赖
|
||||||
// 确保不重复包含这些依赖
|
include: ['@wangeditor/editor-for-vue', 'vue-echarts', ...getElementPlusStylePaths()]
|
||||||
include: ['@wangeditor/editor-for-vue', 'vue-echarts', ...getElementPlusStylePaths()]
|
},
|
||||||
},
|
build: {
|
||||||
build: {
|
rollupOptions: {
|
||||||
rollupOptions: {
|
output: {
|
||||||
output: {
|
manualChunks(id) {
|
||||||
manualChunks(id) {
|
if (id.includes('node_modules')) {
|
||||||
if (id.includes('node_modules')) {
|
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
||||||
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
define: {
|
||||||
|
__VUE_PROD_DEVTOOLS__: false,
|
||||||
|
__VUE_OPTIONS_API__: true,
|
||||||
|
__VUE_PROD_HYDRATION__: true,
|
||||||
|
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
define: {
|
|
||||||
__VUE_PROD_DEVTOOLS__: false,
|
|
||||||
__VUE_OPTIONS_API__: true,
|
|
||||||
__VUE_PROD_HYDRATION__: true,
|
|
||||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user