帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
3.4 KiB

11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="releaseRecord">
  3. <!--顶部导航栏-->
  4. <navbar leftClick @leftClick="$utils.navigateBack" title="我的发布" />
  5. <!--主页面-->
  6. <view class="frame">
  7. <!--标题-->
  8. <view class="title">
  9. <span>我的发布</span>
  10. </view>
  11. <!--标签栏-->
  12. <view class="tabbar">
  13. <view class="" @click="tabChange(0)">
  14. <span :class="checkedIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'">全部</span>
  15. </view>
  16. <view class="" @click="tabChange(1)">
  17. <span :class="checkedIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'">贴子</span>
  18. </view>
  19. <view class="" @click="tabChange(2)">
  20. <span :class="checkedIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'">名片</span>
  21. </view>
  22. </view>
  23. <!--发布列表-->
  24. <view style="" class="publishListClass">
  25. <ReleaseList :list="recordsList" ref="releaseList" />
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import ReleaseList from "./sonPage/release/releaseList.vue";
  32. import {
  33. mapState
  34. } from 'vuex'
  35. export default {
  36. name: "releaseRecord",
  37. components: {
  38. ReleaseList
  39. },
  40. data() {
  41. return {
  42. recordsList: [],
  43. total: 0,
  44. checkedIndex: 0,
  45. queryParams: {
  46. pageNo: 1,
  47. pageSize: 10,
  48. },
  49. };
  50. },
  51. mounted() {
  52. this.getData()
  53. },
  54. onReachBottom() {
  55. console.log("===我的发布页面到底部了,开始加载数据===")
  56. let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
  57. if (allTotal < this.total) {
  58. //当前条数小于总条数 则增加请求数
  59. this.queryParams.pageSize += 10
  60. this.getData() //调用加载数据方法
  61. }
  62. },
  63. computed: {
  64. ...mapState(['userInfo']),
  65. },
  66. onShow() {
  67. // 检查是否登录
  68. // this.$refs.showLogin.checkLogin()
  69. // 获取用户个人信息
  70. this.$store.commit('getUserInfo')
  71. },
  72. methods: {
  73. getData() {
  74. this.$api('infoGetMyReleasePage', {
  75. pageNo: this.queryParams.pageNo,
  76. pageSize: this.queryParams.pageSize,
  77. // 缺少type参数,需要补充
  78. state: this.checkedIndex
  79. }, res => {
  80. if (res.code == 200) {
  81. this.recordsList = res.result.records
  82. this.total = res.result.total
  83. console.log(res.result, "发布列表")
  84. }
  85. })
  86. },
  87. // 标签栏发生变化
  88. tabChange(type) {
  89. this.checkedIndex = type
  90. this.queryParams.pageNo = 1
  91. this.queryParams.pageSize = 10
  92. this.getData()
  93. },
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. * {
  99. box-sizing: border-box;
  100. margin: 0;
  101. padding: 0;
  102. }
  103. .releaseRecord {
  104. width: 100vw;
  105. height: 100vh;
  106. .frame {
  107. width: 100%;
  108. //height: calc(100vh - 220rpx);
  109. padding: 28rpx 28rpx 0 28rpx;
  110. .title {
  111. font-size: 34rpx;
  112. color: #333;
  113. font-weight: 700
  114. }
  115. .tabbar {
  116. display: flex;
  117. justify-content: flex-start;
  118. gap: 20rpx;
  119. margin-top: 40rpx;
  120. .tabbarItemActive {
  121. padding: 10rpx 40rpx;
  122. background: $uni-linear-gradient-color;
  123. -webkit-background-clip: text;
  124. /*将设置的背景颜色限制在文字中*/
  125. -webkit-text-fill-color: transparent;
  126. /*给文字设置成透明*/
  127. border-radius: 20rpx;
  128. }
  129. .tabbarItemNoActive {
  130. padding: 10rpx 40rpx;
  131. background-color: #eaeaeb;
  132. color: #777777;
  133. border-radius: 20rpx;
  134. }
  135. }
  136. .publishListClass {
  137. //margin-top: 10rpx;
  138. //height: 78vh;
  139. //margin-top: 300rpx;
  140. overflow: auto;
  141. width: 100%;
  142. }
  143. }
  144. }
  145. </style>