Skip to content

Commit 51e1aa7

Browse files
authored
Merge pull request #3 from givebest/dev
+log4js records sensitive operation user ip/account/client information
2 parents df08502 + a37287e commit 51e1aa7

26 files changed

+12771
-37
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ $ npm run generate
7878
## Features
7979

8080
* NestJS + MySql output API.
81+
* API calls sensitive operation records IP, administrator and client information.
8182
* NuxtJS + Vue + Bootstrap-vue can generate static HTML for the whole site (SEO).
8283
* Nuxtjs vue implements SSR server-side rendering (SEO).
8384
* Element UI + Vue realizes CMS management.

README.zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ $ npm run generate
7777
## 特色
7878

7979
* NestJS + MySql 输出 API。
80+
* API 调用敏感操作记录 IP、管理员及客户端信息。
8081
* Nuxtjs 实现 Vue SSR 服务端渲染 (SEO)。
8182
* NuxtJS + Vue + Bootstrap-vue 实现整站生成 HTML 静态网站 (SEO)。
8283
* Element UI + Vue 实现 CMS 系统管理。

admin/src/styles/element-ui.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,8 @@
8888
width: 148px;
8989
height: 148px;
9090
}
91+
92+
93+
.el-upload-list--picture-card .el-upload-list__item-thumbnail {
94+
height: auto !important;
95+
}

admin/src/utils/request.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { getToken } from '@/utils/auth'
66
// create an axios instance
77
const service = axios.create({
88
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
9-
// withCredentials: true, // send cookies when cross-domain requests
9+
withCredentials: true, // send cookies when cross-domain requests
1010
timeout: 5000, // request timeout
1111
})
1212

1313
// request interceptor
1414
service.interceptors.request.use(
15-
config => {
15+
(config) => {
1616
// do something before request is sent
1717

1818
if (store.getters.token) {
@@ -23,7 +23,7 @@ service.interceptors.request.use(
2323
}
2424
return config
2525
},
26-
error => {
26+
(error) => {
2727
// do something with request error
2828
console.log(error) // for debug
2929
return Promise.reject(error)
@@ -42,7 +42,7 @@ service.interceptors.response.use(
4242
* Here is just an example
4343
* You can also judge the status by HTTP Status Code
4444
*/
45-
response => {
45+
(response) => {
4646
const { status, data } = response
4747
const res = data
4848

@@ -86,7 +86,7 @@ service.interceptors.response.use(
8686
return res
8787
}
8888
},
89-
error => {
89+
(error) => {
9090
console.log('err' + error) // for debug
9191
Message({
9292
message: error.message,

0 commit comments

Comments
 (0)