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

157 lines
3.4 KiB

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