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

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