shawenguan hace 1 año
padre
commit
92c03c3983
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      Scripts/hbcpre/hbcpreHelper.js

+ 3 - 2
Scripts/hbcpre/hbcpreHelper.js

@@ -466,8 +466,8 @@ function handleCompoundIndex(){
     // content 内容html格式
     collection.status = 1;
     // collection.allow_state = 1;
-    collection.begin_time = new Date().getTime() - 3600;
-    collection.end_time = new Date().getTime() + 3600;
+    collection.begin_time = parseInt(new Date().getTime()/1000) - 3600;
+    collection.end_time = parseInt(new Date().getTime()/1000) + 3600;
     // created_at 创建日期 yyyy-MM-dd hh:mm:ss
     // updated_at 更新日期 yyyy-MM-dd hh:mm:ss
     // all_num 总量
@@ -488,6 +488,7 @@ function handleCompoundIndex(){
     // 随机材料-需要选择
     let randomList = data.randomcollection;
     if(randomList.length == 0){
+        data.random_num = 1;
         data.randomcollection = [
             [{id: 0, count_num: 10000, nums: 0}],
         ];