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

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