mirror of
https://shylinux.com/x/community
synced 2025-04-25 09:38:06 +08:00
27 lines
719 B
Go
27 lines
719 B
Go
package gonganxitong
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
kit "shylinux.com/x/toolkits"
|
|
|
|
"shylinux.com/x/community/src/gonganxitong/model"
|
|
)
|
|
|
|
type qrcode struct {
|
|
portal portal
|
|
userPlace userPlace
|
|
list string `name:"list place_uid auto" role:"void"`
|
|
}
|
|
|
|
func (s qrcode) Init(m *ice.Message, arg ...string) {
|
|
s.portal.Show(m)
|
|
}
|
|
func (s qrcode) List(m *ice.Message, arg ...string) {
|
|
msg := m.Cmd(s.userPlace, m.Option(model.USER_UID), arg[0])
|
|
m.FieldsSetDetail()
|
|
kit.For([]string{model.CITY_NAME, model.STREET_NAME, model.PLACE_NAME, model.PLACE_ADDRESS}, func(key string) { m.Push(key, msg.Append(key)) })
|
|
m.EchoQRCode(s.portal.Link(m, arg[0], m.Prefix("apply")))
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd(qrcode{}) }
|