Commit 010032cf authored by liujiangnan's avatar liujiangnan

fix: 时间显示问题

parent 5c03b809
......@@ -47,7 +47,8 @@ export default class SceneComponent extends MyCocosSceneComponent_NJ_usercenter
getFomartDate() {
const date = new Date();
date.setDate(date.getDate() - date.getDay() + 1);
const day = date.getDay()==0 ? 7 : date.getDay();
date.setDate(date.getDate() - (day - 1));
const monday = date["pattern"]("MM.dd");
date.setDate(date.getDate() + 6);
const sunday = date["pattern"]("MM.dd");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment