fix(接口测试): 修复分享的链接再次点击分享,新的页面错误的缺陷
--bug=1038176 --user=王孝刚 【接口测试】定义-API-接口详情-分享-打开分享页面-再点击分享-再打开新的链接页面错误 https://www.tapd.cn/55049933/s/1484739
This commit is contained in:
parent
50d9d37605
commit
6a89c25a92
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<paramsTable
|
||||
v-model:params="condition.assertions"
|
||||
:selectable="false"
|
||||
:selectable="true"
|
||||
:columns="columns"
|
||||
:scroll="{ minWidth: '700px' }"
|
||||
:default-param-item="defaultParamItem"
|
||||
|
|
|
@ -168,7 +168,11 @@
|
|||
|
||||
function share() {
|
||||
if (isSupported) {
|
||||
copy(`${window.location.href}&dId=${previewDetail.value.id}`);
|
||||
// 判断路由中是不是有dId参数,有的话只是修改当前的值就可以了
|
||||
const url = window.location.href;
|
||||
const dIdParam = `&dId=${previewDetail.value.id}`;
|
||||
const copyUrl = url.includes('dId') ? url.split('&dId')[0] : url;
|
||||
copy(`${copyUrl}${dIdParam}`);
|
||||
Message.success(t('apiTestManagement.shareUrlCopied'));
|
||||
} else {
|
||||
Message.error(t('common.copyNotSupport'));
|
||||
|
|
|
@ -176,7 +176,10 @@
|
|||
|
||||
function share() {
|
||||
if (isSupported) {
|
||||
copy(`${window.location.href}&cId=${caseDetail.value.id}`);
|
||||
const url = window.location.href;
|
||||
const dIdParam = `&cId=${caseDetail.value.id}`;
|
||||
const copyUrl = url.includes('cId') ? url.split('&cId')[0] : url;
|
||||
copy(`${copyUrl}${dIdParam}`);
|
||||
Message.success(t('apiTestManagement.shareUrlCopied'));
|
||||
} else {
|
||||
Message.error(t('common.copyNotSupport'));
|
||||
|
|
|
@ -561,7 +561,10 @@
|
|||
|
||||
function share(id: string) {
|
||||
if (isSupported) {
|
||||
copy(`${window.location.href}&dId=${id}`);
|
||||
const url = window.location.href;
|
||||
const dIdParam = `&dId=${id}`;
|
||||
const copyUrl = url.includes('dId') ? url.split('&dId')[0] : url;
|
||||
copy(`${copyUrl}${dIdParam}`);
|
||||
Message.success(t('apiTestManagement.shareUrlCopied'));
|
||||
} else {
|
||||
Message.error(t('common.copyNotSupport'));
|
||||
|
|
|
@ -199,7 +199,10 @@
|
|||
|
||||
function share() {
|
||||
if (isSupported) {
|
||||
copy(`${window.location.href}&sId=${scenario.value.id}`);
|
||||
const url = window.location.href;
|
||||
const dIdParam = `&sId=${scenario.value.id}`;
|
||||
const copyUrl = url.includes('sId') ? url.split('&sId')[0] : url;
|
||||
copy(`${copyUrl}${dIdParam}`);
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.error(t('common.copyNotSupport'));
|
||||
|
|
Loading…
Reference in New Issue