修改登录接口变化引起的 bug
This commit is contained in:
+4
-3
@@ -48,14 +48,15 @@ export default class Sms extends BaseModel {
|
||||
}
|
||||
|
||||
public async cntLimit(cnt: number) {
|
||||
console.log('hasSendToday:', this.hasSendToday());
|
||||
if (await this.hasSendToday() && this.countToday >= cnt) {
|
||||
console.log('hasSendToday:', this.hasSendToday(), this.countToday, cnt);
|
||||
if (this.hasSendToday() && this.countToday >= cnt) {
|
||||
return true;
|
||||
}
|
||||
this.countToday = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
public async hasSendToday() {
|
||||
public hasSendToday() {
|
||||
console.log(moment(this.updateTime).format('YYYY-MM-DD'), moment(Date.now()).format('YYYY-MM-DD'));
|
||||
return moment(this.updateTime).format('YYYY-MM-DD') === moment(Date.now()).format('YYYY-MM-DD');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user