浏览代码

修改问题

slambb 3 年之前
父节点
当前提交
9b60053f85

+ 170 - 128
assets/Prefabs/NBuildings/Labour/Labour_205_Holy_Farmland.prefab

@@ -33,33 +33,33 @@
         "__id__": 13
       },
       {
-        "__id__": 58
+        "__id__": 60
       },
       {
-        "__id__": 81
+        "__id__": 83
       },
       {
-        "__id__": 95
+        "__id__": 97
       }
     ],
     "_active": true,
     "_level": 1,
     "_components": [
       {
-        "__id__": 102
+        "__id__": 104
       },
       {
-        "__id__": 106
+        "__id__": 108
       },
       {
-        "__id__": 107
+        "__id__": 109
       },
       {
-        "__id__": 108
+        "__id__": 110
       }
     ],
     "_prefab": {
-      "__id__": 109
+      "__id__": 111
     },
     "_opacity": 255,
     "_color": {
@@ -497,14 +497,14 @@
         "__id__": 14
       },
       {
-        "__id__": 53
+        "__id__": 55
       }
     ],
     "_active": false,
     "_level": 2,
     "_components": [],
     "_prefab": {
-      "__id__": 57
+      "__id__": 59
     },
     "_opacity": 255,
     "_color": {
@@ -569,27 +569,27 @@
         "__id__": 25
       },
       {
-        "__id__": 36
+        "__id__": 37
       },
       {
-        "__id__": 44
+        "__id__": 45
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 49
+        "__id__": 51
       },
       {
-        "__id__": 50
+        "__id__": 52
       },
       {
-        "__id__": 51
+        "__id__": 53
       }
     ],
     "_prefab": {
-      "__id__": 52
+      "__id__": 54
     },
     "_opacity": 255,
     "_color": {
@@ -1047,7 +1047,7 @@
     "_level": 3,
     "_components": [],
     "_prefab": {
-      "__id__": 35
+      "__id__": 36
     },
     "_opacity": 255,
     "_color": {
@@ -1069,7 +1069,7 @@
     },
     "_position": {
       "__type__": "cc.Vec3",
-      "x": -87.709,
+      "x": -89.251,
       "y": 0,
       "z": 0
     },
@@ -1310,23 +1310,26 @@
     "_components": [
       {
         "__id__": 33
+      },
+      {
+        "__id__": 34
       }
     ],
     "_prefab": {
-      "__id__": 34
+      "__id__": 35
     },
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
       "r": 255,
-      "g": 255,
-      "b": 255,
+      "g": 247,
+      "b": 111,
       "a": 255
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 22.25,
-      "height": 50.4
+      "width": 24.25,
+      "height": 52.4
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1387,6 +1390,24 @@
     "_N$cacheMode": 0,
     "_id": ""
   },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 32
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 247,
+      "b": 111,
+      "a": 255
+    },
+    "_width": 1,
+    "_id": ""
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -1418,18 +1439,18 @@
     },
     "_children": [
       {
-        "__id__": 37
+        "__id__": 38
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 41
+        "__id__": 42
       }
     ],
     "_prefab": {
-      "__id__": 43
+      "__id__": 44
     },
     "_opacity": 255,
     "_color": {
@@ -1478,21 +1499,21 @@
     "_name": "Background",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 36
+      "__id__": 37
     },
     "_children": [],
     "_active": true,
     "_level": 2,
     "_components": [
       {
-        "__id__": 38
+        "__id__": 39
       },
       {
-        "__id__": 39
+        "__id__": 40
       }
     ],
     "_prefab": {
-      "__id__": 40
+      "__id__": 41
     },
     "_opacity": 255,
     "_color": {
@@ -1541,7 +1562,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 37
+      "__id__": 38
     },
     "_enabled": true,
     "_materials": [
@@ -1573,7 +1594,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 37
+      "__id__": 38
     },
     "_enabled": true,
     "alignMode": 0,
@@ -1611,14 +1632,14 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 36
+      "__id__": 37
     },
     "_enabled": true,
     "duration": 0.1,
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 42
+        "__id__": 43
       }
     ],
     "_N$interactable": true,
@@ -1686,7 +1707,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 37
+      "__id__": 38
     },
     "_id": ""
   },
