project-single.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. $(function() {
  2. vm = new Vue({
  3. el: "#app",
  4. data: {
  5. company: '',
  6. arrayList:[],
  7. detailObj:[],
  8. bottom:'',
  9. statement:''
  10. }
  11. });
  12. var datas = {
  13. };
  14. var getId = localStorage.getItem('id');
  15. var data = {id:getId};
  16. var ajaxUrl = 'http://lanbo.frp.liuniu946.com/apis/product';
  17. AJAX('get',ajaxUrl,data,function(res){
  18. vm.detailObj = res.data.list.filter(item => item.id == getId)
  19. console.log(vm.detailObj)
  20. })
  21. var ajaxUrl = 'http://lanbo.frp.liuniu946.com/apis/product';
  22. AJAX('get',ajaxUrl,datas,function(res){
  23. vm.bottom = res.data.list.filter(item => item.category_ids == "52")
  24. console.log(vm.bottom)
  25. var ajaxUrl = 'http://lanbo.frp.liuniu946.com/apis/product';
  26. AJAX('get', ajaxUrl, datas, function(res) {
  27. vm.statement = res.data.list.filter(item => item.category_ids == "65")
  28. console.log(vm.statement)
  29. })
  30. var ajaxUrl = 'http://lanbo.frp.liuniu946.com/apis/product';
  31. AJAX('get', ajaxUrl, datas, function(res) {
  32. vm.bottom = res.data.list.filter(item => item.category_ids == "64")
  33. console.log(vm.bottom)
  34. })
  35. // var ajaxUrl = 'http://lanbo.frp.liuniu946.com/apis/about/10';
  36. // AJAX('get',ajaxUrl,datas,function(res){
  37. // // console.log(res)
  38. // vm.company = res.data.content;
  39. // })
  40. })
  41. })