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AC,IAAI,CAAC,2BAA2B,EAAE,IAAI,EAAE,SAAS,GAAG,YAAY,eAAG,CAAC,YAAY,EAAG,CAAC,QAAQ,YAAY,uBAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACrK,OAAO,IAAI,CAAC,KAAK,CAAC,GAAa,CAAC,CAAC;IACrC,CAAC;IAHqB,0BAAa,gBAGlC,CAAA;AACL,CAAC,EAhCgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAgC5B","file":"","sourceRoot":"/","sourcesContent":["import { channel, GameConfig } from \"../../GameConfig\";\nimport { SDK } from \"simba-sdk\";\n\nexport namespace HttpRequests {\n // 检查敏感词\n export async function hasDirtyWords(msg: string) {\n if (channel !== \"dummy\") {\n let data = `game_id=${GameConfig.gameId}&game_channel=${channel}&nickname=${msg}`;\n let ret = JSON.parse(await GameConfig.iwpServerUrl.post(\"/wechat/checknickname\", 5000, data, \"application/x-www-form-urlencoded\") as string);\n console.log(\"校验返回的数据 \", ret);\n if (ret.code === \"0\") {\n return ret.obj.is_sensitive as boolean;\n } else {\n throw new Error(\"校验错误\");\n }\n } else {\n return false;\n }\n }\n\n // 获取公告\n export async function getNotice() {\n try {\n let str = await GameConfig.cdnServer.get(`/notice/notice_${GameConfig.gameVersion}.json`) as string;\n return JSON.parse(str);\n } catch (e) {\n return \"\";\n }\n }\n\n // 兑换 CDKEY\n export async function exchangeCDKEY(key: string) {\n let ret = await GameConfig.iwpServerUrl.post(\"/client/v1/cdkey/exchange\", 5000, `cdkey=${key}&user_id=${SDK.getLoginInfo()!.playerId}&game_id=${GameConfig.gameId}`);\n return JSON.parse(ret as string);\n }\n}"]}