快速对接


易语言对接详细教程:https://www.bilibili.com/video/BV1WK411w7U6
易语言模块

http://api.6n6.cn/

lhm-yiyuan.zip
按键精灵Lua插件:http://api.6n6.cn/lhm-anjian-lua.zip  


触动精灵例子:

local ts = require("ts")

--登录
code,header_resp, res = ts.httpGet("http://api.laohuma.net:666/api/login?apiuser=API账号&password=登录密码")
local json = ts.json
res = json.decode(res)
token = res.data.token;
if token == '' then
dialog(res.msg)
end
toast("登录成功--Token:" .. token,5)

--获取余额
code,header_resp, res = ts.httpGet("http://api.laohuma.net:666/api/getBalance?token="..token)
local json = ts.json
res = json.decode(res)
if res.code == 20000 then
toast( "余额" .. res.data.rmb)
end


--取手机号
code,header_resp, res = ts.httpGet("http://api.laohuma.net:666/api/getPhone?token="..token.."&sid=1175")
local json = ts.json

dialog(res)
res = json.decode(res)

if res.code == 20000 then
dialog( "手机号" .. res.data[1].phone)
end