content.vue 551 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <div>
  3. <div v-html="list">
  4. </div>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. data(){
  10. return{
  11. list:''
  12. }
  13. },
  14. created(){
  15. console.log('this',this.$route.query.id)
  16. this.postListIDFn(this.$route.query.id)
  17. },
  18. methods:{
  19. async postListIDFn(id){
  20. // let z = await postListID({id:id})
  21. let z = await this.$axios.$get(`https://official.webapi.bicredit.xin/api/news/detail/${id}`)
  22. // console.log('zzz',z)
  23. if(z.msg == '成功'){
  24. this.list = z.data.content
  25. }
  26. }
  27. }
  28. }
  29. </script>