1.新旧写法都需要继承Hoyipage

2. hoyi 的api访问方式

2.1 新写法 http://localhost:8080/BBCPush/Demo/test.html?username=张三


@RequestMode (MODE = {RequestType.GET, RequestType.POST})

public void test(String username) { JSONObject jsonObject = new JSONObject(); jsonObject.put("username",username); this.WriteUTF8JSONDATAMSG(1, "成功", jsonObject);

}

2.1.1 需要设置在Eclipse编译时保留方法的形参,如图所示:

hoyi新旧写法对比

2.2 旧写法 http://localhost:8080/BBCPush/Demo.html?behavior=test&username=张三


@RequestMode (MODE = {RequestType.GET, RequestType.POST}) public void test() { JSONObject jsonObject = new JSONObject(); jsonObject.put("username",this.getParams("username")); this.WriteUTF8JSONDATAMSG(1, "成功", jsonObject);

}


2.3 返回值都是一样的 

{"data":{"username":"张三"},"msg":"成功","status":1}

3. 

4.


2.hoyi 的方法访问新写法  2.

相关文章:

  • 2021-12-07
  • 2021-10-19
  • 2021-04-21
  • 2021-11-12
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-21
  • 2021-11-07
  • 2022-12-23
  • 2022-01-07
  • 2021-03-31
  • 2021-05-18
  • 2023-04-07
相关资源
相似解决方案