index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <div class="box">
  3. <banner></banner>
  4. <div class="article">
  5. <div class="return-news" @click="GoNews">
  6. <img class="return-img" src="@/assets/img/antibody/left.png" alt="">
  7. <p class="return-text">Back</p>
  8. </div>
  9. <p class="article_title">{{ overView.articleTitle }}</p>
  10. <p class="article_text">{{ overView.articleContent }}</p>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import banner from "@/components/banner";
  16. export default {
  17. name: "articleDetail",
  18. components: {
  19. banner
  20. },
  21. data() {
  22. return {
  23. overView: {}
  24. };
  25. },
  26. methods: {
  27. changeSearchById() {
  28. this.$api.post("/basb/searchById", {
  29. id: this.$route.query.id
  30. }).then(res => {
  31. console.log(res)
  32. this.overView = res.data
  33. })
  34. },
  35. GoNews() {
  36. this.$router.push({
  37. name: "article"
  38. });
  39. }
  40. },
  41. mounted() {},
  42. created() {
  43. this.changeSearchById()
  44. }
  45. };
  46. </script>
  47. <style lang="scss" scoped>
  48. @media screen and (min-width: 751px) and (max-width: 9999px) {
  49. .box {
  50. .article{
  51. width: 1200px;
  52. margin: 30px auto 90px;
  53. .return-news{
  54. display: flex;
  55. align-items: center;
  56. margin-bottom: 25px;
  57. cursor: pointer;
  58. .return-img{
  59. width: 16px;
  60. }
  61. .return-text{
  62. font-size: 14px;
  63. color: #333333;
  64. line-height: 1;
  65. margin-left: 10px;
  66. }
  67. }
  68. .article_title{
  69. font-size: 18px;
  70. font-weight: 600;
  71. margin-bottom: 15px;
  72. }
  73. .article_text{
  74. font-size: 14px;
  75. line-height: 24px;
  76. }
  77. }
  78. }
  79. }
  80. </style>