goto.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // axios
  2. // axios.get('http://172.105.205.52:8000/courses?tag_string=(2)')
  3. // .then(function (response) {
  4. // console.log(response);
  5. // });
  6. // axios.post('/user', {
  7. // firstName: 'Fred',
  8. // lastName: 'Flintstone'
  9. // }).then(function (response) {
  10. // console.log(response);
  11. // })
  12. // jquery
  13. $(document).ready(function () {
  14. $.ajax('http://172.105.205.52:8000/tags', {
  15. type: 'GET', // http method
  16. headers: { 'Access-Control-Allow-Origin': '*' },
  17. success: function (res) {
  18. var a = res;
  19. console.log(res);
  20. var d = JSON.parse(res);
  21. console.log(d[0].name);
  22. },
  23. error: function (err) {
  24. console.log(err);
  25. }
  26. });
  27. $("#submit").bind('click', function () {
  28. var idiom = $("#idiom").val();
  29. });
  30. });
  31. // $.get("date-time.php", function(data){
  32. // console.log(res);
  33. // });
  34. $(".slider1").slick({
  35. dots: true,
  36. dotsClass: 'slick-dots',
  37. speed: 1000,
  38. });