rules.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <app-layout>
  3. <view class="page">
  4. <view class='nav dir-left-nowrap'>
  5. <image class='nav-img' src='./../image/right.png'></image>
  6. <view>规则说明</view>
  7. </view>
  8. <view class="padding">
  9. <app-rich-text class='text' :content="rules"></app-rich-text>
  10. </view>
  11. </view>
  12. </app-layout>
  13. </template>
  14. <script>
  15. import { mapState } from "vuex";
  16. import appRichText from "../../../components/basic-component/app-rich/parse.vue";
  17. export default {
  18. data() {
  19. return {
  20. rules: ' ',
  21. }
  22. },
  23. name: "rules",
  24. components: {
  25. "app-rich-text": appRichText,
  26. },
  27. computed: {
  28. ...mapState({
  29. theme: state => state.mallConfig.theme,
  30. })
  31. },
  32. methods: {
  33. getList(id) {
  34. let that = this;
  35. that.$showLoading({
  36. text: '加载中...'
  37. });
  38. that.$request({
  39. url: that.$api.member.index,
  40. }).then(response=>{
  41. that.$hideLoading();
  42. if(response.code === 0) {
  43. that.loading = false;
  44. that.rules = response.data.mall_member.rules;
  45. }
  46. }).catch(e => {
  47. that.$hideLoading();
  48. });
  49. },
  50. },
  51. onLoad() {
  52. this.getList();
  53. }
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .page {
  58. position: absolute;
  59. top: 0;
  60. left: 0;
  61. width: 100%;
  62. height: 100%;
  63. background-color: #fff;
  64. }
  65. .nav {
  66. font-size: #{32rpx};
  67. color: #353535;
  68. height: #{92rpx};
  69. padding: #{40rpx} #{24rpx} #{4rpx};
  70. background-color: #fff;
  71. }
  72. .nav-img {
  73. height: #{48rpx};
  74. width: #{48rpx};
  75. float: left;
  76. display: block;
  77. margin-right: #{24rpx};
  78. }
  79. .padding {
  80. padding: #{24rpx};
  81. background-color: #fff;
  82. }
  83. </style>