1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-04 00:31:52 +08:00
parent f7e3dcd9ff
commit bb99205fdb

View File

@ -271,12 +271,10 @@ func (m *Message) Resource(file string, arg ...string) string {
} }
func (m *Message) resource(file string) string { func (m *Message) resource(file string) string {
p := kit.FileLines(-1) p := kit.FileLines(-1)
kit.If(file == "", func() { p = kit.ExtChange(p, JS) }, func() { if file == "" {
if kit.HasPrefix(file, PS, HTTP) { file = kit.ExtChange(p, JS)
p = file } else if !kit.HasPrefix(file, SRC, USR, PS, HTTP) {
} else { file = path.Join(path.Dir(p), file)
p = path.Join(path.Dir(p), file) }
} return m.FileURI(file)
})
return m.FileURI(p)
} }