fix:投放测试

This commit is contained in:
liu.huiying@ebiz-digits.com
2025-03-18 10:35:25 +08:00
parent 3bf9519747
commit 29823bd10e
2 changed files with 14 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ const route = useRoute();
const router = useRouter();
function goBack() {
if (window.history.length > 1 && route.meta.title !== '伊调研') {
if (window.history.length > 1 && route.name !== 'home') {
router.go(-1);
} else {
appBridge.navigateBack();

View File

@@ -13,29 +13,13 @@ import { getDomText } from '@/utils/utils';
* @param options
*/
function showModal(options) {
// const confirm = (...rest) => {
// if (options.incompleteQuestionList?.length) {
// if (options.onOk) {
// options.onOk(...rest);
// }
// const firstQuestion = options.incompleteQuestionList[0];
// store.commit(`common/${A_COMMON_SET_ACTIVEQUESTION}`, JSON.stringify(firstQuestion));
// const el = document.getElementById(firstQuestion.id);
// new Scroll(el).animate();
// }
// };
showConfirmDialog({
title: '提示',
icon: null,
...options
})
.then(() => {
// confirm();
})
.catch(() => {
// catch();
});
.then(() => {})
.catch(() => {});
}
/**
@@ -445,7 +429,7 @@ export const canPlanetPublish = async function (sn, publishType) {
if (parsedPublishType === 2) {
const qrcodeRes = await getCheckSurvey(sn);
if (qrcodeRes?.data?.show_test_button) {
if (qrcodeRes?.data?.data?.show_test_button) {
const res = await new Promise((resolve) => {
showConfirmDialog({
class: 'custom-modal custom-modal-title-confirm-notice show-icon',
@@ -466,7 +450,16 @@ export const canPlanetPublish = async function (sn, publishType) {
'投放前测试能帮助您确认问卷设计逻辑及作答数据是否正确,避免因问卷设计问题造成重大损失。',
confirmButtonText: '去测试',
onConfirm() {
appBridge.openInBrowser(`${location.origin}/#/answer?sn=${sn}&is_test=1`);
resolve(false);
if (utils.getSessionStorage('xToken')) {
appBridge.openInBrowser(
`${location.origin}/preview?sn=${sn}&name=${data.data.survey.project_name}+source=0&is_test=1`
);
} else {
window.open(
`${location.origin}/preview?sn=${sn}&name=${data.data.survey.project_name}+source=0&is_test=1`
);
}
},
width: '640px',
height: '364px',