Browse Source

feat:优化提示语

dev
zhaobing’ 1 year ago
parent
commit
13d2ee1cb6
  1. 13
      web/client/src/sections/service/components/addFirmwareModal.jsx

13
web/client/src/sections/service/components/addFirmwareModal.jsx

@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import moment from 'moment' import moment from 'moment'
import { Button, Table, Modal, Form,Notification,Upload,Toast } from '@douyinfe/semi-ui'; import { Button, Table, Modal, Form,Notification,Upload,Toast } from '@douyinfe/semi-ui';
import { IconUpload } from '@douyinfe/semi-icons'; import { IconUpload,IconVigoLogo } from '@douyinfe/semi-icons';
import request from 'superagent'; import request from 'superagent';
const AddFirmwareModal = (props) => { const AddFirmwareModal = (props) => {
@ -62,15 +62,18 @@ const AddFirmwareModal = (props) => {
.query({ version:res?.versionNo,device_meta_id: res?.deviceName,token:'22767e1f-db8d-4a1d-87d4-56347cf21247'}) .query({ version:res?.versionNo,device_meta_id: res?.deviceName,token:'22767e1f-db8d-4a1d-87d4-56347cf21247'})
.end((err, response) => { .end((err, response) => {
if(response?.ok){ if(response?.ok){
Toast.info({ Notification.success({ title: recordRow?'编辑固件包':'新增固件包',
content: recordRow?'编辑成功':'新增成功', content: recordRow?'编辑成功':'新增成功',
duration: 3, duration: 3,
}) })
setRemoveFlag(false) setRemoveFlag(false)
onCancel() onCancel()
}else{ }else{
console.error('Superagent request failed:'); console.error('Superagent request failed:');
Notification.error({ title: recordRow?'编辑固件包':'新增固件包',
content: recordRow?'编辑失败':'新增失败',
duration: 3,
})
} }
}) })

Loading…
Cancel
Save