fix: add way error
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ func AppendCors(app *gin.Engine) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServerStaticHtml 启用返回打包的静态文件
|
// AppendServerStaticHtml 启用返回打包的静态文件
|
||||||
func AppendServerStaticHtml(app *gin.Engine, f embed.FS) {
|
func AppendServerStaticHtml(app *gin.Engine, f embed.FS) {
|
||||||
if setting.ServerSetting.EmbedHtml == "disable" {
|
if setting.ServerSetting.EmbedHtml == "disable" {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ request.interceptors.response.use(
|
|||||||
|
|
||||||
// 异常处理
|
// 异常处理
|
||||||
const handleException = (error) => {
|
const handleException = (error) => {
|
||||||
console.log('99999999', config )
|
|
||||||
console.log('99999999', config.apiUrl )
|
|
||||||
|
|
||||||
console.log('handleException', error);
|
|
||||||
if (error.code == ERR_NETWORK) {
|
if (error.code == ERR_NETWORK) {
|
||||||
ElMessage({ message: `网络错误!`, type: 'error' })
|
ElMessage({ message: `网络错误!`, type: 'error' })
|
||||||
} else if (error.response && error.response.data.code != 200) {
|
} else if (error.response && error.response.data.code != 200) {
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ export default {
|
|||||||
|
|
||||||
const clickLogout = () => {
|
const clickLogout = () => {
|
||||||
localStorage.removeItem(CONSTANT.STORE_TOKEN_NAME);
|
localStorage.removeItem(CONSTANT.STORE_TOKEN_NAME);
|
||||||
console.log('clickLogout')
|
|
||||||
router.push('/login', { replace: true }).then(() => { router.go() });
|
router.push('/login', { replace: true }).then(() => { router.go() });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleEdit = (index, row) => {
|
const handleEdit = (index, row) => {
|
||||||
console.log(index, row)
|
|
||||||
let name = state.editTaskPopUpComponentName;
|
let name = state.editTaskPopUpComponentName;
|
||||||
pageState.ShowDialogData[name] = {};
|
pageState.ShowDialogData[name] = {};
|
||||||
pageState.ShowDialogData[name].isShow = true;
|
pageState.ShowDialogData[name].isShow = true;
|
||||||
@@ -105,7 +104,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleViewAPI = (index, row) => {
|
const handleViewAPI = (index, row) => {
|
||||||
console.log(index, row)
|
|
||||||
let name = state.viewTaskAPIPopUpComponentName;
|
let name = state.viewTaskAPIPopUpComponentName;
|
||||||
pageState.ShowDialogData[name] = {};
|
pageState.ShowDialogData[name] = {};
|
||||||
pageState.ShowDialogData[name].isShow = true;
|
pageState.ShowDialogData[name].isShow = true;
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const renderApiString = () => {
|
const renderApiString = () => {
|
||||||
console.log('renderApiString', state.activeName)
|
|
||||||
let task_id = pageState.ShowDialogData[props.componentName].rowData.id;
|
let task_id = pageState.ShowDialogData[props.componentName].rowData.id;
|
||||||
if (state.activeName == 'curl') {
|
if (state.activeName == 'curl') {
|
||||||
state.currCode = ApiStrGenerate.getCurlString(task_id, {});
|
state.currCode = ApiStrGenerate.getCurlString(task_id, {});
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleEdit = (index, row) => {
|
const handleEdit = (index, row) => {
|
||||||
console.log(index, row)
|
|
||||||
let name = state.editWayComponentName;
|
let name = state.editWayComponentName;
|
||||||
pageState.ShowDialogData[name] = {};
|
pageState.ShowDialogData[name] = {};
|
||||||
pageState.ShowDialogData[name].isShow = true;
|
pageState.ShowDialogData[name].isShow = true;
|
||||||
@@ -114,7 +113,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handPageChange = async (pageNum) => {
|
const handPageChange = async (pageNum) => {
|
||||||
console.log('pageNum', pageNum)
|
|
||||||
state.currPage = pageNum;
|
state.currPage = pageNum;
|
||||||
await queryListData(pageNum, state.pageSize);
|
await queryListData(pageNum, state.pageSize);
|
||||||
|
|
||||||
@@ -125,14 +123,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const filterFunc = async () => {
|
const filterFunc = async () => {
|
||||||
console.log('state.optionValue', state.optionValue);
|
// console.log('state.optionValue', state.optionValue);
|
||||||
await queryListData(state.currPage, state.pageSize, state.search, state.optionValue);
|
await queryListData(state.currPage, state.pageSize, state.search, state.optionValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
const clickAdd = () => {
|
const clickAdd = () => {
|
||||||
pageState.ShowDialogData[state.addWayComponentName] = {};
|
pageState.ShowDialogData[state.addWayComponentName] = {};
|
||||||
pageState.ShowDialogData[state.addWayComponentName].isShow = true;
|
pageState.ShowDialogData[state.addWayComponentName].isShow = true;
|
||||||
console.log('clickAdd', pageState.ShowDialogData[state.addWayComponentName].isShow)
|
// console.log('clickAdd', pageState.ShowDialogData[state.addWayComponentName].isShow)
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryListData = async (page, size, name = '', type = '') => {
|
const queryListData = async (page, size, name = '', type = '') => {
|
||||||
|
|||||||
@@ -104,16 +104,16 @@ export default defineComponent({
|
|||||||
|
|
||||||
const handleTest = async () => {
|
const handleTest = async () => {
|
||||||
let postData = getFinalData();
|
let postData = getFinalData();
|
||||||
const rsp = await request.post('/sendways/test', postData).data;
|
const rsp = await request.post('/sendways/test', postData);
|
||||||
if (await rsp.data.code == 200) {
|
if (await rsp.data.code == 200) {
|
||||||
ElMessage({ message: response.data.msg, type: 'success' })
|
ElMessage({ message: await rsp.data.msg, type: 'success' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
let postData = getFinalData();
|
let postData = getFinalData();
|
||||||
const rsp = await request.post('/sendways/add', postData).data;
|
const rsp = await request.post('/sendways/add', postData);
|
||||||
if (rsp.code == 200) {
|
if (await rsp.data.code == 200) {
|
||||||
handleCancer();
|
handleCancer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default defineComponent({
|
|||||||
let postData = getFinalData();
|
let postData = getFinalData();
|
||||||
const rsp = await request.post('/sendways/test', postData);
|
const rsp = await request.post('/sendways/test', postData);
|
||||||
if (await rsp.data.code == 200) {
|
if (await rsp.data.code == 200) {
|
||||||
ElMessage({ message: response.data.msg, type: 'success' })
|
ElMessage({ message: await rsp.data.msg, type: 'success' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user