zhaojishun 的博客

记录精彩的程序人生

生命不息,折腾不止!
  menu
42 文章
17602 浏览
3 当前访客
ღゝ◡╹)ノ❤️

美腿丝袜图库

效果图片:
image.png

image.png

演示地址:
http://m.zhaojishun.cn/MTImg/index3.html

前端代码:
https://github.com/zhaojishun/mtimg

后端核心代码:

@CrossOrigin
    @RequestMapping(value = "/images/mTImages", method = RequestMethod.POST)
    public void mTImages(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws IOException {
        PageData pd = new PageData(request);
        Json json = new Json();
        if(pd.getString("sort_by").equals("2")){
            JSONObject res = new JSONObject();
            res.put("phtoturls",threeFloorService.findRandList());
            json.setData(res);
            json.setSuccess(true);
        }else{
            String url = "http://floor.huluxia.com/post/list/ANDROID/2.1?start="+pd.getString("start")+"&count=20&cat_id=56&tag_id=0&sort_by="+pd.getString("sort_by");
            JSONObject object = JSON.parseObject(sendReq(url));
            String nextStart = object.getString("start");
            JSONArray array = object.getJSONArray("posts");
            StringBuffer sb = new StringBuffer();
            for (int i = 0;i<array.size();i++){
                String str = array.getJSONObject(i).getString("images");
                if(!str.equals("[]")){
                    sb.append(str.replace("[","").replace("]","")+",");
                }
            }
            String ss = sb.toString().substring(0,sb.toString().length()-1);
            JSONArray js = new JSONArray(10);
            String[] str = ss.split(",");
            for (int i = 1; i <str.length ; i++) {
                js.add(str[i]);
            }
            JSONObject res = new JSONObject();
            res.put("nextStart",nextStart);
            res.put("phtoturls",js);
            json.setSuccess(true);
            json.setData(res);
        }
        this.writeJson(response,json);
    }

设计思路:

抓包。


标题:美腿丝袜图库
作者:zhaojishun
地址:http://blog.zhaojishun.cn/articles/2019/10/13/1570963934293.html