Skip to content

Commit afc040b

Browse files
committed
删除一些冗余文件; 更新前端配置文件,可直接更改
1 parent 94f96d7 commit afc040b

14 files changed

+107
-129
lines changed

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,50 @@ monitorLog get Log
4141

4242
![shell Icon](https://github.com/shudingbo/mypictures/blob/master/sex-pomelo-web/shell-icon.png?raw=true)
4343

44+
## 配置
45+
### 前端
46+
发布后,更新 public 目录下 sexpCfg.js文件,更新 后端请求地址
47+
``` javascript
48+
window.sexpCfg = {
49+
baseUrl: 'http://192.168.2.31:7050' // 后端地址
50+
};
51+
```
52+
53+
### 后端
54+
编辑 config/config.default.js
55+
``` javascript
56+
// redis配置
57+
config.redis = {
58+
client: {
59+
port: 6379,
60+
host: '192.168.2.10',
61+
password: null,
62+
db: 3,
63+
},
64+
};
65+
66+
// 要管理的pomelo的 master 地址
67+
config.pomelo = {
68+
client: {
69+
master: [{
70+
alias: 'test-5',
71+
host: '192.168.2.5',
72+
port: 3005,
73+
username: 'admin',
74+
password: 'admin',
75+
},
76+
{
77+
alias: 'sdb-32',
78+
host: '192.168.2.32',
79+
port: 3005,
80+
username: 'admin',
81+
password: 'admin',
82+
},
83+
84+
],
85+
},
86+
};
87+
```
4488

4589

4690

ant/.browserslistrc

-3
This file was deleted.

ant/.editorconfig

-39
This file was deleted.

ant/jest.config.js

-23
This file was deleted.

ant/package-lock.json

+53-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ant/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"test:unit": "vue-cli-service test:unit",
2828
"lint": "vue-cli-service lint",
2929
"build:preview": "vue-cli-service build --mode preview",
30-
"lint:nofix": "vue-cli-service lint --no-fix",
31-
"postinstall": "opencollective-postinstall"
30+
"lint:nofix": "vue-cli-service lint --no-fix"
3231
},
3332
"dependencies": {
3433
"@antv/data-set": "^0.10.2",

ant/public/avatar2.jpg

-72.3 KB
Loading

ant/public/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>logo.png">
8-
<title>Ant Design Pro</title>
8+
<title>Sex-Pomelo-Web</title>
9+
<script src="/sexpCfg.js"></script>
910
<style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
1011
<!-- require cdn assets css -->
1112
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>

ant/public/logo.png

-18 KB
Loading

ant/public/sexpCfg.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
window.sexpCfg = {
3+
baseUrl: 'http://192.168.2.31:7050'
4+
};

ant/src/config/globalCfg.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
} from '@/store/mutation-types';
44

55
export const globalCfg = {
6-
baseUrl: 'http://127.0.0.1:7010',
6+
baseUrl: 'http://192.168.2.31:7050',
77
accessToken: ACCESS_TOKEN,
88
group: {
99
startFrontendAfter: false, // 启动时,最后启动前端服务器

ant/src/utils/request.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import store from '@/store';
44
import notification from 'ant-design-vue/es/notification';
55
import { VueAxios } from './axios';
66
import { ACCESS_TOKEN } from '@/store/mutation-types';
7-
import { globalCfg } from '@/config/globalCfg';
7+
// import { globalCfg } from '@/config/globalCfg';
88

99
// 创建 axios 实例
1010
const service = axios.create({
11-
baseURL: globalCfg.baseUrl, // process.env.VUE_APP_API_BASE_URL, // api base_url
11+
baseURL: window.sexpCfg.baseUrl, // process.env.VUE_APP_API_BASE_URL, // api base_url
1212
timeout: 6000 // 请求超时时间
1313
});
1414

0 commit comments

Comments
 (0)