fix modal bug

This commit is contained in:
Jay 2017-05-03 13:10:04 +08:00
parent ef5e115b9d
commit 5113518997
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ class IPCamPage extends React.Component {
if(!data.model) return showDialog('請選擇型號');
toggleLoading(1);
fetch('/api/ipcam/addipcam', getRequest(data))
let url = type == 1 ? '/api/ipcam/editipcam' : '/api/ipcam/addipcam';
fetch(url, getRequest(data))
.then(response=>response.json())
.then(json => {
toggleLoading(0);