index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="container">
  3. <view class="h-content">
  4. <view class="" v-html="termOfService.aboutContent"></view>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. // import {getTermOfServiceByType} from '/src/api/me/me.js';
  10. export default {
  11. data() {
  12. return {
  13. reqParm: {
  14. auth: true,
  15. type: 1
  16. },
  17. };
  18. },
  19. mounted() {
  20. },
  21. onLoad(option) {
  22. uni.setNavigationBarTitle({
  23. title:option.name
  24. })
  25. this.reqParm.type = option.type;
  26. this.getTermOfServiceByType();
  27. },
  28. methods: {
  29. // 获取服务条款信息
  30. getTermOfServiceByType(){
  31. // 获取数据
  32. this.$api.getTermOfServiceByType(this.reqParm).then((res)=>{
  33. if(res.aboutContent){
  34. this.termOfService.aboutContent = res.aboutContent
  35. }else{
  36. this.termOfService.aboutContent = "暂无信息!!!"
  37. }
  38. }).catch(() =>{
  39. uni.showToast({
  40. title: "操作失败"
  41. })
  42. });
  43. },
  44. }
  45. };
  46. </script>
  47. <style lang="scss">
  48. .container{
  49. padding: 12px;
  50. }
  51. </style>