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

110 lines
2.7 KiB

3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
  1. <template>
  2. <view class="content">
  3. <u-parse :content="article"></u-parse>
  4. </view>
  5. </template>
  6. <script>
  7. import { tipsDetail,aboutUs, gradeAgreement, privacyAgreement, cardDesign, ratingStandard, getServiceStandard } from '@/service/agreementArticle.js';
  8. import { notifyDetail } from '@/service/index.js';
  9. export default {
  10. data(){
  11. return {
  12. id: '',
  13. article: '',
  14. type: ''
  15. }
  16. },
  17. onLoad(options){
  18. this.id = options.id || '';
  19. if(options.type === 'about_us'){
  20. this.getAboutUsDetail();
  21. }else if(options.type === 'grade_agreement'){
  22. this.getGradeAgreement();
  23. }else if(options.type === 'privacy_agreement'){
  24. this.getPrivacyAgreement();
  25. }else if(options.type === 'card_design'){
  26. this.getCardDesign();
  27. }else if(options.type === 'rating_standard'){
  28. this.getRatingStandard();
  29. }else if(options.type === 'service_standard'){
  30. this.getServiceStandard();
  31. }else if(options.type === 'notify_detail'){
  32. this.notifyDetail();
  33. }else{
  34. this.getTips();
  35. }
  36. },
  37. methods: {
  38. // 获取关于我们
  39. async getTips(){
  40. let res = await tipsDetail(this.id);
  41. this.article = res.data.datas.content;
  42. uni.setNavigationBarTitle({
  43. title: res.data.datas.title
  44. })
  45. },
  46. // 获取关于我们
  47. async getAboutUsDetail(){
  48. let res = await aboutUs();
  49. this.article = res.data.datas.content;
  50. uni.setNavigationBarTitle({
  51. title: res.data.datas.title
  52. })
  53. },
  54. // 获取快速评级的相关协议
  55. async getGradeAgreement(){
  56. let res = await gradeAgreement();
  57. this.article = res.data.datas.content;
  58. uni.setNavigationBarTitle({
  59. title: res.data.datas.title
  60. })
  61. },
  62. // 获取用户隐私协议协议
  63. async getPrivacyAgreement(){
  64. let res = await privacyAgreement();
  65. this.article = res.data.datas.content;
  66. uni.setNavigationBarTitle({
  67. title: res.data.datas.title
  68. })
  69. },
  70. // 获取卡砖设计
  71. async getCardDesign(){
  72. let res = await cardDesign();
  73. this.article = res.data.datas.content;
  74. uni.setNavigationBarTitle({
  75. title: res.data.datas.title
  76. })
  77. },
  78. // 获取评级标准
  79. async getRatingStandard(){
  80. let res = await ratingStandard();
  81. this.article = res.data.datas.content;
  82. uni.setNavigationBarTitle({
  83. title: res.data.datas.title
  84. })
  85. },
  86. async getServiceStandard(){
  87. let res = await getServiceStandard();
  88. this.article = res.data.datas.content;
  89. uni.setNavigationBarTitle({
  90. title: res.data.datas.title
  91. })
  92. },
  93. async notifyDetail(){
  94. let res = await notifyDetail(this.id);
  95. this.article = res.data.datas.content;
  96. uni.setNavigationBarTitle({
  97. title: res.data.datas.title
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style>
  104. .content{font-size:16px;padding:20px;line-height:2em;}
  105. </style>