This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-07 14:26:41 +08:00
parent 63a7d791c6
commit 4d4621fa80
14 changed files with 67 additions and 61 deletions

View File

@ -3,18 +3,18 @@ package model
import "shylinux.com/x/mysql-story/src/db" import "shylinux.com/x/mysql-story/src/db"
const ( const (
UID = "uid" UID = "uid"
NAME = "name" NAME = "name"
INFO = "info" INFO = "info"
TYPE = "type" TYPE = "type"
TITLE = "title" TITLE = "title"
CONTENT = "content" CONTENT = "content"
USER_UID = "user_uid" USER_UID = "user_uid"
USER_WEBSITE_ROLE = "user_website_role" USER_WEBSITE_ROLE = "user_website_role"
WEBSITE_UID = "website_uid" WEBSITE_UID = "website_uid"
WEBSITE_NAME = "website_name" WEBSITE_NAME = "website_name"
WEBSITE_TYPE = "website_type" WEBSITE_TYPE = "website_type"
PORTAL_UID = "portal_uid" PORTAL_UID = "portal_uid"
) )
type UserWebsite struct { type UserWebsite struct {
@ -30,5 +30,4 @@ type Portal struct {
WebsiteUID string `gorm:"type:char(32);index"` WebsiteUID string `gorm:"type:char(32);index"`
} }
func init() { db.CmdModels("", &UserWebsite{}, &Website{}, &Portal{}) } func init() { db.CmdModels("", &UserWebsite{}, &Website{}, &Portal{}) }

View File

@ -7,7 +7,7 @@ import (
type Portal struct { type Portal struct {
guanlixitong.Portal guanlixitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* website_name* website_type:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* website_name*" role:"void"`
} }
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userWebsite{}, website{})}) } func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userWebsite{}, website{})}) }

View File

@ -1,9 +0,0 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.onimport.myView(can, msg, function(value) { return [
{view: html.TITLE, list: [value.title||value.name]},
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
{view: html.OUTPUT, list: [value.content||value.info]},
] })
},
})

View File

