在w_main的open函数里输入string as_url = "http://192.168.37.184:10103/demo3"
string ls_str
uo_curl u_curl
u_curl = Create uo_curl
u_curl.setUtf8(True)
u_curl.SetTimeout(10000)
u_curl.setUrl(as_url,"GET")
boolean a
a = u_curl.request("")
uo_json json1
json1 = u_curl.response.json
integer code
uo_json data
uo_json tmp
data = Create uo_json
tmp = Create uo_json
//json1.get("code", code)
json1.get("data", data)
integer li_arrcount
integer li_1
li_arrcount = data.arrcount( )
For li_1 = 0 To li_arrcount - 1
data.get( "/" + String(li_1) , tmp)
integer stuNum
string stuName
tmp.get("stuNum", stuNum)
tmp.get("stuName", stuName)
dw_1.insertrow(0)
dw_1.setitem(li_1 + 1, "stu_num", stuNum)
dw_1.setitem(li_1 + 1, "stu_name",stuName)
Next
Destroy u_curl
Destroy data
Destroy tmp