Skip to content

Commit 3e7e17a

Browse files
committed
refactor:update
1 parent 4e39de7 commit 3e7e17a

File tree

13 files changed

+46
-38
lines changed

13 files changed

+46
-38
lines changed

router/default.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package router
88
import (
99
"grm/controllers"
1010
"grm/middleware"
11+
"net/http"
1112

1213
"github.com/gin-contrib/gzip"
1314
"github.com/gin-contrib/sessions"
@@ -21,7 +22,11 @@ func Init() *gin.Engine {
2122
store := cookie.NewStore([]byte("goredismanagerphper"))
2223
router.Use(middleware.StaticCache(), gzip.Gzip(gzip.DefaultCompression), sessions.Sessions("goredismanager", store))
2324

24-
app := router.Group("/api")
25+
router.NoRoute(func(ctx *gin.Context) {
26+
ctx.Redirect(http.StatusMovedPermanently, "/static/#")
27+
})
28+
29+
app := router.Group("/grmapix")
2530

2631
userRouter := app.Group("/user")
2732
{
@@ -97,7 +102,7 @@ func Init() *gin.Engine {
97102
streamRouter.POST("/add", controllers.Stc.AddItem)
98103
}
99104

100-
wsapp := router.Group("/ws")
105+
wsapp := app.Group("/ws")
101106
{
102107
wsapp.GET("/cmd", controllers.Wsc.Ws)
103108
}

web/src/api/base.js

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

33
export const getConnList = query => {
44
return request({
5-
url: 'api/conn/list',
5+
url: 'grmapix/conn/list',
66
method: 'get',
77
params: query
88
});
99
};
1010

1111
export const delConn = data => {
1212
return request({
13-
url: 'api/conn/del',
13+
url: 'grmapix/conn/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addConn = data => {
2020
return request({
21-
url: 'api/conn/add',
21+
url: 'grmapix/conn/add',
2222
method: 'post',
2323
data
2424
});
2525
};
2626

2727
export const testConn = data => {
2828
return request({
29-
url: 'api/conn/test',
29+
url: 'grmapix/conn/test',
3030
method: 'post',
3131
data
3232
});

web/src/api/hash.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import request from '@/utils/request';
22

33
export const showHash = data => {
44
return request({
5-
url: 'api/hash/show',
5+
url: 'grmapix/hash/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const delHash = data => {
1212
return request({
13-
url: 'api/hash/del',
13+
url: 'grmapix/hash/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addHash = data => {
2020
return request({
21-
url: 'api/hash/add',
21+
url: 'grmapix/hash/add',
2222
method: 'post',
2323
data
2424
});

web/src/api/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,71 @@ import request from '@/utils/request';
22

33
export const openDb = data => {
44
return request({
5-
url: 'api/index/open',
5+
url: 'grmapix/index/open',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const getKeys = data => {
1212
return request({
13-
url: 'api/index/getkeys',
13+
url: 'grmapix/index/getkeys',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const getKeyType = data => {
2020
return request({
21-
url: 'api/index/getkeytype',
21+
url: 'grmapix/index/getkeytype',
2222
method: 'post',
2323
data
2424
});
2525
};
2626

2727
export const delKeys = data => {
2828
return request({
29-
url: 'api/index/delkey',
29+
url: 'grmapix/index/delkey',
3030
method: 'post',
3131
data
3232
});
3333
};
3434

3535
export const ttlKey = data => {
3636
return request({
37-
url: 'api/index/ttlkey',
37+
url: 'grmapix/index/ttlkey',
3838
method: 'post',
3939
data
4040
});
4141
};
4242

4343
export const serInfo = data => {
4444
return request({
45-
url: 'api/index/serinfo',
45+
url: 'grmapix/index/serinfo',
4646
method: 'post',
4747
data
4848
});
4949
}
5050

5151
export const luaRun = data => {
5252
return request({
53-
url: 'api/index/luarun',
53+
url: 'grmapix/index/luarun',
5454
method: 'post',
5555
data
5656
});
5757
}
5858

5959
export const setting = data => {
6060
return request({
61-
url: 'api/index/setting',
61+
url: 'grmapix/index/setting',
6262
method: 'post',
6363
data
6464
});
6565
}
6666

6767
export const getSetting = () => {
6868
return request({
69-
url: 'api/index/setting',
69+
url: 'grmapix/index/setting',
7070
method: 'get'
7171
});
7272
};

web/src/api/list.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import request from '@/utils/request';
22

33
export const showList = data => {
44
return request({
5-
url: 'api/list/show',
5+
url: 'grmapix/list/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const delList = data => {
1212
return request({
13-
url: 'api/list/del',
13+
url: 'grmapix/list/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addList = data => {
2020
return request({
21-
url: 'api/list/add',
21+
url: 'grmapix/list/add',
2222
method: 'post',
2323
data
2424
});

web/src/api/set.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import request from '@/utils/request';
22

33
export const showSet = data => {
44
return request({
5-
url: 'api/set/show',
5+
url: 'grmapix/set/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const delSet = data => {
1212
return request({
13-
url: 'api/set/del',
13+
url: 'grmapix/set/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addSet = data => {
2020
return request({
21-
url: 'api/set/add',
21+
url: 'grmapix/set/add',
2222
method: 'post',
2323
data
2424
});

web/src/api/stream.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import request from '@/utils/request';
22

33
export const showStream = data => {
44
return request({
5-
url: 'api/stream/show',
5+
url: 'grmapix/stream/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const delStream = data => {
1212
return request({
13-
url: 'api/stream/del',
13+
url: 'grmapix/stream/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addStream = data => {
2020
return request({
21-
url: 'api/stream/add',
21+
url: 'grmapix/stream/add',
2222
method: 'post',
2323
data
2424
});

web/src/api/string.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import request from '@/utils/request';
22

33
export const showString = data => {
44
return request({
5-
url: 'api/string/show',
5+
url: 'grmapix/string/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const addString = data => {
1212
return request({
13-
url: 'api/string/add',
13+
url: 'grmapix/string/add',
1414
method: 'post',
1515
data
1616
});

web/src/api/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import request from '@/utils/request';
22

33
export const login = data => {
44
return request({
5-
url: 'api/user/login',
5+
url: 'grmapix/user/login',
66
method: 'post',
77
data
88
});

web/src/api/zset.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import request from '@/utils/request';
22

33
export const showZset = data => {
44
return request({
5-
url: 'api/zset/show',
5+
url: 'grmapix/zset/show',
66
method: 'post',
77
data
88
});
99
};
1010

1111
export const delZset = data => {
1212
return request({
13-
url: 'api/zset/del',
13+
url: 'grmapix/zset/del',
1414
method: 'post',
1515
data
1616
});
1717
};
1818

1919
export const addZset = data => {
2020
return request({
21-
url: 'api/zset/add',
21+
url: 'grmapix/zset/add',
2222
method: 'post',
2323
data
2424
});

0 commit comments

Comments
 (0)