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

200 lines
4.3 KiB

11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
  1. <template>
  2. <view class="promotionRecord">
  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="search">
  13. <!--搜索框-->
  14. <view style="width:30%;height:100%">
  15. <uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
  16. @change="keyWordChange"></uv-input>
  17. </view>
  18. <!--开始时间-->
  19. <view class="dateTimeCls">
  20. <view class="date" @click="startDateOpen">
  21. {{ queryParams.startDate }}
  22. <uv-datetime-picker ref="startDateRef" v-model="queryParams.startDate" mode="date"
  23. @confirm="startDateChange"></uv-datetime-picker>
  24. </view>
  25. <view class="image">
  26. <image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
  27. </view>
  28. </view>
  29. <!--结束时间-->
  30. <view class="dateTimeCls">
  31. <view class="date" @click="endDateOpen">
  32. {{ queryParams.endDate }}
  33. <uv-datetime-picker ref="endDateRef" v-model="queryParams.endDate" mode="date"
  34. @confirm="endDateChange">
  35. </uv-datetime-picker>
  36. </view>
  37. <view class="image">
  38. <image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
  39. </view>
  40. </view>
  41. </view>
  42. <!--推广列表-->
  43. <view style="" class="publishListClass">
  44. <PromotionRecordList :list="promotionRecordList" />
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import PromotionRecordList from "./sonPage/promotion/promotionRecordList.vue";
  51. import dayjs from "dayjs";
  52. export default {
  53. components: {
  54. PromotionRecordList
  55. },
  56. data() {
  57. return {
  58. promotionRecordList: [
  59. {
  60. name:'aaa',
  61. tuTime:1,
  62. price:9.9,
  63. createTime:new Date(),
  64. }
  65. ],
  66. queryParams: {
  67. pageNo: 1,
  68. pageSize: 10,
  69. startDate: dayjs(new Date()).subtract(30,'day').format('YYYY-MM-DD'),
  70. endDate: dayjs(new Date()).format('YYYY-MM-DD'),
  71. keyWord: '',
  72. },
  73. }
  74. },
  75. onReachBottom() {
  76. let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
  77. if (allTotal < this.total) {
  78. //当前条数小于总条数 则增加请求数
  79. this.queryParams.pageSize += 10
  80. this.getData() //调用加载数据方法
  81. }
  82. },
  83. mounted() {
  84. this.getData()
  85. },
  86. methods: {
  87. getData() {
  88. this.$api('infoGetPromotionPage', {
  89. pageNo: this.queryParams.pageNo,
  90. pageSize: this.queryParams.pageSize,
  91. startDate: this.queryParams.startDate,
  92. endDate: this.queryParams.endDate,
  93. keyWord: this.queryParams.keyWord
  94. }, res => {
  95. if (res.code == 200) {
  96. this.promotionRecordList = res.result.records
  97. this.total = res.result.total
  98. }
  99. })
  100. },
  101. keyWordChange(val) {
  102. this.queryParams.keyWord = val
  103. this.getData()
  104. },
  105. startDateChange(val) {
  106. this.$nextTick(() => {
  107. this.queryParams.startDate = dayjs(val.value).format("YYYY-MM-DD")
  108. this.getData()
  109. });
  110. },
  111. startDateOpen() {
  112. this.$refs.startDateRef.open();
  113. },
  114. endDateChange(val) {
  115. this.$nextTick(() => {
  116. this.queryParams.endDate = dayjs(val.value).format("YYYY-MM-DD")
  117. this.getData()
  118. });
  119. },
  120. endDateOpen() {
  121. this.$refs.endDateRef.open();
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. * {
  128. box-sizing: border-box;
  129. margin: 0;
  130. padding: 0;
  131. }
  132. .promotionRecord {
  133. width: 100vw;
  134. height: 100vh;
  135. .frame {
  136. width: 100%;
  137. //height: calc(100vh - 220rpx);
  138. padding: 28rpx 28rpx 0 28rpx;
  139. .title {
  140. font-size: 34rpx;
  141. color: #333;
  142. font-weight: 700
  143. }
  144. .search {
  145. display: flex;
  146. align-items: center;
  147. gap: 10rpx;
  148. width: 100%;
  149. height: 80rpx;
  150. margin-top: 20rpx;
  151. .dateTimeCls {
  152. display: flex;
  153. align-items: center;
  154. justify-content: space-between;
  155. width: 30%;
  156. height: 80%;
  157. border: 1px solid #b0b2b3;
  158. padding: 5rpx;
  159. border-radius: 20rpx;
  160. .date {
  161. font-size: 25rpx;
  162. display: flex;
  163. align-items: center;
  164. width: 80%;
  165. height: 100%;
  166. color: #b0b2b3;
  167. }
  168. .image {
  169. width: 20%;
  170. height: 100%;
  171. }
  172. }
  173. }
  174. .publishListClass {
  175. margin-top: 10rpx;
  176. height: 78vh;
  177. overflow: auto;
  178. width: 100%;
  179. }
  180. }
  181. }
  182. </style>