@ -1,14 +1,13 @@
{ {
"portal": "官方网站", "portal": "官方网站",
"portal": "场景应用",
"icons": { "icons": {
"portal": "https://img.icons8.com/officel/80/activity-grid.png" "website": "https://img.icons8.com/officel/80/activity-grid.png"
}, },
"input": { "input": {
"My Website": "我的场景", "My Website": "我的网站",
"user_website_role": "成员角色", "user_website_role": "成员角色",
"website_name": "场景名称", "website_name": "网站名称",
"website_type": "场景类型" "website_type": "网站类型"
}, },
"value": { "value": {
"user_website_role": { "user_website_role": {

View File

@ -5,6 +5,7 @@ import (
kit "shylinux.com/x/toolkits" kit "shylinux.com/x/toolkits"
"strconv" "strconv"
"shylinux.com/x/community/src/api"
"shylinux.com/x/community/src/gonganxitong" "shylinux.com/x/community/src/gonganxitong"
"shylinux.com/x/enterprise/src/guanlixitong/model" "shylinux.com/x/enterprise/src/guanlixitong/model"
) )
@ -25,8 +26,9 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
case model.COMPANY_UID: case model.COMPANY_UID:
m.Cmdy(company{}, s.Select).Cut(model.UID, model.NAME).RenameAppend(model.UID, arg[0]) m.Cmdy(company{}, s.Select).Cut(model.UID, model.NAME).RenameAppend(model.UID, arg[0])
m.DisplayInputKeyNameIconTitle() m.DisplayInputKeyNameIconTitle()
case model.COMPANY_NAME, model.CITY_NAME: case model.COMPANY_NAME:
m.Cmdy(Portal{}, Portal{}.PlaceList, m.Option(model.USER_UID)).Cut(arg[0]) msg := m.Cmd(api.GONGANXITONG_CITY, s.Select, model.NAME, m.Option(model.CITY_NAME))
m.Cmdy(company{}, s.Select, "auth_uid IS NOT NULL AND auth_uid != '' AND city_uid = ?", msg.Append(model.UID)).CutTo(model.NAME, model.COMPANY_NAME)
case model.DEGREE: case model.DEGREE:
m.Push(arg[0], "博士") m.Push(arg[0], "博士")
m.Push(arg[0], "硕士") m.Push(arg[0], "硕士")

View File

@ -9,9 +9,7 @@ import (
type company struct { type company struct {
Table Table
modify string `name:"modify info" role:"tech"` list string `name:"list uid auto"`
list string `name:"list city_name company_name auto" role:"void"`
authCreate string `name:"authCreate" role:"tech"`
} }
func (s company) FindOrCreateByName(m *ice.Message, arg ...string) { func (s company) FindOrCreateByName(m *ice.Message, arg ...string) {
@ -22,28 +20,41 @@ func (s company) FindOrCreateByName(m *ice.Message, arg ...string) {
arg[2], arg[3] = model.COMPANY_UID, msg.Append(model.UID) arg[2], arg[3] = model.COMPANY_UID, msg.Append(model.UID)
} }
} }
func (s company) Modify(m *ice.Message, arg ...string) {
s.Update(m, m.OptionSimple(model.INFO), m.OptionSimple(model.UID)...)
}
func (s company) List(m *ice.Message, arg ...string) { func (s company) List(m *ice.Message, arg ...string) {
if m.Option(model.AUTH_UID) != "" {
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_AUTH, m.Option(model.AUTH_UID)).Cut(model.SERVICE_UID, model.PLACE_UID)
s.SelectJoinRecent(m, "")
s.SelectJoinService(m)
m.Display("").DisplayCSS("").Sort("service_name,place_name")
return
}
if len(arg) == 0 { if len(arg) == 0 {
s.CityList(m) s.Select(m)
} else if msg := s.CityList(m.Spawn(), arg[0]); len(arg) == 1 { s.SelectJoinAuth(m)
s.Select(m, model.CITY_UID, msg.Append(model.UID)).RenameAppend(model.NAME, model.COMPANY_NAME) m.Table(func(value ice.Maps) {
} else if len(arg) == 2 { switch value[model.AUTH_STATUS] {
s.SelectDetail(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1]) case "create":
m.PushButton(s.AuthInfo, s.AuthMember, s.AuthClean)
case "issued":
m.PushButton(s.AuthInfo, s.AuthMember)
default:
m.PushButton(s.AuthCreate, s.Delete)
}
}).Action()
m.Sort("auth_status", []string{"issued", "create"})
} else {
s.SelectDetail(m, model.UID, arg[0])
if m.Append(model.AUTH_UID) == "" && m.IsTech() {
m.EchoInfoButton("请申请公司认证", s.AuthCreate)
}
} }
} }
func (s company) AuthCreate(m *ice.Message, arg ...string) { func (s company) AuthCreate(m *ice.Message, arg ...string) {
msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID)) msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))
s.Table.AuthCreate(m, 4, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...) s.Table.AuthCreate(m, api.AuthCompany, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
}
func (s company) AuthInfo(m *ice.Message, arg ...string) {
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID)))
}
func (s company) AuthMember(m *ice.Message, arg ...string) {
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID), api.RENZHENGSHOUQUAN_MEMBER))
}
func (s company) AuthClean(m *ice.Message, arg ...string) {
s.Update(m, ice.Map{model.AUTH_UID: ""})
m.Cmd(api.RENZHENGSHOUQUAN_CLEAN, "prune", m.Option(model.AUTH_UID))
} }
func init() { ice.TeamCtxCmd(company{}) } func init() { ice.TeamCtxCmd(company{}) }

View File

