regulation.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view class="">
  3. <!-- <u-navbar
  4. :title="title"
  5. :placeholder="true"
  6. :autoBack="true"
  7. :safeAreaInsetTop="true"
  8. >
  9. </u-navbar> -->
  10. <!-- <view class="title">积分规则</view> -->
  11. <view class="page-wrap">
  12. <u-parse :content="content"></u-parse>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. title:'',
  21. regulationName:'',
  22. content:'',
  23. }
  24. },
  25. onShow() {
  26. },
  27. onLoad(page) {
  28. this.title = page.regulationName;;
  29. this.regulationName = page.regulationName;
  30. // console.log('page',page);
  31. this.getPageData();
  32. uni.setNavigationBarTitle({
  33. title: this.title
  34. });
  35. },
  36. methods: {
  37. getPageData(){
  38. this.$u.api.memberCreditDesc({type:1,name:this.regulationName}).then(res=>{
  39. this.content = res.data.content
  40. console.log('res',res.data);
  41. }).catch(err=>{
  42. console.log('memberCreditDesc',err);
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style>
  49. page{
  50. background-color: #F5F9FC;
  51. }
  52. </style>
  53. <style lang="scss" scoped>
  54. .title{
  55. text-align: center;
  56. }
  57. </style>