|
|
@@ -752,8 +752,7 @@ export class GameData {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!isAddMaxProduct)
|
|
|
- {
|
|
|
+ if (!isAddMaxProduct) {
|
|
|
mk.event.emit("refreshFarmMapUI");
|
|
|
}
|
|
|
this.setProp(GameProp.productMakeTimes, this._productMakeTimesData);
|
|
|
@@ -1030,7 +1029,7 @@ export class GameData {
|
|
|
}
|
|
|
|
|
|
if (!has && unlock) {
|
|
|
- data = { tab: config.tab, productID: id };
|
|
|
+ data = { tab: config.tab, productID: id, id: config.id };
|
|
|
this._maxProduct.push(data);
|
|
|
}
|
|
|
|
|
|
@@ -1171,14 +1170,13 @@ export class GameData {
|
|
|
/** 更新最大可种植产品到服务器 */
|
|
|
async updateMaxProduct() {
|
|
|
if (this.maxProductToServer) {
|
|
|
- let data = {"unLockProductList": []};
|
|
|
- for(let i = 0; i != this._maxProduct.length; ++i)
|
|
|
- {
|
|
|
- let dataE = this._maxProduct[i];
|
|
|
- let d = {id: dataE.productID, tab: dataE.tab};
|
|
|
- data.unLockProductList.push(d);
|
|
|
- }
|
|
|
- let respone =await mk.http.sendData('orderTask/updateUnlockProduct', data);
|
|
|
+ let data = { "unLockProductList": this._maxProduct };
|
|
|
+ // for (let i = 0; i != this._maxProduct.length; ++i) {
|
|
|
+ // let dataE = this._maxProduct[i];
|
|
|
+ // let d = { id: dataE.productID, tab: dataE.tab };
|
|
|
+ // data.unLockProductList.push(d);
|
|
|
+ // }
|
|
|
+ let respone = await mk.http.sendData('orderTask/updateUnlockProduct', data);
|
|
|
console.log("------");
|
|
|
}
|
|
|
}
|