|
|
@@ -128,7 +128,6 @@ cc.Class({
|
|
|
this.SeedBtn.setContentSize(100,54);
|
|
|
this.FruitBtn.setContentSize(100,54);
|
|
|
|
|
|
-
|
|
|
this.EvnBtn.y = -5;
|
|
|
this.LabourBtn.y = -5;
|
|
|
this.ShopBtn.y = -5;
|
|
|
@@ -190,8 +189,29 @@ cc.Class({
|
|
|
this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Seed_Sprite;
|
|
|
this.Seed.active = true;
|
|
|
this.SelectedFrame.parent = this.Building40;
|
|
|
- this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building40.getComponent('Content_Button').Name, this.Building40.getComponent('Content_Button').Price, this.Building40.getComponent('Content_Button').Synopsis);
|
|
|
|
|
|
+ GlobalD.GameData.getMallSeed(function(res, vaule)
|
|
|
+ {
|
|
|
+ let Synopsis = "成熟期:"+maturity;
|
|
|
+ this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, vaule.data[0].price, Synopsis);
|
|
|
+ });
|
|
|
+
|
|
|
+ // "id": 1,
|
|
|
+ // "mallType": "0",
|
|
|
+ // "picture": null,
|
|
|
+ // "name": "白菜种子",
|
|
|
+ // "maturity": 100,
|
|
|
+ // "planting": 100,
|
|
|
+ // "harvestQuantity": 2500,
|
|
|
+ // "harvestCount": 2500,
|
|
|
+ // "harvestName": "大白菜",
|
|
|
+ // "price": 99,
|
|
|
+ // "amount": 0,
|
|
|
+ // "withered": 200,
|
|
|
+ // "createTime": "2022-01-10 16:45:18",
|
|
|
+ // "updateTime": "2022-01-10 16:45:26"
|
|
|
+ // },
|
|
|
+
|
|
|
this.SeedBtn.setSiblingIndex(10);
|
|
|
this.SeedBtn.setContentSize(86,88);
|
|
|
}
|
|
|
@@ -201,8 +221,25 @@ cc.Class({
|
|
|
this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Fruit_Sprite;
|
|
|
this.Fruit.active = true;
|
|
|
this.SelectedFrame.parent = this.Building50;
|
|
|
- this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building50.getComponent('Content_Button').Name, this.Building50.getComponent('Content_Button').Price, this.Building50.getComponent('Content_Button').Synopsis);
|
|
|
|
|
|
+ // {
|
|
|
+ // "id": 1,
|
|
|
+ // "picture": null,
|
|
|
+ // "name": "白菜",
|
|
|
+ // "priceSnb": 99,
|
|
|
+ // "priceCnt": 9.9,
|
|
|
+ // "createTime": "2022-01-10 16:45:18",
|
|
|
+ // "updateTime": "2022-01-10 16:45:26"
|
|
|
+ // }
|
|
|
+
|
|
|
+ GlobalD.GameData.getMallSeed(function(res, vaule)
|
|
|
+ {
|
|
|
+ let Price = 'Snb:'+vaule.data[0].priceSnb+' Cnt:'+vaule.data[0].priceCnt;
|
|
|
+ let Synopsis = "成熟期:"+maturity;
|
|
|
+ this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, Price, Synopsis);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
this.FruitBtn.setSiblingIndex(10);
|
|
|
this.FruitBtn.setContentSize(86,88);
|
|
|
}
|