future 1 рік тому
батько
коміт
744c2789ac
2 змінених файлів з 6 додано та 2 видалено
  1. 4 0
      assets/script/config.ts
  2. 2 2
      assets/script/edit/level_list.ts

+ 4 - 0
assets/script/config.ts

@@ -7,6 +7,10 @@ export class config {
     static domain = "https://zcapi.xwrun.com";
     static version = '调试 v2.1.0'
     static is_MAC_edit = false; //目前临时处理:如果是Mac并且浏览器打开了检查时设置为true,正式打包需要设置为false
+    static LevelType = {
+        LEVEL:0,      //关卡
+        LONG_STORY:1, //长篇
+    }
     static select_res_and_control_type = {
         RES_TYPE:0,
         CONTROL_TYPE:1,

+ 2 - 2
assets/script/edit/level_list.ts

@@ -77,10 +77,10 @@ export class level_list extends Component {
     requestData() {
         this.content.removeAllChildren()
 
-        let stype = 0    //0:短篇 1:长篇
+        let stype = config.LevelType.LEVEL  //0:关卡,1:长篇
         let book_id = 0
         if(this.m_long_story_list_data) {
-            stype = 1
+            stype = config.LevelType.LONG_STORY
             book_id = this.m_long_story_list_data.id
         }
         let opt = {"stype":stype,"book_id":book_id,"page":this.m_cur_page,"limit":this.m_every_page_count}