|
@@ -148,7 +148,6 @@ const MyCreateWidget = ({ word }: IWidget) => {
|
|
|
loading={loading}
|
|
loading={loading}
|
|
|
icon={<SaveOutlined />}
|
|
icon={<SaveOutlined />}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
- console.log("edit word", editWord);
|
|
|
|
|
setLoading(true);
|
|
setLoading(true);
|
|
|
const data = [
|
|
const data = [
|
|
|
{
|
|
{
|
|
@@ -163,7 +162,6 @@ const MyCreateWidget = ({ word }: IWidget) => {
|
|
|
confidence: editWord.confidence,
|
|
confidence: editWord.confidence,
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
- console.log("wbw data", data);
|
|
|
|
|
post<IUserDictCreate, IDictResponse>("/v2/userdict", {
|
|
post<IUserDictCreate, IDictResponse>("/v2/userdict", {
|
|
|
view: "dict",
|
|
view: "dict",
|
|
|
data: JSON.stringify(data),
|
|
data: JSON.stringify(data),
|
|
@@ -173,7 +171,9 @@ const MyCreateWidget = ({ word }: IWidget) => {
|
|
|
})
|
|
})
|
|
|
.then((json) => {
|
|
.then((json) => {
|
|
|
if (json.ok) {
|
|
if (json.ok) {
|
|
|
- message.success("成功");
|
|
|
|
|
|
|
+ message.success(
|
|
|
|
|
+ intl.formatMessage({ id: "flashes.success" })
|
|
|
|
|
+ );
|
|
|
} else {
|
|
} else {
|
|
|
message.error(json.message);
|
|
message.error(json.message);
|
|
|
}
|
|
}
|