Browse Source

1.添加获取种植的列表

slambb 3 years ago
parent
commit
88b6222931

+ 1259 - 0
assets/Prefabs/UI/listInfo/userListInfoItem.prefab

@@ -0,0 +1,1259 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "userListInfoItem",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 15
+      },
+      {
+        "__id__": 25
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 36
+      }
+    ],
+    "_prefab": {
+      "__id__": 37
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 440,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -220,
+      "y": -20,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 228,
+      "g": 244,
+      "b": 249,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 440,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "d5OL2zwdRF5oKtPEziq2Er",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "address",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 10
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [],
+    "_prefab": {
+      "__id__": 14
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 20,
+      "y": -10,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.691,
+      "y": 0.691,
+      "z": 0.691
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 6,
+    "_components": [
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 42,
+      "g": 155,
+      "b": 200,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 101.2,
+      "height": 26.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1.44718,
+      "y": 1.44718,
+      "z": 1.44718
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "钱包地址:",
+    "_N$string": "钱包地址:",
+    "_fontSize": 20,
+    "_lineHeight": 20,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 42,
+      "g": 155,
+      "b": 200,
+      "a": 255
+    },
+    "_width": 0.6,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "779kpcfEBMcbb26X0hjj4/",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "value",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 137,
+      "b": 165,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 271.21,
+      "height": 26.2
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 132.067,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1.44718,
+      "y": 1.44718,
+      "z": 1.44718
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "asdsdsdasdasd455as4dasd45",
+    "_N$string": "asdsdsdasdasd455as4dasd45",
+    "_fontSize": 20,
+    "_lineHeight": 20,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 137,
+      "b": 165,
+      "a": 255
+    },
+    "_width": 0.5,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "87t1cjXRdJd7onklPgUSYX",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "0cxQrxuWJO15OBCVoIH8XG",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "remainder",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 16
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [],
+    "_prefab": {
+      "__id__": 24
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 20,
+      "y": -60,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.691,
+      "y": 0.691,
+      "z": 0.691
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 15
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 6,
+    "_components": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 42,
+      "g": 155,
+      "b": 200,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 81.2,
+      "height": 26.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1.44718,
+      "y": 1.44718,
+      "z": 1.44718
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "剩余量:",
+    "_N$string": "剩余量:",
+    "_fontSize": 20,
+    "_lineHeight": 20,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 42,
+      "g": 155,
+      "b": 200,
+      "a": 255
+    },
+    "_width": 0.6,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "97ZjbMdNlL55/UOqRXbCy2",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "value",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 15
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 21
+      },
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": {
+      "__id__": 23
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 137,
+      "b": 165,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 56.82,
+      "height": 26.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 101.838,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1.44718,
+      "y": 1.44718,
+      "z": 1.44718
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "10000",
+    "_N$string": "10000",
+    "_fontSize": 20,
+    "_lineHeight": 20,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 137,
+      "b": 165,
+      "a": 255
+    },
+    "_width": 0.6,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "64osF0E7RHso2bnbpy3JBu",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "8e8KrD96dGRYECKW8rHYZm",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "enter",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 26
+      }
+    ],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 33
+      }
+    ],
+    "_prefab": {
+      "__id__": 35
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 365.944,
+      "y": -68.146,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 25
+    },
+    "_children": [
+      {
+        "__id__": 27
+      }
+    ],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 30
+      },
+      {
+        "__id__": 31
+      }
+    ],
+    "_prefab": {
+      "__id__": 32
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 29
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "进入农场",
+    "_N$string": "进入农场",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "98gJVMMXtN/oB5PX8kGpG1",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 40,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "a4mwLVFqFL4LgRS/CPo3iH",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 25
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 34
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 2,
+    "transition": 2,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 120,
+      "g": 120,
+      "b": 120,
+      "a": 200
+    },
+    "_N$normalSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 26
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "8cc70BrHu5B6pOYMYylHj3Y",
+    "handler": "onEnterOtherFarm",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "bdf2LdJRFEbY8oaQ46AqTV",
+    "sync": false
+  },
+  {
+    "__type__": "8cc70BrHu5B6pOYMYylHj3Y",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "listItemAddress": {
+      "__id__": 11
+    },
+    "amount": {
+      "__id__": 21
+    },
+    "otherUserId": "",
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "62f924aa-77e6-467a-a2d7-f6630c33e5d8"
+    },
+    "fileId": "f8kj9bJ0ZPmI5JH3OBJ3gG",
+    "sync": false
+  }
+]

+ 8 - 0
assets/Prefabs/UI/listInfo/userListInfoItem.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "62f924aa-77e6-467a-a2d7-f6630c33e5d8",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

