mirror of
https://shylinux.com/x/education
synced 2025-04-25 01:58:05 +08:00
add some
This commit is contained in:
parent
0d4b0617f6
commit
f1685f82db
@ -1,11 +1,6 @@
|
||||
package jiaocaiziliao
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/education/src/jiaocaiziliao/model"
|
||||
)
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type document struct {
|
||||
Table
|
||||
@ -14,15 +9,9 @@ type document struct {
|
||||
remove string `name:"remove" role:"teacher"`
|
||||
}
|
||||
|
||||
func (s document) Create(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueCreate(m, kit.TransArgKeys(arg, model.DOCUMENT_TYPE, model.TYPE)...)
|
||||
}
|
||||
func (s document) Remove(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueRemove(m, arg...)
|
||||
}
|
||||
func (s document) List(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueList(m, arg).Display("")
|
||||
}
|
||||
func (s document) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s document) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s document) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd(document{}) }
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at)]},
|
||||
{view: html.STATUS, list: [value.school, value.grade, value.subject]},
|
||||
|
@ -9,8 +9,8 @@ type homework struct {
|
||||
remove string `name:"remove" role:"leader"`
|
||||
}
|
||||
|
||||
func (s homework) Create(m *ice.Message, arg ...string) { s.Table.ValueCreate(m, arg...) }
|
||||
func (s homework) Remove(m *ice.Message, arg ...string) { s.Table.ValueRemove(m, arg...) }
|
||||
func (s homework) List(m *ice.Message, arg ...string) { s.Table.ValueList(m, arg).Display("") }
|
||||
func (s homework) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s homework) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s homework) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd(homework{}) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
@ -9,8 +9,8 @@ type question struct {
|
||||
remove string `name:"remove" role:"teacher"`
|
||||
}
|
||||
|
||||
func (s question) Create(m *ice.Message, arg ...string) { s.Table.ValueCreate(m, arg...) }
|
||||
func (s question) Remove(m *ice.Message, arg ...string) { s.Table.ValueRemove(m, arg...) }
|
||||
func (s question) List(m *ice.Message, arg ...string) { s.Table.ValueList(m, arg).Display("") }
|
||||
func (s question) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s question) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s question) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd(question{}) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
@ -9,8 +9,8 @@ type lesson struct {
|
||||
remove string `name:"remove" role:"teacher"`
|
||||
}
|
||||
|
||||
func (s lesson) Create(m *ice.Message, arg ...string) { s.Table.ValueCreate(m, arg...) }
|
||||
func (s lesson) Remove(m *ice.Message, arg ...string) { s.Table.ValueRemove(m, arg...) }
|
||||
func (s lesson) List(m *ice.Message, arg ...string) { s.Table.ValueList(m, arg).Display("") }
|
||||
func (s lesson) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s lesson) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s lesson) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd(lesson{}) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user