gaze一级.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. js:
  2. log(input);
  3. let d = [];
  4. // log(MY_FL);
  5. // log(MY_PAGE);
  6. let body = {
  7. "mform": MY_CATE,
  8. "mcountry": MY_FL.mcountry||'all',
  9. "tag_arr%5B%5D": MY_FL.mtag||'all',
  10. // "tag_arr[]": MY_FL.mtag||'all',
  11. "page": MY_PAGE,
  12. "sort": MY_FL.sort||'updatetime',
  13. "album": MY_FL.album||'all',
  14. "title": '',
  15. };
  16. // let forms=[];
  17. // Object.keys(body).forEach(function (it){
  18. // forms.push(it+'='+body[it]);
  19. // });
  20. // let form = forms.join('&');
  21. // log(body);
  22. // log(form);
  23. // fetch_params.body = form;
  24. fetch_params.body = body;
  25. fetch_params.headers['x-requested-with'] = 'XMLHttpRequest';
  26. // fetch_params.headers['cookie'] = 'PHPSESSID=e7ht5hvema4sg0o8l1o5k0bqt1; Hm_lvt_eebb854b7348edadfb6b433786f5d059=1666239708; Hm_lpvt_eebb854b7348edadfb6b433786f5d059=1666244071';
  27. let url = input.split('?')[0];
  28. let html = post(url,fetch_params);
  29. print(html);
  30. let data = JSON.parse(html);
  31. data.mlist.forEach(function (it){
  32. d.push({
  33. title: it.title,
  34. desc: it.definition+' '+it.grade,
  35. url:it.id,
  36. img:it.cover_img,
  37. });
  38. });
  39. setResult(d);