mirror of
https://shylinux.com/x/community
synced 2025-07-02 05:31:20 +08:00
add some
This commit is contained in:
parent
59151c09a4
commit
d51a4c41ac
@ -269,7 +269,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
value: function(can, value) { if (!value || !value._uid) { return } can.sup.current = value
|
||||
can.onexport.place(can, value._uid),
|
||||
// can.onexport.hash(can, value._uid),
|
||||
// can.onexport.title(can, value._name, can.ConfHelp())
|
||||
can.onexport.title(can, value._name, can.ConfHelp())
|
||||
can.onimport.myOption(can.sup)
|
||||
can.page.Select(can, can.ui._target, "div.item.card.uid-"+value._uid, function(target) {
|
||||
can.onmotion.select(can, can.ui._target, html.DIV_ITEM, target)
|
||||
|
@ -15,6 +15,7 @@ type qrcode struct {
|
||||
role string `data:"leader"`
|
||||
applyQRCode string `name:"applyQRCode" help:"邀请码" role:"void"`
|
||||
placeQRCode string `name:"placeQRCode" help:"场景码" role:"void"`
|
||||
scanQRCode string `name:"scanQRCode" help:"扫码" role:"void"`
|
||||
}
|
||||
|
||||
func (s qrcode) ApplyQRCode(m *ice.Message, arg ...string) {
|
||||
@ -25,6 +26,14 @@ func (s qrcode) PlaceQRCode(m *ice.Message, arg ...string) {
|
||||
s.info(m, arg[0], "portal")
|
||||
s.EchoQRCode(m, arg[0]).Echo(kit.JoinWord(m.Append(model.CITY_NAME), m.Append(s.Keys(s.Street, model.NAME)), m.Append(s.Keys(s.Place, model.NAME))))
|
||||
}
|
||||
func (s qrcode) ScanQRCode(m *ice.Message, arg ...string) {
|
||||
m.FieldsSetDetail()
|
||||
for i := 0; i < len(arg); i += 2 {
|
||||
m.Push(arg[i], arg[i+1])
|
||||
}
|
||||
m.EchoQRCode(m.Append("text")).Action(s.ApplyQRCode, s.PlaceQRCode, s.ScanQRCode)
|
||||
m.Display("/plugin/table.js")
|
||||
}
|
||||
func (s qrcode) List(m *ice.Message, arg ...string) {
|
||||
s.PlaceQRCode(m, arg[0])
|
||||
}
|
||||
@ -39,6 +48,6 @@ func (s qrcode) info(m *ice.Message, place_uid, cmd string) *ice.Message {
|
||||
m.Cmdy(s.Prefix(m, s.portal), s.portal.PlaceList, m.Option(model.USER_UID), place_uid)
|
||||
m.Option(model.AUTH_AVATAR, m.Append(model.AUTH_AVATAR))
|
||||
m.Cut(model.CITY_NAME, s.Keys(s.Street, model.NAME), s.Keys(s.Place, model.NAME))
|
||||
m.Push(model.QRCODE_TYPE, cmd).Action(s.ApplyQRCode, s.PlaceQRCode)
|
||||
m.Push(model.QRCODE_TYPE, cmd).Action(s.ApplyQRCode, s.PlaceQRCode, s.ScanQRCode)
|
||||
return m
|
||||
}
|
||||
|
@ -7,7 +7,15 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onappend.input(can, {type: html.BUTTON, name: "website", value: "进入官网", onclick: function() {
|
||||
can.user.open("/")
|
||||
}}, "", can._output)
|
||||
|
||||
can.onappend.input(can, {type: html.BUTTON, name: "scan", value: "扫码识别", onclick: function(event) {
|
||||
can.user.agent.scanQRCode(can, function(value) {
|
||||
var data = can.misc.ParseURL(can, value.text)
|
||||
can.onimport.myStory(can, {space: data.pod, index: data.cmd, opts: data})
|
||||
can.page.Append(can, can._output, [{text: value.text, onclick: function(event) {
|
||||
can.user.copy(event, can, value.text)
|
||||
}}])
|
||||
})
|
||||
}}, "", can._output)
|
||||
can.onappend.input(can, {type: html.BUTTON, name: "logout", value: "退出登录", style: "danger", onclick: function() {
|
||||
if (can.user.confirm("请确认退出登录")) { can.misc.CookieSessid(can, ""), location.reload() }
|
||||
}}, "", can._output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user