소스 검색

时间格式问题

tangning 3 년 전
부모
커밋
77952756ba
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      pages/room/add.js

+ 2 - 2
pages/room/add.js

@@ -260,8 +260,8 @@ Page({
       anchorUserId, //主持人ID
       assistantUserId, //助理用户iD
 
-      effectiveStartTime: new Date(effectiveStartTime).getTime() ,
-      effectiveEndTime: new Date(effectiveEndTime).getTime() ,
+      effectiveStartTime: new Date(effectiveStartTime.replace(/-/g, "/")).getTime() ,
+      effectiveEndTime: new Date(effectiveEndTime.replace(/-/g, "/")).getTime() ,
     }, "POST", 'application/json')
 
     // debugger