Пример #1
0
func (c *RequireController) Delete() {
	name := c.GetString("name")
	_, err := require.NewRequireList().Delete(name)
	if err != nil {
		c.SetJsonResponse("error", err.Error())
	}

	c.GetJsonResponse().ServeJson()
}
Пример #2
0
func (c *RequireController) Edit() {
	name := c.GetString("name")
	newName := c.GetString("newName")
	err := require.NewRequireList().Edit(name, newName)
	if err != nil {
		c.SetJsonResponse("error", err.Error())
	}

	c.GetJsonResponse().ServeJson()
}
Пример #3
0
func (c *RequireController) Create() {
	ret := make(map[string]interface{})

	name := c.GetString("name")
	_, err := require.NewRequireList().Add(name)
	if err != nil {
		ret["error"] = err.Error()
	}

	c.Data["json"] = ret
	c.ServeJson()
}
Пример #4
0
func CreateRequires() {
	requireObj := require.NewRequireList()
	var requires = []string{"网页制作", "二级页面制作", "报名页面制作", "页面修改", "Banner制作", "Logo更新", "Logo排序", "Logo上新", "报名通道关闭", "报名通道开通", "报名通道制作", "后台资料查询", "后台资料导出",
		"后台资料修改", "链接更新", "链接提供", "链接添加", "逻辑设置更新", "逻辑设置删除", "逻辑设置制作", "模板更新",
		"模板制作", "视频更新", "视频上新", "视频删除", "图片更新", "图片删除", "图片上新", "图文更新",
		"图文删除", "图文上新", "图文视频更新", "图文视频上新", "图文视频删除", "网站制作", "文字更新", "文字删除",
		"文字上新", "页面更新", "页面上新", "页面制作", "邮件发送", "域名申请", "批量退款", "短信发送"}

	for _, v := range requires {
		requireObj.Add(v)
	}
}
Пример #5
0
func (c *JobController) getRequires() []string {
	return require.NewRequireList().GetRequireNames()
}
Пример #6
0
func (c *RequireController) List() {
	c.Data["requires"] = require.NewRequireList().GetRequireNames()
	c.Data["require"] = c.GetString("require")
	c.TplNames = "require/list.tpl"
}