Browse Source

我的推广时间选择器Bug

master
chenkun 10 months ago
parent
commit
bf2aeef451
1 changed files with 17 additions and 17 deletions
  1. +17
    -17
      pages_mine/mine/promotionRecord.vue

+ 17
- 17
pages_mine/mine/promotionRecord.vue View File

@ -15,16 +15,14 @@
<!--搜索框-->
<view style="width:40%;height:100%">
<uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
@change="keyWordChange"
></uv-input>
@change="keyWordChange"></uv-input>
</view>
<!--开始时间-->
<view class="dateTimeCls">
<view class="date" @click="startDateOpen">
{{ queryParams.startDate }}
<uv-datetime-picker ref="startDateRef" v-model="queryParams.startDate" mode="date"
@confirm="startDateChange">
</uv-datetime-picker>
@confirm="startDateChange"></uv-datetime-picker>
</view>
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
@ -53,7 +51,7 @@
<script>
import PromotionRecordList from "./sonPage/promotion/promotionRecordList.vue";
import moment from "moment";
import dayjs from "dayjs";
export default {
components: {
PromotionRecordList
@ -64,8 +62,8 @@
queryParams: {
pageNo: 1,
pageSize: 10,
startDate: moment(new Date()).format('YYYY-MM-DD'),
endDate: moment(new Date()).format('YYYY-MM-DD'),
startDate: dayjs(new Date()).format('YYYY-MM-DD'),
endDate: dayjs(new Date()).format('YYYY-MM-DD'),
keyWord: '',
},
}
@ -86,7 +84,6 @@
methods: {
getData() {
console.log("==getData==")
this.$api('infoGetPromotionPage', {
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
@ -100,23 +97,26 @@
}
})
},
keyWordChange(val) {
console.log("val",val)
this.queryParams.keyWord = val
this.getData()
},
keyWordChange(val) {
console.log("val", val)
this.queryParams.keyWord = val
this.getData()
},
startDateChange(val) {
this.queryParams.startDate = moment(new Date(val.value)).format('YYYY-MM-DD')
this.$nextTick(() => {
this.queryParams.startDate = dayjs(val.value).format("YYYY-MM-DD")
});
this.getData()
},
startDateOpen() {
this.$refs.startDateRef.open();
},
endDateChange(val) {
var aaa = moment(new Date(val.value)).format('YYYY-MM-DD')
console.log(aaa,"aaaaaaaaaaaa")
this.queryParams.endDate = aaa
this.$nextTick(() => {
this.queryParams.endDate = dayjs(val.value).format("YYYY-MM-DD")
});
this.getData()
},
endDateOpen() {
this.$refs.endDateRef.open();


Loading…
Cancel
Save