|
@@ -218,6 +218,17 @@ class HomeApi {
|
|
|
Api.httpPost(this.setRequestBody('/item/collect.do', {'buildingId':buildingId}, success, fail))
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 解锁建筑接口
|
|
|
+ * @param {*} buildingId
|
|
|
+ * @param {*} success
|
|
|
+ * @param {*} fail
|
|
|
+ */
|
|
|
+ static buildingUnlock(buildingId, success, fail) {
|
|
|
+ Api.httpPost(this.setRequestBody('/building/unlock.do', {'buildingId':buildingId}, success, fail))
|
|
|
+ }
|
|
|
+
|
|
|
// 生成一个 RequestBody, 总是要写重复代码, 太恶心了
|
|
|
static setRequestBody(url, data, success, fail) {
|
|
|
let requestBody = {
|