async historyListByYear(dateYear){
await getAction("/menstrual/historyListByYear?year="+dateYear).then(res=>{
console.log(res,"LastYear")
if(res.data.code=200){
let {cycleNumber,continuousDays} = res.data.result.userMenstrualBasics;
this.cycleNumber=cycleNumber
this.continuousDays=continuousDays
console.log(cycleNumber,'cycleNumber');
console.log(continuousDays,"continuousDays");
}
})
},
async historyAdd(){
await postAction("/menstrual/historyAdd?startTime=" + this.SetTime).then(res => {
if (res.data.code = 200) {
console.log(res,"result")
this.SetId = res.data.result.id
console.log(this.SetId,"SetId")
this.historyEdit(this.SetId)
}
})
},
async historyEdit(id) {
await postAction("/menstrual/historyEdit?endTime=" + this.SetTime1 + "&id=" + id).then(res => {
if (res.data.code = 200) {
/*let myDate = new Date();
myDate.setDate(myDate.getDate()+5)*/
console.log(this.endTime, "endTime");
console.log(res, "操作成功")
}
})
},
本代码是vue控制调用的方法
浙公网安备 33010602011771号