From 6dae2780d8c2443ed740cc02cc30adb88d9792b1 Mon Sep 17 00:00:00 2001 From: jixudong Date: Fri, 1 Dec 2023 10:36:49 +0800 Subject: [PATCH] Replace 项目列表-预替换.md --- gameditor/前端接口/项目列表-预替换.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\242\204\346\233\277\346\215\242.md" "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\242\204\346\233\277\346\215\242.md" index 76b6f10..e2c3dc5 100644 --- "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\242\204\346\233\277\346\215\242.md" +++ "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\242\204\346\233\277\346\215\242.md" @@ -69,6 +69,66 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/userTextWordReplace?projectI } ``` +### 更新预替换数据 + +**METHOD**: PUT + +**path**: api/platform/design/userTextWordReplace + +**RequestHeaders:** 同创作平台请求header + +#### 请求param字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求body字段说明 + +| key | type | required | description | +| --------- | ---- | -------- | ----------- | +| projectId | | yes | 项目id | +| content | | yes | 词语内容 | + +content值说明 + +| key | type | description | +| ---------- | ---- | ---------------- | +| originWord | | 需要预替换的词语 | +| targetWord | | 预替换后的结果 | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/userTextWordReplace' \ + -X 'PUT' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFek9UVTJNRE1zSW1WNGNDSTZNVGN3TVRRd01qZ3dNeXdpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLlRHRFFWSF9WWGd1Y3RTNVdWeFlFcXBBTWthOE15UktYbHNielRfcEE5TlE6czAwcGVyczNjcmV0' \ + -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: txgz14botwww853177949' \ + -H 'groupId: 713' \ + -H 'mul: true' \ + -H 'projectId: 6381' \ + --data-raw '{"content":[{"originWord":"帮你们省","targetWord":"不需要"},{"originWord":"懒得","targetWord":"不想"},{"originWord":"加加","targetWord":"添加"},{"originWord":"你好,我是","targetWord":"visitor是"},{"originWord":"并没有","targetWord":"没有"},{"originWord":"没有必要","targetWord":"不需要"},{"originWord":"手机有点问题","targetWord":"不方便"}],"projectId":6381}' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": null +} +``` + ### 导入预替换数据 **METHOD**: POST -- libgit2 0.27.1