Skip to content

Commit

Permalink
Merge pull request #48 from Octoveau/dev
Browse files Browse the repository at this point in the history
v1.0.2-alpha.3
  • Loading branch information
zero-fsc authored Feb 28, 2023
2 parents cc4c3dc + 408216b commit ac34729
Show file tree
Hide file tree
Showing 47 changed files with 10,324 additions and 2,512 deletions.
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_TARGET_SITE_KEY='5ba7b6fe36a04ce0bab97f103907123f'
VUE_APP_TARGET_SITE_SECRET='1ff77c23c2ea440d84ab17505b4588026233c709bf5d489aae07cd3b788999e1'
VUE_APP_TARGET_SITE_KEY='292c3edcf6ff48b6b8f8acda69a24af1'
VUE_APP_TARGET_SITE_SECRET='baa7d507406f4dd689ab45ca956853c33757fef9bdde41a4b3c0029f8178e626'
4 changes: 2 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_TARGET_SITE_KEY='e17abffae39143a6a154a7eb91b42eb6'
VUE_APP_TARGET_SITE_SECRET='e46365a18fe141e7908e5710aa2232efca863b4c42be42289723c88c2a4a6888'
VUE_APP_TARGET_SITE_KEY='e12c25c323334b769c4f5a894c7a0d90'
VUE_APP_TARGET_SITE_SECRET='e82751ea1c604529bcdadf4f5ba74e6075aea49124bc4ed7af9bac6e909467b0'
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
},
},
rules: {
'no-extra-boolean-cast': 'off',
'import/no-cycle': 'off',
'prettier/prettier': ['error'],
semi: 'error',
Expand All @@ -42,6 +43,7 @@ module.exports = {
'import/extensions': ['error', { vue: 'never' }],
'vue/multi-word-component-names': 'off',
'no-unused-expressions': 'off',
'no-plusplus': 'off',
// 特别注意:vue/order-in-components,此规则用于矫正vue文件结构顺序乱写问题
'vue/order-in-components': [
'error',
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# v1.0.2-alpha.3(2023-03-01)

### Feature
- add workspace page
- add ayalysis page
- add footer component
- add i18n components and config
- update headers and breadCrumb

### Bug Fixes
- fix style with rem
- fix menu style
12 changes: 12 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# v1.0.2-alpha.3(2023-03-01)

### Feature
- 新增工作台页面
- 新增分析页
- 新增footer组件
- 新增i18n组件及相关配置
- 优化header与面包屑的相关问题

### Bug Fixes
- 修复关于rem的样式问题
- 修复menu组件的样式问题
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"wangeditor": "^4.7.15",
"webpack": "^4.46.0",
"webpack-bundle-analyzer": "^4.6.1",
"webpack-cli": "^4.10.0"
"webpack-cli": "^4.10.0",
"echarts": "4.9.0",
"echarts-liquidfill": "2.0.6"
},
"devDependencies": {
"@commitlint/cli": "^17.4.2",
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {

<style lang="less">
#app {
overflow: hidden !important;
width: 100%;
height: 100%;
}
Expand Down
14 changes: 7 additions & 7 deletions src/api/interceptors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Message } from 'element-ui';
import router from '@/router';
// eslint-disable-next-line import/no-cycle
import refreshTokenFun from '@/utils/refreshToken';
import authStorage from '@/utils/auth';

const ERROE_MSG = '请求异常,请重试';
const ERROR_MSG_400 = '请求参数异常';
Expand Down Expand Up @@ -30,7 +30,7 @@ const handleRespCode = (respData) => {
const loginFun = () => {
setTimeout(() => {
router.push({
name: 'Login',
name: 'SsoLogin',
});
}, 600);
};
Expand All @@ -42,10 +42,11 @@ const setupInterceptors = (request) => {
if (whiteApi.some((url) => config.url.includes(url))) {
return config;
}
const result = await refreshTokenFun();
if (!result) {
loginFun();
return config;
if (JSON.parse(authStorage.getIsSsoLoginInfo())) {
if (!(await refreshTokenFun())) {
loginFun();
return config;
}
}
return config;
},
Expand All @@ -55,7 +56,6 @@ const setupInterceptors = (request) => {
// 响应拦截器
request.interceptors.response.use(
(resp) => {
// 从xios里取出api返回的data
const respData = resp.data;
handleRespCode(respData);
if (respData.code === 401) {
Expand Down
3 changes: 3 additions & 0 deletions src/api/userInfo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import service from './index';
// 获取用户信息
export const getUserInfoData = () => service.get('api/info');

// get octoveau all public git projects
export const getAllGitProjects = (user = 'octoveau') => service.get(`//api.github.com/users/${user}/repos`);
2 changes: 1 addition & 1 deletion src/components/BreadCrumb/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
const first = route[0];
if (!this.isDashBoard(first)) {
route = [{ path: '/dashboard', meta: { title: 'DashBoard' } }].concat(route);
route = [{ path: '/ayalysis', meta: { title: 'Dashboard' } }].concat(route);
}
this.breadCrumbList = route.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false);
Expand Down
5 changes: 2 additions & 3 deletions src/components/I18n/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
!-->
<template>
<div class="i18n-container">
<el-dropdown trigger="click" placement="bottom">
<el-dropdown placement="bottom">
<span class="el-dropdown-link">
<i role="img" class="el-icon-s-comment"></i>
</span>
Expand All @@ -25,7 +25,7 @@ export default {
return {
lang: localStorage.getItem('lang') || 'zh',
langOptions: [
{ lang: 'zh', label: '中文' },
{ lang: 'zh', label: '简体中文' },
{ lang: 'en', label: 'English' },
],
};
Expand All @@ -48,6 +48,5 @@ export default {
i {
font-size: 0.225rem;
line-height: 0.6rem;
color: #fff;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<div>dashboard</div>
<div class="page-header-container">
<slot name="content"></slot>
</div>
</template>

<script>
Expand All @@ -10,9 +12,7 @@ export default {
computed: {},
mounted() {
console.log('test fork');
},
mounted() {},
methods: {},
};
Expand Down
16 changes: 8 additions & 8 deletions src/css/element.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.el-header {
padding: 0 !important;
color: #333;
border-bottom: solid 1px #e6e6e6;
line-height: 0.75rem;
border-bottom: 1px solid #eee;
}

.el-aside {
Expand All @@ -15,16 +15,20 @@
line-height: 2.5rem;
}

.el-footer {
height: auto !important;
}

.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 200px;
min-height: 400px;
}

.el-main {
text-align: center;
.el-main, .el-footer {
overflow: hidden !important;
padding: 0 !important;
color: #333;
background-color: #e9eef3;
line-height: 2rem;
}

.el-menu {
Expand All @@ -42,10 +46,6 @@
}
}

.el-main {
padding: 0 !important;
}

/* <i/>样式 */
.no-icon {
display: inline-block;
Expand Down
1 change: 1 addition & 0 deletions src/css/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import url("./reset.less");
@import url("./element.less");
@import url("./transition.less");
@import url("./public.less");

//修改浏览器默认样式
::-webkit-scrollbar {
Expand Down
3 changes: 3 additions & 0 deletions src/css/public.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.public-content__padding {
padding: 0.25rem;
}
1 change: 0 additions & 1 deletion src/css/reset.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
padding: 0;
margin: 0;
font-size: 0.175rem;
font-weight: 400;
}

html,
Expand Down
2 changes: 2 additions & 0 deletions src/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export default {
menu: {
dashboard: 'Dashboard',
nestmenu: 'Nest Menu',
ayalysis: 'Ayalysis',
workplace: 'Work Place',
menu1: 'Menu1',
'menu1-1': 'Menu1-1',
'menu1-1-1': 'Menu1-1-1',
Expand Down
2 changes: 2 additions & 0 deletions src/lang/zh.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export default {
menu: {
dashboard: '首页',
ayalysis: '分析页',
workplace: '工作台',
nestmenu: '嵌套菜单',
menu1: '菜单1',
'menu1-1': '菜单1-1',
Expand Down
25 changes: 17 additions & 8 deletions src/layouts/content/index.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<template>
<div class="main-container">
<bread-crumb />
<div class="tab-page-container">
<span>这里是标签页</span>
</div>
<div class="main-content">
<router-view />
<footer-comp />
</div>
</div>
</template>

<script>
import BreadCrumb from '@components/BreadCrumb';
import FooterComp from '../footer';
export default {
components: {
BreadCrumb,
FooterComp,
},
data() {
return {};
Expand All @@ -29,13 +32,19 @@ export default {
<style lang="less" scoped>
.main-container {
position: relative;
margin: 0 0 0.15rem 0.3rem;
width: calc(100% - 0.6rem);
height: calc(100% - 0.3rem);
.tab-page-container {
padding: 0 5px;
height: 0.375rem;
text-align: left;
background-color: #fff;
border-bottom: 1px solid #eee;
line-height: 0.375rem;
}
.main-content {
width: 100%;
height: calc(100% - 0.45rem);
overflow: auto;
max-height: 10.25rem;
border-radius: 5px;
}
}
Expand Down
31 changes: 31 additions & 0 deletions src/layouts/footer/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<div class="footer-container">
<slot name="content">
<div class="footer-content-description">备案号:蜀ICP备2022027428号-1</div>
</slot>
</div>
</template>

<script>
export default {
data() {
return {};
},
};
</script>

<style lang="less" scoped>
.footer-container {
margin: 0.6rem 0 0.3rem;
text-align: center;
.footer-content-link {
margin-bottom: 0.125rem;
}
.footer-content-description {
font-size: 0.175rem;
color: rgba(0, 0, 0, 45%);
}
}
</style>
Loading

0 comments on commit ac34729

Please sign in to comment.