forked from x/icebergs
opt meet.miss
This commit is contained in:
parent
9f92209b89
commit
2bc64f5784
@ -15,7 +15,7 @@ const (
|
|||||||
DATE = "date"
|
DATE = "date"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _miss_select = "time,name,性别,年龄,身高,籍贯,户口,学历,职业,公司,年薪,资产,家境,照片"
|
var _miss_select = "time,name,照片,性别,年龄,身高,籍贯,户口,学历,职业,公司,年薪,资产,家境"
|
||||||
var _miss_insert = kit.List(
|
var _miss_insert = kit.List(
|
||||||
"_input", "text", "name", "name",
|
"_input", "text", "name", "name",
|
||||||
"_input", "text", "name", "性别",
|
"_input", "text", "name", "性别",
|
||||||
@ -93,7 +93,7 @@ func init() {
|
|||||||
m.Push("照片", "")
|
m.Push("照片", "")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
m.Push("照片", m.Cmdx(mdb.RENDER, web.RENDER.IMG, path.Join("/share/local", value["照片"])))
|
m.Push("照片", m.Cmdx(mdb.RENDER, web.RENDER.IMG, path.Join("/share/local/usr/image/local/", m.Option(ice.MSG_DOMAIN), value["照片"])))
|
||||||
} else {
|
} else {
|
||||||
m.Push(k, value[k])
|
m.Push(k, value[k])
|
||||||
}
|
}
|
||||||
@ -102,11 +102,12 @@ func init() {
|
|||||||
if m.Option(ice.MSG_USERUA) == "" {
|
if m.Option(ice.MSG_USERUA) == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.PushAction("喜欢", "删除")
|
m.PushAction("喜欢", "约会")
|
||||||
|
m.Sort("time", "time_r")
|
||||||
} else {
|
} else {
|
||||||
msg.Table(func(index int, value map[string]string, head []string) {
|
msg.Table(func(index int, value map[string]string, head []string) {
|
||||||
if value["key"] == "照片" {
|
if value["key"] == "照片" {
|
||||||
value["value"] = m.Cmdx(mdb.RENDER, web.RENDER.IMG, path.Join("/share/local", value["value"]), "400")
|
value["value"] = m.Cmdx(mdb.RENDER, web.RENDER.IMG, path.Join("/share/local/usr/image/local/", m.Option(ice.MSG_DOMAIN), value["value"]), "640")
|
||||||
}
|
}
|
||||||
m.Push("key", value["key"])
|
m.Push("key", value["key"])
|
||||||
m.Push("value", value["value"])
|
m.Push("value", value["value"])
|
||||||
|
@ -20,7 +20,7 @@ func init() {
|
|||||||
)},
|
)},
|
||||||
},
|
},
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
FEEL: {Name: "feel path=auto auto 上传:button 上一页:button 下一页:button 参数:button", Help: "影音媒体", Meta: kit.Dict(
|
FEEL: {Name: "feel path=auto auto 上传:button 上一页:button 下一页:button 下载:button 参数:button", Help: "影音媒体", Meta: kit.Dict(
|
||||||
"display", "/plugin/local/wiki/feel.js", "detail", []string{"标签", "删除"},
|
"display", "/plugin/local/wiki/feel.js", "detail", []string{"标签", "删除"},
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
mdb.CREATE: {Name: "create", Help: "创建", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create", Help: "创建", Hand: func(m *ice.Message, arg ...string) {
|
||||||
@ -34,6 +34,9 @@ func init() {
|
|||||||
m.Assert(os.Remove(path.Join(m.Conf(FEEL, "meta.path"), m.Option("path"))))
|
m.Assert(os.Remove(path.Join(m.Conf(FEEL, "meta.path"), m.Option("path"))))
|
||||||
}},
|
}},
|
||||||
web.UPLOAD: {Name: "upload", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
web.UPLOAD: {Name: "upload", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
if m.Option(ice.MSG_DOMAIN) != "" {
|
||||||
|
m.Option("path", path.Join("local", m.Option(ice.MSG_DOMAIN), m.Option("path")))
|
||||||
|
}
|
||||||
_wiki_upload(m, FEEL)
|
_wiki_upload(m, FEEL)
|
||||||
}},
|
}},
|
||||||
web.SPIDE: {Name: "spide type title url poster", Help: "爬虫", Hand: func(m *ice.Message, arg ...string) {
|
web.SPIDE: {Name: "spide type title url poster", Help: "爬虫", Hand: func(m *ice.Message, arg ...string) {
|
||||||
@ -45,9 +48,10 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
m.Option("prefix", m.Conf(FEEL, "meta.path"))
|
m.Option("prefix", m.Conf(FEEL, "meta.path"))
|
||||||
if !_wiki_list(m, FEEL, kit.Select("./", arg, 0)) {
|
if m.Option(ice.MSG_DOMAIN) == "" {
|
||||||
m.Echo(path.Join(m.Conf(FEEL, "meta.path"), arg[0]))
|
_wiki_list(m, FEEL, path.Join(kit.Select("", arg, 0))+"/")
|
||||||
return
|
} else {
|
||||||
|
_wiki_list(m, FEEL, path.Join("local", m.Option(ice.MSG_DOMAIN), kit.Select("", arg, 0))+"/")
|
||||||
}
|
}
|
||||||
m.Sort("time", "time_r")
|
m.Sort("time", "time_r")
|
||||||
}},
|
}},
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func _wiki_list(m *ice.Message, cmd, name string, arg ...string) bool {
|
func _wiki_list(m *ice.Message, cmd, name string, arg ...string) bool {
|
||||||
|
m.Debug(name)
|
||||||
if strings.HasSuffix(name, "/") {
|
if strings.HasSuffix(name, "/") {
|
||||||
m.Option(nfs.DIR_ROOT, m.Conf(cmd, "meta.path"))
|
m.Option(nfs.DIR_ROOT, m.Conf(cmd, "meta.path"))
|
||||||
m.Option(nfs.DIR_TYPE, nfs.TYPE_DIR)
|
m.Option(nfs.DIR_TYPE, nfs.TYPE_DIR)
|
||||||
|
10
meta.go
10
meta.go
@ -187,19 +187,19 @@ func (m *Message) Sort(key string, arg ...string) *Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 排序因子
|
// 排序因子
|
||||||
number := map[int]int{}
|
number := map[int]int64{}
|
||||||
table := []map[string]string{}
|
table := []map[string]string{}
|
||||||
m.Table(func(index int, line map[string]string, head []string) {
|
m.Table(func(index int, line map[string]string, head []string) {
|
||||||
table = append(table, line)
|
table = append(table, line)
|
||||||
switch cmp {
|
switch cmp {
|
||||||
case "int":
|
case "int":
|
||||||
number[index] = kit.Int(line[key])
|
number[index] = kit.Int64(line[key])
|
||||||
case "int_r":
|
case "int_r":
|
||||||
number[index] = -kit.Int(line[key])
|
number[index] = -kit.Int64(line[key])
|
||||||
case "time":
|
case "time":
|
||||||
number[index] = int(kit.Time(line[key]))
|
number[index] = int64(kit.Time(line[key]))
|
||||||
case "time_r":
|
case "time_r":
|
||||||
number[index] = -int(kit.Time(line[key]))
|
number[index] = -int64(kit.Time(line[key]))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user