@@ -1720,14 +1741,14 @@
     },
     "_children": [
       {
-        "__id__": 45
+        "__id__": 46
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [],
     "_prefab": {
-      "__id__": 48
+      "__id__": 50
     },
     "_opacity": 255,
     "_color": {
@@ -1776,18 +1797,21 @@
     "_name": "text",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 44
+      "__id__": 45
     },
     "_children": [],
     "_active": true,
     "_level": 4,
     "_components": [
       {
-        "__id__": 46
+        "__id__": 47
+      },
+      {
+        "__id__": 48
       }
     ],
     "_prefab": {
-      "__id__": 47
+      "__id__": 49
     },
     "_opacity": 255,
     "_color": {
@@ -1799,8 +1823,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 135.04,
-      "height": 22.68
+      "width": 135.44,
+      "height": 23.08
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1836,7 +1860,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 45
+      "__id__": 46
     },
     "_enabled": true,
     "_materials": [
@@ -1861,6 +1885,24 @@
     "_N$cacheMode": 0,
     "_id": ""
   },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 46
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_width": 0.2,
+    "_id": ""
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -1949,14 +1991,14 @@
     "_level": 3,
     "_components": [
       {
-        "__id__": 54
+        "__id__": 56
       },
       {
-        "__id__": 55
+        "__id__": 57
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 58
     },
     "_opacity": 255,
     "_color": {
@@ -2005,7 +2047,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 53
+      "__id__": 55
     },
     "_enabled": false,
     "_materials": [
@@ -2037,7 +2079,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 53
+      "__id__": 55
     },
     "_enabled": true,
     "_id": ""
@@ -2073,17 +2115,17 @@
     },
     "_children": [
       {
-        "__id__": 59
+        "__id__": 61
       },
       {
-        "__id__": 76
+        "__id__": 78
       }
     ],
     "_active": false,
     "_level": 2,
     "_components": [],
     "_prefab": {
-      "__id__": 80
+      "__id__": 82
     },
     "_opacity": 255,
     "_color": {
@@ -2132,31 +2174,31 @@
     "_name": "midSlider",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 58
+      "__id__": 60
     },
     "_children": [
       {
-        "__id__": 60
+        "__id__": 62
       },
       {
-        "__id__": 63
+        "__id__": 65
       },
       {
-        "__id__": 68
+        "__id__": 70
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 73
+        "__id__": 75
       },
       {
-        "__id__": 74
+        "__id__": 76
       }
     ],
     "_prefab": {
-      "__id__": 75
+      "__id__": 77
     },
     "_opacity": 255,
     "_color": {
@@ -2205,18 +2247,18 @@
     "_name": "bar",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 59
+      "__id__": 61
     },
     "_children": [],
     "_active": true,
     "_level": 0,
     "_components": [
       {
-        "__id__": 61
+        "__id__": 63
       }
     ],
     "_prefab": {
-      "__id__": 62
+      "__id__": 64
     },
     "_opacity": 255,
     "_color": {
@@ -2265,7 +2307,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 60
+      "__id__": 62
     },
     "_enabled": true,
     "_materials": [
@@ -2308,18 +2350,18 @@
     "_name": "multiple",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 59
+      "__id__": 61
     },
     "_children": [
       {
-        "__id__": 64
+        "__id__": 66
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [],
     "_prefab": {
-      "__id__": 67
+      "__id__": 69
     },
     "_opacity": 255,
     "_color": {
@@ -2368,18 +2410,18 @@
     "_name": "bg",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 63
+      "__id__": 65
     },
     "_children": [],
     "_active": true,
     "_level": 4,
     "_components": [
       {
-        "__id__": 65
+        "__id__": 67
       }
     ],
     "_prefab": {
-      "__id__": 66
+      "__id__": 68
     },
     "_opacity": 255,
     "_color": {
@@ -2428,7 +2470,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 64
+      "__id__": 66
     },
     "_enabled": true,
     "_materials": [
@@ -2482,18 +2524,18 @@
     "_name": "MaturityDate",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 59
+      "__id__": 61
     },
     "_children": [
       {
-        "__id__": 69
+        "__id__": 71
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [],
     "_prefab": {
-      "__id__": 72
+      "__id__": 74
     },
     "_opacity": 255,
     "_color": {
@@ -2542,18 +2584,18 @@
     "_name": "text",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 68
+      "__id__": 70
     },
     "_children": [],
     "_active": true,
     "_level": 4,
     "_components": [
       {
-        "__id__": 70
+        "__id__": 72
       }
     ],
     "_prefab": {
-      "__id__": 71
+      "__id__": 73
     },
     "_opacity": 255,
     "_color": {
@@ -2602,7 +2644,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 69
+      "__id__": 71
     },
     "_enabled": true,
     "_materials": [
@@ -2654,7 +2696,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 59
+      "__id__": 61
     },
     "_enabled": true,
     "_materials": [
@@ -2686,12 +2728,12 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 59
+      "__id__": 61
     },
     "_enabled": true,
     "_N$totalLength": 100,
     "_N$barSprite": {
-      "__id__": 61
+      "__id__": 63
     },
     "_N$mode": 0,
     "_N$progress": 1,
@@ -2714,21 +2756,21 @@
     "_name": "showPlantInfo",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 58
+      "__id__": 60
     },
     "_children": [],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 77
+        "__id__": 79
       },
       {
-        "__id__": 78
+        "__id__": 80
       }
     ],
     "_prefab": {
-      "__id__": 79
+      "__id__": 81
     },
     "_opacity": 255,
     "_color": {
@@ -2777,7 +2819,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 76
+      "__id__": 78
     },
     "_enabled": false,
     "_materials": [
@@ -2809,7 +2851,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 76
+      "__id__": 78
     },
     "_enabled": true,
     "_id": ""
@@ -2845,21 +2887,21 @@
     },
     "_children": [
       {
-        "__id__": 82
+        "__id__": 84
       },
       {
-        "__id__": 85
+        "__id__": 87
       }
     ],
     "_active": true,
     "_level": 2,
     "_components": [
       {
-        "__id__": 93
+        "__id__": 95
       }
     ],
     "_prefab": {
-      "__id__": 94
+      "__id__": 96
     },
     "_opacity": 255,
     "_color": {
@@ -2908,18 +2950,18 @@
     "_name": "lock",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 81
+      "__id__": 83
     },
     "_children": [],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 83
+        "__id__": 85
       }
     ],
     "_prefab": {
-      "__id__": 84
+      "__id__": 86
     },
     "_opacity": 255,
     "_color": {
@@ -2968,7 +3010,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 82
+      "__id__": 84
     },
     "_enabled": true,
     "_materials": [
@@ -3011,22 +3053,22 @@
     "_name": "SendLeasedButton",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 81
+      "__id__": 83
     },
     "_children": [
       {
-        "__id__": 86
+        "__id__": 88
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 90
+        "__id__": 92
       }
     ],
     "_prefab": {
-      "__id__": 92
+      "__id__": 94
     },
     "_opacity": 255,
     "_color": {
@@ -3075,21 +3117,21 @@
     "_name": "Background",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 85
+      "__id__": 87
     },
     "_children": [],
     "_active": true,
     "_level": 2,
     "_components": [
       {
-        "__id__": 87
+        "__id__": 89
       },
       {
-        "__id__": 88
+        "__id__": 90
       }
     ],
     "_prefab": {
-      "__id__": 89
+      "__id__": 91
     },
     "_opacity": 255,
     "_color": {
@@ -3138,7 +3180,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 86
+      "__id__": 88
     },
     "_enabled": true,
     "_materials": [
@@ -3170,7 +3212,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 86
+      "__id__": 88
     },
     "_enabled": true,
     "alignMode": 0,
