invitation.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="invitation">
  3. <toptip :currTitle="currTitle"></toptip>
  4. <template v-for="item in imgList">
  5. <img :src="item" alt="邀请函" :key="item">
  6. </template>
  7. </div>
  8. </template>
  9. <script>
  10. import { article_list, article_info } from "../../request/api";
  11. import toptip from "../../components/toptip";
  12. export default {
  13. metaInfo: {
  14. title: "邀请函",
  15. },
  16. data() {
  17. return {
  18. currTitle: "邀请函",
  19. imgList: [],
  20. };
  21. },
  22. components: {
  23. toptip,
  24. },
  25. created() {
  26. this.getImgList();
  27. },
  28. methods: {
  29. getImgList() {
  30. article_info({}, 65).then(({ data: res }) => {
  31. let imgUrl = "http://ca.liuniu946.com/" + res.data.coverimage;
  32. this.imgList.push(imgUrl);
  33. article_info({}, 66).then(({ data: res }) => {
  34. let imgUrl = "http://ca.liuniu946.com/" + res.data.coverimage;
  35. this.imgList.push(imgUrl);
  36. console.log(this.imgList)
  37. });
  38. });
  39. },
  40. },
  41. };
  42. </script>
  43. <style lang="scss" scoped>
  44. img {
  45. width: 100%;
  46. }
  47. </style>