Skip to content

Commit c342e63

Browse files
committed
修复一些问题
1 parent 4fa43c2 commit c342e63

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

server/api/v1/sys_auto_code.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ func CreateTemp(c *gin.Context) {
8484
}
8585
err := service.CreateTemp(a)
8686
if err != nil {
87-
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
88-
os.Remove("./ginvueadmin.zip")
87+
c.Writer.Header().Add("success", "false")
88+
c.Writer.Header().Add("msg", url.QueryEscape(err.Error()))
89+
_ = os.Remove("./ginvueadmin.zip")
8990
} else {
9091
c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; filename=%s", "ginvueadmin.zip")) // fmt.Sprintf("attachment; filename=%s", filename)对下载的文件重命名
9192
c.Writer.Header().Add("Content-Type", "application/json")
9293
c.Writer.Header().Add("success", "true")
9394
c.File("./ginvueadmin.zip")
94-
os.Remove("./ginvueadmin.zip")
95+
_ = os.Remove("./ginvueadmin.zip")
9596
}
9697
}
9798

web/src/api/autoCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const getTable = (params) => {
5858
// @accept application/json
5959
// @Produce application/json
6060
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
61-
// @Router /autoCode/getColume [get]
61+
// @Router /autoCode/getColumn [get]
6262
export const getColumn = (params) => {
6363
return service({
6464
url: "/autoCode/getColumn",

web/src/view/systemTools/autoCode/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ export default {
349349
}
350350
},
351351
async setFdMap() {
352-
const fdTpyes = ["string", "int", "bool", "float64", "time.Time"];
353-
fdTpyes.map(async fdtype => {
352+
const fdTypes= ["string", "int", "bool", "float64", "time.Time"];
353+
fdTypes.map(async fdtype => {
354354
const res = await getDict(fdtype);
355355
res.map(item => {
356356
this.fdMap[item.label] = fdtype;

web/vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
// 把key的路径代理到target位置
2424
// detail: https://cli.vuejs.org/config/#devserver-proxy
2525
[process.env.VUE_APP_BASE_API]: { //需要代理的路径 例如 '/api'
26-
target: `http://139.9.113.229:8888/`, //代理到 目标路径
26+
target: `http://127.0.0.1:8888/`, //代理到 目标路径
2727
changeOrigin: true,
2828
pathRewrite: { // 修改路径数据
2929
['^' + process.env.VUE_APP_BASE_API]: '' // 举例 '^/api:""' 把路径中的/api字符串删除

0 commit comments

Comments
 (0)