cmsinfo.vue 537 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view class="container">
  3. <web-view :src="baseUrl + url"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import request from '../../api/cms.js';
  8. import { BASE_URL } from '../../env.js';
  9. export default {
  10. components: {},
  11. onLoad: function (option) {
  12. this.id = option.id;
  13. this.url = `/cms/article/${option.id}`;
  14. },
  15. data() {
  16. return {
  17. baseUrl: BASE_URL.url,
  18. url: '',
  19. id: '',
  20. }
  21. },
  22. async mounted() {
  23. await request.addBlogViews({ id: this.id });
  24. },
  25. methods: {}
  26. }
  27. </script>
  28. <style>
  29. </style>