This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-09-14 00:36:25 +08:00
parent 0d4b0617f6
commit f1685f82db
8 changed files with 17 additions and 28 deletions

View File

@ -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{}) }

View File

@ -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]},

View File

@ -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{}) }

View File

@ -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]},

View File

@ -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{}) }

View File

@ -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]},

View File

@ -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{}) }

View File

@ -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]},