上传页面调试工具集成到web服务下

This commit is contained in:
liwei1dao 2022-08-26 15:42:59 +08:00
parent 88423a2301
commit 6c04e4ad8c
22 changed files with 106 additions and 5 deletions

1
bin/dist/css/337.cabf670a.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
bin/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
bin/dist/index.html vendored Normal file
View File

@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>vue_dreamfactory</title><script defer="defer" src="/js/chunk-vendors.1f7b1e49.js"></script><script defer="defer" src="/js/app.4cca1493.js"></script><link href="/css/chunk-vendors.eea01d21.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue_dreamfactory doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

42
bin/dist/js/337.f88064b7.js vendored Normal file

File diff suppressed because one or more lines are too long

1
bin/dist/js/337.f88064b7.js.map vendored Normal file

File diff suppressed because one or more lines are too long

2
bin/dist/js/431.8f99464c.js vendored Normal file
View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkvue_dreamfactory"]=self["webpackChunkvue_dreamfactory"]||[]).push([[431],{9431:function(e,n,r){r.r(n),r.d(n,{default:function(){return s}});var a=r(3396),t=r(3369);function u(e,n,r,u,c,f){return(0,a.wg)(),(0,a.j4)(t.K)}var c=(0,a.aZ)({name:"IndexView",components:{}}),f=r(89);const o=(0,f.Z)(c,[["render",u]]);var s=o}}]);
//# sourceMappingURL=431.8f99464c.js.map

1
bin/dist/js/431.8f99464c.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"js/431.8f99464c.js","mappings":"8OACEA,EAAAA,EAAAA,IACcC,EAAAA,GAMhB,OAAeC,EAAAA,EAAAA,IAAgB,CAC7BC,KAAM,YACNC,WAAY,K,QCLd,MAAMC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,KAEpE","sources":["webpack://vue_dreamfactory/./src/views/Index.vue","webpack://vue_dreamfactory/./src/views/Index.vue?bd4c"],"sourcesContent":["<template>\n <v-container>\n </v-container>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n name: 'IndexView',\n components: {},\n})\n</script>\n","import { render } from \"./Index.vue?vue&type=template&id=a5cd2b80\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"F:\\\\work\\\\go\\\\vue_dreamfactory\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_createBlock","_component_v_container","defineComponent","name","components","__exports__","render"],"sourceRoot":""}

2
bin/dist/js/app.4cca1493.js vendored Normal file

File diff suppressed because one or more lines are too long

1
bin/dist/js/app.4cca1493.js.map vendored Normal file

File diff suppressed because one or more lines are too long

20
bin/dist/js/chunk-vendors.1f7b1e49.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
bin/dist/js/webfontloader.f43b01ad.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,7 @@ import (
type ISys interface {
engine.IRoutes
LoadHTMLGlob(pattern string)
Close() (err error)
}
@ -35,7 +36,9 @@ func NewSys(opt ...Option) (sys ISys, err error) {
sys, err = newSys(option)
return
}
func LoadHTMLGlob(pattern string) {
defsys.LoadHTMLGlob(pattern)
}
func Close() (err error) {
return defsys.Close()
}

View File

@ -100,6 +100,10 @@ func (this *Gin) RunListener(listener net.Listener) (err error) {
return
}
func (this *Gin) LoadHTMLGlob(pattern string) {
this.engine.LoadHTMLGlob(pattern)
}
func (this *Gin) Close() (err error) {
if err = this.server.Shutdown(context.Background()); err != nil {
this.options.Log.Errorln(err)

View File

@ -1,6 +1,7 @@
package web
import (
"fmt"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/gin"
@ -24,8 +25,18 @@ func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core
err = this.ModuleCompBase.Init(service, module, comp, options)
this.options = options.(*Options)
this.module = module.(*Web)
this.gin, err = gin.NewSys(gin.SetListenPort(this.options.Port))
this.suitableMethods() //发射注册api
if this.gin, err = gin.NewSys(gin.SetListenPort(this.options.Port)); err != nil {
return
}
this.gin.LoadHTMLGlob(fmt.Sprintf("%s/*.html", this.options.WebDir)) // 添加入口index.html
this.gin.Static("/js", fmt.Sprintf("%s/js", this.options.WebDir)) // 添加资源路径
this.gin.Static("/css", fmt.Sprintf("%s/css", this.options.WebDir)) // 添加资源路径
this.gin.Static("/img", fmt.Sprintf("%s/img", this.options.WebDir)) // 添加资源路径
this.gin.Static("/fonts", fmt.Sprintf("%s/fonts", this.options.WebDir)) // 添加资源路径
this.gin.Static("/media", fmt.Sprintf("%s/media", this.options.WebDir)) // 添加资源路径
this.gin.StaticFile("/favicon.ico", fmt.Sprintf("%s/favicon.ico", this.options.WebDir)) // 添加资源路径
this.gin.StaticFile("/", fmt.Sprintf("%s/index.html", this.options.WebDir)) // 前端接口
this.suitableMethods() //发射注册api
return
}

View File

@ -8,8 +8,9 @@ import (
type (
Options struct {
modules.Options
Port int
Key string
WebDir string
Port int
Key string
}
)