function httpPost()
local sOut = CTNString();
local sParam = 'apikey=08b0bfd1ef078f9be6b40333aab745dd&mobile=#photo#&text=【塔网科技】MES通知,发生时间:#time#,描述:#info#';
sParam = string.gsub(sParam, '#photo#', '15658877663,13071817122');
sParam = string.gsub(sParam, '#time#', cutil:getSys14Time());
sParam = string.gsub(sParam, '#info#', '短信测试');
local sU = cutil:a2u(sParam);
cutil:httpPost('http://sms.yunpian.com/v2/sms/batch_send.json', sOut, sU);
local sRet = sOut:get();
if #sRet <= 0 then
return print('返回值为空');
end
sRet = cutil:u2a(sRet);
print( sRet )
if _G['_load_tn_json2lua'] == nil then
ui:use('tn_json2lua');
_G['_load_tn_json2lua'] = true;
end
local res = json_decode(sRet);
if res == nil then
return;
end
if res.unit ~= nil then
print( res.unit )
end
if res.data ~= nil then
for i=1,#res.data do
print( res.data[i].mobile..'->'..res.data[i].msg )
end
end
end