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

210 lines
4.5 KiB

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