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.
41 lines
873 B
41 lines
873 B
2 months ago
|
const overlaypop = {
|
||
|
state: {
|
||
|
//存储查询的任务列表
|
||
|
listdata: [],
|
||
|
showOverPop: false
|
||
|
},
|
||
|
mutations: {
|
||
|
setlist: (state, list) => {
|
||
|
state.listdata = list
|
||
|
},
|
||
|
setshowOverPop: (state, newstate) => {
|
||
|
state.showOverPop = newstate
|
||
|
}
|
||
|
},
|
||
|
actions: {
|
||
|
//我的消息--获取消息条数
|
||
|
getNewsList({ state, commit }) {
|
||
|
// 获取当前日期
|
||
|
const time = new Date();
|
||
|
let year = time.getFullYear();
|
||
|
let month = time.getMonth() + 1;
|
||
|
let day = time.getDate();
|
||
|
let single = `${ year + '-' + month + '-' + day}`;
|
||
|
|
||
|
console.log(single)
|
||
|
listTask({ cjTime: single }).then(res => {
|
||
|
if (res.rows === []) {
|
||
|
commit("setshowOverPop", false)
|
||
|
} else {
|
||
|
console.log(res.rows.length, "vuex今日任务");
|
||
|
commit("setlist", res.rows)
|
||
|
commit("setshowOverPop", true)
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
export default overlaypop
|