@ -27,6 +27,7 @@ const (
RECRUITMENT_TYPE = "recruitment_type" RECRUITMENT_TYPE = "recruitment_type"
INTERVIEW_STATUS = "interview_status" INTERVIEW_STATUS = "interview_status"
START_TIME = "start_time" START_TIME = "start_time"
AUTH_STATUS = "auth_status"
STOP_TIME = "stop_time" STOP_TIME = "stop_time"
MOBILE = "mobile" MOBILE = "mobile"
DEGREE = "degree" DEGREE = "degree"

View File

@ -4,24 +4,20 @@ import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
_ "shylinux.com/x/enterprise/src/gongyinglian" _ "shylinux.com/x/enterprise/src/gongyinglian"
_ "shylinux.com/x/enterprise/src/guanfangwangzhan"
_ "shylinux.com/x/enterprise/src/guanlixitong" _ "shylinux.com/x/enterprise/src/guanlixitong"
_ "shylinux.com/x/enterprise/src/kehuguanli"
_ "shylinux.com/x/enterprise/src/peixunguanli" _ "shylinux.com/x/enterprise/src/peixunguanli"
_ "shylinux.com/x/enterprise/src/rongzijihua"
_ "shylinux.com/x/enterprise/src/shichangyingxiao" _ "shylinux.com/x/enterprise/src/shichangyingxiao"
_ "shylinux.com/x/enterprise/src/xiangmuguanli" _ "shylinux.com/x/enterprise/src/xiangmuguanli"
_ "shylinux.com/x/enterprise/src/yingxiaotuiguang" _ "shylinux.com/x/enterprise/src/yingxiaotuiguang"
_ "shylinux.com/x/enterprise/src/zijinlian" _ "shylinux.com/x/enterprise/src/zijinlian"
_ "shylinux.com/x/operation/src/production"
_ "shylinux.com/x/enterprise/src/guanfangwangzhan"
_ "shylinux.com/x/enterprise/src/kehuguanli"
_ "shylinux.com/x/enterprise/src/rongzijihua"
) )
func main() { print(ice.Run()) } func main() { print(ice.Run()) }
func init() { func init() {
ice.Info.CodeMain = "src/guanlixitong/portal.go" ice.Info.CodeMain = "src/yingxiaotuiguang/portal.go"
ice.Info.NodeMain = "web.team.guanlixitong.portal" ice.Info.NodeMain = "web.team.yingxiaotuiguang.portal"
} }

View File

@ -36,7 +36,7 @@ func (s invite) List(m *ice.Message, arg ...string) {
button := []ice.Any{s.Enter, s.Publish} button := []ice.Any{s.Enter, s.Publish}
defer func() { m.PushButton(button...) }() defer func() { m.PushButton(button...) }()
if value[model.USER_UID] == m.Option(ice.MSG_USERUID) || s.IsLeader(m) { if value[model.USER_UID] == m.Option(ice.MSG_USERUID) || s.IsLeader(m) {
if button = append(button, s.Modify); kit.Int(value[model.VISITE_COUNT]) == 0 { if button = append(button, s.MarketInsert, s.Modify); kit.Int(value[model.VISITE_COUNT]) == 0 {
button = append(button, s.Remove) button = append(button, s.Remove)
} }
} }
@ -52,5 +52,9 @@ func (s invite) Enter(m *ice.Message, arg ...string) {
func (s invite) Publish(m *ice.Message, arg ...string) { func (s invite) Publish(m *ice.Message, arg ...string) {
m.ProcessField(publish{}, []string{m.Option(model.PLACE_UID), m.Option(model.UID)}, arg...) m.ProcessField(publish{}, []string{m.Option(model.PLACE_UID), m.Option(model.UID)}, arg...)
} }
func (s invite) MarketInsert(m *ice.Message, arg ...string) {
s.GetCommandUID(m, s.Prefix(m, publish{}))
s.Table.MarketInsert(m, arg...)
}
func init() { ice.TeamCtxCmd(invite{}) } func init() { ice.TeamCtxCmd(invite{}) }

View File

@ -7,7 +7,8 @@ import (
type Portal struct { type Portal struct {
guanlixitong.Portal guanlixitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* promotion_name* promotion_type:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* promotion_name*" role:"void"`
// placeCreate string `name:"placeCreate city_name* company_name* promotion_name* promotion_type:select" role:"void"`
} }
func init() { func init() {

View File

@ -7,6 +7,7 @@
"product": "product.png", "product": "product.png",
"channel": "channel.png", "channel": "channel.png",
"invite": "invite.png", "invite": "invite.png",
"publish": "invite.png",
"bonus": "bonus.png", "bonus": "bonus.png",
"stat": "stat.png" "stat": "stat.png"
}, },

View File

@ -4,6 +4,7 @@ Volcanos(chat.ONIMPORT, {
{view: html.TITLE, list: [value.title||value.name]}, can.onimport.metaView(can, value), {view: html.TITLE, list: [value.title||value.name]}, can.onimport.metaView(can, value),
{view: html.STATUS, list: [can.onimport.unitView(can, value, "invite_count"), "推广期:", can.onimport.beginTime(can, value)]}, {view: html.STATUS, list: [can.onimport.unitView(can, value, "invite_count"), "推广期:", can.onimport.beginTime(can, value)]},
{view: html.OUTPUT, list: [value.content]}, {view: html.OUTPUT, list: [value.content]},
can.onimport.titleAction(can, value),
] }) ] })
}, },
}) })