article-details.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view>
  3. <headContent statusBarBg="#191A2E" bgColor="#191A2E">
  4. <template #left>
  5. <reverse-back iconColor="#fff" />
  6. </template>
  7. <template #content>
  8. <view class="haed-title">
  9. {{ NewTitle }}
  10. </view>
  11. </template>
  12. <template #right>
  13. <closeIocn iconColor="#fff" />
  14. </template>
  15. </headContent>
  16. <view class="new-content" v-html="NewContent">
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import {
  22. Api_getNewDetail
  23. } from "@/api/index.js"
  24. export default {
  25. name: 'article-details',
  26. data() {
  27. return {
  28. NewId: null,
  29. NewContent:'',
  30. NewTitle:''
  31. };
  32. },
  33. onLoad(opt) {
  34. this.NewId = opt?.id;
  35. this.getNewDetail()
  36. },
  37. mounted() {
  38. },
  39. methods: {
  40. getNewDetail() {
  41. if (this.NewId) {
  42. Api_getNewDetail({
  43. id: this.NewId
  44. }).then(res => {
  45. this.NewContent = res?.content;
  46. this.NewTitle = res?.title;
  47. })
  48. }
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .haed-title {
  55. color: #fff !important;
  56. }
  57. .new-content{
  58. padding: 0 $pages-padding 0;
  59. }
  60. </style>