diff --git a/src/guanlixitong/conference.go b/src/guanlixitong/conference.go deleted file mode 100644 index c745143..0000000 --- a/src/guanlixitong/conference.go +++ /dev/null @@ -1,67 +0,0 @@ -package guanlixitong - -import ( - "math/rand" - "strconv" - "strings" - "time" - - wemeet "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi" - wemeetcore "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi/core" - meetings "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi/service/meetings" - "shylinux.com/x/ice" - kit "shylinux.com/x/toolkits" -) - -type conference struct { - Table - fields string `data:"title,content,user_uid"` - create string `name:"create title* content*" role:"leader"` - remove string `name:"remove" role:"leader"` - join string `name:"join" help:"入会" style:"notice" role:"void"` -} - -func (s conference) List(m *ice.Message, arg ...string) { - s.V1MeetingsGet(m, "admin1731860473", "1") - m.PushAction(s.Join) - m.Display("") -} -func (s conference) Join(m *ice.Message, arg ...string) { m.ProcessOpen(m.Option("join_url")) } - -func init() { ice.TeamCtxCmd(conference{}) } - -func (s conference) V1MeetingsGet(m *ice.Message, arg ...string) { - client, authenticator := s.newClient(m) - response, err := client.MeetingsApi.V1MeetingsGet(m, &meetings.ApiV1MeetingsGetRequest{ - Userid: &arg[0], Instanceid: &arg[1], - }, wemeetcore.WithJWTAuth(authenticator)) - s.resTable(m, response.Data, err, "meeting_info_list", - "subject", "meeting_code", "start_time", "end_time", "join_url", - ) -} -func (s conference) resTable(m *ice.Message, data ice.Any, err error, key string, arg ...string) { - if err != nil { - m.Echo(kit.Formats(err)) - } else { - data := kit.UnMarshal(kit.Formats(data)) - kit.For(kit.Value(data, key), func(value ice.Map) { - kit.For(arg, func(key string) { - if strings.HasSuffix(key, "_time") { - t := time.Unix(kit.Int64(value[key]), 0) - m.Push(key, strings.TrimSuffix(t.Format(ice.MOD_TIME), ":00.000")) - } else { - m.Push(key, value[key]) - } - }) - }) - } -} -func (s conference) newClient(m *ice.Message, arg ...string) (*wemeet.Client, *wemeetcore.JWTAuthenticator) { - client := wemeet.NewClient(wemeet.WithAppId("234460469"), wemeet.WithSdkId("27510111425"), - wemeet.WithSecret("i4MYQuEzVtd0Jb5qbecDMXgSLD2AhQh0", "mYkEPBtGPYjcu0a5gvlK2HNGU0ZRDaG5AAssB29Dvp2A3FB6")) - rn := rand.New(rand.NewSource(time.Now().UnixNano())) - nonce := uint64(100000 + rn.Intn(900000)) - curTs := strconv.Itoa(int(time.Now().Unix())) - authenticator := &wemeetcore.JWTAuthenticator{Nonce: nonce, Timestamp: curTs} - return client, authenticator -} diff --git a/src/guanlixitong/conference.js b/src/guanlixitong/conference.js deleted file mode 100644 index 7708311..0000000 --- a/src/guanlixitong/conference.js +++ /dev/null @@ -1,8 +0,0 @@ -Volcanos(chat.ONIMPORT, { - _init: function(can, msg) { - can.onimport.myView(can, msg, function(value) { return [ - {view: html.TITLE, list: [value.subject, can.onimport.titleAction(can, value)]}, - {view: html.STATUS, list: [value.start_time, "~", value.end_time.split(" ")[1]]}, - ] }) - }, -}) \ No newline at end of file diff --git a/src/guanlixitong/conference.shy b/src/guanlixitong/conference.shy deleted file mode 100644 index 5a0e10f..0000000 --- a/src/guanlixitong/conference.shy +++ /dev/null @@ -1,7 +0,0 @@ -chapter "腾讯会议" -refer ` -后台 https://meeting.tencent.com/user-center/work-bench -应用 https://meeting.tencent.com/marketplace/corp-created -文档 https://cloud.tencent.com/document/product/1095/83658 -调试 https://meeting.tencent.com/marketplace/restApiTool.html?type=jwt&interface_id=dTRvM3FoUXJWaDlGZndGWTJpR3J0RkNy&replica_id=NE9GdEsx -` \ No newline at end of file diff --git a/src/guanlixitong/document.go b/src/guanlixitong/document.go deleted file mode 100644 index 535a3e5..0000000 --- a/src/guanlixitong/document.go +++ /dev/null @@ -1,14 +0,0 @@ -package guanlixitong - -import "shylinux.com/x/ice" - -type document struct { - Table - fields string `data:"title,content,user_uid"` - create string `name:"create title* content*" role:"leader"` - remove string `name:"remove" role:"leader"` -} - -func (s document) List(m *ice.Message, arg ...string) { s.ValueList(m, arg) } - -func init() { ice.TeamCtxCmd(document{}) } diff --git a/src/guanlixitong/model/model.go b/src/guanlixitong/model/model.go index cf0e064..1db9177 100644 --- a/src/guanlixitong/model/model.go +++ b/src/guanlixitong/model/model.go @@ -93,19 +93,10 @@ type Equipment struct { db.ModelContent GroupUID string `gorm:"type:char(32);index"` } -type Conference struct { - db.ModelContent - GroupUID string `gorm:"type:char(32);index"` -} -type Document struct { - db.ModelContent - GroupUID string `gorm:"type:char(32);index"` -} func init() { db.CmdModels("", &UserGroup{}, &Group{}, &Company{}, &Target{}, &Recruitment{}, &Resume{}, &Interview{}, &Employee{}, &Inventory{}, &Procurement{}, &Equipment{}, - &Conference{}, &Document{}, ) } diff --git a/src/guanlixitong/portal.json b/src/guanlixitong/portal.json index 9cf8297..028b67d 100644 --- a/src/guanlixitong/portal.json +++ b/src/guanlixitong/portal.json @@ -2,7 +2,6 @@ "portal": "团队管理", "member": "团队成员", "target": "目标计划", "recruitment": "招聘需求", "resume": "应聘简历", "interview": "招聘面试", "employee": "员工信息", "inventory": "库存物资", "procurement": "采购清单", "equipment": "办公用品", - "conference": "在线会议", "document": "在线文档", "resumeInsert": "投简历", "interviewInsert": "约面试", "icons": { "recruitment": "https://img.icons8.com/officel/80/set-as-resume.png", @@ -14,8 +13,6 @@ "procurement": "https://img.icons8.com/officel/80/purchase-order.png", "equipment": "https://img.icons8.com/officel/80/office.png", - "conference": "https://img.icons8.com/officel/80/video-conference.png", - "document": "https://img.icons8.com/officel/80/upload-link-document.png", "target": "https://img.icons8.com/officel/80/goal--v1.png" }, "style": {