userAgreementEN.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view>
  3. <u-navbar back-text="Back" :back-text-style="backStyle"
  4. back-icon-color="#fff" title-color="#fff"
  5. title="User Agreement"
  6. :background="background">
  7. </u-navbar>
  8. <view class="" style="color: #000;background-color: #fff;padding: 50px 20px;"
  9. v-html="contentHtml?contentHtml:noData">
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. initDataDetails:[],
  18. initID:null,
  19. initData:[],
  20. noData:'<p>暂无信息</p>',
  21. contentHtml:'',
  22. background:{
  23. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  24. },
  25. backStyle:{
  26. color:'#fff'
  27. },
  28. scrollTop: 0,
  29. }
  30. },
  31. async onShow(){
  32. const res = await this.$myRequest({
  33. url: '/op/helpCenterEntitys/getColumnTree',
  34. data: {
  35. language:'EN'
  36. }
  37. });
  38. const that = this;
  39. if(res.data){
  40. res.data.forEach(item=>{
  41. if(item.name=='About Us' && item.children){
  42. item.children.forEach(i=>{
  43. if(i.name == 'User Agreement') {
  44. that.initID = i.id;
  45. }
  46. })
  47. }
  48. })
  49. that.initData = res.data.data;
  50. that.getInitIdDetail();
  51. }
  52. },
  53. onPageScroll(e) {
  54. this.scrollTop = e.scrollTop;
  55. },
  56. methods:{
  57. i18n (data) {
  58. return this.$t('common.'+data);
  59. },
  60. async getInitIdDetail(){
  61. const that = this;
  62. const res = await this.$myRequest({
  63. url: '/cms/cmsInformationViews/',
  64. data: {
  65. pageSize:6,
  66. pageNo:1,
  67. businessType:'help_center',
  68. businessId:that.initID,
  69. language:'EN',
  70. }
  71. });
  72. if(res.data){
  73. this.initDataDetails = res.data.cmsInformationViews || [];
  74. if(this.initDataDetails){
  75. this.initDataDetails.forEach(item=>{
  76. if(item.businessId == that.initID){
  77. return that.contentHtml = item.contentHtml;
  78. }
  79. })
  80. }
  81. }
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. page {
  88. background-color: #fff;
  89. }
  90. .center {
  91. width: 100%;
  92. text-align: center;
  93. }
  94. .weight7 {
  95. font-weight: 700;
  96. }
  97. </style>