cmsinfo.vue 580 B

1234567891011121314151617181920212223242526272829303132
  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}?type=${option.page || 'info'}`;
  14. },
  15. data() {
  16. return {
  17. baseUrl: BASE_URL.url,
  18. url: '',
  19. id: '',
  20. page: ''
  21. }
  22. },
  23. async mounted() {
  24. await request.addBlogViews({ id: this.id });
  25. },
  26. methods: {}
  27. }
  28. </script>
  29. <style>
  30. </style>