theme

package
v1.13.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName string

Functions

func ApiGetPageTheme

func ApiGetPageTheme(ctx iris.Context)

ApiGetPageTheme 开放接口:获取页面主题配置。

func FormatPageTheme

func FormatPageTheme(configs []themeConfig) (mapConfigs map[string]interface{})

FormatPageTheme 格式化->map

func GetPageTheme

func GetPageTheme(page string) (configs []themeConfig)

GetPageTheme 开放方法:获取页面主题配置。从缓存中获取

func GetPageThemeSkipCache

func GetPageThemeSkipCache(page string) (configs []themeConfig)

GetPageThemeSkipCache 开放方法:获取页面主题配置。跳过缓存

func GetWebViewData

func GetWebViewData() (data map[string]interface{}, err error)

func GetWebViewDataSkipCache

func GetWebViewDataSkipCache() (data map[string]interface{}, err error)

func Router

func Router(p iris.Party)

Router Theme提供的默认接口

func WithWebViewFilter

func WithWebViewFilter(ctx iris.Context)

WithWebViewFilter webViewFilter

Types

type AppThemeConfig

type AppThemeConfig struct {
	Id                int       `orm:"pk;auto;column(id)"`
	AppName           string    `orm:"column(app_name);"`                           //应用名称
	ConfigPage        string    `orm:"column(config_page);"`                        //配置所属页
	ConfigName        string    `orm:"column(config_name);"`                        //配置字段名称
	ConfigContent     string    `orm:"column(config_content);default()"`            //配置字段内容
	ConfigContentType string    `orm:"column(config_content_Type);default(string)"` //配置字段内容类型
	CreateTime        time.Time `orm:"auto_now_add;type(datetime);column(ctime)"`
}

func (*AppThemeConfig) TableUnique

func (atc *AppThemeConfig) TableUnique() [][]string

TableUnique 联合唯一约束

type AppWebView

type AppWebView struct {
	Id         int       `orm:"pk;auto;column(id)"`
	AppName    string    `orm:"column(app_name);unique"` //应用名称
	ViewData   string    `orm:"column(view_data);null"`  //layout通用配置,json格式
	CreateTime time.Time `orm:"auto_now_add;type(datetime);column(ctime)"`
}

type ConfigContentType

type ConfigContentType string
const (
	BooleanConfigContentType ConfigContentType = "boolean"
	NumberConfigContentType  ConfigContentType = "int"
	StringConfigContentType  ConfigContentType = "string"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL