index.vue 826 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="container">
  3. <jyf-parser :html="content" class="mar_t50"></jyf-parser>
  4. </view>
  5. </template>
  6. <script>
  7. import { post } from "@/request/api.js";
  8. import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
  9. export default {
  10. data() {
  11. return {
  12. content: "",
  13. };
  14. },
  15. onLoad(da) {
  16. this.loadData(da.type);
  17. uni.setNavigationBarTitle({ title: decodeURI(da.tit) });
  18. },
  19. methods: {
  20. loadData(type) {
  21. post("/my/article", {type}).then((res) => {
  22. if (res.code == 0) {
  23. this.content = res.data.data.content;
  24. }
  25. });
  26. },
  27. },
  28. components: {
  29. jyfParser,
  30. },
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. // 用户须知
  35. .container {
  36. border-top: 20rpx solid #f5f5f5;
  37. padding: 0 20rpx;
  38. box-sizing: border-box;
  39. }
  40. // 用户须知-end
  41. </style>