This commit is contained in:
wangzenghua 2025-04-14 02:39:31 +01:00
parent 3ed137b757
commit 2e8be43932
10 changed files with 26 additions and 93 deletions

View File

@ -1,9 +1,8 @@
# 开发环境
VITE_PORT = 9526
VITE_MODE = 'DEV'
VITE_PORT = 9527
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://localhost:9000'
VITE_APP_NAME = 'sub-operation-service'
VITE_APP_NAME = 'sub-operation-admin'
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_UPLOAD_API = '/uploadApis'

View File

@ -1,9 +1,9 @@
# 生产环境
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://47.109.205.240'
VITE_APP_NAME = 'sub-operation-service'
VITE_APP_NAME = 'sub-operation-admin'
# 接口
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = ''
VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = ''

View File

@ -1,7 +1,7 @@
# 测试环境
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://192.168.18.99:88'
VITE_APP_NAME = 'sub-operation-service'
VITE_APP_NAME = 'sub-operation-admin'
# 接口
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = ''

View File

@ -1,5 +1,5 @@
{
"name": "sub-operation-service",
"name": "sub-operation-admin",
"private": true,
"version": "0.0.1",
"type": "module",
@ -7,7 +7,7 @@
"dev": "vite --mode development",
"build": "vite build --mode production",
"test": "vite build --mode test",
"local": "vite build --mode local",
"pre": "vite build --mode pre",
"preview": "vite preview",
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
"eslint": "npx eslint --init",
@ -21,7 +21,7 @@
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.6.5",
"echarts": "^5.5.0",
"echarts": "^5.6.0",
"element-plus": "^2.7.2",
"js-base64": "^3.7.6",
"lodash": "^4.17.21",
@ -31,6 +31,7 @@
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"screenfull": "^6.0.2",
"splitpanes": "^4.0.3",
"vue": "^3.3.11",
"vue-router": "^4.2.5"
},

View File

@ -3,7 +3,7 @@
* @Author: zenghua.wang
* @Date: 2024-01-24 18:54:01
* @LastEditors: zenghua.wang
* @LastEditTime: 2025-04-12 15:22:39
* @LastEditTime: 2025-02-28 11:31:12
-->
<template>
<el-config-provider :size="size" :locale="zhCn">
@ -23,45 +23,5 @@ const size = computed(() => SettingStore.themeConfig.globalComSize);
</script>
<style lang="scss">
@import './styles/style.scss';
// @import '@/styles/iconfont.css';
body {
div {
box-sizing: border-box;
}
--el-color-primary: #25bf82;
--el-color-primary-light-3: #45dda1;
--el-color-primary-light-5: #8cddbd;
--el-color-primary-light-9: rgba(37, 191, 130, 0.1);
--el-color-primary-light-8: rgba(37, 191, 130, 0.5);
.el-input {
--el-input-focus-border-color: #25bf82;
--el-input-focus-border: #25bf82;
::v-deep() {
.el-input__wrapper:focus,
.el-input__wrapper:hover,
.el-input__wrapper .is-focus {
box-shadow: 0 0 0 1px $color-main !important;
}
}
}
.el-button--primary {
--el-button-bg-color: #25bf82;
--el-button-border-color: #25bf82;
--el-button-outline-color: #45dda1;
--el-button-active-color: #158b5c;
--el-button-hover-bg-color: #45dda1;
--el-button-hover-border-color: #45dda1;
--el-button-active-bg-color: #158b5c;
--el-button-active-border-color: #158b5c;
--el-button-disabled-text-color: var(--el-color-white);
--el-button-disabled-bg-color: #45dda1;
--el-button-disabled-border-color: #45dda1;
}
--el-menu-hover-text-color: #25bf82;
--el-menu-hover-bg-color: fff;
}
@import './styles/style';
</style>

View File

@ -16,7 +16,7 @@
<div class="layout-header-top-right">
<span>商家中心</span>
<span @click="toUserCenter">个人中心</span>
<span @click="toHome" class="back-home">
<span class="back-home" @click="toHome">
<div class="iconfont icon-home" style="font-size: 12px"></div>
<span>返回首页</span>
</span>
@ -59,22 +59,13 @@
</template>
<script setup name="layout-header">
import { computed, ref } from 'vue';
import { useSettingStore } from '@/store/modules/setting';
import { usePermissionStore } from '@/store/modules/permission';
import { ref } from 'vue';
import { qrImg } from './base64img';
import AppLink from '../Menu/Link.vue';
import { useRoute, useRouter } from 'vue-router';
import { isEmpty, getAssetsFile } from '@/utils';
import { useRouter } from 'vue-router';
import { getAssetsFile } from '@/utils';
const route = useRoute();
const router = useRouter();
const SettingStore = useSettingStore();
const PermissionStore = usePermissionStore();
const cacheRoutes = computed(() => PermissionStore.keepAliveRoutes);
const isReload = computed(() => SettingStore.isReload);
const isSubApp = computed(() => route.path.includes('sub'));
const keyword = ref('');
@ -124,14 +115,10 @@ const toUserCenter = () => {
</script>
<style lang="scss" scoped>
div {
box-sizing: border-box;
}
.layout-header-warp {
width: 100%;
text-align: center;
background: $color-fff;
background: #fff;
.layout-header-menu {
width: 100%;
::v-deep() {
@ -244,10 +231,8 @@ div {
height: 50px;
font-size: 18px;
width: 100%;
::v-deep() {
.el-input__wrapper {
padding-right: 100px;
}
:deep(.el-input__wrapper) {
padding-right: 100px;
}
}

View File

@ -6,11 +6,8 @@
</template>
<script setup name="layout">
import { useSettingStore } from '@/store/modules/setting';
import Header from './component/Header';
import Main from './component/Main';
const SettingStore = useSettingStore();
</script>
<style lang="scss" scoped>

View File

@ -1,15 +1,4 @@
import * as components from '../../../main/src/components';
// const modules = import.meta.glob('../../../main/src/components/**/**.vue');
// const components = Object.keys(modules).reduce((acc, path) => {
// const component = modules[path].default || modules[path];
// const componentName = path
// .split('/')
// .pop()
// .replace(/\.\w+$/, '');
// acc[componentName] = component;
// return acc;
// }, {});
import * as components from '#/components';
// 全局注册组件
export const registerGlobalComponents = (app) => {

View File

@ -1,6 +1,6 @@
import { renderWithQiankun, qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
export const registerMicroApps = (app) => {
export const registerMicroApps = async (app) => {
const initQiankun = () => {
renderWithQiankun({
bootstrap() {
@ -18,8 +18,9 @@ export const registerMicroApps = (app) => {
},
});
};
const render = ({ container }) => {
app.mount(container ? container : '#app');
const render = async ({ container }) => {
await new Promise((resolve) => setTimeout(resolve, 1000));
app.mount(container ? container.querySelector('#app') : '#app');
};
qiankunWindow.__POWERED_BY_QIANKUN__ ? initQiankun() : render({});
};

View File

@ -2,8 +2,8 @@
* @Descripttion:
* @Author: zenghua.wang
* @Date: 2022-09-18 21:24:29
* @LastEditors: zenghua.wang 1048523306@qq.com
* @LastEditTime: 2025-01-20 10:51:23
* @LastEditors: zenghua.wang
* @LastEditTime: 2025-04-14 09:02:04
*/
import { defineConfig, loadEnv } from 'vite';
@ -55,6 +55,7 @@ export default defineConfig(({ command, mode }) => {
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'#': resolve(__dirname, '../main/src'),
},
extensions: ['.js', '.vue', '.json', '.ts'],
},