rules.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <app-layout>
  3. <view class="page">
  4. <view class='top'>签到规则</view>
  5. <view class='rules'>
  6. <text class='rule'>{{rule}}</text>
  7. </view>
  8. </view>
  9. </app-layout>
  10. </template>
  11. <script>
  12. import appLayout from "../../../components/basic-component/app-layout/app-layout.vue";
  13. import appFormId from "../../../components/basic-component/app-form-id/app-form-id.vue";
  14. import { mapState } from "vuex";
  15. export default {
  16. data() {
  17. return {
  18. rule: "",
  19. }
  20. },
  21. components: {
  22. "app-layout": appLayout,
  23. "app-form-id": appFormId
  24. },
  25. computed: {
  26. ...mapState({
  27. theme: state => state.mallConfig.theme,
  28. })
  29. },
  30. methods: {
  31. getList() {
  32. let that = this;
  33. that.$request({
  34. url: that.$api.check_in.index,
  35. }).then(response=>{
  36. that.$hideLoading();
  37. if(response.code == 0) {
  38. that.rule = response.data.config.rule;
  39. }else {
  40. uni.showToast({
  41. title: response.msg,
  42. icon: 'none',
  43. duration: 1000
  44. });
  45. }
  46. }).catch(response => {
  47. that.$hideLoading();
  48. });
  49. },
  50. },
  51. onLoad() {
  52. let that = this;
  53. that.getList();
  54. }
  55. }
  56. </script>
  57. <style scoped lang="scss">
  58. .page {
  59. padding-top: #{40rpx};
  60. color: #353535;
  61. background-color: white;
  62. position: absolute;
  63. width: 100%;
  64. height: 100%;
  65. }
  66. .top {
  67. margin-left: #{40rpx};
  68. }
  69. .rules{
  70. width: 100%;
  71. padding: 20rpx #{40rpx};
  72. }
  73. </style>