Skip to content

Commit 5b4ae10

Browse files
committed
add devserve config & clear debug
1 parent 723bd16 commit 5b4ae10

File tree

3 files changed

+11
-31
lines changed

3 files changed

+11
-31
lines changed

web/src/js/view/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default {
8686
},
8787
methods: {
8888
getIfLogin() {
89-
api.fetch('/mock/dss/getBaseInfo', 'get').then(() => {
89+
api.fetch('/dss/getBaseInfo', 'get').then(() => {
9090
this.$router.push('/');
9191
}).catch(() => {
9292
this.clearSession();

web/src/js/view/workspace/index.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,24 +190,24 @@ export default {
190190
methods: {
191191
init(){
192192
193-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}`, 'get').then(data=>{
193+
api.fetch(`/dss/workspaces/${this.workspaceId}`, 'get').then(data=>{
194194
this.workspaceData = data;
195195
})
196196
197-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}/favorites`, 'get').then(data=>{
197+
api.fetch(`/dss/workspaces/${this.workspaceId}/favorites`, 'get').then(data=>{
198198
this.favoriteApps = data;
199199
})
200200
201-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}/managements`, 'get').then(data=>{
201+
api.fetch(`/dss/workspaces/${this.workspaceId}/managements`, 'get').then(data=>{
202202
this.adminApps = data.managements ? data.managements[0]: [];
203203
})
204204
205-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}/applications`, 'get').then(data=>{
205+
api.fetch(`/dss/workspaces/${this.workspaceId}/applications`, 'get').then(data=>{
206206
this.applications = data.applications;
207207
})
208208
},
209209
deleteFavoriteApp(favouritesId, index){
210-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}/favorites`, 'delete').then(data=>{
210+
api.fetch(`/dss/workspaces/${this.workspaceId}/favorites`, 'delete').then(data=>{
211211
this.favoriteApps.splice(index, 1);
212212
})
213213
},
@@ -217,8 +217,7 @@ export default {
217217
if (valid) {
218218
// this.addAppLoading = true;
219219
this.show = false;
220-
api.fetch(`/mock/dss/workspaces/${this.workspaceId}/favorites`, {applicationId: this.formDynamic.selectApp},'post').then(data=>{
221-
console.log('添加成功')
220+
api.fetch(`/dss/workspaces/${this.workspaceId}/favorites`, {applicationId: this.formDynamic.selectApp},'post').then(data=>{
222221
const app = this.findAppByApplicationId(this.formDynamic.selectApp)
223222
this.favoriteApps.push({
224223
...app,
@@ -254,7 +253,7 @@ export default {
254253
}
255254
return false;
256255
})
257-
this.searchResult = [{title: '搜索结果', appInstances: [...this.searchResult]}];
256+
this.searchResult = [{title: '', appInstances: [...this.searchResult]}];
258257
this.search = true;
259258
}else{
260259
this.search = false;
@@ -277,7 +276,6 @@ export default {
277276
return this.applications.map(item=>({title: item.title, id: item.id}))
278277
},
279278
apps: function(){
280-
console.log('this.formDynamic.selectType', this.formDynamic.selectType);
281279
if(this.formDynamic.selectType){
282280
const arr = this.applications.filter(item=>item.id==this.formDynamic.selectType);
283281
return arr[0].appInstances;
@@ -286,7 +284,6 @@ export default {
286284
},
287285
tabsApplication: function(){
288286
if(this.search){
289-
console.log('dsadad', this.searchResult, this.applications)
290287
return this.searchResult;
291288
}
292289
return this.applications;

web/vue.config.js

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,26 @@ module.exports = {
3333
publicPath: './',
3434
outputDir: 'dist/dist',
3535
devServer: {
36-
port: 8091,
36+
port: 8080,
3737
open: true,
3838
disableHostCheck: true,
3939
overlay: {
4040
warnings: false,
4141
errors: true
4242
},
4343
proxy: { //代理转发
44-
45-
'^/api/rest_j/v1/mock': {
46-
target: 'http://rap2.taobao.org:38080/app/mock/162239', //后端服务地址
47-
ws: true,
48-
changeOrigin: true,
49-
pathRewrite: {
50-
'^/api/rest_j/v1/mock': '/api/rest_j/v1'
51-
},
52-
logLevel: "debug"
53-
},
54-
// '^/ws/api': { //websocket
55-
// target: 'ws://192.168.9.180:8089',
56-
// ws: true,
57-
// secure: false,
58-
// // logLevel: 'debug',
59-
// },
6044
'^/api/rest_j/v1': {
61-
target: 'http://42.123.106.20:8088', //后端服务地址
45+
target: 'http://host:port', //后端服务地址
6246
ws: true,
6347
changeOrigin: true,
6448
pathRewrite: {
6549
'^/api/rest_j/v1': '/api/rest_j/v1'
6650
}
6751
},
6852
'^/ws/api': { //websocket
69-
target: 'ws://42.123.106.20:8088',
53+
target: 'ws://host:port',
7054
ws: true,
7155
secure: false,
72-
// logLevel: 'debug',
7356
},
7457
}
7558
// after: require('./mock/mock-server.js')

0 commit comments

Comments
 (0)