@@ -3208,14 +3250,14 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 85
+      "__id__": 87
     },
     "_enabled": true,
     "duration": 0.1,
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 91
+        "__id__": 93
       }
     ],
     "_N$interactable": true,
@@ -3283,7 +3325,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 86
+      "__id__": 88
     },
     "_id": ""
   },
@@ -3313,7 +3355,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 81
+      "__id__": 83
     },
     "_enabled": true,
     "_materials": [],
@@ -3354,21 +3396,21 @@
     },
     "_children": [
       {
-        "__id__": 96
+        "__id__": 98
       }
     ],
     "_active": false,
     "_level": 2,
     "_components": [
       {
-        "__id__": 99
+        "__id__": 101
       },
       {
-        "__id__": 100
+        "__id__": 102
       }
     ],
     "_prefab": {
-      "__id__": 101
+      "__id__": 103
     },
     "_opacity": 255,
     "_color": {
@@ -3417,18 +3459,18 @@
     "_name": "harvest",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 95
+      "__id__": 97
     },
     "_children": [],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 97
+        "__id__": 99
       }
     ],
     "_prefab": {
-      "__id__": 98
+      "__id__": 100
     },
     "_opacity": 255,
     "_color": {
@@ -3477,7 +3519,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 96
+      "__id__": 98
     },
     "_enabled": true,
     "_materials": [
@@ -3520,7 +3562,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 95
+      "__id__": 97
     },
     "_enabled": true,
     "_id": ""
@@ -3530,7 +3572,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 95
+      "__id__": 97
     },
     "_enabled": true,
     "_id": ""
@@ -3558,7 +3600,7 @@
       "__id__": 8
     },
     "buildInfo": {
-      "__id__": 103
+      "__id__": 105
     },
     "buildZone": {
       "__id__": 2
@@ -3611,7 +3653,7 @@
     "totalInventory": 10,
     "goodsArray": [
       {
-        "__id__": 104
+        "__id__": 106
       }
     ],
     "_goods": null,
@@ -3631,7 +3673,7 @@
     "goodsPrice": 20,
     "goodsSalesRate": 50,
     "goodsMaterial": {
-      "__id__": 105
+      "__id__": 107
     }
   },
   {
@@ -3715,37 +3757,37 @@
       "__id__": 33
     },
     "leaseDate": {
-      "__id__": 46
+      "__id__": 47
     },
     "midSliderNode": {
-      "__id__": 58
+      "__id__": 60
     },
     "midDate": {
-      "__id__": 70
+      "__id__": 72
     },
     "midSliderProgressNode": {
-      "__id__": 59
+      "__id__": 61
     },
     "notLeased": {
-      "__id__": 81
+      "__id__": 83
     },
     "leaseLandInfo": null,
     "configLandInfo": null,
     "showLandInfo": {
-      "__id__": 53
+      "__id__": 55
     },
     "landInfoPrefabs": {
       "__uuid__": "8b7c02b7-8c93-4f18-8a21-8ea7d64b433a"
     },
     "plantInfo": null,
     "showPlantInfo": {
-      "__id__": 76
+      "__id__": 78
     },
     "plantInfoPrefabs": {
       "__uuid__": "ff60e2cb-959f-4250-93e7-95c5223b0176"
     },
     "harvestNode": {
-      "__id__": 95
+      "__id__": 97
     },
     "isHarvest": false,
     "_id": ""

文件差异内容过多而无法显示
+ 541 - 246
assets/Prefabs/UI/lease/SalePanel.prefab


文件差异内容过多而无法显示
+ 441 - 104
assets/Scene/MyCityScene - 004.fire


+ 15 - 7
assets/Script/Lease/CntInfo.js

