You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
1.7 KiB

  1. <%@ language=vbscript codepage="65001" %>
  2. <!--#include file="conn.asp"-->
  3. <!--#include file="function.asp"-->
  4. <%
  5. Response.Charset = "UTF-8"
  6. c_openid = request.cookies("m_openid")
  7. 'if c_openid="" then c_openid="oCVcbvzVgz84sGA30f-PgPAAMZ0o"
  8. csql = "SP_GET_ORDER_LIST '" & c_openid & "'"
  9. c_rtn = ""
  10. set rs=conn.execute(csql)
  11. if not rs.eof then
  12. c_rtn = "{"
  13. c_errcode = rs("errcode")
  14. if c_errcode - 0 > 0 then
  15. c_rtn = "{""code"":""" & c_errcode & """,""info"":""" & rs("errinfo") & """}"
  16. else
  17. c_rtn = "{""code"":""0"",""info"":"""",""order_list"":["
  18. c_rtn1 = ""
  19. do until rs.eof
  20. c_rtn1 = c_rtn1 & "{""order_no"":""" & rs("main_id") & ""","
  21. c_rtn1 = c_rtn1 & """order_time"":""" & rs("order_time") & ""","
  22. c_rtn1 = c_rtn1 & """order_status"":""" & rs("order_status") & ""","
  23. c_rtn1 = c_rtn1 & """prod_code"":""" & rs("prod_code") & ""","
  24. c_rtn1 = c_rtn1 & """prod_name"":""" & rs("prod_name") & ""","
  25. c_rtn1 = c_rtn1 & """price"":""" & rs("price") & ""","
  26. c_rtn1 = c_rtn1 & """start_area"":""" & rs("start_area") & ""","
  27. c_rtn1 = c_rtn1 & """end_area"":""" & rs("end_area") & ""","
  28. c_rtn1 = c_rtn1 & """go_info"":""" & rs("go_info") & ""","
  29. c_rtn1 = c_rtn1 & """back_info"":""" & rs("back_info") & ""","
  30. c_rtn1 = c_rtn1 & """direction"":""" & rs("direction") & ""","
  31. c_rtn1 = c_rtn1 & """run_days"":""" & rs("run_days") & ""","
  32. c_rtn1 = c_rtn1 & """need_pay"":""" & rs("need_pay") & ""","
  33. c_rtn1 = c_rtn1 & """order_type"":""" & rs("order_type") & """},"
  34. rs.movenext
  35. loop
  36. if right(c_rtn1,1)="," then c_rtn1 = left(c_rtn1,len(c_rtn1)-1)
  37. c_rtn = c_rtn & c_rtn1 & "]}"
  38. end if
  39. else
  40. c_rtn = "{""code"":""0"",""info"":""""}"
  41. end if
  42. rs.close
  43. response.write c_rtn
  44. %>