future hai 11 meses
pai
achega
c17d6acb35
Modificáronse 3 ficheiros con 24 adicións e 18 borrados
  1. 8 8
      assets/edit_game.scene
  2. 4 0
      assets/script/http.ts
  3. 12 10
      assets/script/tools.ts

+ 8 - 8
assets/edit_game.scene

@@ -213,7 +213,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1920,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -350,7 +350,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 960,
+    "_orthoHeight": 959.9999999999999,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -540,7 +540,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 840,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7339,7 +7339,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -510,
+      "y": -509.9999999999999,
       "z": 0
     },
     "_lrot": {
@@ -19663,7 +19663,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 840,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -185098,7 +185098,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 419.9999999999998,
-      "height": 1870
+      "height": 1869.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -185323,7 +185323,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 419.9999999999998,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -191245,7 +191245,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1920,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 4 - 0
assets/script/http.ts

@@ -85,6 +85,10 @@ export class http  {
                 call_back(null,xml.responseText);
             } else if (xml.status === 404) {
                 call_back('404 page not found!',null);
+            } else if (xml.readyState === 3) {
+                // console.log("status ==",'Request dealing!')
+            } else if (xml.readyState === 2) {
+                // console.log("status ==", 'Request received!')
             } else {
                 console.log('请求出错=',url)
                 tools.showToast('请求出错')

+ 12 - 10
assets/script/tools.ts

@@ -419,17 +419,19 @@ export class tools  {
     public static requestGetAnimationList(call) {
         http.get('/tool/mysnote/get_animation',(err,data)=>{
             // console.log('err=',err,'data=',data)
-            let _data = JSON.parse(data);
-            if(_data.code==config.MSG_CODE.SUCCESS) {
-                let content_list = JSON.parse(_data.content.content)
-                let list:att_ani_data[] = []
-                for (let index = 0; index < content_list.length; index++) {
-                    const element = content_list[index];
-                    list.push(element)
+            if(!err) {
+                let _data = JSON.parse(data);
+                if(_data.code==config.MSG_CODE.SUCCESS) {
+                    let content_list = JSON.parse(_data.content.content)
+                    let list:att_ani_data[] = []
+                    for (let index = 0; index < content_list.length; index++) {
+                        const element = content_list[index];
+                        list.push(element)
+                    }
+                    call(list)
+                } else {
+                    tools.showToast('获取动画列表失败')
                 }
-                call(list)
-            } else {
-                tools.showToast('获取动画列表失败')
             }
         })
     }