Skip to content

Commit 1cf61a6

Browse files
committed
修改动态迁移的一个小bug
1 parent 2516745 commit 1cf61a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

server/config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ autoCode:
7575

7676
web: '/web/src'
7777
web-api: '/api'
78-
web-form: '/view/file1'
79-
web-table: '/view/file1'
80-
web-flow: '/view/file1'
78+
web-form: '/view'
79+
web-table: '/view'
80+
web-flow: '/view'
8181

8282
# local configuration
8383
local:

server/service/sys_auto_code.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ func addAutoMoveFile(data *tplData) {
239239
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WApi, base)
240240
} else if strings.Contains(fileSlice[n-2], "workflowForm") {
241241
data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root,
242-
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WFlow, strings.TrimSuffix(base, filepath.Ext(base))+"WorkflowForm.vue")
242+
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WFlow, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), strings.TrimSuffix(base, filepath.Ext(base))+"WorkflowForm.vue")
243243
} else if strings.Contains(fileSlice[n-2], "form") {
244244
data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root,
245-
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WForm, strings.TrimSuffix(base, filepath.Ext(base))+"Form.vue")
245+
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WForm, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), strings.TrimSuffix(base, filepath.Ext(base))+"Form.vue")
246246
} else if strings.Contains(fileSlice[n-2], "table") {
247247
data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root,
248-
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WTable, base)
248+
global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WTable, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), base)
249249
}
250250
}
251251
}

0 commit comments

Comments
 (0)