File diff suppressed because it is too large
+ 285 - 295
assets/Scene/MyCityScene - 004.fire


+ 2 - 2
assets/Script/Lease/LeaseInfo.js

@@ -194,7 +194,7 @@ cc.Class({
                                     // console.log("轮询到土地购买成功!");
                                     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "土地购买成功!", 2);
                                     //解锁土地操作
-                                    _leaseFarmlandInfo.setLeaseLandInfo(_landData);
+                                    _leaseFarmlandInfo.setLeaseLandInfo(_landData,true);
                                     this.onClose();
                                 } else {
                                     //根据update时间判断
@@ -213,7 +213,7 @@ cc.Class({
                                             updateTime: _landData.updateTime
                                         });
                                         // console.log("续租之后的信息:", _landData, _leaseLandInfo, _oldLeaseLandInfo);
-                                        _leaseFarmlandInfo.setLeaseLandInfo(_oldLeaseLandInfo);
+                                        _leaseFarmlandInfo.setLeaseLandInfo(_oldLeaseLandInfo,true);
                                         this.onClose();
                                     }
                                 }

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

@@ -75,7 +75,7 @@ cc.Class({
                     // };
 
                     utils.post(utils.api.loginTokenAndVerification, dappLoginData, (res, value) => {
-                        // console.log("loginTokenAndVerification========>", value);
+                        console.log("loginTokenAndVerification========>", value);
                         if (value.code == 0) {
                             /** 登录成功获取token */
                             utils.setToken(value.data.token);

+ 3 - 0
assets/Script/Network/netUtils.ts

@@ -38,6 +38,9 @@ var utils = {
         landConfig: 'configLand/getList',
         //获取用户已经租赁的土地
         userLandList: 'comPlayerLand/getList',
+        //新增 获取用户可以偷取的列表信息
+        canStealUserList: 'comPlayerLand/getCanStealUserList',
+
         //获取土地信息
         landState: 'comPlayerLand/getState',
         //种植

+ 124 - 50
assets/Script/UI/ManageBuildings.js

@@ -370,8 +370,7 @@ cc.Class({
          * 注释 spawnConfigLand 不初始化固定土地
          */
         //第一步初始化土地的网络数据
-        this.spawnConfigLand();
-
+        this.spawnConfigLand(GlobalD.UserLeaseLand, true);
         /**
          * todo 之类初始化场景障碍物操作,如果不需要直接注释即可。
          * 村长和镇长
@@ -380,10 +379,8 @@ cc.Class({
         // if(0 != GlobalD.Dapp.UserInfo.agent_level){
         //     this.spawnDressUp();
         // }
-
         //先初始化网络数据
         this.SpawnHouse();
-
         // cc.log('初始化场景建筑');
         let BuildingStateArray = GlobalD.GameData.GetBuildingStateArray();
         for (let i = 0; i < BuildingStateArray.length; i++) {
@@ -490,69 +487,146 @@ cc.Class({
 
     },
 
-    //初始化后台配置的土地数据
-    spawnConfigLand() {
+    /**
+     * 按钮调用
+     * 回到用户自己的农场
+     */
+    onBackSelfFarmland() {
+        //刷新一下自己的用户信息
+        GlobalD.GameData.getSelfUserLandList(() => {
+            this.spawnConfigLand(GlobalD.UserLeaseLand, true);
+
+            //显示底部菜单栏
+            GlobalD.game._ManageUIScript.onBottomMenuView(true);
+            //收起其他用户场景后菜单操作
+            GlobalD.game._ManageUIScript.onOtherFarmerView(false);
+        })
+    },
+
+    /**
+     * 初始化后台配置的土地数据
+     * 切换时候需要重置其他用户数据
+     * @returns 
+     */
+    spawnConfigLand(_userLeaseLand, bSelf) {
 
         if (GlobalD.ConfigLand == null) {
             console.error("GlobalD.ConfigLand 未初始化设置!");
             return;
         }
-        if (GlobalD.UserLeaseLand == null) {
-            console.error("GlobalD.UserLeaseLand 未初始化设置!");
+        if (_userLeaseLand == null) {
+            console.error("_userLeaseLand 未初始化设置!");
             return;
         }
         let _configLand = GlobalD.ConfigLand;
-        let _userLeaseLand = GlobalD.UserLeaseLand;
-        // console.log(_configLand, _userLeaseLand);
-        // console.log(this.node.getComponent("ManageUI"));
-
-        for (let i = 0; i < _configLand.length; i++) {
-            //生成默认土地
-            //农田
-            let housingTemp_farmland = this.onGetHousingPrefabFromName('Labour_205_Holy_Farmland');
-            housingTemp_farmland.parent = this.BuildingsParent;
-            var endPos = GlobalD.TiledMap._getTheMiddleLocationFromtilePos(cc.v2(_configLand[i].posX, _configLand[i].posY));
-            housingTemp_farmland.setPosition(endPos.x, endPos.y);
-            let leaseFarmlandInfoScript = housingTemp_farmland.getComponent("LeaseFarmlandInfo");
-            //记录config的土地信息
-            leaseFarmlandInfoScript.setConfigLandInfo(_configLand[i]);
-            for (let j = 0; j < _userLeaseLand.length; j++) {
-                //记录已经租赁的信息(租赁里面包含了seedInfo,如果有种植的话,对应的种植信息会有)
-                if (_userLeaseLand[j].configLandId == _configLand[i].id) {
-                    let _leaseLandInfo = _userLeaseLand[j];
-                    leaseFarmlandInfoScript.setLeaseLandInfo(_leaseLandInfo);
+        if (bSelf) {
+            let _bInitFarmland = false;
+            let _landBuildingsInfo = this.BuildingsParent.children;
+            for (let i = _landBuildingsInfo.length - 1; i >= 0; i--) {
+                let resetLandInfo = _landBuildingsInfo[i];
+                if (resetLandInfo.name == "Labour_205_Holy_Farmland") {
+                    let leaseFarmlandInfoScript = resetLandInfo.getComponent("LeaseFarmlandInfo");
+                    //如果存在开锁的土地,重置状态
+                    if (!leaseFarmlandInfoScript.onGetUnlockLandState()) {
+                        leaseFarmlandInfoScript.onLockLand();
+                    }
+                    for (let j = 0; j < _userLeaseLand.length; j++) {
+                        //记录已经租赁的信息(租赁里面包含了seedInfo,如果有种植的话,对应的种植信息会有)
+                        if (_userLeaseLand[j].configLandId == leaseFarmlandInfoScript.initConfigLandId) {
+                            // console.log(leaseFarmlandInfoScript.initConfigLandId);
+                            let _leaseLandInfo = _userLeaseLand[j];
+                            leaseFarmlandInfoScript.setLeaseLandInfo(_leaseLandInfo, bSelf);
+                        }
+                    }
+
+                    _bInitFarmland = true;
                 }
+
             }
-            let buildingsInfo_farmland = housingTemp_farmland.getComponent("buildingsInfo");
-            //id用时间戳来记录
-            buildingsInfo_farmland.buildInfo.id = _configLand[i].id;//对应的id
-            /**
-             * 服务器设置的农田 独立于其他游戏数据
-             * 这步设置之后,addBuilding 时候不存储到 GameData_buildings
-             */
-            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);
-            //添加占位信息
-            GlobalD.game.addBuilding(buildingsInfo_farmland);
-        }
+            if (_bInitFarmland) {
+                console.log("已经初始化过土地数据!");
+                return;
+            }
+            //此时是第一次生成
+            for (let i = 0; i < _configLand.length; i++) {
+                //生成默认土地
+                //农田
+                let housingTemp_farmland = this.onGetHousingPrefabFromName('Labour_205_Holy_Farmland');
+                housingTemp_farmland.parent = this.BuildingsParent;
+                var endPos = GlobalD.TiledMap._getTheMiddleLocationFromtilePos(cc.v2(_configLand[i].posX, _configLand[i].posY));
+                housingTemp_farmland.setPosition(endPos.x, endPos.y);
+                let leaseFarmlandInfoScript = housingTemp_farmland.getComponent("LeaseFarmlandInfo");
+                //记录一下第一次初始化时候的id
+                leaseFarmlandInfoScript.initConfigLandId = _configLand[i].id;
+                // console.log(housingTemp_farmland.name +" = "+ leaseFarmlandInfoScript.initConfigLandId);
+                //记录config的土地信息
+                leaseFarmlandInfoScript.setConfigLandInfo(_configLand[i]);
+                for (let j = 0; j < _userLeaseLand.length; j++) {
+                    //记录已经租赁的信息(租赁里面包含了seedInfo,如果有种植的话,对应的种植信息会有)
+                    if (_userLeaseLand[j].configLandId == _configLand[i].id) {
+                        let _leaseLandInfo = _userLeaseLand[j];
+                        leaseFarmlandInfoScript.setLeaseLandInfo(_leaseLandInfo, bSelf);
+                    }
+                }
+                let buildingsInfo_farmland = housingTemp_farmland.getComponent("buildingsInfo");
+                //id用时间戳来记录
+                buildingsInfo_farmland.buildInfo.id = _configLand[i].id;//对应的id
+                /**
+                 * 服务器设置的农田 独立于其他游戏数据
+                 * 这步设置之后,addBuilding 时候不存储到 GameData_buildings
+                 */
+                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);
+                //添加占位信息
+                GlobalD.game.addBuilding(buildingsInfo_farmland);
 
+            }
+
+            // console.log(this.BuildingsParent.children);
+        } else {
+            //访问其他用户时候,已经有土地了
+            //重置土地信息
+            let _landBuildingsInfo = this.BuildingsParent.children;
+            for (let i = _landBuildingsInfo.length - 1; i >= 0; i--) {
+                let resetLandInfo = _landBuildingsInfo[i];
+                if (resetLandInfo.name == "Labour_205_Holy_Farmland") {
+                    let leaseFarmlandInfoScript = resetLandInfo.getComponent("LeaseFarmlandInfo");
+                    //如果存在开锁的土地,重置状态
+                    if (!leaseFarmlandInfoScript.onGetUnlockLandState()) {
+                        leaseFarmlandInfoScript.onLockLand();
+                    }
+                    //访问其他农场时候,全部不显示待租按钮
+                    leaseFarmlandInfoScript.onUnlockLand();
+                    for (let j = 0; j < _userLeaseLand.length; j++) {
+                        //记录已经租赁的信息(租赁里面包含了seedInfo,如果有种植的话,对应的种植信息会有)
+                        if (_userLeaseLand[j].configLandId == leaseFarmlandInfoScript.initConfigLandId) {
+                            let _leaseLandInfo = _userLeaseLand[j];
+                            leaseFarmlandInfoScript.setLeaseLandInfo(_leaseLandInfo, bSelf);
+                        }
+                    }
+                }
+
+            }
+            // console.log("other:", this.BuildingsParent.children);
+        }
 
     },
 
-   
+
+
     /**
      * 初始化障碍物
      * 生成的预制信息,需要在 DressUpArray 添加对应的预制件,才可以添加
      */
     spawnDressUp() {
         //村长和镇长的区别,樱花树区别
-    
+
         let agent_level = GlobalD.Dapp.UserInfo.agent_level;  // 0普通用户,1 村长身份,2 镇长身份
-        let  _cherryTree = 2 === agent_level? "Dress_505_SmallTree02":"Dress_505_SmallTree01";
+        let _cherryTree = 2 === agent_level ? "Dress_505_SmallTree02" : "Dress_505_SmallTree01";
         let _temp = [
             //左边第一部分 ----start----
             {
@@ -672,9 +746,9 @@ cc.Class({
         //         startPos: cc.v2(15 - x * 2, 2)
         //     })
         // }
-       
+
         //生成一个未盛开的樱花围绕,间隔1个空格 --- end
-       
+
 
         //多倍土地部分木质花圃
         // for (let x = 0; x < 3; x++) {
@@ -695,7 +769,7 @@ cc.Class({
         //         })
         //     }
         // }
-        
+
 
         //----中上别墅区域--start
         //生成中上三个别墅和三个树木
@@ -794,7 +868,7 @@ cc.Class({
                     let prefab = cc.instantiate(_dressUpTemp);
                     prefab.parent = this.BuildingsParent;
                     let tipNode = prefab.getChildByName("Tip");
-                    if(tipNode){
+                    if (tipNode) {
                         tipNode.destroy();
                     }
                     let buildingsInfo = prefab.getComponent("buildingsInfo");

+ 1 - 1
assets/Script/UI/ManageSeedNode.js

@@ -206,7 +206,7 @@ cc.Class({
                 BuildingView.onUpdateList();
 
                 //把种子的信息存储到当前的土地 plantInfo 上;
-                _leaseFarmlandInfo.setLeaseLandInfo(value.data);
+                _leaseFarmlandInfo.setLeaseLandInfo(value.data,true);
 
                 //开始种植,给一个初始的状态
                 // this.targetBuildingsInfo.onInitHolyFarmlandSeedFromGrow(1, this.fruitSpriteFrame);

+ 10 - 6
assets/Script/UI/component/slider_progress.js

@@ -17,29 +17,33 @@ cc.Class({
 
     // LIFE-CYCLE CALLBACKS:
 
-    onLoad () {
+    onLoad() {
         this.slider = this.getComponent(cc.Slider);
         this.progressbar = this.getComponent(cc.ProgressBar);
 
-        if(this.slider == null || this.progressbar == null){
+        if (this.slider == null || this.progressbar == null) {
             return;
         }
 
         this.progressbar.progress = this.slider.progress;
 
         let self = this;
-        this.slider.node.on('slide', function(event){
+        this.slider.node.on('slide', function (event) {
             this.progressbar.progress = this.slider.progress;
         }, this);
 
     },
 
-    start () {
+    start() {
 
     },
 
-    onSetProcgress(value){
-        this.progressbar.progress = this.slider.progress = value;
+    onSetProcgress(value) {
+        if (this.slider)
+            this.slider.progress = value;
+
+        if (this.progressbar)
+            this.progressbar.progress = value;
     }
 
     // update (dt) {},

+ 147 - 0
assets/Script/adpp/userListInfo.js

@@ -0,0 +1,147 @@
+/**
+ * 可偷菜的用户信息
+ */
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        listInfoPrefab: {
+            default: null,
+            type: cc.Prefab,
+            serializable: true,
+        },
+        listContainer: {
+            default: null,
+            type: cc.Node
+        },
+        value_set: {
+            default: null,
+            visible: false
+        },
+        scroll_view: { //获取scrollview组件
+            type: cc.ScrollView,
+            default: null,
+        },
+
+        HIGH: 80,   //每一项的高度
+        PAGE_NUM: 4,  //每一页4个项
+
+        opt_item_set: []
+
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad() {
+
+    },
+    start() {
+        // this.onOpentList();
+        this.scroll_view.node.on("scroll-ended", this.on_scroll_ended.bind(this), this);//监听scrollview事件
+
+        this.opt_item_set = [];
+        //每次加载3页
+        for (var i = 0; i < this.PAGE_NUM * 3; i++) {
+            let _info = cc.instantiate(this.listInfoPrefab);
+            _info.active = false;
+            this.listContainer.addChild(_info);
+            this.opt_item_set.push(_info);
+        }
+        this.start_y = this.listContainer.y;//初始化起始y坐标
+        this.start_index = 0; //100项数据里面的起始数据记录索引
+        // this.load_recode(this.start_index);
+
+        GlobalD.GameData.onGetCanStealUserList(0, 10, (list) => {
+            console.log("==========", list);
+            this.onShowUserList(list);
+        });
+    },
+
+    //显示列表
+    onShowUserList(list) {
+        this.value_set = Object.assign([], list);
+        this.load_recode(this.start_index);
+    },
+
+    load_recode: function (start_index) {
+        this.start_index = start_index;
+        if (this.opt_item_set.length <= 0) return;
+        for (var i = 0; i < this.PAGE_NUM * 3; i++) {
+            if (this.value_set.length <= i) {
+                this.opt_item_set[i].active = false;
+                continue;
+            }
+            this.opt_item_set[i].active = true;
+            //处理item
+            let _infoScript = this.opt_item_set[i].getComponent("userListInfoItem");
+            let _item = this.value_set[i];
+
+            let _temp = {
+                address: _item.address,
+                amount: 0,
+                otherUserId: _item.userId
+            }
+            _infoScript.setInfo(_temp);
+        }
+    },
+
+    load_scroll_recode: function () {
+        //向下加载数据
+        //当开始位置比value_set的长度小则代表没加载完
+        if (this.start_index + this.PAGE_NUM * 3 < this.value_set.length &&
+            this.listContainer.y >= this.start_y + this.PAGE_NUM * 2 * this.HIGH)//content超过2个PAGE的高度
+        {
+            //_autoScrolling在引擎源码中负责处理scrollview的滚动动作
+            if (this.scroll_view._autoScrolling) { //等自动滚动结束后再加载防止滚动过快,直接跳到非常后的位置
+                this.scroll_view.elastic = false; //关闭回弹效果 美观
+                return;
+            }
+            var down_loaded = this.PAGE_NUM;
+            this.start_index += down_loaded;
+
+            if (this.start_index + this.PAGE_NUM * 3 > this.value_set.length) {
+                //超过数据范围的长度
+                var out_len = this.start_index + this.PAGE_NUM * 3 - this.value_set.length;
+                down_loaded -= out_len;
+                this.start_index -= out_len;
+            }
+            this.load_recode(this.start_index);
+            this.listContainer.y -= down_loaded * this.HIGH;
+            return;
+        }
+        //向上加载
+        if (this.start_index > 0 && this.listContainer.y <= this.start_y) {
+            if (this.scroll_view._autoScrolling) {
+                this.scroll_view.elastic = false;
+                return;
+            }
+            var up_loaded = this.PAGE_NUM;
+            this.start_index -= up_loaded;
+            if (this.start_index < 0) {
+                up_loaded += this.start_index;
+                this.start_index = 0;
+            }
+            this.load_recode(this.start_index);
+            this.listContainer.y += up_loaded * this.HIGH;
+        }
+    },
+    on_scroll_ended: function () {
+        this.load_scroll_recode();
+        this.scroll_view.elastic = true; //加载结束后自动滚动回弹开启
+    },
+    update(dt) {
+        // this.load_scroll_recode();
+    },
+
+    /**
+      * 显示偷菜可偷列表
+      */
+    onOpen() {
+        this.node.active = true;
+    },
+    onClose() {
+        this.node.active = false;
+    },
+
+});

+ 9 - 0
assets/Script/adpp/userListInfo.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "892754cc-8673-455b-b812-b5ef64bb1803",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 43 - 0
assets/Script/adpp/userListInfoItem.js

@@ -0,0 +1,43 @@
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+
+        listItemAddress: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+
+        amount: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+
+        otherUserId: {
+            default: '',
+            visible: false
+        }
+    },
+
+    setInfo(context) {
+        let { address, amount, otherUserId } = context;
+        this.listItemAddress.string = address;
+        this.amount.string = amount;
+        this.otherUserId = otherUserId;
+    },
+
+    /**
+     * 进入其他用户的农场偷菜
+     */
+    onEnterOtherFarm() {
+        if (this.otherUserId.length <= 0) {
+            console.log('没有用户', this.otherUserId);
+        }
+        GlobalD.GameData.getOtherUserLandList(this.otherUserId);
+    }
+
+
+});

+ 9 - 0
assets/Script/adpp/userListInfoItem.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "8cc7006b-1eee-41ea-9398-318ca51e3dd8",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 36 - 42
assets/Script/build/LeaseFarmlandInfo.js

@@ -64,6 +64,9 @@ cc.Class({
             serializable: true,
         },
 
+        //初始化时候对应的土地的id
+        initConfigLandId: -1,
+
         // configLandId: 1
         // createTime: "2022-01-10 21:25:30"
         // id: 1
@@ -225,6 +228,13 @@ cc.Class({
         }
 
     },
+    /**
+     * 获取锁定状态
+     */
+    onGetUnlockLandState() {
+        return this.notLeased.active;
+    },
+
     /**
      * 重新锁定
      */
@@ -254,8 +264,13 @@ cc.Class({
     setConfigLandInfo(value) {
         this.configLandInfo = value;
     },
-    //设置已租赁参数
-    setLeaseLandInfo(value) {
+
+    /**
+     * 设置其他用户租赁的土地信息
+     * 比如去其他用户家里偷取物品,目前统一在这处理
+     */
+    setLeaseLandInfo(value, bSelf) {
+        console.log("土地信息是,bSelf:", bSelf);
         if (!value) {
             console.log("已租赁土地状态为空:", value);
             return;
@@ -270,35 +285,28 @@ cc.Class({
         //先解绑一下信息
         this.showLandInfo.off(cc.Node.EventType.TOUCH_START, this._showLandInfo, this);
         this.showPlantInfo.off(cc.Node.EventType.TOUCH_START, this._showPlantInfo, this);
-        
+
+        //每个作物直接实时计算时间
+        if (this.timeInterval) {
+            clearInterval(this.timeInterval);
+            this.timeInterval = null;
+        }
+        //删除解锁图标
+        this.onUnlockLand();
+
         //更新一下土地信息
-        this.updateLandState();
+        this.updateLandState(bSelf);
     },
 
-    updateLandState() {
-        //已解锁
+    updateLandState(bSelf) {
         //显示剩余天数
-        this.upSliderNode.parent.active = true;
+        this.upSliderNode.parent.active = bSelf;
         this.multipleLabel.string = this.leaseLandInfo.leaseMultiple;
-        //租赁土地的剩余天数
-        //获得服务器租赁日期毫秒
-        // let [_lDay, _lHour, _lMinutes, _lSeconds] = date.remainFromMillisecond(this.leaseLandInfo.leaseDaysMill);
-        // //todo 处理了 this.leaseLandInfo.leaseDaysRemaining
-        // if (0 !== _lDay) {
-        //     this.leaseDate.string = "剩余" + _lDay + "天数,共" + this.leaseLandInfo.leaseDays + "天";
-        // } else if (0 !== _lHour) {
-        //     this.leaseDate.string = "剩余" + _lHour + "小时,共" + this.leaseLandInfo.leaseDays + "天";
-        // } else if (0 !== _lMinutes) {
-        //     this.leaseDate.string = "剩余" + _lMinutes + "分钟,共" + this.leaseLandInfo.leaseDays + "天";
-        // } else if (0 !== _lSeconds) {
-        //     this.leaseDate.string = "剩余" + _lMinutes + "秒,共" + this.leaseLandInfo.leaseDays + "天";
-        // }
         //  进去条按天算
         let sliderProgressScript = this.upSliderNode.getComponent("slider_progress");
         let _proccess = this.leaseLandInfo.leaseDays === 0 ? 0 : this.leaseLandInfo.leaseDaysRemaining / this.leaseLandInfo.leaseDays;
         sliderProgressScript.onSetProcgress(_proccess);
-        //删除解锁图标
-        this.onUnlockLand();
+
         /**
          * 绑定生成显示信息面板,现在土地信息
          */
@@ -342,18 +350,7 @@ cc.Class({
             //设置一个收获时候的图片
             this.harvestSprite = _spriteFrame;
 
-
-            this.midSliderNode.active = true;
-            // //获得服务器种植日期毫秒
-            // let [_pDay, _pHour, _pMinutes, _pSeconds] = date.remainFromMillisecond(this.leaseLandInfo.plantDaysMill);
-            // //todo 处理了 this.leaseLandInfo.plantDaysRemaining
-            // if (0 === _pDay && 0 === _pHour) {
-            //     //如果种植天数和种植小时为0,显示分钟和秒
-            //     this.midDate.string = "剩余" + _pMinutes + "分钟" + _pSeconds + "秒";
-            // } else {
-            //     //否则显示天和小时
-            //     this.midDate.string = "剩余" + _pDay + "天" + _pHour + "小时";
-            // }
+            this.midSliderNode.active = bSelf;
             // 进度条按小时计算
             let _maturityAllHour = this.leaseLandInfo.seedInfo.maturity * 24
             let _remainAllHour = this.leaseLandInfo.plantDaysRemaining * 24 + this.leaseLandInfo.plantHoursRemaining;
@@ -365,11 +362,7 @@ cc.Class({
               */
             this.showPlantInfo.on(cc.Node.EventType.TOUCH_START, this._showPlantInfo, this);
         }
-        //每个作物直接实时计算时间
-        if (this.timeInterval) {
-            clearInterval(this.timeInterval);
-            this.timeInterval = null;
-        }
+
         let lastUpdateTime = Date.now();
         let elapsedTime = 0;
         let updateFrequency = 1; //ms
@@ -423,10 +416,11 @@ cc.Class({
                             //如果传回的毫秒是小于零,说明成熟了
                             //成熟阶段
                             this._workingBuilding.onSetGrow(3, this.harvestSprite);
-                            //todo,如果时间小的,走收获,收获成果实
                             // console.log("土地:", _userLeaseLand[j].configLandId, "已经成熟,可以操作收取果实了!!");
-                            //todo 土地可收获状态
-                            this.onShowHarvest();
+                            //如果是自己的,显示收成
+                            if (bSelf) {
+                                this.onShowHarvest();
+                            }
                         } else {
                             let _maturityHour = this.leaseLandInfo.seedInfo.maturity * 24
                             let _ratio = (_pDay * 24 + _pHour) / _maturityHour;

+ 77 - 10
assets/Script/public/GameData.js

@@ -190,7 +190,12 @@ cc.Class({
         }
 
     },
-
+    /**
+     * 处理用户生成的场景,新增处理跳转其他用户界面,
+     * 其他用户界面 不同点:
+     * 1.土地信息:显示对应用户的土地信息
+     * 2.界面按钮:显示对应用户所需要的操作按钮
+     */
     InitSceneInfo() {
         //根据顺序生成
         //初始化时间ui
@@ -202,20 +207,23 @@ cc.Class({
         // //初始化地图物件
         // cc.find("GameNode/ManageMap").getComponent('ManageMap').InitManageMap();
         GlobalD.TiledMap.onInitSolid();
-
         //初始化生成房屋 
         /**
          * dapp设定: 如果固定土地冲突,删除冲突的建筑和回收仓库
+         * 新增:
+         * 当进入其他用户农场时候,只处理土地显示信息。其他的都隐藏起来,不进行操作
+         * 更新的数据:1.土地
+         * 隐藏的数据:1.隐藏游客
+         *            2.隐藏用户当前建筑
+         *            3.隐藏当前用户菜单,显示对应农场按钮
          */
         this.ManageUI.getComponent('ManageBuildings').InitBuildings();
-
         //初始化道路
         /**
          * 原本游戏设定是先生产道路,现在为了方便处理等房屋生产后,再处理公路
          * dapp设定: 如果固定土地冲突,删除对应的公路
          */
         this.onSpawnHighway();
-
         //初始化生成人物
         /**
         * dapp设定: 如果固定土地位置冲突,把人物生成位置放置到主路
@@ -226,9 +234,7 @@ cc.Class({
         let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : 0;
         //初始化新手教学
         GlobalD.ManageTask.InitTask(_BFirstLoadGame);
-
         this.ManageUI.getComponent('ManageUI').Init();
-
     },
     InitNextworkData() {
         // console.log("this.readData", this.readData);
@@ -570,8 +576,8 @@ cc.Class({
         if (bPush) {
             //每次砖石操作。更新一次数据
             this.pushData(true);
-        } 
-       
+        }
+
 
     },
     PlusDiamond: function (num) {
@@ -1027,12 +1033,73 @@ cc.Class({
             }
         })
     },
+    //获取自己全部租赁土地
+    getSelfUserLandList(callback) {
+        utils.get(utils.api.userLandList, {}, (res, value) => {
+            if (0 === value.code) {
+                GlobalD.UserLeaseLand = value.data;
+                if (callback)
+                    callback();
+            } else {
+                console.warn("读取到用户的土地错误?");
+            }
+        })
+    },
     //获取用户全部租赁土地
-    getUserLandList() {
-        utils.get(utils.api.userLandList, {}, (res, vaule) => {
+    getOtherUserLandList(otherUserId, callback) {
+        utils.get(utils.api.userLandList, { otherUserId: otherUserId }, (res, value) => {
+            console.log(otherUserId + ",获取其他用户土地数据:", value);
+            if (0 === value.code) {
+                GlobalD.OtherLeaseland = value.data;
+                //todo 获取数据成功,进入切换流程,设置 false,处理其他用户对应的土地
+                this.ManageUI.getComponent('ManageBuildings').spawnConfigLand(GlobalD.OtherLeaseland, false);
+
+                //收起菜单
+                GlobalD.game._ManageUIScript.onHideMenu();
+                //收起底部菜单栏
+                GlobalD.game._ManageUIScript.onBottomMenuView(false);
+                //显示进入其他用户场景后菜单操作
+                GlobalD.game._ManageUIScript.onOtherFarmerView(true);
+
+
+                if (callback)
+                    callback();
+            } else {
+                console.warn("获取其他用户土地数据错误?");
+            }
+        })
+    },
+    //获取用户可以偷取的列表
+    onGetCanStealUserList(page, limit, callback) {
+        utils.get(utils.api.canStealUserList, { page: page, limit: limit }, (res, value) => {
+            if (0 === value.code) {
+                if (callback)
+                    callback(value.data);
+            } else {
+                let myList = [];
+                if (callback)
+                    callback(myList);
+            }
+
+        })
+    },
+
+    onGetSnbInfoList(page, limit, callback) {
+
+        utils.get(utils.api.snbList, { page: page, limit: limit }, (res, value) => {
+            // console.log("snb操作日志", value);
+            if (0 === value.code) {
+                if (callback)
+                    callback(value.data);
+            } else {
+                let mySnbList = [];
+                if (callback)
+                    callback(mySnbList);
+            }
 
         })
     },
+
     //获取用户已租赁土地的状态
     getLandState(context) {
         let { landId, callback } = context;

+ 2 - 0
assets/Script/public/Globals.js

@@ -15,6 +15,8 @@ window.GlobalD = {
     ConfigLand:null,
     //用户已租赁的土地
     UserLeaseLand:null,
+    //其他用户已租赁的土地
+    OtherLeaseland:null,
 
     //保存数据的脚本
     GameData: null,

+ 14 - 1
assets/Script/public/ManageUI.js

@@ -46,6 +46,10 @@ cc.Class({
     LuckView: cc.Node,
     // 底部的菜单栏
     BottomView: cc.Node,
+
+    // 其他农场用户的界面节点
+    OtherFarmerMask: cc.Node,
+
     Evn: cc.Node,
     Seed: cc.Node,
     EveryDaySignView: cc.Node,
@@ -541,6 +545,7 @@ cc.Class({
     //商城界面
     if (this.StoreView.active) this.onSetTouchStatus(this.StoreView, false)
   },
+  
   //底部菜单栏
   onBottomMenuView(isActive) {
     if (this.BottomView) {
@@ -550,6 +555,13 @@ cc.Class({
     // cc.log('不能显示面板信息:');
     GlobalD.GameControl._isBuildingCanEdit = !isActive
   },
+
+  //农场界面相关菜单
+  onOtherFarmerView(isActive) {
+    if (this.OtherFarmerMask) {
+      this.OtherFarmerMask.active = isActive
+    }
+  },
   //开启信息显示
   onShowBuildingInfo(buildingInfo) {
     this.BuildingInfoView.active = true
@@ -580,6 +592,7 @@ cc.Class({
     this.inviteNode.getComponent('inviteInfo').onOpenInviteInfo()
   },
 
+
   //点击钻石兑换
   onButtonEvent_Exchange() {
     //判断钻石数量是否大于等于3万个
@@ -598,7 +611,7 @@ cc.Class({
       if (0 === value.code) {
         var BuildingView = cc.find("Canvas/UICamera/BuildingContainer/BuildingView").getComponent("BuildingView");
         BuildingView.onUpdateList();
-        
+
         this.onSetTouchStatus(this.DiamondSeedsView, true);
       } else {
         //兑换失败

Some files were not shown because too many files changed in this diff