From 0bd29467462a83abf7a453e31636c72556ca04aa Mon Sep 17 00:00:00 2001 From: jixudong Date: Fri, 8 Dec 2023 18:42:35 +0800 Subject: [PATCH] Replace 更多菜单-打开物品.md --- gameditor/前端接口/更多菜单-打开物品.md | 273 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 259 insertions(+), 14 deletions(-) diff --git "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\346\233\264\345\244\232\350\217\234\345\215\225-\346\211\223\345\274\200\347\211\251\345\223\201.md" "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\346\233\264\345\244\232\350\217\234\345\215\225-\346\211\223\345\274\200\347\211\251\345\223\201.md" index dcb78f2..8bdfb80 100644 --- "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\346\233\264\345\244\232\350\217\234\345\215\225-\346\211\223\345\274\200\347\211\251\345\223\201.md" +++ "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\346\233\264\345\244\232\350\217\234\345\215\225-\346\211\223\345\274\200\347\211\251\345\223\201.md" @@ -100,12 +100,12 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/instance_by_project_id #### 请求body字段说明 -| key | type | required | description | -| ----------------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | -| name | | yes | 物品类别 | -| intro | | no | 物品简介 | -| goodsClassAttrVos | | yes | 物品属性 | +| key | type | required | description | +| ----------------- | ---- | -------- | ------------ | +| projectId | | yes | 项目id | +| name | | yes | 物品类别 | +| intro | | no | 物品简介 | +| goodsClassAttrVos | | yes | 物品类别属性 | goodsClassAttrVos值说明 @@ -154,6 +154,12 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/class/' \ **RequestHeaders:** 同创作平台请求header +#### 请求path字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| id | | yes | 物品类ID | + #### 请求param字段说明 | key | type | required | description | @@ -162,13 +168,13 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/class/' \ #### 请求body字段说明 -| key | type | required | description | -| ----------------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | -| name | | yes | 物品类别 | -| intro | | no | 物品简介 | -| goodsClassAttrVos | | yes | 物品属性 | -| id | | yes | 主键ID | +| key | type | required | description | +| ----------------- | ---- | -------- | ------------ | +| projectId | | yes | 项目id | +| name | | yes | 物品类别 | +| intro | | no | 物品简介 | +| goodsClassAttrVos | | yes | 物品类别属性 | +| id | | yes | 主键ID | goodsClassAttrVos值说明 @@ -214,10 +220,16 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/class/2661/' \ **METHOD**: DELETE -**path**: api/platform/design/goods/class/{id}/ +**path**: api/platform/design/goods/class/{googsClassId}/ **RequestHeaders:** 同创作平台请求header +#### 请求path字段说明 + +| key | type | required | description | +| ------------ | ---- | -------- | ----------- | +| googsClassId | | yes | 物品类ID | + #### 请求param字段说明 | key | type | required | description | @@ -339,4 +351,237 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/class/?projectId=963' } ``` +### 插入物品实例 + +**METHOD**: POST + +**path**: api/platform/design/goods/instance/ + +**RequestHeaders:** 同创作平台请求header + +#### 请求param字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求body字段说明 + +| key | type | required | description | +| -------------------- | ---- | -------- | ------------ | +| goodsClassId | | yes | 物品类ID | +| name | | yes | 物品名称 | +| intro | | no | 物品简介 | +| goodsInstanceAttrVos | | yes | 物品实例属性 | +| nickname | | no | 物品别名 | +| placeId | | no | 地点id | +| placeName | | no | 地点名称 | +| npcId | | no | 角色id | + +goodsInstanceAttrVos值说明 + +| key | type | description | +| ---------------- | ---- | ------------------ | +| goodsClassAttrId | | 物品类型属性关联ID | +| name | | 物品实例属性名 | +| value | | 物品实例属性值 | +| isBase | | 是否是基础属性 | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/instance/' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURJd01qWXhPREFzSW1WNGNDSTZNVGN3TWpBek16TTRNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLnNZekk3M0thY0NSTG1ZSTJYNHpyVEhuUjA0bWFkRGlhczZUWEFqOTBDcDQ6czAwcGVyczNjcmV0' \ + -H 'Connection: keep-alive' \ + -H 'Content-Type: application/json;charset=UTF-8' \ + -H 'Origin: http://localhost:8080' \ + -H 'Referer: http://localhost:8080/' \ + -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ + -H 'botAccount: 4926009641' \ + -H 'groupId: 49' \ + -H 'mul: true' \ + -H 'projectId: 983' \ + --data-raw '{"name":"物品名称","nickname":"物品别名","intro":"物品简介","placeId":"","placeName":"","npcId":"","npcName":"","goodsClassId":2661,"goodsInstanceAttrVos":[{"goodsClassAttrId":9491,"name":"可被询问","value":"是"},{"goodsClassAttrId":9492,"name":"所属角色","value":""},{"goodsClassAttrId":9493,"name":"所在地点","value":""}]}' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": null +} +``` + +### 删除物品实例 + +**METHOD**: DELETE + +**path**: api/platform/design/goods/instance/{goodsInstanceId}/ + +**RequestHeaders:** 同创作平台请求header + +#### 请求path字段说明 + +| key | type | required | description | +| --------------- | ---- | -------- | ----------- | +| goodsInstanceId | | yes | 物品实例ID | + +#### 请求param字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求body字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/instance/6518/' \ + -X 'DELETE' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURJd01qWXhPREFzSW1WNGNDSTZNVGN3TWpBek16TTRNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLnNZekk3M0thY0NSTG1ZSTJYNHpyVEhuUjA0bWFkRGlhczZUWEFqOTBDcDQ6czAwcGVyczNjcmV0' \ + -H 'Connection: keep-alive' \ + -H 'Origin: http://localhost:8080' \ + -H 'Referer: http://localhost:8080/' \ + -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ + -H 'botAccount: 4926009641' \ + -H 'groupId: 49' \ + -H 'mul: true' \ + -H 'projectId: 983' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": null +} +``` + +### 获取物品实例 + +**METHOD**: GET + +**path**: api/platform/design/goods/instance/ + +**RequestHeaders:** 同创作平台请求header + +#### 请求param字段说明 + +| key | type | required | description | +| --------------- | ---- | -------- | ----------- | +| goodsInstanceId | | yes | 物品实例ID | + +#### 请求body字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/goods/instance/?goodsClassId=2661' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURJd01qWXhPREFzSW1WNGNDSTZNVGN3TWpBek16TTRNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLnNZekk3M0thY0NSTG1ZSTJYNHpyVEhuUjA0bWFkRGlhczZUWEFqOTBDcDQ6czAwcGVyczNjcmV0' \ + -H 'Connection: keep-alive' \ + -H 'Origin: http://localhost:8080' \ + -H 'Referer: http://localhost:8080/' \ + -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ + -H 'botAccount: 4926009641' \ + -H 'groupId: 49' \ + -H 'mul: true' \ + -H 'projectId: 983' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": [ + { + "id": 6516, + "name": "物品名称", + "intro": "物品简介", + "nickname": "物品别名", + "goodsClassId": 2661, + "goodsInstanceAttrVos": [ + { + "id": 27635, + "name": "可被询问", + "value": "是", + "isBase": false, + "goodsClassAttrId": 9491 + }, + { + "id": 27636, + "name": "所属角色", + "value": "", + "isBase": false, + "goodsClassAttrId": 9492 + }, + { + "id": 27637, + "name": "所在地点", + "value": "", + "isBase": false, + "goodsClassAttrId": 9493 + } + ] + }, + { + "id": 6517, + "name": "物品名称1", + "intro": "", + "nickname": "", + "goodsClassId": 2661, + "goodsInstanceAttrVos": [ + { + "id": 27638, + "name": "可被询问", + "value": "是", + "isBase": false, + "goodsClassAttrId": 9491 + }, + { + "id": 27639, + "name": "所属角色", + "value": "120377", + "isBase": false, + "goodsClassAttrId": 9492 + }, + { + "id": 27640, + "name": "所在地点", + "value": "6789", + "isBase": false, + "goodsClassAttrId": 9493 + } + ] + } + ] +} +``` + ### \ No newline at end of file -- libgit2 0.27.1