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

155 lines
3.3 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="releaseRecord">
  3. <!--顶部导航栏-->
  4. <navbar
  5. leftClick
  6. @leftClick="$utils.navigateBack"
  7. title="我的发布"/>
  8. <!--主页面-->
  9. <view class="frame">
  10. <!--标题-->
  11. <view class="title">
  12. <span>我的发布</span>
  13. </view>
  14. <!--标签栏-->
  15. <view class="tabbar">
  16. <view class="tabbarItemActive" @click="tabChange('all')">
  17. <span :class="checkedIndex==0 ? 'active' : ''">全部</span>
  18. </view>
  19. <view class="tabbarItemNoActive" @click="tabChange('tiezi')">
  20. <span :class="checkedIndex==1 ? 'active' : ''">贴子</span>
  21. </view>
  22. <view class="tabbarItemNoActive" @click="tabChange('mingpian')">
  23. <span :class="checkedIndex==2 ? 'active' : ''">名片</span>
  24. </view>
  25. </view>
  26. <!--发布列表-->
  27. <view style="" class="publishListClass">
  28. <ReleaseList :list="recordsList"/>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import ReleaseList from "@/pages/mine/sonPage/release/releaseList.vue";
  35. import {
  36. mapState
  37. } from 'vuex'
  38. export default {
  39. name: "releaseRecord",
  40. components: {
  41. ReleaseList
  42. },
  43. data() {
  44. return {
  45. recordsList: [
  46. {
  47. title: "这是一条动态",
  48. createTime: '2024-08-22 09:00:00',
  49. createBy: "小飞",
  50. isPay: "是"
  51. },
  52. ],
  53. checkedIndex: 0,
  54. queryParams: {
  55. pageNo: 1,
  56. pageSize: 10,
  57. },
  58. };
  59. },
  60. mounted() {
  61. this.getData()
  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(type) {
  74. this.$api('infoGetMyReleasePage', {
  75. pageNo: this.queryParams.pageNo,
  76. pageSize: this.queryParams.pageSize,
  77. // 缺少type参数,需要补充
  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.queryParams.pageNo = 1
  89. this.queryParams.pageSize = 10
  90. this.getData()
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. * {
  97. box-sizing: border-box;
  98. margin: 0;
  99. padding: 0;
  100. }
  101. .releaseRecord {
  102. width: 100vw;
  103. height: 100vh;
  104. .frame {
  105. width: 100%;
  106. //height: calc(100vh - 220rpx);
  107. padding: 28rpx 28rpx 0 28rpx;
  108. .title {
  109. font-size: 34rpx;
  110. color: #333;
  111. font-weight: 700
  112. }
  113. .tabbar {
  114. display: flex;
  115. justify-content: flex-start;
  116. gap: 20rpx;
  117. margin-top: 40rpx;
  118. .tabbarItemActive {
  119. padding: 10rpx 40rpx;
  120. background: $uni-linear-gradient-color;
  121. -webkit-background-clip: text; /*将设置的背景颜色限制在文字中*/
  122. -webkit-text-fill-color: transparent; /*给文字设置成透明*/
  123. }
  124. .tabbarItemNoActive {
  125. padding: 10rpx 40rpx;
  126. background-color: #eaeaeb;
  127. color: #777777;
  128. border-radius: 20rpx;
  129. }
  130. }
  131. .publishListClass {
  132. //margin-top: 10rpx;
  133. height: 78vh;
  134. //margin-top: 300rpx;
  135. overflow: auto;
  136. width: 100%;
  137. }
  138. }
  139. }
  140. </style>