about.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. $(function () {
  2. // $("#aboutUs").on('click')
  3. vm = new Vue({
  4. el: '#app',
  5. data() {
  6. return {
  7. topList: [],
  8. statement:{},
  9. pictureList: [],
  10. middleList: [],
  11. pictureTwoList: [],
  12. middleTwoList: [],
  13. charactersList: [],
  14. bottom: [],
  15. statement: '',
  16. baseUrl: 'http://lanbo.frp.liuniu946.com/apis/product',
  17. allList: [],
  18. introduction: {},
  19. policy: {},
  20. operating: {},
  21. application: {},
  22. sinceTime: 2004,
  23. Y: 0
  24. }
  25. },
  26. created() {
  27. this.getAll()
  28. this.getTime()
  29. },
  30. computed: {
  31. longTime() {
  32. return this.Y - this.sinceTime
  33. }
  34. },
  35. methods: {
  36. getAll() {
  37. let data = {
  38. limit: 1000
  39. }
  40. AJAX('get',this.baseUrl, data, (res) => {
  41. this.allList = res.data.list
  42. console.log(this.allList)
  43. this.allList.forEach(item => {
  44. if(item.id === 124) {
  45. this.introduction = item
  46. // this.introduction.content = this.introduction.content.replace(/<p>/g,'<span class="span-q"></span><p>')
  47. console.log(this.introduction.content)
  48. }else if(item.id === 125) {
  49. this.policy = item
  50. }else if(item.id === 126) {
  51. this.operating = item
  52. }else if(item.id === 127) {
  53. this.application = item
  54. }else if(item.id === 101) {
  55. this.statement = item
  56. }
  57. });
  58. console.log(this.introduction)
  59. this.bottom = this.allList.filter( item => item.category_ids === '64')
  60. console.log(this.bottom)
  61. } )
  62. },
  63. getTime() {
  64. let date = new Date()
  65. this.Y = date.getFullYear()
  66. console.log(this.Y)
  67. }
  68. }
  69. })
  70. })