fix(项目管理): 修复开启tcpMock时没有自动分配端口号的问题

--bug=1017940 --user=宋天阳 【项目设置】应用管理-接口测试,开启tcp mock端口没有自动选择可用端口
https://www.tapd.cn/55049933/s/1260516
This commit is contained in:
song-tianyang 2022-10-13 14:23:20 +08:00 committed by 建国
parent 3f1ca0663c
commit ed834c5bbb
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ export default {
tcpMockSwitchChange(value, other) { tcpMockSwitchChange(value, other) {
if (value && this.config.mockTcpPort === 0) { if (value && this.config.mockTcpPort === 0) {
genTcpMockPort(this.projectId).then(res => { genTcpMockPort(this.projectId).then(res => {
let port = res.data.data; let port = res.data;
this.config.mockTcpPort = port; this.config.mockTcpPort = port;
this.$nextTick(() => { this.$nextTick(() => {
this.switchChange("MOCK_TCP_OPEN", value, ['MOCK_TCP_PORT', this.config.mockTcpPort]); this.switchChange("MOCK_TCP_OPEN", value, ['MOCK_TCP_PORT', this.config.mockTcpPort]);