球星卡微信小程序
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.

87 lines
2.1 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, getServiceStandard } 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. }else if(options.type === 'service_standard'){
  29. this.getServiceStandard();
  30. }
  31. },
  32. methods: {
  33. // 获取关于我们
  34. async getAboutUsDetail(){
  35. let res = await aboutUs();
  36. this.article = res.data.datas.content;
  37. uni.setNavigationBarTitle({
  38. title: res.data.datas.title
  39. })
  40. },
  41. // 获取快速评级的相关协议
  42. async getGradeAgreement(){
  43. let res = await gradeAgreement();
  44. this.article = res.data.datas.content;
  45. uni.setNavigationBarTitle({
  46. title: res.data.datas.title
  47. })
  48. },
  49. // 获取用户隐私协议协议
  50. async getPrivacyAgreement(){
  51. let res = await privacyAgreement();
  52. this.article = res.data.datas.content;
  53. uni.setNavigationBarTitle({
  54. title: res.data.datas.title
  55. })
  56. },
  57. // 获取卡砖设计
  58. async getCardDesign(){
  59. let res = await cardDesign();
  60. this.article = res.data.datas.content;
  61. uni.setNavigationBarTitle({
  62. title: res.data.datas.title
  63. })
  64. },
  65. // 获取评级标准
  66. async getRatingStandard(){
  67. let res = await ratingStandard();
  68. this.article = res.data.datas.content;
  69. uni.setNavigationBarTitle({
  70. title: res.data.datas.title
  71. })
  72. },
  73. async getServiceStandard(){
  74. let res = await getServiceStandard();
  75. this.article = res.data.datas.content;
  76. uni.setNavigationBarTitle({
  77. title: res.data.datas.title
  78. })
  79. },
  80. }
  81. }
  82. </script>
  83. <style>
  84. </style>