@@ -19,6 +19,9 @@ cc.Class({
         isOutCnt: false,
     },
     inputValue(value, e) {
+        // var numberTemp = new RegExp("^[A-Za-z0-9]+$");
+        // this.inputInviteValue = value.replace(/[^\d^\.]+/g, '');
+        // this.inputContainer.getComponent(cc.EditBox).string = this.inputInviteValue;
         var numberTemp = new RegExp("^[A-Za-z0-9]+$");
         if (numberTemp.test(value)) {
             if (Number(value) >= 1) {
@@ -28,22 +31,27 @@ cc.Class({
                 this.inputContainer.getComponent(cc.EditBox).string = this.inputInviteValue;
             }
         } else {
-            this.inputInviteValue = 1;
+            this.inputInviteValue = 0;
             this.inputContainer.getComponent(cc.EditBox).string = this.inputInviteValue;
             console.log("请输入整数的倍数", this.inputInviteValue);
+            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "请输入整数提现!", 1);
         }
     },
     setInfo() {
-        this.amountValue.string = Math.floor( GlobalD.GameData.CNTDrawBalance * 100) / 100;
+        this.amountValue.string = Math.floor(GlobalD.GameData.CNTDrawBalance * 100) / 100;
     },
     onclose() {
         this.node.active = false;
     },
 
-    
+
     onPanelCntWithdraw() {
         //todo 判断一下amount
-        console.log(this.inputInviteValue,GlobalD.GameData.CNTDrawBalance);
+        console.log(this.inputInviteValue, GlobalD.GameData.CNTDrawBalance);
+        if(0 === this.inputInviteValue || this.inputInviteValue.length == 0){
+            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "请输入提现的数量", 1);
+            return;
+        }
         if (this.inputInviteValue > GlobalD.GameData.CNTDrawBalance) {
             GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "提现的cnt不足!", 2, () => {
                 console.log("finish toast!");
@@ -63,7 +71,7 @@ cc.Class({
                 console.log(tx) //String|null 交易唯一哈市
 
                 GlobalD.GameData.onCntCanWithdrawBalance((data) => {
-                    console.log("站内收益余额:",GlobalD.GameData.CNTDrawBalance);
+                    console.log("站内收益余额:", GlobalD.GameData.CNTDrawBalance);
                     //更新数据
                     this.setInfo();
                 });
@@ -76,9 +84,9 @@ cc.Class({
 
                 //更新日志数据
                 cc.find("GameNode/ManageDapp").getComponent("ManageDapp").onUpdateCntList();
-                
 
-               
+
+
                 GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "成功提现!", 1, () => {
                     console.log("finish toast!");
                 });

+ 5 - 8
assets/Script/Lease/LeaseGrantInfo.js

@@ -74,7 +74,8 @@ cc.Class({
             });
             return;
         }
-
+        if(GlobalD.GameData.isOnGrantFruit)return;
+        GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "赠送果实中...", 5);
         //默认赠送全部
         GlobalD.GameData.onGrantFruit({ fruitId: this.fruitInfo.id, amount: Number(this.amount.string), address: this.inputInviteValue }, (res, value) => {
             // console.log(value);
@@ -87,15 +88,11 @@ cc.Class({
                 var BuildingView = cc.find("Canvas/UICamera/BuildingContainer/BuildingView").getComponent("BuildingView");
                 BuildingView.onUpdateList();
 
-                this.saleAmount.string = 0;
+                this.amount.string = 0;
 
-                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 2, () => {
-                    console.log("finish toast!");
-                });
+                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 1);
             } else {
-                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 2, () => {
-                    console.log("finish toast!");
-                });
+                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 1);
             }
         });
     }

+ 38 - 23
assets/Script/Lease/LeaseSaleInfo.js

@@ -14,8 +14,9 @@ cc.Class({
             serializable: true,
         },
         inputInviteValue: {
-            default: 1,
-            visible: false
+            default: 0,
+            visible: false,
+            serializable:false
         },
         //当前操作的果实信息
         fruitInfo: {
@@ -35,6 +36,15 @@ cc.Class({
         },
 
         isPlayingSnb: false,
+
+        /**
+         * 预计收入显示
+         */
+        estimateAmount: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
     },
     inputValue(value, e) {
 
@@ -43,14 +53,16 @@ cc.Class({
             if (Number(value) >= 1) {
                 this.inputInviteValue = Number(value);
             } else {
-                this.inputInviteValue = 1;
+                this.inputInviteValue = 0;
                 this.inputContainer.getComponent(cc.EditBox).string = this.inputInviteValue;
             }
         } else {
-            this.inputInviteValue = 1;
+            this.inputInviteValue = 0;
             this.inputContainer.getComponent(cc.EditBox).string = this.inputInviteValue;
-            console.log("请输入整数的倍数", this.inputInviteValue);
+            console.log("请输入20整数的倍数", this.inputInviteValue);
         }
+
+        this.estimateAmount.string = Number(this.inputInviteValue * 1)+" SNB";
     },
     setInfo(saleName, amount) {
         this.saleName.string = saleName;
@@ -65,19 +77,23 @@ cc.Class({
         //todo 判断一下amount
         console.log(this.inputInviteValue, Number(this.saleAmount.string));
         if (this.inputInviteValue > Number(this.saleAmount.string)) {
-            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "销售的果实数量过多!", 2, () => {
-                console.log("finish toast!");
-            });
+            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "销售的果实数量过多!", 1);
             return;
         }
-        if (this.isPlayingSnb) {
-            console.warn("同时触发支付SNB过快!");
+        if (this.inputInviteValue <=0) {
+            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "输入不为零的果实数量!", 1);
             return;
         }
-        this.isPlayingSnb = true;
+        // if (this.isPlayingSnb) {
+        //     console.warn("同时触发支付SNB过快!");
+        //     return;
+        // }
+        // this.isPlayingSnb = true;
 
+        if (GlobalD.GameData.isOnSaleFruit) return;
+        GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "销售果实中...", 5);
         GlobalD.GameData.onSaleFruit({ fruitId: this.fruitInfo.id, amount: this.inputInviteValue }, (res, value) => {
-            this.isPlayingSnb = false;
+            // this.isPlayingSnb = false;
             // console.log(value);
             if (value.code === 0) {
                 // let NumLabel = this.upTarget.getComponent("Content_Button").NumLabel.getComponent(cc.Label);
@@ -88,24 +104,23 @@ cc.Class({
                 //     NumLabel.string = parseInt(NumLabel.string) - this.inputInviteValue;
                 //     this.saleAmount.string = parseInt(this.saleAmount.string) - this.inputInviteValue;
                 // }
-                GlobalD.GameData.SetSNB(GlobalD.GameData.GetSNB() + (this.inputInviteValue * this.fruitInfo.priceSnb));
-
                 var BuildingView = cc.find("Canvas/UICamera/BuildingContainer/BuildingView").getComponent("BuildingView");
                 BuildingView.onUpdateList();
-                this.saleAmount.string = parseInt(this.saleAmount.string) - this.inputInviteValue;
 
-                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "成功售卖了!", 2, () => {
-                    console.log("finish toast!");
+                //更新ui snb
+                GlobalD.GameData.onGetUserSnb((res, value) => {
+                    this.saleAmount.string = parseInt(this.saleAmount.string) - this.inputInviteValue;
                 });
+                // GlobalD.GameData.SetSNB(GlobalD.GameData.GetSNB() + (this.inputInviteValue * this.fruitInfo.priceSnb));
+                // this.saleAmount.string = parseInt(this.saleAmount.string) - this.inputInviteValue;
+                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), "成功售卖了!", 1);
 
                 //更新日志列表
-                 //更新日志数据
-                 cc.find("GameNode/ManageDapp").getComponent("ManageDapp").onUpdateSnbList();
-                
+                //更新日志数据
+                cc.find("GameNode/ManageDapp").getComponent("ManageDapp").onUpdateSnbList();
+
             } else {
-                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 2, () => {
-                    console.log("finish toast!");
-                });
+                GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 1);
             }
         });
     }

+ 1 - 0
assets/Script/Network/dapp.js

@@ -99,6 +99,7 @@ cc.Class({
                                         GlobalD.ConfigLand = value.data;
                                         
                                         utils.get(utils.api.userLandList, {}, (res, value) => {
+                                            // console.log(value);
                                             if (0 === value.code) {
                                                 GlobalD.UserLeaseLand = value.data;
 

+ 8 - 1
assets/Script/UI/BuildingView.js

@@ -127,7 +127,7 @@ cc.Class({
         //先判断container下面是否存在Seed
         // this.Seed.destroyAllChildren;
         // console.log("this.Seed.children:", this.Seed.children);
-         //清除种子的预制
+        //清除种子的预制
         let _children = this.Seed.children;
         for (let i = _children.length - 1; i > 0; i--) {
             _children[i].destroy();
@@ -200,6 +200,10 @@ cc.Class({
                         _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[7];
                         _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[7];
                         break;
+                    case "Lentil":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[8];
+                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[8];
+                        break;
                     default:
                         break;
                 }
@@ -249,6 +253,9 @@ cc.Class({
                     case "Pepper":
                         _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[7];
                         break;
+                    case "Lentil":
+                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[8];
+                        break;
                     default:
                         break;
                 }

+ 7 - 8
assets/Script/UI/ManageBuildings.js

@@ -507,7 +507,8 @@ cc.Class({
                     let _leaseLandInfo = _userLeaseLand[j];
                     leaseFarmlandInfoScript.setLeaseLandInfo(_leaseLandInfo);
                     //todo 后续看看如何刷新,现在走的是开始刷新一次
-                    if (_leaseLandInfo.isPlant === 1) {
+                    //如果土地是租赁转态并且同时种植了 ,这里处理土地状态,显示种植信息
+                    if (1 === _leaseLandInfo.isLease && 1 === _leaseLandInfo.isPlant) {
 
                         let _workingBuilding = housingTemp_farmland.getComponent("WorkingBuilding");
                         let _spriteFrame;
@@ -536,19 +537,22 @@ cc.Class({
                             case "Pepper":
                                 _spriteFrame = _buildingView.fruitSpriteFrame[7];
                                 break;
+                            case "Lentil":
+                                _spriteFrame = _buildingView.fruitSpriteFrame[8];
+                                break;
                             default:
                                 break;
                         }
-
                         //拿到土地的成熟期来判断
                         // let _plantStart = Date.parse(_leaseLandInfo.plantStart.replace(/-/g, '/'))
                         // let _currentDay = _plantStart.getTime() - new Date().getTime(); //date.datedifference(date.formatTime(new Date()), _leaseLandInfo.plantStart);
                         //种植日期加成熟期
                         // let _endMilli = date.addDayTranMillisecond(_leaseLandInfo.plantStart, _leaseLandInfo.seedInfo.maturity);
                         // let _currentMilli = new Date().getTime();
+                        // console.log("已种植土地状态:",_leaseLandInfo);
                         let _currentDay = date.dateAddDate(_leaseLandInfo.plantStart, _leaseLandInfo.seedInfo.maturity)
                         let [_remainingDay, _remainingHour] = date.remainDayAndHour(_currentDay, date.formatTime(new Date()));
-          
+
                         let _maturityHour = _leaseLandInfo.seedInfo.maturity * 24
                         let _ratio = _remainingHour / _maturityHour;
                         // console.log("生成的:" + _ratio);
@@ -571,12 +575,9 @@ cc.Class({
 
                 }
             }
-
-
             let buildingsInfo_farmland = housingTemp_farmland.getComponent("buildingsInfo");
             //id用时间戳来记录
             buildingsInfo_farmland.buildInfo.id = _configLand[i].id;//对应的id
-
             /**
              * 服务器设置的农田 独立于其他游戏数据
              * 这步设置之后,addBuilding 时候不存储到 GameData_buildings
@@ -584,9 +585,7 @@ cc.Class({
             buildingsInfo_farmland.InitPosFromStore = true;
             //设置tile的最底下的坐标,就是起始坐标
             buildingsInfo_farmland.buildInfo.startTilePos = cc.v2(_configLand[i].posX, _configLand[i].posY);
-
             this.SpawnBuildingDefaultValue(buildingsInfo_farmland);
-
             //起始坐标,占位范围,是否占位
             GlobalD.game.addBuildTiled(buildingsInfo_farmland.buildInfo.id, buildingsInfo_farmland.buildInfo.startTilePos, buildingsInfo_farmland.buildInfo.occupyArea);
             //添加占位信息

+ 17 - 10
assets/Script/UI/ManageSeedNode.js

@@ -130,8 +130,14 @@ cc.Class({
             let buildIndex = GlobalD.TiledMap.getIndex(self._EndPosition);
             let _targetBuildingsInfo = GlobalD.game.onGetBuildingsTiledMapUnitFromIndex(buildIndex);
             if (_targetBuildingsInfo) {
-                self.labelTip.string = '播种到' + _targetBuildingsInfo.buildInfo.buildingName + '上';
-                self.targetBuildingsInfo = _targetBuildingsInfo;
+                if (_targetBuildingsInfo.buildInfo.buildType == reGameStates.BuildType.HolyFarmland) {
+                    self.labelTip.string = '播种到' + _targetBuildingsInfo.buildInfo.buildingName + '上';
+                    self.targetBuildingsInfo = _targetBuildingsInfo;
+                } else {
+                    self.labelTip.string = '请移动到农田上!';
+                    self.targetBuildingsInfo = null;
+                }
+
             }
             else {
                 self.labelTip.string = self.labelTipString;
@@ -182,7 +188,7 @@ cc.Class({
 
         GlobalD.GameData.onPlant(data, (res, value) => {
             //面板种子消耗减少1  
-            if (value.code == 0) {
+            if (0 === value.code) {
                 console.log('种子减少的类型名字', this.seedName);
                 console.log(value);
                 // GlobalD.game.MuinusBuilding(this.seedName);
@@ -205,14 +211,15 @@ cc.Class({
                 //开始种植,给一个初始的状态
                 this.targetBuildingsInfo.onInitHolyFarmlandSeedFromGrow(1, this.fruitSpriteFrame);
 
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "已成功种植!", 1, () => {
-                    console.log("finish toast!");
-                });
-            } else if (value.code == 704) {
+                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "已成功种植!", 1);
+            } else if (706 === value.code) {
+                //土地到期,没有更新刷新的处理刷新
+                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
+                //重置锁定状态显示
+                _leaseFarmlandInfo.onLockLand();
+            } else {
                 //土地已经种植了
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1, () => {
-                    console.log("finish toast!");
-                });
+                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
             }
 
         });

+ 3 - 0
assets/Script/UI/StoreView.js

@@ -169,6 +169,9 @@ cc.Class({
                     case "Pepper":
                         _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[7];
                         break;
+                    case "Lentil":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[8];
+                        break;
                     default:
                         break;
                 }

+ 54 - 41
assets/Script/build/LeaseFarmlandInfo.js

@@ -194,11 +194,29 @@ cc.Class({
     onUnlockLand() {
         //直接删除此节点
         if (this.notLeased) {
-            this.notLeased.destroy();
-            this.notLeased = null;
+            this.notLeased.active = false;
+            // this.notLeased.destroy();
+            // this.notLeased = null;
         }
 
     },
+    /**
+     * 重新锁定
+     */
+    onLockLand() {
+        //显示按钮
+        if (this.notLeased) {
+            this.notLeased.active = true;
+        }
+        //去除提示框
+        this.upSliderNode.parent.active = false;
+        this.midSliderNode.active = false;
+        this.harvestNode.active = false;
+
+        //重置土地图片
+        let _workingBuilding = this.node.getComponent("WorkingBuilding");
+        _workingBuilding.onSetGrow(0, null);
+    },
     //设置config的土地信息
     setConfigLandInfo(value) {
         this.configLandInfo = value;
@@ -214,28 +232,25 @@ cc.Class({
         if (!this.leaseLandInfo) return;
         // console.log("this.leaseLandInfo.1", this.leaseLandInfo)
         if (1 === this.leaseLandInfo.isLease) {
+            // console.log("已租赁土地状态:", this.leaseLandInfo);
             //已解锁
             //显示剩余天数
             this.upSliderNode.parent.active = true;
             this.multipleLabel.string = this.leaseLandInfo.leaseMultiple;
             //计算天数
-            let allDay = date.datedifference(this.leaseLandInfo.createTime, this.leaseLandInfo.leaseTime);
+            // let allDay = date.datedifference(this.leaseLandInfo.createTime, this.leaseLandInfo.leaseTime);
             //租赁土地的剩余天数
-            let [_remainingLandDay, _remainingLandHour] = date.remainDayAndHour(this.leaseLandInfo.leaseTime, date.formatTime(new Date()));
+            // let [_remainingLandDay, _remainingLandHour] = date.remainDayAndHour(this.leaseLandInfo.leaseTime, date.formatTime(new Date()));
             //todo 处理了
-
-            this.leaseDate.string = "剩余" + _remainingLandDay + "天数,共" + allDay + "天";
+            this.leaseDate.string = "剩余" + this.leaseLandInfo.leaseDaysRemaining + "天数,共" + this.leaseLandInfo.leaseDays + "天";
             let sliderProgressScript = this.upSliderNode.getComponent("slider_progress");
-            sliderProgressScript.onSetProcgress(_remainingLandDay / allDay);
-            //todo 到期处理土地回收
-
+            let _proccess = this.leaseLandInfo.leaseDays === 0 ? 0 : this.leaseLandInfo.leaseDaysRemaining / this.leaseLandInfo.leaseDays;
+            sliderProgressScript.onSetProcgress(_proccess);
             //删除解锁图标
             this.onUnlockLand();
-
             /**
              * 绑定生成显示信息面板,现在土地信息
              */
-
             this.showLandInfo.on(cc.Node.EventType.TOUCH_START, () => {
                 let leasePanel = cc.instantiate(this.landInfoPrefabs);
                 let parent = cc.find('Canvas/UICamera/DAPPContainer');
@@ -248,21 +263,19 @@ cc.Class({
                 let { rentalExpenses, createTime, leaseTime, leaseMultiple, landDescribe } = this.leaseLandInfo;
                 leasePanelScript.setInfo(rentalExpenses, _date + "天", createTime, leaseTime, leaseMultiple + "倍", landDescribe);
             })
-
-            // console.log("this.leaseLandInfo.id", this.leaseLandInfo, " ", this.leaseLandInfo.seedInfo)
-            if (this.leaseLandInfo.seedInfo) {
-
+            //如果是种植状态并且有返回种植信息
+            if (1 === this.leaseLandInfo.isPlant && this.leaseLandInfo.seedInfo) {
+                //种植信息
                 this.midSliderNode.active = true;
-                let _currentDay = date.dateAddDate(this.leaseLandInfo.plantStart, this.leaseLandInfo.seedInfo.maturity)
-                let [_remainingDay, _remainingHour] = date.remainDayAndHour(_currentDay, date.formatTime(new Date()));
-
-                let _hour = _remainingHour - parseInt(_remainingHour / 24) * 24;
-
-                this.midDate.string = "剩余" + _remainingDay + "天" + _hour + "小时";
-                let _maturityHour = this.leaseLandInfo.seedInfo.maturity * 24
-                //计算剩余时间显示
-                this.midSliderProgressNode.getComponent(cc.ProgressBar).progress = _remainingHour / _maturityHour;
-
+                // let _currentDay = date.dateAddDate(this.leaseLandInfo.plantStart, this.leaseLandInfo.seedInfo.maturity)
+                // let [_remainingDay, _remainingHour] = date.remainDayAndHour(_currentDay, date.formatTime(new Date()));
+                // let _hour = _remainingHour - parseInt(_remainingHour / 24) * 24;
+                this.midDate.string = "剩余" + this.leaseLandInfo.plantDaysRemaining + "天" + this.leaseLandInfo.plantHoursRemaining + "小时";
+                let _maturityAllHour = this.leaseLandInfo.seedInfo.maturity * 24
+                let _remainAllHour = this.leaseLandInfo.plantDaysRemaining * 24 + this.leaseLandInfo.plantHoursRemaining;
+                //计算剩余时间显示(进度条)
+                let _midProccess = _maturityAllHour === 0 ? 0 : _remainAllHour / _maturityAllHour;
+                this.midSliderProgressNode.getComponent(cc.ProgressBar).progress = _midProccess;
                 /**
                   * 绑定生成显示信息面板,种植信息
                   */
@@ -286,10 +299,6 @@ cc.Class({
                     leasePanelScript.setInfo(priceCnt, maturity + "天", this.leaseLandInfo.plantStart, _harvest, seedDescribe);
                 })
             }
-
-
-        } else {
-
         }
     },
 
@@ -297,22 +306,25 @@ cc.Class({
 
 
     /**
+     * 场景有多个收获预制时候,用GameData限制
      * 点击之后,重置土地信息, 并且收入进仓库果实列表中去
+     * 需要防多次触发
      */
     onShowHarvest() {
         this.harvestNode.active = true;
 
         this.harvestNode.on(cc.Node.EventType.TOUCH_START, () => {
-            console.log("点击收获");
             //限制点击多次
-            if (this.isHarvest) return;
-            this.isHarvest = true;
-
+            // if (this.isHarvest) return;
+            // this.isHarvest = true;
+            if (GlobalD.GameData.isOnAddFruit) return;
+            console.log("点击收获");
+            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "收获中..", 5);
             let data = { landId: this.leaseLandInfo.configLandId };
             //果实收入仓库,重置土地种植信息
             GlobalD.GameData.onAddFruit(data, (res, value) => {
                 // console.log(value);
-                if (value.code === 0) {
+                if (0 === value.code) {
                     //收成后处理相关状态
                     this.harvestNode.active = false;
                     this.midSliderNode.active = false
@@ -322,16 +334,17 @@ cc.Class({
                     let BuildingView = cc.find("Canvas/UICamera/BuildingContainer/BuildingView").getComponent("BuildingView");
                     BuildingView.onUpdateList();
                     // "收获成功!"
-                    GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "收获成功!", 2, () => {
-                        console.log("finish toast!");
-                    });
+                    GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "收获成功!", 1);
+                } else if (706 === value.code) {
+                    //土地到期,没有更新刷新的处理刷新
+                    GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
+                    //重置锁定状态显示
+                    this.onLockLand();
                 } else {
-                    GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 2, () => {
-                        console.log("finish toast!");
-                    });
+                    GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
                 }
                 //处理信息后开放
-                this.isHarvest = false;
+                // this.isHarvest = false;
             });
         })
 

+ 27 - 115
assets/Script/public/GameData.js

@@ -84,6 +84,15 @@ cc.Class({
         isPlayingCnt: false,
         isPlayingSnb: false,
 
+
+        /**
+         * 处理请求
+         */
+        //现在多次触发
+        isOnAddFruit: false,
+        isOnSaleFruit: false,
+        isOnGrantFruit: false
+
     },
     onLoad() {
         //初始化GameData全局变量
@@ -951,23 +960,6 @@ cc.Class({
      * 暂时不需要从这里读取
      */
     getLandConfig() {
-        // "data": [
-        //     {
-        //         "id": 1,
-        //         "configLandId": 1,
-        //         "userId": "4",
-        //         "name": "1",
-        //         "isLease": 1,
-        //         "leaseTime": "2022-01-10 21:25:17",
-        //         "leaseMultiple": null,
-        //         "isPlant": 1,
-        //         "plantStart": "2022-01-10 21:25:22",
-        //         "plantMature": 1,
-        //         "landDescribe": "1",
-        //         "createTime": "2022-01-10 21:25:30",
-        //         "updateTime": "2022-01-10 21:25:33"
-        //     }
-        // ],
         utils.get(utils.api.landConfig, {}, (res, value) => {
             if (0 === value.code) {
                 this.ConfigLand = value.data;
@@ -978,23 +970,6 @@ cc.Class({
     },
     //获取用户全部租赁土地
     getUserLandList() {
-        // "data": [
-        //     {
-        //         "id": 1,
-        //         "configLandId": 1,
-        //         "userId": "4",
-        //         "name": "1",
-        //         "isLease": 1,
-        //         "leaseTime": "2022-01-10 21:25:17",
-        //         "leaseMultiple": null,
-        //         "isPlant": 1,
-        //         "plantStart": "2022-01-10 21:25:22",
-        //         "plantMature": 1,
-        //         "landDescribe": "1",
-        //         "createTime": "2022-01-10 21:25:30",
-        //         "updateTime": "2022-01-10 21:25:33"
-        //     }
-        // ],
         utils.get(utils.api.userLandList, {}, (res, vaule) => {
 
         })
@@ -1002,99 +977,18 @@ cc.Class({
     //获取用户已租赁土地的状态
     getLandState(context) {
         let { landId, callback } = context;
-        // {
-        //     "id": 1,
-        //     "configLandId": 1,
-        //     "userId": "4",
-        //     "name": "1",
-        //     "isLease": 1,
-        //     "leaseTime": "2022-01-10 21:25:17",
-        //     "leaseMultiple": null,
-        //     "isPlant": 1,
-        //     "plantStart": "2022-01-10 21:25:22",
-        //     "plantMature": 1,
-        //     "landDescribe": "1",
-        //     "createTime": "2022-01-10 21:25:30",
-        //     "updateTime": "2022-01-10 21:25:33"
-        // }
         utils.get(utils.api.landState, { landId: landId }, (res, vaule) => {
             callback(res, vaule);
         })
     },
     //获取商城种子
     getMallSeed(callback) {
-        // "data": [
-        //     {
-        //         "id": 1,
-        //         "mallType": "0",
-        //         "picture": null,
-        //         "name": "白菜种子",
-        //         "maturity": 100,
-        //         "planting": 100,
-        //         "harvestQuantity": 2500,
-        //         "harvestCount": 2500,
-        //         "harvestName": "大白菜",
-        //         "price": 99,
-        //         "amount": 0,
-        //         "withered": 200,
-        //         "createTime": "2022-01-10 16:45:18",
-        //         "updateTime": "2022-01-10 16:45:26"
-        //     },
-        //     {
-        //         "id": 2,
-        //         "mallType": "0",
-        //         "picture": null,
-        //         "name": "辣椒种子",
-        //         "maturity": 100,
-        //         "planting": 100,
-        //         "harvestQuantity": 2500,
-        //         "harvestCount": 2500,
-        //         "harvestName": "辣椒",
-        //         "price": 99,
-        //         "amount": 0,
-        //         "withered": 200,
-        //         "createTime": "2022-01-10 16:45:23",
-        //         "updateTime": "2022-01-10 16:45:28"
-        //     }
-        // ],
         utils.get(utils.api.mallSeed, {}, (res, vaule) => {
             callback(res, vaule);
         })
     },
 
     getWarehouseSeedAndFruit(callback) {
-        // "data": {
-        //     "seed": [
-        //         {
-        // amount: 0
-        // createTime: "2022-01-10 16:45:18"
-        // harvestCount: 2500
-        // harvestName: "大白菜"
-        // harvestQuantity: 2500
-        // id: 1
-        // mallType: "0"
-        // maturity: 100
-        // name: "白菜种子"
-        // picture: null
-        // planting: 100
-        // priceCnt: 99.99
-        // priceSnb: 495.99
-        // updateTime: "2022-01-10 16:45:26"
-        // withered: 200
-        //         }
-        //     ],
-        //     "fruit": [
-        //         {
-        // createTime: "2022-01-10 16:45:18"
-        // id: 1
-        // name: "白菜"
-        // picture: null
-        // priceCnt: 9.99
-        // priceSnb: 99
-        // updateTime: "2022-01-10 16:45:26"
-        //         }
-        //     ]
-        // },
         utils.get(utils.api.getSeedAndFruit, {}, (res, vaule) => {
             callback(res, vaule);
         })
@@ -1116,21 +1010,39 @@ cc.Class({
 
     //收取果实
     onAddFruit(data, callback) {
+        if (this.isOnAddFruit) {
+            console.log("收取果实过快!");
+            return;
+        }
+        this.isOnAddFruit = true;
         utils.post(utils.api.addFruit, data, (res, vaule) => {
+            this.isOnAddFruit = false;
             callback(res, vaule);
         })
     },
 
     //出售果实
     onSaleFruit(data, callback) {
+        if (this.isOnSaleFruit) {
+            console.log("出售果实过快!");
+            return;
+        }
+        this.isOnSaleFruit = true;
         utils.post(utils.api.saleFruit, data, (res, vaule) => {
+            this.isOnSaleFruit = false;
             callback(res, vaule);
         })
     },
 
     //赠送果实
     onGrantFruit(data, callback) {
+        if(this.isOnGrantFruit){
+            console.log("赠送果实过快!");
+            return;
+        }
+        this.isOnGrantFruit = true;
         utils.post(utils.api.grantFruit, data, (res, vaule) => {
+            this.isOnGrantFruit = false;
             callback(res, vaule);
         })
     },

二进制
assets/UI/NPublic/warning.png


+ 34 - 0
assets/UI/NPublic/warning.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "cfcfb020-2991-435a-a771-a73746db3abd",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "warning": {
+      "ver": "1.0.4",
+      "uuid": "0d173446-0535-495f-833a-0cb85bb3ab12",
+      "rawTextureUuid": "cfcfb020-2991-435a-a771-a73746db3abd",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 64,
+      "height": 64,
+      "rawWidth": 64,
+      "rawHeight": 64,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

部分文件因为文件数量过多而无法显示