mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 17:18:06 +08:00
add some
This commit is contained in:
parent
7f1a5d7e78
commit
9ec0e72f2e
@ -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
|
|
||||||
}
|
|
@ -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]]},
|
|
||||||
] })
|
|
||||||
},
|
|
||||||
})
|
|
@ -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
|
|
||||||
`
|
|
@ -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{}) }
|
|
@ -93,19 +93,10 @@ type Equipment struct {
|
|||||||
db.ModelContent
|
db.ModelContent
|
||||||
GroupUID string `gorm:"type:char(32);index"`
|
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() {
|
func init() {
|
||||||
db.CmdModels("", &UserGroup{}, &Group{}, &Company{}, &Target{},
|
db.CmdModels("", &UserGroup{}, &Group{}, &Company{}, &Target{},
|
||||||
&Recruitment{}, &Resume{}, &Interview{}, &Employee{},
|
&Recruitment{}, &Resume{}, &Interview{}, &Employee{},
|
||||||
&Inventory{}, &Procurement{}, &Equipment{},
|
&Inventory{}, &Procurement{}, &Equipment{},
|
||||||
&Conference{}, &Document{},
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
"portal": "团队管理", "member": "团队成员", "target": "目标计划",
|
"portal": "团队管理", "member": "团队成员", "target": "目标计划",
|
||||||
"recruitment": "招聘需求", "resume": "应聘简历", "interview": "招聘面试", "employee": "员工信息",
|
"recruitment": "招聘需求", "resume": "应聘简历", "interview": "招聘面试", "employee": "员工信息",
|
||||||
"inventory": "库存物资", "procurement": "采购清单", "equipment": "办公用品",
|
"inventory": "库存物资", "procurement": "采购清单", "equipment": "办公用品",
|
||||||
"conference": "在线会议", "document": "在线文档",
|
|
||||||
"resumeInsert": "投简历", "interviewInsert": "约面试",
|
"resumeInsert": "投简历", "interviewInsert": "约面试",
|
||||||
"icons": {
|
"icons": {
|
||||||
"recruitment": "https://img.icons8.com/officel/80/set-as-resume.png",
|
"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",
|
"procurement": "https://img.icons8.com/officel/80/purchase-order.png",
|
||||||
"equipment": "https://img.icons8.com/officel/80/office.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"
|
"target": "https://img.icons8.com/officel/80/goal--v1.png"
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user