Skip to content

Commit 61aad21

Browse files
committed
sync to plus1.3.5
1 parent 977bb74 commit 61aad21

File tree

10 files changed

+31
-9251
lines changed

10 files changed

+31
-9251
lines changed

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue3-admin-electron",
3-
"version": "1.2.3",
3+
"version": "1.3.4",
44
"author": "kuanghua([email protected])",
55
"scripts": {
66
"dev": "vite --mode serve-dev --host",
@@ -102,12 +102,10 @@
102102
"@vitejs/plugin-legacy": "1.6.4",
103103
"@vitejs/plugin-vue": "1.10.2",
104104
"@vitejs/plugin-vue-jsx": "1.3.1",
105-
"@vue/compiler-sfc": "3.2.26",
106105
"electron": "16.0.5",
107106
"electron-builder": "22.14.5",
108107
"eslint": "7.32.0",
109108
"eslint-config-prettier": "8.3.0",
110-
"eslint-define-config": "1.2.0",
111109
"eslint-plugin-import": "2.25.3",
112110
"eslint-plugin-prettier": "4.0.0",
113111
"eslint-plugin-vue": "8.1.1",
@@ -119,13 +117,10 @@
119117
"scss": "0.2.4",
120118
"svg-sprite-loader": "6.0.11",
121119
"typescript": "4.3.2",
122-
"vite": "2.7.3",
120+
"vite": "2.7.10",
123121
"vite-plugin-mock": "^2.9.6",
124122
"vite-plugin-style-import": "1.2.1",
125123
"vite-plugin-svg-icons": "1.0.5",
126124
"vue-tsc": "0.28.1"
127-
},
128-
"engines": {
129-
"node": ">=14"
130125
}
131126
}

src/api/user.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import request from '@/utils/axiosReq'
22

33
export function loginReq(data) {
44
return request({
5-
url: '/ty-user/user/loginValid',
5+
url: '/integration-front/user/loginValid',
66
data,
77
method: 'post',
88
bfLoading: false,
@@ -13,15 +13,16 @@ export function loginReq(data) {
1313

1414
export function getInfoReq() {
1515
return request({
16-
url: '/ty-user/user/getUserInfo',
16+
url: '/integration-front/user/getUserInfo',
1717
bfLoading: false,
18-
method: 'post'
18+
method: 'post',
19+
isAlertErrorMsg: false
1920
})
2021
}
2122

2223
export function logoutReq() {
2324
return request({
24-
url: '/ty-user/user/loginOut',
25+
url: '/integration-front/user/loginOut',
2526
method: 'post'
2627
})
2728
}

src/hooks/errorLogHook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import bus from '@/utils/bus'
55
import pack from '../../package.json'
66
let errorLogReq = (errLog) => {
77
request({
8-
url: '/ty-user/errorCollection/insert',
8+
url: '/integration-front/errorCollection/insert',
99
data: {
1010
pageUrl: window.location.href,
1111
errorLog: errLog,

src/hooks/useErrorLog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import bus from '@/utils/bus'
55
import pack from '../../package.json'
66
let errorLogReq = (errLog) => {
77
request({
8-
url: '/ty-user/errorCollection/insert',
8+
url: '/integration-front/errorCollection/insert',
99
data: {
1010
pageUrl: window.location.href,
1111
errorLog: errLog,

src/utils/axiosReq.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,19 @@ service.interceptors.response.use(
6464
} else {
6565
//业务失败处理
6666
if (code === 403) {
67-
ElMessageBox.confirm('请重新登录', {
68-
confirmButtonText: '重新登录',
69-
cancelButtonText: '取消',
70-
type: 'warning'
71-
}).then(() => {
72-
store.dispatch('user/resetToken').then(() => {
73-
location.reload()
74-
//direct return
75-
return Promise.reject(res.data)
67+
if (location.href.indexOf('/login') === 1) {
68+
ElMessageBox.confirm('请重新登录', {
69+
confirmButtonText: '重新登录',
70+
cancelButtonText: '取消',
71+
type: 'warning'
72+
}).then(() => {
73+
store.dispatch('user/resetToken').then(() => {
74+
location.reload()
75+
//direct return
76+
return Promise.reject(res.data)
77+
})
7678
})
77-
})
79+
}
7880
}
7981
//是否需要提示错误信息 isAlertErrorMsg:true 提示
8082
if (reqConfig.isAlertErrorMsg) {

src/views/error-log/ErrorLog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ let selectPageReq = () => {
159159
if (data[fItem] === '' || data[fItem] === null || data[fItem] === undefined) delete data[fItem]
160160
})
161161
let reqConfig = {
162-
url: '/ty-user/errorCollection/selectPage',
162+
url: '/integration-front/errorCollection/selectPage',
163163
method: 'get',
164164
data,
165165
isParams: true,
@@ -199,7 +199,7 @@ let detailData = ref({})
199199
/*删除*/
200200
let deleteByIdReq = (id) => {
201201
return proxy.$axiosReq({
202-
url: '/ty-user/errorCollection/deleteById',
202+
url: '/integration-front/errorCollection/deleteById',
203203
data: { id: id },
204204
isParams: true,
205205
method: 'delete',
@@ -241,7 +241,7 @@ const multiDelBtnClick = async () => {
241241
const data = rowDeleteIdArrMixin
242242
proxy
243243
.$axiosReq({
244-
url: `/ty-user/errorCollection/deleteBatchIds`,
244+
url: `/integration-front/errorCollection/deleteBatchIds`,
245245
data,
246246
method: 'DELETE',
247247
bfLoading: true

src/views/error-log/ErrorLogTest.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let reqCrossOrigin = () => {
6060
proxy
6161
.$axiosReq({
6262
baseURL: 'http://8.135.1.141/micro-service-test',
63-
url: '/ty-user/brand/updateBy',
63+
url: '/integration-front/brand/updateBy',
6464
data: { id: 'fai' },
6565
method: 'put',
6666
isParams: true,
@@ -73,7 +73,7 @@ import axiosReq from '@/utils/axiosReq'
7373
let req404 = () => {
7474
axiosReq({
7575
// baseURL: 'http://8.135.1.141/micro-service-test',
76-
url: '/ty-user/brand/updateBy1',
76+
url: '/integration-front/brand/updateBy1',
7777
data: { id: 'fai' },
7878
method: 'put',
7979
isParams: true,

src/views/setting-switch/SettingSwitch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ let updateReq = () => {
9090
return proxy
9191
.$axiosReq({
9292
// baseURL: 'http://8.135.1.141/micro-service-test',
93-
url: '/ty-user/brand/updateBy',
93+
url: '/integration-front/brand/updateBy',
9494
data: { id: 'fai' },
9595
method: 'put',
9696
isParams: true,

vite.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default ({ command }) => {
7979
})
8080
],
8181
build: {
82-
minify: 'terser',
82+
// minify: 'terser',
8383
brotliSize: false,
8484
// 消除打包大小超过500kb警告
8585
chunkSizeWarningLimit: 2000,
@@ -119,8 +119,8 @@ export default ({ command }) => {
119119
}
120120
}
121121
},
122-
optimizeDeps: {
123-
include: ['element-plus/lib/locale/lang/zh-cn', 'element-plus/lib/locale/lang/en']
124-
}
122+
// optimizeDeps: {
123+
// include: ['element-plus/lib/locale/lang/zh-cn', 'element-plus/lib/locale/lang/en']
124+
// }
125125
}
126126
}

0 commit comments

Comments
 (0)