|
|
|
@ -13,6 +13,7 @@ import {ref, computed} from "vue"; |
|
|
|
|
import {InfoFilled} from "@element-plus/icons-vue"; |
|
|
|
|
import JsonEditorVue from "json-editor-vue3"; |
|
|
|
|
import Api_block from "@/components/mock/api_block.vue"; |
|
|
|
|
import {onBeforeRouteLeave} from "vue-router"; |
|
|
|
|
|
|
|
|
|
const mockConfigPost = ref() |
|
|
|
|
let cinema_items = ref([]); |
|
|
|
@ -322,6 +323,10 @@ const handleStart = () => { |
|
|
|
|
console.log(selectedOvertimeShowType.value) |
|
|
|
|
console.log(selectedShowInfo.value) |
|
|
|
|
console.log(selectedStatus.value) |
|
|
|
|
if (selectIp.value === '') { |
|
|
|
|
alert('请先选择影院IP!') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (checkedMockConfig.value.indexOf('get_overtime_ticket_status') >= 0) { |
|
|
|
|
if (selectedOvertimeShowType.value === '' || selectedShowInfo.value === '' || selectedStatus.value === '') { |
|
|
|
|
alert('请先设置‘超时票务查询’中的选项!') |
|
|
|
@ -347,6 +352,10 @@ const handleStart = () => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleEnd = () => { |
|
|
|
|
if (selectIp.value === '') { |
|
|
|
|
alert('请先选择影院IP!') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
running.value = false |
|
|
|
|
startBtn_disable.value = false |
|
|
|
|
startBtn_loading.value = false |
|
|
|
@ -400,6 +409,17 @@ onMounted( |
|
|
|
|
await get_cinema_items(); |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
onBeforeRouteLeave((from, to, next) => { |
|
|
|
|
console.log(selectIp.value) |
|
|
|
|
console.log(to.path) |
|
|
|
|
console.log(from.path) |
|
|
|
|
if (to.path === '/mock' && running.value === true) { |
|
|
|
|
alert('请先停止运行!') |
|
|
|
|
}else{ |
|
|
|
|
next() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|