tips.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="wrapper">
  3. <div v-html="res.content"></div>
  4. </div>
  5. </template>
  6. <script>
  7. import { getArticleDetail } from "@/api/article";
  8. export default {
  9. data() {
  10. return {
  11. res: "",
  12. way: {
  13. user: {
  14. title: "用户协议",
  15. type: "USER_AGREEMENT",
  16. },
  17. privacy: {
  18. title: "隐私政策",
  19. type: "PRIVACY_POLICY",
  20. },
  21. message: {
  22. title: "证照信息",
  23. type: "LICENSE_INFORMATION",
  24. },
  25. about: {
  26. title: "关于我们",
  27. type: "ABOUT",
  28. },
  29. },
  30. };
  31. },
  32. mounted() {},
  33. onLoad(option) {
  34. uni.setNavigationBarTitle({
  35. title: this.way[option.type].title,
  36. });
  37. this.init(option);
  38. },
  39. methods: {
  40. init(option) {
  41. getArticleDetail(this.way[option.type].type).then((res) => {
  42. if (res.data.success) {
  43. this.res = res.data.result;
  44. }
  45. });
  46. },
  47. },
  48. };
  49. </script>
  50. <style lang="scss" scoped>
  51. .wrapper {
  52. padding: 16rpx;
  53. }
  54. </style>