HomeControllers

package
v0.0.0-...-01033d1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	beego.Controller
	TplTheme  string //模板主题
	TplStatic string //模板静态文件
	IsLogin   int    //用户是否已登录
	Sys       models.Sys
	Out       Output
}

func (*BaseController) CheckLogin

func (this *BaseController) CheckLogin() int

是否已经登录,如果已登录,则返回用户的id

func (*BaseController) DocExist

func (this *BaseController) DocExist()

校验文档是否已经存在

func (*BaseController) Pages

func (this *BaseController) Pages()

单页

func (*BaseController) Prepare

func (this *BaseController) Prepare()

初始化函数

func (*BaseController) ResetCookie

func (this *BaseController) ResetCookie()

重置cookie

func (*BaseController) ResponseJson

func (this *BaseController) ResponseJson(isSuccess bool, msg string, data ...interface{})

响应json

func (*BaseController) SetCookieLogin

func (this *BaseController) SetCookieLogin(uid interface{})

设置用户登录的cookie,其实uid是时间戳的加密,而token才是真正的uid @param uid interface{} 用户UID

func (*BaseController) Xsrf

func (this *BaseController) Xsrf()

防止跨站攻击,在有表单的控制器放大中调用,不要直接在base控制器中调用,因为用户每访问一个页面都重新刷新cookie了

type CollectController

type CollectController struct {
	BaseController
}

func (*CollectController) CollectCancel

func (this *CollectController) CollectCancel()

取消收藏文档

func (*CollectController) FolderList

func (this *CollectController) FolderList()

收藏夹列表

func (*CollectController) Get

func (this *CollectController) Get()

收藏文档

type ErrorsController

type ErrorsController struct {
	beego.Controller
}

func (*ErrorsController) Error404

func (this *ErrorsController) Error404()

404

func (*ErrorsController) Error501

func (this *ErrorsController) Error501()

501

func (*ErrorsController) ErrorDb

func (this *ErrorsController) ErrorDb()

数据库错误

type IndexController

type IndexController struct {
	BaseController
}

func (*IndexController) Get

func (this *IndexController) Get()

type InstallController

type InstallController struct {
	beego.Controller
}

func (*InstallController) Install

func (this *InstallController) Install()

安装程序

type ListController

type ListController struct {
	BaseController
}

func (*ListController) Get

func (this *ListController) Get()

type Output

type Output struct {
	// contains filtered or unexported fields
}

type ReportController

type ReportController struct {
	BaseController
}

func (*ReportController) Get

func (this *ReportController) Get()

举报

type SearchController

type SearchController struct {
	BaseController
}

func (*SearchController) Get

func (this *SearchController) Get()

type StaticController

type StaticController struct {
	beego.Controller
}

func (*StaticController) Static

func (this *StaticController) Static()

将除了static之外的静态资源导向到虚拟根目录

type UploadController

type UploadController struct {
	BaseController
}

func (*UploadController) Get

func (this *UploadController) Get()

文档上传页面

func (*UploadController) Post

func (this *UploadController) Post()

文档执行操作 处理流程: 1、检测用户是否已登录,未登录不允许上传 2、检测是否存在了该文档的md5,如果已存在,则根据md5查询存储在文档存档表中的数据;如果文档已经在文档存储表中存在,则该文档不需要再获取封面、大小、页码等数据 3、检测文档格式是否符合要求。 4、计算文档md5,然后根据md5再比对一次文档是否在存档表中存在 5、文档未存在,则将文档数据录入文档存储表(document_store) 6、执行文档转pdf,并获取文档页数、封面、摘要等 7、获取文档大小

func (*UploadController) SegWord

func (this *UploadController) SegWord()

分词

type UserController

type UserController struct {
	BaseController
}

func (*UserController) Avatar

func (this *UserController) Avatar()

更换头像

func (*UserController) CheckLogin

func (this *UserController) CheckLogin()

检测用户是否已登录

func (*UserController) Coin

func (this *UserController) Coin()

金币记录

func (*UserController) Collect

func (this *UserController) Collect()

收藏夹

func (*UserController) CollectCancel

func (this *UserController) CollectCancel()

取消收藏(针对文档)

func (*UserController) CollectFolderDel

func (this *UserController) CollectFolderDel()

删除收藏(针对收藏夹)

func (*UserController) CreateCollectFolder

func (this *UserController) CreateCollectFolder()

创建收藏夹

func (*UserController) DocDel

func (this *UserController) DocDel()

删除文档

func (*UserController) DocEdit

func (this *UserController) DocEdit()

文档编辑

func (*UserController) Edit

func (this *UserController) Edit()

编辑个人信息

func (*UserController) FindPwd

func (this *UserController) FindPwd()

找回密码

func (*UserController) Get

func (this *UserController) Get()

会员中心

func (*UserController) Login

func (this *UserController) Login()

用户登录

func (*UserController) Logout

func (this *UserController) Logout()

用户退出登录

func (*UserController) Prepare

func (this *UserController) Prepare()

func (*UserController) Reg

func (this *UserController) Reg()

会员注册[GET/POST]

func (*UserController) SendMail

func (this *UserController) SendMail()

发送邮件

func (*UserController) Sign

func (this *UserController) Sign()

会员签到,增加金币

type ViewController

type ViewController struct {
	BaseController
}

func (*ViewController) Comment

func (this *ViewController) Comment()

文档评论

func (*ViewController) DownFree

func (this *ViewController) DownFree()

是否可以免费下载

func (*ViewController) Download

func (this *ViewController) Download()

文档下载

func (*ViewController) Get

func (this *ViewController) Get()

func (*ViewController) GetComment

func (this *ViewController) GetComment()

获取评论列表

Jump to

Keyboard shortcuts

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