record.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view>
  3. <view style="color: #fff;">
  4. <tn-nav-bar backgroundColor="#207CF7"
  5. :bottomShadow="false">{{appInfo.number_alias?appInfo.number_alias:'点数'}}/会员时长记录</tn-nav-bar>
  6. <view :style="{height: tobheight+'px'}"></view>
  7. </view>
  8. <z-paging ref="paging" refresher-complete-delay="200" v-model="jobList" @query="queryList">
  9. <view slot="top" class="z_tabs" :style="{marginTop: tobheight+'px'}"></view>
  10. <block v-for="(item,index) in jobList" :key="index">
  11. <view class="record-list flxe align-center justify-between">
  12. <view>
  13. <view class="record-title">{{item.mark}}</view>
  14. <view class="time">{{item.create_time}}</view>
  15. </view>
  16. <view v-if="item.mark != '充值时长'">
  17. <view class="quantity">{{item.pm == 0?'- ':'+ '}}{{item.coin}}</view>
  18. </view>
  19. </view>
  20. </block>
  21. </z-paging>
  22. <!-- <u-loading-page :loading="loading" loading-text="正在加载" icon-size="35" color="#9e9e9e" loadingColor="#9e9e9e"></u-loading-page> -->
  23. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. mapMutations,
  29. mapActions,
  30. mapState,
  31. mapGetters
  32. } from 'vuex';
  33. export default {
  34. data() {
  35. return {
  36. loading: true,
  37. jobList: [],
  38. tobheight: 45,
  39. platform: this.$platform.get(),
  40. isLoading: true
  41. };
  42. },
  43. computed: {
  44. ...mapGetters(['appInfo', 'userInfo'])
  45. },
  46. onLoad() {
  47. if (this.platform == 'wxMiniProgram') {
  48. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  49. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  50. this.tobheight = (menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height)
  51. }
  52. // this.memberbill()
  53. },
  54. onShow() {
  55. if (!this.userInfo.nickname) {
  56. uni.navigateTo({
  57. url: '/pages/user/signin'
  58. })
  59. }
  60. },
  61. methods: {
  62. queryList(pageNo, pageSize) {
  63. //这里的pageNo和pageSize会自动计算好,直接传给服务器即可
  64. const params = {
  65. page: pageNo,
  66. limit: pageSize,
  67. };
  68. this.$http('member.bill', params).then(res => {
  69. if (res.code == 0) {
  70. uni.setNavigationBarTitle({
  71. title: this.appInfo.site_name
  72. });
  73. this.$refs.paging.complete(res.data.data);
  74. this.isLoading = false
  75. }
  76. });
  77. },
  78. memberbill() {
  79. this.$http('member.bill').then(res => {
  80. if (res.code == 0) {
  81. this.jobList = res.data
  82. this.loading = false
  83. }
  84. });
  85. }
  86. }
  87. };
  88. </script>
  89. <style lang="scss">
  90. page {
  91. background: #f6f7fb;
  92. }
  93. // view,
  94. // scroll-view,
  95. // swiper,
  96. // button,
  97. // input,
  98. // textarea,
  99. // label,
  100. // navigator,
  101. // image {
  102. // box-sizing: border-box;
  103. // }
  104. .record-list {
  105. background: #ffffff;
  106. margin: 30rpx;
  107. padding: 30rpx;
  108. border-radius: 20rpx;
  109. .record-title {
  110. font-size: 32rpx;
  111. margin-bottom: 10rpx;
  112. }
  113. .time {
  114. color: #9e9e9e;
  115. }
  116. .quantity {
  117. font-weight: bold;
  118. font-size: 34rpx;
  119. }
  120. }
  121. </style>