帧视界壹通告,付费看视频的微信小程序
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.

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