Detail.vue 426 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <div>图书id{{bookid}}</div>
  3. </template>
  4. <script>
  5. import {get} from '@/util'
  6. export default {
  7. data() {
  8. return {
  9. bookid: ''
  10. }
  11. },
  12. methods: {
  13. async getDetail() {
  14. const info = await get('/weapp/bookdetail', {id: this.bookid})
  15. console.log(info);
  16. }
  17. },
  18. mounted() {
  19. this.bookid = this.$root.$mp.query.id;
  20. this.getDetail();
  21. }
  22. }
  23. </script>
  24. <style lang="scss">
  25. </style>