slambb 4 лет назад
Родитель
Сommit
e493776ad1
38 измененных файлов с 1997 добавлено и 343 удалено
  1. 916 0
      assets/Prefabs/UI/listInfo/applyListInfoItem.prefab
  2. 8 0
      assets/Prefabs/UI/listInfo/applyListInfoItem.prefab.meta
  3. 3 3
      assets/Prefabs/UI/seed/StoreHolyFarmlandEquip.prefab
  4. 192 253
      assets/Scene/MyCityScene - 004.fire
  5. 7 0
      assets/Script/Dog/DogContainer.js
  6. 27 5
      assets/Script/Network/netUtils.ts
  7. 17 2
      assets/Script/UI/Content_Button.js
  8. 154 6
      assets/Script/UI/StoreView.js
  9. 31 1
      assets/Script/UI/equip/PayEquipPopView.js
  10. 77 0
      assets/Script/adpp/VillageReceivesSNBView.js
  11. 9 0
      assets/Script/adpp/VillageReceivesSNBView.js.meta
  12. 159 0
      assets/Script/adpp/applyListInfo.js
  13. 9 0
      assets/Script/adpp/applyListInfo.js.meta
  14. 73 0
      assets/Script/adpp/applyListInfoItem.js
  15. 9 0
      assets/Script/adpp/applyListInfoItem.js.meta
  16. 75 32
      assets/Script/public/GameData.js
  17. 71 7
      assets/Script/public/ManageUI.js
  18. BIN
      assets/UI/NBuilding/Store/SNBReceiver.png
  19. 8 8
      assets/UI/NBuilding/Store/SNBReceiver.png.meta
  20. BIN
      assets/UI/NBuilding/text_receiver.png
  21. 10 10
      assets/UI/NBuilding/text_receiver.png.meta
  22. BIN
      assets/UI/NLease/green-slider.png
  23. 34 0
      assets/UI/NLease/green-slider.png.meta
  24. BIN
      assets/UI/NOther/MainMenu/SNBButton.png
  25. 8 8
      assets/UI/NOther/MainMenu/SNBButton.png.meta
  26. BIN
      assets/UI/NOther/MainMenu/Stock.png
  27. BIN
      assets/UI/NOther/MainMenu/allStealButton.png
  28. 4 4
      assets/UI/NOther/MainMenu/allStealButton.png.meta
  29. BIN
      assets/UI/NOther/MainMenu/bottombuttonbg.png
  30. BIN
      assets/UI/NOther/MainMenu/btn_sign.png
  31. BIN
      assets/UI/NOther/MainMenu/homeButton.png
  32. 4 4
      assets/UI/NOther/MainMenu/homeButton.png.meta
  33. 3 0
      assets/UI/NScene/DogIcon/DogIcon.pac
  34. 21 0
      assets/UI/NScene/DogIcon/DogIcon.pac.meta
  35. BIN
      assets/UI/NScene/DogIcon/beastIcon.png
  36. 34 0
      assets/UI/NScene/DogIcon/beastIcon.png.meta
  37. BIN
      assets/UI/NScene/DogIcon/naturalIcon.png
  38. 34 0
      assets/UI/NScene/DogIcon/naturalIcon.png.meta

+ 916 - 0
assets/Prefabs/UI/listInfo/applyListInfoItem.prefab

@@ -0,0 +1,916 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "applyListInfoItem",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 14
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 25
+      }
+    ],
+    "_prefab": {
+      "__id__": 26
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 511,
+      "height": 143
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -255,
+      "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": 511,
+      "height": 143
+    },
+    "_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__": "f11ac3b4-ea33-40b5-9894-f9e2c655ecc0"
+    },
+    "_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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "d5OL2zwdRF5oKtPEziq2Er",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "snb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 9
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_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": 49,
+      "y": -40.995,
+      "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": "getSnb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 140,
+      "g": 90,
+      "b": 28,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 122.25,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -12,
+      "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__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "SNB:",
+    "_N$string": "SNB:",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "16w6rWBVVKloijlJ8DBv0z",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "value",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 140,
+      "g": 90,
+      "b": 28,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 31.240000000000002
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 88.965,
+      "y": -13.663,
+      "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__": 9
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "1",
+    "_N$string": "1",
+    "_fontSize": 24,
+    "_lineHeight": 24,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 3,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 9
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 140,
+      "g": 90,
+      "b": 28,
+      "a": 255
+    },
+    "_width": 0.5,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "87t1cjXRdJd7onklPgUSYX",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "0cxQrxuWJO15OBCVoIH8XG",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "enter",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_active": false,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": {
+      "__id__": 24
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 149,
+      "height": 67
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 415.944,
+      "y": -70,
+      "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__": 14
+    },
+    "_children": [
+      {
+        "__id__": 16
+      }
+    ],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 19
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_prefab": {
+      "__id__": 21
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 149,
+      "height": 67
+    },
+    "_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": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 15
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 17
+      }
+    ],
+    "_prefab": {
+      "__id__": 18
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100.02,
+      "height": 37.8
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 3.999,
+      "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__": 16
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "兑换cnt",
+    "_N$string": "兑换cnt",
+    "_fontSize": 30,
+    "_lineHeight": 30,
+    "_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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "68HhOEA2tH55QdnB2+SyOL",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 15
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "71646e31-40ce-4f00-ba88-8e6e636b3017"
+    },
+    "_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__": 15
+    },
+    "_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__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "a4mwLVFqFL4LgRS/CPo3iH",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 23
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_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__": "06a5bada-5288-4317-aa11-0f1cc367cc89"
+    },
+    "_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__": 15
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "b1c5ahHdPhEbKOpnECZDvDi",
+    "handler": "onApplyTranCnt",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "bdf2LdJRFEbY8oaQ46AqTV",
+    "sync": false
+  },
+  {
+    "__type__": "b1c5ahHdPhEbKOpnECZDvDi",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "snbAmount": {
+      "__id__": 10
+    },
+    "applyButton": {
+      "__id__": 14
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0"
+    },
+    "fileId": "f8kj9bJ0ZPmI5JH3OBJ3gG",
+    "sync": false
+  }
+]

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

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "3bc6c259-3596-4ea0-8d0f-c488cf8759e0",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 3 - 3
assets/Prefabs/UI/seed/StoreHolyFarmlandEquip.prefab

