球星卡微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view>
  3. <u-parse :content="article"></u-parse>
  4. </view>
  5. </template>
  6. <script>
  7. import { aboutUs, gradeAgreement, privacyAgreement, cardDesign, ratingStandard } from '@/service/agreementArticle.js';
  8. export default {
  9. data(){
  10. return {
  11. id: '',
  12. article: '',
  13. type: ''
  14. }
  15. },
  16. onLoad(options){
  17. this.id = options.id || '';
  18. if(options.type === 'about_us'){
  19. this.getAboutUsDetail();
  20. }else if(options.type === 'grade_agreement'){
  21. this.getGradeAgreement();
  22. }else if(options.type === 'privacy_agreement'){
  23. this.getPrivacyAgreement();
  24. }else if(options.type === 'card_design'){
  25. this.getCardDesign();
  26. }else if(options.type === 'rating_standard'){
  27. this.getRatingStandard();
  28. }
  29. },
  30. methods: {
  31. // 获取关于我们
  32. async getAboutUsDetail(){
  33. let res = await aboutUs();
  34. this.article = res.data.datas.content;
  35. uni.setNavigationBarTitle({
  36. title: res.data.datas.title
  37. })
  38. },
  39. // 获取快速评级的相关协议
  40. async getGradeAgreement(){
  41. let res = await gradeAgreement();
  42. this.article = res.data.datas.content;
  43. uni.setNavigationBarTitle({
  44. title: res.data.datas.title
  45. })
  46. },
  47. // 获取用户隐私协议协议
  48. async getPrivacyAgreement(){
  49. let res = await privacyAgreement();
  50. this.article = res.data.datas.content;
  51. uni.setNavigationBarTitle({
  52. title: res.data.datas.title
  53. })
  54. },
  55. // 获取卡砖设计
  56. async getCardDesign(){
  57. let res = await cardDesign();
  58. this.article = res.data.datas.content;
  59. uni.setNavigationBarTitle({
  60. title: res.data.datas.title
  61. })
  62. },
  63. // 获取评级标准
  64. async getRatingStandard(){
  65. let res = await ratingStandard();
  66. this.article = res.data.datas.content;
  67. uni.setNavigationBarTitle({
  68. title: res.data.datas.title
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style>
  75. </style>