record.vue 2.8 KB

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