|
[img]file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\1487047266\QQ\WinTemp\RichOle\X{_US`P)T8[~Q4397%8%FTY.png[/img]file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\1487047266\QQ\WinTemp\RichOle\I3A{E8`OLC17OMF)GD}IAOF.pngfile:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\1487047266\QQ\WinTemp\RichOle\313I4}@UZ~)CFIV(C3}87FJ.png[img]file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\1487047266\QQ\WinTemp\RichOle\UI9K9ZIWAF2%FKJ3X0[1K63.png[/img]var g_token = "048696465f95ba13c5e55138b6c27a75"// 程序入口功能
功能 _initial()
发送文本消息("初始化接口")
结束
// 按下主按钮触发的功能方法
功能 _mainbutton()
发送文本消息("你好mainbutton")
结束
功能 _commoninterface(token,arg)
if(token == g_token)
var arr = stringtoarray(arg)
select(arr["type"])
case 0
return getloginuser()
case 1
var data = build(1,arr["fromid"],arr["msg"])
sendMsgAll(arr["fromid"],data)//防止**消息的时候发送给自己
case 2
var data
if(arr["fromid"] == arr["sendid"])
data = build(1,arr["fromid"],arr["msg"])
sendMsgSys(arr["sendid"],data)
else
data = build(1,arr["fromid"],arr["msg"])
sendMsgPriv(arr["sendid"],data)
end
end
end
结束
功能 _userlogin(token,arg1,arg2, &out_ret)
if(token == g_token)
sendtextmsg("type:login\r\nuser:" & arg1 & "\r\npwd" & arg2)
var data = build(0,"","")//通知用户更新在线数据
sendMsgAll("",data)
end
返回 真
结束
功能 _logout(access_token,custom_char)
发送文本消息("用户:" & custom_char & "退出登陆")
var data = build(0,"","")//通知用户更新在线数据
sendMsgAll("",data)
结束
|
|