@@ -239,13 +239,13 @@
     "_position": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 12,
+      "y": 0,
       "z": 0
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.7,
-      "y": 0.7,
+      "x": 0.6,
+      "y": 0.6,
       "z": 1
     },
     "_eulerAngles": {

Разница между файлами не показана из-за своего большого размера
+ 192 - 253
assets/Scene/MyCityScene - 004.fire


+ 7 - 0
assets/Script/Dog/DogContainer.js

@@ -190,11 +190,18 @@ cc.Class({
             //修改按钮提示文字
             this.showButtonLabel.string = 1 === GlobalD.Dog.isShow ? "隐藏小狗" : "显示小狗"
 
+            this.DogNode.opacity = 1 === GlobalD.Dog.isShow ? 255 : 125;
+
         })
     },
 
     _updateDogState(dogValue) {
 
+        //修改按钮提示文字
+        this.showButtonLabel.string = 1 === dogValue.isShow ? "隐藏小狗" : "显示小狗";
+        //修改半显示状态
+        this.DogNode.opacity = 1 === dogValue.isShow ? 255 : 125;
+
         this.DogSliderLabel.string = "剩" + dogValue.remainingDay + "天";
         this.basinSliderLabel.string = "剩余" + dogValue.remainingConsumption + "G";
 

+ 27 - 5
assets/Script/Network/netUtils.ts

@@ -18,10 +18,10 @@ var utils = {
         //获取public 和 系统设置
         publicKeyAndSys: 'comUsers/publicKeyAndSys',
 
-        /**
-         * @deprecated 用loginTokenAndVerification 替代
-         */
-        loginToken: 'comUsers/loginToken',
+        // /**
+        //  * @deprecated 用loginTokenAndVerification 替代
+        //  */
+        // loginToken: 'comUsers/loginToken',
         loginTokenAndVerification: 'comUsers/loginTokenAndVerification',
         //平台账户相关信息
         userInfo: 'comUsers/getUserInfo',
@@ -45,6 +45,13 @@ var utils = {
         //获取用户可以偷取的列表信息
         canStealUserList: 'comPlayerLand/getCanStealUserList',
 
+        /**
+         * 新增灾难部分接口
+         */
+        //灾难接口
+        disasterHistory:'comPlayerLand/getDisasterHistory',
+
+
         //获取土地信息
         landState: 'comPlayerLand/getState',
         //种植
@@ -87,9 +94,24 @@ var utils = {
         //是否显示狗
         setDogShowState:'comPlayerDog/setDogShowState',
         //商城装备列表
-        getMallEquipmentList:'comMallOther/getMallEquipmentList'
+        getMallEquipmentList:'comMallOther/getMallEquipmentList',
 
 
+        /**
+         * 模块10 返还snb
+         */
+        //说明:返回当前userId是否在领取SNB名单中,如果在名单中通过计算可算出进度
+        getCntToSnb:'comCntToSnb/get',
+        //说明:领取SNB接口,需要提前导入数据到com_cnt_to_snb表,点击领取按钮后,后端自动计算本次可领取的SNB数量,Status为0不可领取
+        receiveCntToSnb:'comCntToSnb/receive',
+        /**
+         * 审核snb
+         */
+        //获取申请的page
+        getSnbApplyPage:'comSnbApply/getPage',
+        //提交申请
+        applySnbToCnt:'comSnbApply/applySnbToCnt',
+        
     },
     /** 登录获取的token */
     token: null,

+ 17 - 2
assets/Script/UI/Content_Button.js

@@ -8,6 +8,15 @@ var CurrencyType = cc.Enum({
     SaleSNB: 3
 });
 
+/**
+ * 货币显示类型,默认显示两种货币
+ */
+var ShowCurrencyType = cc.Enum({
+    CNTORSNB: 0,
+    CNT: 1,
+    SNB: 2
+});
+
 cc.Class({
     extends: cc.Component,
 
@@ -54,6 +63,12 @@ cc.Class({
             tooltip: '需要消耗的货币类型',
         },
 
+        showConsumeType: {
+            default: ShowCurrencyType.CNTORSNB,
+            type: cc.Enum(ShowCurrencyType),
+            tooltip: '需要显示消耗的货币类型'
+        },
+
         bgSprite: {
             default: null,
             type: cc.Sprite,
@@ -119,7 +134,7 @@ cc.Class({
         GlobalD.game._ManageUIScript.onSetButtonState({ Target: this }, item);
     },
     onPressedInfo(event, customEventData) {
-        let item = { Name: this.Name, Price: this.Price, Mature: this.Mature, Synopsis: this.Synopsis};
+        let item = { Name: this.Name, Price: this.Price, Mature: this.Mature, Synopsis: this.Synopsis };
         switch (this.consumeType) {
             case CurrencyType.CNT:
                 item.Price = this.CNT;
@@ -139,7 +154,7 @@ cc.Class({
 
     //商城种子面板信息显示
     onMallPressedInfo(event, customEventData) {
-        let item = { Name: this.Name, CNT: this.CNT ,SNB: this.SNB , Mature: this.Mature, Synopsis: this.Synopsis };
+        let item = { Name: this.Name, CNT: this.CNT, SNB: this.SNB, Mature: this.Mature, Synopsis: this.Synopsis, showConsumeType: this.showConsumeType };
         GlobalD.game._ManageUIScript.onSetMallInfoState({ Target: this }, item);
     }
 });

+ 154 - 6
assets/Script/UI/StoreView.js

@@ -173,6 +173,13 @@ cc.Class({
     },
 
     isPlaying: false,
+
+
+    //拿到申请列表的节点
+    applySnbView: {
+      default: null,
+      type: cc.Node,
+    },
   },
   HiddenAll() {
     if (this.Seed.active) this.Seed.active = false
@@ -222,7 +229,7 @@ cc.Class({
         _seedScript.Price = ''
         _seedScript.CNT = this.mySeedList[i].priceCnt
         _seedScript.SNB = this.mySeedList[i].priceSnb
-        _seedScript.Mature = this.mySeedList[i].maturity + '天'
+        _seedScript.Mature = "成熟期:" + this.mySeedList[i].maturity + '天'
         _seedScript.Synopsis = this.mySeedList[i].seedDescribe
 
         //设置一个生成点
@@ -285,10 +292,10 @@ cc.Class({
         let _equipScript = _equip.getComponent('Content_Button')
         _equipScript.Name = this.equipmentList[i].name
         // _equipScript.Price = ''
-        // _equipScript.CNT = 0;
+        _equipScript.CNT = this.equipmentList[i].priceCnt;
         _equipScript.SNB = this.equipmentList[i].priceSnb
-        // _equipScript.Mature = this.equipmentList[i].maturity + '天'
-        _equipScript.Synopsis = this.equipmentList[i].itemDescribe
+        _equipScript.Mature = "有效期:" + this.equipmentList[i].effectiveDay + '天'
+        _equipScript.Synopsis = this.equipmentList[i].itemDescribe;
 
         //设置一个生成点
         let _spawnScript = _equip.getComponent('Content_equip')
@@ -300,9 +307,19 @@ cc.Class({
         switch (this.equipmentList[i].picture) {
           case 'dog':
             _equipScript.bgSprite.spriteFrame = this.equipIconList[0];
+            _equipScript.showConsumeType = 2;
             break
           case 'beatDogStick':
             _equipScript.bgSprite.spriteFrame = this.equipIconList[1];
+            _equipScript.showConsumeType = 2;
+            break
+          case 'natural':
+            _equipScript.bgSprite.spriteFrame = this.equipIconList[2];
+            _equipScript.showConsumeType = 1;
+            break
+          case 'beast':
+            _equipScript.bgSprite.spriteFrame = this.equipIconList[3];
+            _equipScript.showConsumeType = 1;
             break
           default:
             break
@@ -409,6 +426,49 @@ cc.Class({
       // console.log('res=', res)
     })
   },
+
+  /**
+   * 提交申请
+   */
+  onApplyingTran() {
+    //限制相关人员交易
+    if (1 === GlobalD.UserInfo.limitTran) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '转换CNT通道关闭,请联系相关管理人员!',
+        1
+      )
+      return
+    }
+    if (0 === Number(this.snbAmount) || 0 != Number(this.snbAmount) % 5) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '请输入5的倍数兑换!',
+        1
+      )
+      return
+    }
+    console.log('申请兑换:' + Number(this.snbAmount))
+    GlobalD.GameData.onPostApplySnbToCnt(Number(this.snbAmount), (value) => {
+      console.log("兑换", value);
+      if (0 === value.code) {
+        this.ExchangePopView.active = false
+        GlobalD.GameData.showToast(
+          cc.find('Canvas/UICamera'),
+          '已提交申请,详情见申请列表兑换CNT。',
+          2
+        )
+      }else{
+        GlobalD.GameData.showToast(
+          cc.find('Canvas/UICamera'),
+          value.msg,
+          2
+        )
+      }
+    });
+  },
+
+
   onPayCNTPopView(myIndex) {
     this.buySeedIndex = myIndex
     this.PayCNTPopView.active = true
@@ -689,7 +749,7 @@ cc.Class({
   },
   PayEquipSNB() {
     console.log(
-      '支付价格:' + this.equipmentList[this.buyEquipIndex].priceSnb
+      '支付价格Snb:' + this.equipmentList[this.buyEquipIndex].priceSnb
     )
     if (this.isPlaying) {
       GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '购买过快!', 1)
@@ -736,6 +796,91 @@ cc.Class({
       }
     )
   },
+  //用cnt购买
+  PayEquipCNT() {
+    console.log(
+      '支付价格Cnt:' + this.equipmentList[this.buyEquipIndex].priceCnt + ",购买类型:" + this.equipmentList[this.buyEquipIndex].otherType
+    )
+    return;
+    // if (this.isPlaying) {
+    //   GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '购买过快!', 1)
+    //   return
+    // }
+    // GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '支付处理中...', 10)
+    // this.isPlaying = true
+
+    // //购买防护包也要使用轮询
+    // let currentAmount = 0;
+
+    // for (let i = 0; i < this.myWareHouseSeedList.length; i++) {
+    //   if (
+    //     this.myWareHouseSeedList[i].id == this.mySeedList[this.buySeedIndex].id
+    //   ) {
+    //     currentAmount = this.myWareHouseSeedList[i].amount
+    //   }
+    // }
+    // //当前背包的数量
+    // console.log('currentAmount:', {
+    //   seedId: this.mySeedList[this.buySeedIndex].id,
+    //   currentAmount: currentAmount, //把当前背包的数据传进去
+    // })
+    // let playAmount =
+    //   this.playAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt)
+    // if (0 === playAmount) {
+    //   GlobalD.GameData.showToast(
+    //     cc.find('Canvas/UICamera'),
+    //     '请输入购买数量',
+    //     1
+    //   )
+    //   return
+    // }
+    // GlobalD.GameData.payCNT(
+    //   playAmount,
+    //   4,
+    //   this.mySeedList[this.buySeedIndex].id + '',
+    //   (data) => {
+    //     const [err, tx] = data
+    //     // this.isPlaying = false;
+    //     if (err === null) {
+    //       // TODO 成功, 支付为链上操作,需要提供回调接口给这边服务端确认交易成功后修改购买订单结果
+    //       console.log(tx) // 交易hash,唯一标识符
+    //       //todo 种子
+    //       if (this.AutoGetSeedsData) {
+    //         this.unschedule(this.AutoGetSeedsData)
+    //         this.AutoGetSeedsData = null
+    //       }
+    //       this.AutoGetSeedsData = () => {
+    //         // getSeedCount ++;
+    //         GlobalD.GameData.onGetSeedState(
+    //           {
+    //             seedId: this.mySeedList[this.buySeedIndex].id,
+    //             currentAmount: currentAmount, //把当前背包的数据传进去
+    //           },
+    //           (value) => {
+    //             console.log('轮询种子:' + JSON.stringify(value))
+    //             if (0 === value.code) {
+    //               this.unschedule(this.AutoGetSeedsData)
+    //               console.log('轮询种子购买成功')
+    //               GlobalD.GameData.showToast(
+    //                 cc.find('Canvas/UICamera'),
+    //                 '种子购买成功!',
+    //                 1
+    //               )
+    //               // this.PayCNTPopView.active = false;
+    //               //直接重新初始化一下列表,
+    //               this.buildingViewScript.onUpdateList()
+    //             }
+    //           }
+    //         )
+    //       }
+    //       this.schedule(this.AutoGetSeedsData, 5)
+    //     } else {
+    //       console.log(err)
+    //       GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), err, 2)
+    //     }
+    //   }
+    // )
+  },
 
   onDestory() {
     if (this.AutoGetSeedsData) {
@@ -744,7 +889,10 @@ cc.Class({
     }
   },
 
-
+  //申请列表
+  OpenApplyList() {
+    this.applySnbView.active = true;
+  }
 
 
 })

+ 31 - 1
assets/Script/UI/equip/PayEquipPopView.js

@@ -18,11 +18,26 @@ cc.Class({
             type: cc.Label,
             serializable: true,
         },
+        EquipSNBNode:{
+            default: null,
+            type: cc.Node,
+            serializable: true,
+        },
         EquipSNB: {
             default: null,
             type: cc.Label,
             serializable: true,
         },
+        EquipCNTNode:{
+            default: null,
+            type: cc.Node,
+            serializable: true,
+        },
+        EquipCNT: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
     },
 
 
@@ -31,7 +46,22 @@ cc.Class({
 
         this.EquipName.string = context.name;
         this.EquipDay.string = context.effectiveDay;
-        this.EquipSNB.string = context.priceSnb;
         this.EquipView.spriteFrame = context.bgSpriteFrame;
+
+        //默认是0:小狗,1:打狗棒, 2:灾害防护, 3:野兽防护,用cnt购买
+        if(2 === context.otherType || 3 === context.otherType){
+            this.EquipCNT.string = context.priceCnt;
+            this.EquipCNTNode.active = true;
+
+            this.EquipSNBNode.active = false;
+            
+        }else{
+         
+            this.EquipSNB.string = context.priceSnb;
+            this.EquipSNBNode.active = true;
+
+            this.EquipCNTNode.active = false;
+        }
+       
     }
 });

+ 77 - 0
assets/Script/adpp/VillageReceivesSNBView.js

@@ -0,0 +1,77 @@
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        snbDaysLabel: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+        receivesSnbLabel: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+        snbProgressBar: {
+            default: null,
+            type: cc.ProgressBar,
+            serializable: true,
+        }
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    // onLoad () {},
+
+    start() {
+
+    },
+
+    //设置领取snb信息
+    /**
+     * beginTime: "2022-03-01 00:00:00"
+          id: 163
+        receivedDay: 0
+        receivedQuantity: 0
+        status: 1
+        totalDay: 100
+        totalQuantity: 155570
+        unitQuantity: 1555.7
+        userId: "4"
+     * @param {*} data 
+     */
+    setVillageReceivesSnbInfo(data) {
+        // this.snbDaysLabel.string = data.receivedDay + '/' + data.totalDay;
+        this.snbDaysLabel.string = data.receivedQuantity + '/' + data.totalQuantity;
+        if(0 != data.totalDay){
+            this.receivesSnbLabel.string = 'x' + data.totalQuantity/data.totalDay;
+        }
+
+        if (0 != data.totalQuantity) {
+            // this.snbProgressBar.progress = data.receivedDay / data.totalDay;
+            this.snbProgressBar.progress = data.receivedQuantity / data.totalQuantity;
+        }
+    },
+    //获取一个收入
+    onGetReceivesSnbEvent() {
+        GlobalD.GameData.onReceiveCntToSnb((value) => {
+            //领取一个收入状态 
+            // todo 后面完善提示
+            GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 1);
+
+            //重新获取一下snb,会自动更新到面板
+            GlobalD.GameData.onGetUserSnb()
+
+            GlobalD.GameData.onGetCntToSnb((value) => {
+                console.log("当前用户转换的snb", value);
+                if (value.data != null) {
+                    this.setVillageReceivesSnbInfo(value.data);
+                }
+
+            })
+        });
+    }
+
+    // update (dt) {},
+});

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

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "df99a287-aa82-4bc7-ac7a-040db6422470",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 159 - 0
assets/Script/adpp/applyListInfo.js

@@ -0,0 +1,159 @@
+/**
+ * 可偷菜的用户信息
+ */
+
+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: [],
+
+        //是否在刷新列表
+        bUpdateList: false,
+
+    },
+
+    // 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);
+
+        this.loadList(1);
+    },
+
+    //显示列表
+    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("applyListInfoItem");
+            let _item = this.value_set[i];
+            _infoScript.setInfo({ item: _item, parentScript: this});
+        }
+    },
+
+    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;
+    },
+    //刷新列表
+    onRefreshEvent(e, data) {
+        console.log(e, data);
+        this.loadList(data);
+    },
+    loadList(isState) {
+        if (this.bUpdateList) return;
+        this.bUpdateList = true;
+        GlobalD.GameData.onGetSnbApplyPage(isState, 0, 10, (list) => {
+            this.bUpdateList = false;
+            console.log(list)
+            this.onShowUserList(list.rows);
+        });
+    },
+    onchildrenUpdate(){
+        //默认刷通过审核
+        this.loadList(1);
+    }
+
+});

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

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "44e07257-43d9-48f2-868c-d32101a68635",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 73 - 0
assets/Script/adpp/applyListInfoItem.js

@@ -0,0 +1,73 @@
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+
+        snbAmount: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+
+        applyItem: {
+            default: null,
+            serializable: false,
+            visible: false
+        },
+
+
+        applyButton: {
+            default: null,
+            type: cc.Node,
+            serializable: true,
+        },
+        parentScript:{
+            default:null,
+            visible:false
+        }
+    },
+
+    setInfo(context) {
+        let { item , parentScript} = context;
+        this.applyItem = item;
+        this.snbAmount.string = item.snb;
+        if(1 === item.isState){
+            this.applyButton.active = true;
+        }
+        this.parentScript = parentScript;
+
+    },
+
+    /**
+     * 提现cnt
+     */
+    onApplyTranCnt() {
+        //限制相关人员交易
+        if (1 === GlobalD.UserInfo.limitTran) {
+            GlobalD.GameData.showToast(
+                cc.find('Canvas/UICamera'),
+                '转换CNT通道关闭,请联系相关管理人员!',
+                1
+            )
+            return
+        }
+        if (0 === Number(this.applyItem.snb) || 0 != Number(this.applyItem.snb) % 5) {
+            GlobalD.GameData.showToast(
+                cc.find('Canvas/UICamera'),
+                '请输入5的倍数兑换!',
+                1
+            )
+            return
+        }
+        console.log('发起兑换:' + Number(this.applyItem.snb))
+        GlobalD.GameData.onSnbToCnt(Number(this.applyItem.snb), (data) => {
+            //更新数据
+            // console.log('res=', data)
+            //更新审核列表
+            this.parentScript.onchildrenUpdate();
+        })
+    }
+
+
+});

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

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "b1c5a847-74f8-446c-a3a9-9c40990ef0e2",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 75 - 32
assets/Script/public/GameData.js

@@ -106,7 +106,8 @@ cc.Class({
         isOnSaleFruit: false,
         isOnGrantFruit: false,
         isExchangeSeed: false,
-
+        //是否申请
+        isApplying: false,
         //自动存储数据
         AutoSaveData: null
 
@@ -121,9 +122,9 @@ cc.Class({
         this.RemoveBuildingCost = 5;
 
         //
-        this.Dapp = {
-            UserInfo: null
-        }
+        // this.Dapp = {
+        //     UserInfo: null
+        // }
     },
     start() {
         cc.loader.loadRes("prefab/gameToast", function (err, texture) {
@@ -146,6 +147,15 @@ cc.Class({
      */
     isDebugMode: function (bInit) {
         if (bInit) {
+            //读取可领取的snb
+            this.onGetCntToSnb((value) => {
+                console.log("当前用户转换的snb", value);
+                if (value.data != null) {
+                    this.ManageUI.getComponent("ManageUI").onSetVillageReceivesSNBViewInfo(value.data);
+                }
+
+            })
+
             //读取网络数据
             try {
                 GlobalD.dapp.cntBalance().then((cntBalance) => {
@@ -1137,21 +1147,21 @@ cc.Class({
         })
     },
 
-    onGetSnbInfoList(page, limit, callback) {
+    // onGetSnbInfoList(page, limit, callback) {
 
-        utils.get(utils.api.snbList, { page: page, limit: limit }, (flag, value) => {
-            // console.log("snb操作日志", value);
-            if (flag && 0 === value.code) {
-                if (callback)
-                    callback(value.data);
-            } else {
-                let mySnbList = [];
-                if (callback)
-                    callback(mySnbList);
-            }
+    //     utils.get(utils.api.snbList, { page: page, limit: limit }, (flag, value) => {
+    //         // console.log("snb操作日志", value);
+    //         if (flag && 0 === value.code) {
+    //             if (callback)
+    //                 callback(value.data);
+    //         } else {
+    //             let mySnbList = [];
+    //             if (callback)
+    //                 callback(mySnbList);
+    //         }
 
-        })
-    },
+    //     })
+    // },
     //狗的相关处理
     //获取状态
     onGetDogState(data, callback) {
@@ -1429,15 +1439,11 @@ cc.Class({
         }
         if (GlobalD.GameData.GetSNB() <= 0) {
             console.log("神农呗数量GetSNB:", GlobalD.GameData.GetSNB(), "替换snbAmount:", snbAmount);
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "神农呗数量不足!", 2, () => {
-                console.log("finish toast!");
-            });
+            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "神农呗数量不足!", 2);
             return;
         }
+        this.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 10);
 
-        GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "已发起兑换!", 5, () => {
-            console.log("finish toast!");
-        });
         this.isPlayingSnb = true;
         GlobalD.dapp.snbToCnt(snbAmount).then((data) => {
             //更新日志数据
@@ -1455,17 +1461,10 @@ cc.Class({
                     // console.log("更新cnt:" + cntBalance) // string, 精度18,需要自行处理省略几位小数
                     GlobalD.GameData.SetCNT(cntBalance);
                 });
-
-
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 5, () => {
-                    console.log("finish toast!");
-                });
-
+                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 2);
             } else {
                 console.log(err)
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), err, 2, () => {
-                    console.log("finish toast!");
-                });
+                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), err, 2);
             }
 
             if (callback) {
@@ -1570,6 +1569,50 @@ cc.Class({
         })
     },
 
+    //获取snb申请列表
+    onGetSnbApplyPage(isState, page, limit, callback) {
+        utils.get(utils.api.getSnbApplyPage, { isState: isState, page: page, limit: limit }, (flag, value) => {
+            if (flag && 0 === value.code) {
+                if (callback)
+                    callback(value.data);
+            } else {
+                let getSnbApplyPage = [];
+                if (callback)
+                    callback(getSnbApplyPage);
+            }
+
+        })
+    },
+    //提交申请
+    onPostApplySnbToCnt(applyAmount, callback) {
+        if (this.isApplying) {
+            this.showToast(cc.find("Canvas/UICamera"), "正在申请中..", 1);
+            return;
+        }
+        this.isExchangeSeed = true;
+
+        utils.post(utils.api.applySnbToCnt, { applyAmount: applyAmount }, (flag, value) => {
+            this.isExchangeSeed = false;
+            if (flag)
+                callback(value);
+        })
+    },
+
+    //获取转换的snb
+    onGetCntToSnb(callback) {
+        utils.get(utils.api.getCntToSnb, {}, (flag, value) => {
+            if (flag)
+                callback(value);
+        })
+    },
+    //领取SNB接口
+    onReceiveCntToSnb(callback) {
+        utils.get(utils.api.receiveCntToSnb, {}, (flag, value) => {
+            if (flag)
+                callback(value);
+        })
+    },
+
     //切换不同身份的场景,这里处理
     onSwitchAddressBg(_level) {
         //设置背景

+ 71 - 7
assets/Script/public/ManageUI.js

@@ -97,6 +97,23 @@ cc.Class({
     mallContent_Mature: cc.Label,
     mallContent_Synopsis: cc.Label,
 
+    seedBottomLineBg: {
+      default: null,
+      type: cc.Node,
+    },
+    seedBottomCntNode: {
+      default: null,
+      type: cc.Node,
+    },
+    seedBottomSnbNode: {
+      default: null,
+      type: cc.Node,
+    },
+    seedBottomOrLabelNode: {
+      default: null,
+      type: cc.Node,
+    },
+
     //偷取成功生成一个提示
     StealViewSuccessPrefab: cc.Prefab,
 
@@ -104,7 +121,12 @@ cc.Class({
     surroundingBlack: cc.Node,
 
     dogButtonNode: cc.Node,
-    stickButtonNode: cc.Node
+    stickButtonNode: cc.Node,
+
+
+    //村长领取snb
+    VillageReceivesSNBView: cc.Node,
+    VillageReceivesSNBButton: cc.Node
   },
   onLoad() {
     cc.game.setFrameRate(30)
@@ -465,17 +487,38 @@ cc.Class({
         Synopsis.Mature,
         Synopsis.CNT,
         Synopsis.SNB,
-        Synopsis.Synopsis
+        Synopsis.Synopsis,
+        Synopsis.showConsumeType
       )
     }
   },
   //设置介绍信息
-  onSetMallInfo(_Name, _mature, _CNT, _SNB, _Synopsis) {
-    this.mallContent_Name.string = _Name
-    this.mallContent_Price.string = _CNT
+  onSetMallInfo(_Name, _mature, _CNT, _SNB, _Synopsis, showConsumeType) {
+    this.mallContent_Name.string = _Name;
+    this.mallContent_Price.string = _CNT;
     this.mallContent_SNBPrice.string = _SNB;
-    this.mallContent_Mature.string = _mature
-    this.mallContent_Synopsis.string = _Synopsis.replace(/\n|\r/g, '')
+    this.mallContent_Mature.string = _mature;
+    this.mallContent_Synopsis.string = _Synopsis.replace(/\n|\r/g, '');
+    // CNTORSNB: 0,
+    // CNT: 1,
+    // SNB: 2
+    if (0 === showConsumeType) {
+      this.seedBottomLineBg.width = 376;
+      this.seedBottomCntNode.active = true;
+      this.seedBottomOrLabelNode.active = true;
+      this.seedBottomSnbNode.active = true;
+
+    } else if (1 === showConsumeType) {
+      this.seedBottomLineBg.width = 188;
+      this.seedBottomCntNode.active = true;
+      this.seedBottomOrLabelNode.active = false;
+      this.seedBottomSnbNode.active = false;
+    } else if (2 === showConsumeType) {
+      this.seedBottomLineBg.width = 188;
+      this.seedBottomCntNode.active = false;
+      this.seedBottomOrLabelNode.active = false;
+      this.seedBottomSnbNode.active = true;
+    }
   },
   //编辑对应的建筑
   onEditorialBuildings(mUI_buildTarget) {
@@ -677,6 +720,27 @@ cc.Class({
     this.LightRotate.stopAllActions()
   },
 
+
+  /**
+   * 村长领取snb
+   */
+  onSetSnbButtonActive(isShow) {
+    this.VillageReceivesSNBButton.active = isShow
+  },
+
+  onButtonEvent_VillageSnbReceive() {
+    this.VillageReceivesSNBView.active = true
+  },
+
+  onButtonEvent_VillageSnbReceive_Close() {
+    this.VillageReceivesSNBView.active = false
+  },
+
+  onSetVillageReceivesSNBViewInfo(data) {
+    this.onSetSnbButtonActive(true);
+    this.VillageReceivesSNBView.getComponent('VillageReceivesSNBView').setVillageReceivesSnbInfo(data);
+  },
+
   //音效设置界面
   onButtonEvent_Setting_OPen() {
     this.onHideMenu()

BIN
assets/UI/NBuilding/Store/SNBReceiver.png


+ 8 - 8
assets/UI/NOther/MainMenu/Stock.png.meta → assets/UI/NBuilding/Store/SNBReceiver.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "6ab17561-93dd-4f2e-b55d-4ad078e0cd07",
+  "uuid": "96798222-06a2-4b67-8375-6805a9f710b9",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,10 +9,10 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "Stock": {
+    "SNBReceiver": {
       "ver": "1.0.4",
-      "uuid": "f8999cf0-35a3-4692-b330-ff3573631939",
-      "rawTextureUuid": "6ab17561-93dd-4f2e-b55d-4ad078e0cd07",
+      "uuid": "0ea7bbe9-7176-4c06-9fa8-5a6d97cb803f",
+      "rawTextureUuid": "96798222-06a2-4b67-8375-6805a9f710b9",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 100,
-      "height": 102,
-      "rawWidth": 100,
-      "rawHeight": 102,
+      "width": 156,
+      "height": 166,
+      "rawWidth": 156,
+      "rawHeight": 166,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/text_receiver.png


+ 10 - 10
assets/UI/NOther/MainMenu/bottombuttonbg.png.meta → assets/UI/NBuilding/text_receiver.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "ed040bad-ab7e-48f6-8692-378b7afb3abb",
+  "uuid": "4d1affcd-1f92-4efc-9c3a-9bc9426bbf78",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,21 +9,21 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "bottombuttonbg": {
+    "text_receiver": {
       "ver": "1.0.4",
-      "uuid": "f5f2d295-6226-411c-a836-195a4e9dae2e",
-      "rawTextureUuid": "ed040bad-ab7e-48f6-8692-378b7afb3abb",
+      "uuid": "18690afc-fbe4-4291-b224-39555dbf00bb",
+      "rawTextureUuid": "4d1affcd-1f92-4efc-9c3a-9bc9426bbf78",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
       "offsetX": 0,
       "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 130,
-      "height": 130,
-      "rawWidth": 130,
-      "rawHeight": 130,
+      "trimX": 3,
+      "trimY": 3,
+      "width": 112,
+      "height": 58,
+      "rawWidth": 118,
+      "rawHeight": 64,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NLease/green-slider.png


+ 34 - 0
assets/UI/NLease/green-slider.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "ec4c1f30-9f45-45d1-b827-40f6a884490c",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "green-slider": {
+      "ver": "1.0.4",
+      "uuid": "cfb0c333-c592-442b-af53-63f7c4b4a752",
+      "rawTextureUuid": "ec4c1f30-9f45-45d1-b827-40f6a884490c",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 87,
+      "height": 60,
+      "rawWidth": 87,
+      "rawHeight": 60,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 22,
+      "borderRight": 21,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NOther/MainMenu/SNBButton.png


+ 8 - 8
assets/UI/NOther/MainMenu/btn_sign.png.meta → assets/UI/NOther/MainMenu/SNBButton.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "13916b14-2912-4a25-9519-c9627ff8bb9f",
+  "uuid": "c80dfd6a-3a1f-4c1c-8262-7e037ca3174a",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,10 +9,10 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "btn_sign": {
+    "SNBButton": {
       "ver": "1.0.4",
-      "uuid": "c12b49bd-77ec-4cbb-95c8-c15c0aeeea78",
-      "rawTextureUuid": "13916b14-2912-4a25-9519-c9627ff8bb9f",
+      "uuid": "d508d7e7-68eb-47b4-8156-1d6377b14f80",
+      "rawTextureUuid": "c80dfd6a-3a1f-4c1c-8262-7e037ca3174a",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 71,
-      "height": 87,
-      "rawWidth": 71,
-      "rawHeight": 87,
+      "width": 162,
+      "height": 180,
+      "rawWidth": 162,
+      "rawHeight": 180,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NOther/MainMenu/Stock.png


BIN
assets/UI/NOther/MainMenu/allStealButton.png


+ 4 - 4
assets/UI/NOther/MainMenu/allStealButton.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 485,
-      "height": 507,
-      "rawWidth": 485,
-      "rawHeight": 507,
+      "width": 243,
+      "height": 254,
+      "rawWidth": 243,
+      "rawHeight": 254,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NOther/MainMenu/bottombuttonbg.png


BIN
assets/UI/NOther/MainMenu/btn_sign.png


BIN
assets/UI/NOther/MainMenu/homeButton.png


+ 4 - 4
assets/UI/NOther/MainMenu/homeButton.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 485,
-      "height": 486,
-      "rawWidth": 485,
-      "rawHeight": 486,
+      "width": 243,
+      "height": 243,
+      "rawWidth": 243,
+      "rawHeight": 243,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

+ 3 - 0
assets/UI/NScene/DogIcon/DogIcon.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 21 - 0
assets/UI/NScene/DogIcon/DogIcon.pac.meta

@@ -0,0 +1,21 @@
+{
+  "ver": "1.2.0",
+  "uuid": "d0ad86f8-3f86-4c73-91f3-4235b8de3a1c",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

BIN
assets/UI/NScene/DogIcon/beastIcon.png


+ 34 - 0
assets/UI/NScene/DogIcon/beastIcon.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "a524c9d6-e63e-4174-87af-ccfa7663ac2f",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "beastIcon": {
+      "ver": "1.0.4",
+      "uuid": "3380d6eb-a3be-42dd-9fac-299363b7de8b",
+      "rawTextureUuid": "a524c9d6-e63e-4174-87af-ccfa7663ac2f",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -2.5,
+      "offsetY": 28,
+      "trimX": 68,
+      "trimY": 69,
+      "width": 209,
+      "height": 211,
+      "rawWidth": 350,
+      "rawHeight": 405,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NScene/DogIcon/naturalIcon.png


+ 34 - 0
assets/UI/NScene/DogIcon/naturalIcon.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "1e799ff3-d2a4-41a8-9abe-763dcb207385",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "naturalIcon": {
+      "ver": "1.0.4",
+      "uuid": "8f22e055-1f36-4c1d-bd5a-d7bb7e688c25",
+      "rawTextureUuid": "1e799ff3-d2a4-41a8-9abe-763dcb207385",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0.5,
+      "offsetY": 24,
+      "trimX": 77,
+      "trimY": 78,
+      "width": 197,
+      "height": 201,
+      "rawWidth": 350,
+      "rawHeight": 405,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов