diff --git a/components.d.ts b/components.d.ts index bc1c037..bdaf31a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -2,15 +2,21 @@ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -export {}; +export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] + ElButton: typeof import('element-plus/es')['ElButton'] + ElDropdown: typeof import('element-plus/es')['ElDropdown'] + ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] + ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSpace: typeof import('element-plus/es')['ElSpace'] + ElText: typeof import('element-plus/es')['ElText'] RichText: typeof import('./src/components/RichText.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -32,8 +38,13 @@ declare module 'vue' { VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanRow: typeof import('vant/es')['Row'] + VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] + VanTab: typeof import('vant/es')['Tab'] + VanTabbar: typeof import('vant/es')['Tabbar'] + VanTabbarItem: typeof import('vant/es')['TabbarItem'] + VanTabs: typeof import('vant/es')['Tabs'] YLCascader: typeof import('./src/components/YLCascader.vue')['default'] YLInput: typeof import('./src/components/YLInput.vue')['default'] YLPicker: typeof import('./src/components/YLPicker.vue')['default'] diff --git a/src/api/common.js b/src/api/common.js new file mode 100644 index 0000000..fc4dfe9 --- /dev/null +++ b/src/api/common.js @@ -0,0 +1,147 @@ +import request from '@/utils/request'; +import createCOS from '@/utils/txyunCosUpLoad.js'; +import { uploadDocumentFile } from './upload/index.js'; +import router from '../router/index'; +import { computed } from 'vue'; +import { shrinkImage } from 'shrinkpng'; +const sn = computed(() => router.currentRoute.value.query.sn || 'default'); +export default class CommonApi { + static uploadFileWidthSn(file, sn) { + const formData = new FormData(); + formData.append('file', file); + formData.append('sn', sn || ''); + + return request({ + url: '/console/upload_file', + method: 'post', + data: formData + }); + } + static uploadFileWidthSnForAnswer(file, sn) { + const formData = new FormData(); + formData.append('file', file); + + return request({ + url: `/answer/upload_file/${sn}`, + method: 'post', + data: formData + }); + } + /** OssInfo */ + static getOssInfo() { + return request({ + url: '/console/files/credentials' + }); + } + static async cosUpload3DCompress(file, quality = 20) { + const _file = await shrinkImage(file, { quality }); + return await this.cosUpload3D(_file); + } + static async cosUpload3D(file, defaultName = '') { + let name = defaultName?.replace?.(/[\s+]/g, '_') || ''; + + const getRandomFileName = () => { + return `3D/upload/${new Date().getTime()}_${Math.floor(Math.random() * 1000)}`; + }; + + name = name || getRandomFileName(); + const { data } = await CommonApi.getOssInfo(); + const param = { + region: data.Region, + host: data.Host, + sessionToken: data.sessionToken, + tmpSecretId: data.tmpSecretId, + tmpSecretKey: data.tmpSecretKey, + bucket: data.Bucket, + startTime: data.startTime, + expiredTime: data.expiredTime, + name: `${data.prefix}/${name}`, + file + }; + + try { + const location = await createCOS(param); + return { + url: `https://${location}`, + name + }; + } catch (error) { + return { + url: '', + name: '' + }; + } + } + /** + * 上传文件 + * @param {文件file} file + * @returns {url:"",name:'fileName'} + */ + static async cosUpload(file, fileName) { + let name = fileName?.replace?.(/[\s+]/g, '_') || ''; + + const getRandomFileName = (name) => { + return `survey/${sn.value}/${new Date().getTime()}-${Math.floor(Math.random() * 1000)}-${name}`; + }; + /* eslint-disable no-useless-escape */ + const reg = /\\|\/|\?|\?|\*|"|“|”|'|‘|’|<|>|{|}|\[|\]|\【|\】|:|:|、|\^|\$|!|~|`|\s|\+/g; + name = + name || + getRandomFileName(file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png`); + const res = await CommonApi.getOssInfo(); + /* eslint-enable no-useless-escape */ + + const { data } = res.data; + const param = { + region: data.Region, + host: data.Host, + sessionToken: data.sessionToken, + tmpSecretId: data.tmpSecretId, + tmpSecretKey: data.tmpSecretKey, + bucket: data.Bucket, + startTime: data.startTime, + expiredTime: data.expiredTime, + name: `${data.prefix}/${name}`, + file + }; + try { + const location = await createCOS(param); + return { + url: `https://${location}`, + name + }; + } catch (error) { + return { + url: '', + name: '' + }; + } + } + /** + * 上传文件到阿里云和文档库 + * @param {文件file} file + * @param {问卷id} sn + * @param {1=问卷设计,2=数据分析,3=问卷预览,4=数据明细,5=图表分析,6=高级分析,7=市场模拟} importType + * @returns {url:"",name:'fileName'} + */ + static async docuHousecosUpload(file, sn, importType, startFileName = 'survey') { + // eslint-disable-next-line standard/no-callback-literal + const reg = /\\|\/|\?|?|\*|"|“|”|'|‘|’|<|>|{|}|\[|\]|【|】|:|:|、|\^|\$|!|~|`|\s|\+/g; + + // eslint-disable-next-line standard/no-callback-literal + const fileName = `${startFileName}/${new Date().getTime()}_${Math.floor(Math.random() * 1000)}_${ + file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png` + }`; + try { + const result = await this.cosUpload(file, fileName); + uploadDocumentFile({ + url: JSON.stringify([{ name: file.name, url: result.url, size: file.size }]), + parent_sn: sn?.value || sn, + import_type: importType || 1 + }); + return result; + } catch (error) { + // error + } + } +} diff --git a/src/api/upload/index.js b/src/api/upload/index.js new file mode 100644 index 0000000..2d06e5e --- /dev/null +++ b/src/api/upload/index.js @@ -0,0 +1,8 @@ +import request from '@/utils/request.js'; +export function uploadDocumentFile(data) { + return request({ + url: `/console/document_import`, + method: 'post', + data + }); +} diff --git a/src/components/contenteditable.vue b/src/components/contenteditable.vue index 67418c6..469cdca 100644 --- a/src/components/contenteditable.vue +++ b/src/components/contenteditable.vue @@ -1,9 +1,11 @@ diff --git a/src/fonts/moblie/demo.css b/src/fonts/moblie/demo.css index 18e8077..12ec742 100644 --- a/src/fonts/moblie/demo.css +++ b/src/fonts/moblie/demo.css @@ -4,11 +4,11 @@ src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') - format('embedded-opentype'), + format('embedded-opentype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') - format('svg'); + format('svg'); } .logo { diff --git a/src/fonts/moblie/iconfont.css b/src/fonts/moblie/iconfont.css index 2ad02d0..68b34b2 100644 --- a/src/fonts/moblie/iconfont.css +++ b/src/fonts/moblie/iconfont.css @@ -14,6 +14,22 @@ -moz-osx-font-smoothing: grayscale; } +.mobilefont-jiacu::before { + content: '\e71d'; +} + +.mobilefont-qingxie::before { + content: '\e71e'; +} + +.mobilefont-xiahuaxian::before { + content: '\e720'; +} + +.mobilefont-tupian::before { + content: '\e730'; +} + .mobilefont-del1::before { content: '\e637'; } diff --git a/src/fonts/moblie/iconfont.woff b/src/fonts/moblie/iconfont.woff index c21f7d0..ff340bb 100644 Binary files a/src/fonts/moblie/iconfont.woff and b/src/fonts/moblie/iconfont.woff differ diff --git a/src/layouts/config3d.constant.js b/src/layouts/config3d.constant.js index d5818c3..3dd41e3 100644 --- a/src/layouts/config3d.constant.js +++ b/src/layouts/config3d.constant.js @@ -25,7 +25,7 @@ export const QUESTION_TYPE = { MATRIX_RADIO: 9, contains(item) { - return Object.keys(this).some((key) => this[key] == item); + return Object.keys(this).some((key) => this[key] === item); } }; diff --git a/src/layouts/logic.js b/src/layouts/logic.js index 7ff8ce3..5c46026 100644 --- a/src/layouts/logic.js +++ b/src/layouts/logic.js @@ -368,39 +368,39 @@ export function isCross(range1, range2) { const isSibling = isLeft || isRight; // 逻辑包含循环 - const contain = - (isPlainSequence && - (((isNullish(start2) || isSequence(judge, start2, start1)) && - (isNullish(end2) || isSequence(judge, end2, start1))) || - ((isNullish(start2) || isSequence(start1, start2, end1)) && - (isNullish(end2) || isSequence(start1, end2, end1))))) || - (!isPlainSequence && - (judge < start1 - ? ((isNullish(start2) || isSequence(judge, start2, start1)) && - (isNullish(end2) || isSequence(judge, end2, start1))) || - ((isNullish(start2) || isSequence(start1, start2, end1)) && - (isNullish(end2) || isSequence(start1, end2, end1))) - : ((isNullish(start2) || isSequence(start1, start2, judge)) && - (isNullish(end2) || isSequence(start1, end2, judge))) || - ((isNullish(start2) || isSequence(judge, start2, end1)) && - (isNullish(end2) || isSequence(judge, end2, end1))))); + const contain + = (isPlainSequence + && (((isNullish(start2) || isSequence(judge, start2, start1)) + && (isNullish(end2) || isSequence(judge, end2, start1))) + || ((isNullish(start2) || isSequence(start1, start2, end1)) + && (isNullish(end2) || isSequence(start1, end2, end1))))) + || (!isPlainSequence + && (judge < start1 + ? ((isNullish(start2) || isSequence(judge, start2, start1)) + && (isNullish(end2) || isSequence(judge, end2, start1))) + || ((isNullish(start2) || isSequence(start1, start2, end1)) + && (isNullish(end2) || isSequence(start1, end2, end1))) + : ((isNullish(start2) || isSequence(start1, start2, judge)) + && (isNullish(end2) || isSequence(start1, end2, judge))) + || ((isNullish(start2) || isSequence(judge, start2, end1)) + && (isNullish(end2) || isSequence(judge, end2, end1))))); // 循环存在封闭区间,并且循环包含逻辑 - const contained = - !isNullish(start2) && - !isNullish(end2) && + const contained + = !isNullish(start2) + && !isNullish(end2) // [judge, start1, end1]; - ((isPlainSequence && start2 <= judge && end1 <= end2) || + && ((isPlainSequence && start2 <= judge && end1 <= end2) // [judge, start1, end1]; // [start1, judge, end1]; - (!isPlainSequence && start2 <= start1 && start2 <= judge && end1 <= end2)); + || (!isPlainSequence && start2 <= start1 && start2 <= judge && end1 <= end2)); // 循环不存在封闭区间 - const unCircled = - (!isNullish(start2) && - isNullish(end2) && - ((isPlainSequence && start2 === judge) || (!isPlainSequence && judge < start1) + const unCircled + = (!isNullish(start2) + && isNullish(end2) + && ((isPlainSequence && start2 === judge) || (!isPlainSequence && judge < start1) ? start2 === judge - : start2 === start1)) || - (isNullish(start2) && !isNullish(end2) && end2 === end1); + : start2 === start1)) + || (isNullish(start2) && !isNullish(end2) && end2 === end1); return !(isSibling || contain || contained || unCircled); } @@ -420,13 +420,13 @@ function isSequence(s1, s2, s3, equal) { * @param store */ export function updateNewQuestionsByLoopingEffect(quesSaveParam, store) { - const { questionInfoBeforeModified = {}, questionInfo = {} } = - JSON.parse(JSON.stringify(store.state.common)) || {}; + const { questionInfoBeforeModified = {}, questionInfo = {} } + = JSON.parse(JSON.stringify(store.state.common)) || {}; const oldPages = questionInfoBeforeModified.survey.pages; const newQuestions = questionInfo.questions; const newPages = questionInfo.survey.is_one_page_one_question - ? questionInfo.questions.filter((i) => i.question_index).map((i, idx) => [i.question_index]) + ? questionInfo.questions.filter((i) => i.question_index).map((i) => [i.question_index]) : questionInfo.survey.pages; const cycles = questionInfo.cycle_pages || []; diff --git a/src/layouts/utils.js b/src/layouts/utils.js index 8df15ec..7c44672 100644 --- a/src/layouts/utils.js +++ b/src/layouts/utils.js @@ -33,7 +33,9 @@ function showModal(options) { .then(() => { // confirm(); }) - .catch(() => {}); + .catch(() => { + // catch(); + }); } /** @@ -41,13 +43,13 @@ function showModal(options) { * @param {*} data * @returns */ -const canPlanetPublishPSM = function (data) { +const canPlanetPublishPSM = function(data) { let isFb = true; let message = ''; let title = '题目设置未完成'; const incompleteQuestionList = []; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 101 && s.config.price_gradient.length <= 0) { isFb = false; message = 'psm题目未完成设置,请设置价格区间后投放'; @@ -72,15 +74,15 @@ const canPlanetPublishPSM = function (data) { * @param {*} data * @returns */ -const canPlanetPublishMxdAndHotArea = function (data) { +const canPlanetPublishMxdAndHotArea = function(data) { let isFb = true; let message = ''; const qSteams = []; const incompleteQuestionList = []; let type = 0; let title = '题目设置未完成'; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 105 && s.config.design_version <= 0) { isFb = false; message = 'maxdiff题目未完成设置,请生成设计后投放'; @@ -119,21 +121,23 @@ const canPlanetPublishMxdAndHotArea = function (data) { * @param {*} data * @returns */ -const canPlanetPublish3D = function (data) { +const canPlanetPublish3D = function(data) { { let canFB = true; let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (QUESTION_TYPE.contains(s.question_type)) { try { if (s.config.is_three_dimensions && !s.config.scene) { canFB = false; qSteams.push(`(${s.title})`); } - } catch (error) {} + } catch (error) { + // eslint-disable-next-line no-eval + } } }); @@ -154,15 +158,15 @@ const canPlanetPublish3D = function (data) { let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (QUESTION_TYPE.contains(s.question_type)) { try { if (s.config.is_three_dimensions && s.config.is_binding_goods) { const wares = []; const _sceneInformation = s.config.scene_information; - const sceneInformation = - typeof _sceneInformation === 'string' + const sceneInformation + = typeof _sceneInformation === 'string' ? JSON.parse(_sceneInformation) : _sceneInformation; sceneInformation.shelves.forEach((shelf) => { @@ -174,7 +178,10 @@ const canPlanetPublish3D = function (data) { const options = s.options.flat(); s.associate.forEach((ass) => { - const question = data.questions.find((q) => q.question_index == ass.question_index); + // eslint-disable-next-line no-eval + const question = data.questions.find( + (q) => q.question_index === ass.question_index + ); if (!question) return; options.push(...question.options.flat()); }); @@ -184,7 +191,9 @@ const canPlanetPublish3D = function (data) { qSteams.push(`(${s.title})`); } } - } catch (error) {} + } catch (error) { + // error + } } }); @@ -207,14 +216,14 @@ const canPlanetPublish3D = function (data) { * @param {*} data * @returns */ -const canPlanetPublishImage = function (data) { +const canPlanetPublishImage = function(data) { { let canFB = true; let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 13) { try { if (s.options.length <= 0 || s.options.some((y) => y.length <= 0)) { @@ -284,9 +293,10 @@ function canPublishRandom(data, publishType) { const publishStr = ['', '预览', '投放'][publishType] || '投放'; const errors = []; + // eslint-disable-next-line no-eval const randomList = data?.survey?.group_pages || []; - randomList.forEach((random, randomIndex) => { + randomList.forEach((random) => { const list = random.list || []; // 每一个随机,至少要有两个随机题组 @@ -308,8 +318,8 @@ function canPublishRandom(data, publishType) { if (!isValidated) { errors.push({ message: - field.message || - `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"` + field.message + || `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"` }); } }); @@ -369,11 +379,11 @@ function isLoopingLogicValid(data, publishType) { if ( (data?.cycle_pages || []).every((i) => { return ( - i.question_index && - i.relation_type !== undefined && - i.relation_type !== null && - i.first_page && - i.last_page + i.question_index + && i.relation_type !== undefined + && i.relation_type !== null + && i.first_page + && i.last_page ); }) ) { @@ -397,7 +407,7 @@ function isLoopingLogicValid(data, publishType) { * @param sn * @param publishType undefined投放;null投放;0投放;1预览;2投放;3测试 */ -export const canPlanetPublish = async function (sn, publishType) { +export const canPlanetPublish = async function(sn, publishType) { const parsedPublishType = !publishType ? 2 : publishType; const num = window.location.href.indexOf('code='); let code; diff --git a/src/utils/txyunCosUpLoad.js b/src/utils/txyunCosUpLoad.js new file mode 100644 index 0000000..f4b9185 --- /dev/null +++ b/src/utils/txyunCosUpLoad.js @@ -0,0 +1,56 @@ +// const COS = require('cos-js-sdk-v5'); +import COS from 'cos-js-sdk-v5'; +/** + * + * @param {腾讯云的pramas} data + * @returns + */ +export default function createCOS(data) { + const { + bucket, + host, + region, + sessionToken, + tmpSecretId, + tmpSecretKey, + startTime, + expiredTime, + name, + file + } = data; + + const config = { + Region: region, + Host: host, + Bucket: bucket, + Key: name, + Body: file, + onProgress: (progressData) => { + console.log(progressData); + } + }; + const client = new COS({ + getAuthorization: (options, callback) => { + // eslint-disable-next-line standard/no-callback-literal + callback({ + TmpSecretId: tmpSecretId, + TmpSecretKey: tmpSecretKey, + SecurityToken: sessionToken, + // 建议返回服务器时间作为签名的开始时间,避免用户浏览器本地时间偏差过大导致签名错误 + StartTime: startTime, // 时间戳,单位秒,如:1580000000 + ExpiredTime: expiredTime + }); + } + // eslint-enable standard/no-callback-literal + }); + return new Promise((resolve, reject) => { + client.putObject(config, (err, data) => { + console.log('腾讯上传', err, data); + if (err) { + reject(err); + } else { + resolve(data.Location); + } + }); + }); +} diff --git a/src/views/Design/components/Questions/Choice.vue b/src/views/Design/components/Questions/Choice.vue index f9e0ddb..6257010 100644 --- a/src/views/Design/components/Questions/Choice.vue +++ b/src/views/Design/components/Questions/Choice.vue @@ -57,9 +57,11 @@ + diff --git a/src/views/Design/components/Questions/SignQuestion.vue b/src/views/Design/components/Questions/SignQuestion.vue index 06bc5b2..fe923a0 100644 --- a/src/views/Design/components/Questions/SignQuestion.vue +++ b/src/views/Design/components/Questions/SignQuestion.vue @@ -13,7 +13,6 @@ const signatureCanvas = useTemplateRef('signatureCanvas'); const canvasWidth = ref(100); const canvasHeight = computed(() => canvasWidth.value / 1.5); -const showSignText = ref(true); const isEraser = ref(false); let ctx: CanvasRenderingContext2D; @@ -193,7 +192,7 @@ const emitValue = () => { style="border: 1px dashed #ccc; border-radius: 4px" > -
+
{ >
-
请在空白区域书写您的签名
+
请在空白区域书写您的签名
@@ -259,13 +258,14 @@ const emitValue = () => { } } } + .sign-tips { position: absolute; - left: 50%; top: 50%; + left: 50%; width: max-content; - transform: translate(-50%, -50%); color: #cdcdcd; + transform: translate(-50%, -50%); } } diff --git a/src/views/Survey/views/Create/Index.vue b/src/views/Survey/views/Create/Index.vue index 468ec17..97e1616 100644 --- a/src/views/Survey/views/Create/Index.vue +++ b/src/views/Survey/views/Create/Index.vue @@ -97,6 +97,10 @@
+ + + +
保存 预览 @@ -397,14 +401,14 @@ const questionEvent = (item) => { options: item.json.options.length > 0 ? item.json.options.map((item) => { - return item.map((it) => { - return { - ...it, - // 主键生成 - id: uuidv4() - }; - }); - }) + return item.map((it) => { + return { + ...it, + // 主键生成 + id: uuidv4() + }; + }); + }) : [] }) ); @@ -537,7 +541,7 @@ const previewQuestion = () => { router.push({ name: 'preview', query: { ...route.query } }); }; -onMounted(async () => { +onMounted(async() => { await getQuestionDetail(); }); diff --git a/src/views/Survey/views/Publish/Index.vue b/src/views/Survey/views/Publish/Index.vue index 04661b8..bf76b21 100644 --- a/src/views/Survey/views/Publish/Index.vue +++ b/src/views/Survey/views/Publish/Index.vue @@ -4,9 +4,11 @@
- + alt="" + />
@@ -26,8 +28,13 @@
点击"启用"按钮后,问卷才可以开始回收数据
- + @@ -92,21 +99,21 @@ type OperateItem = (typeof operateList)[0]; const operateBtn = (item: OperateItem) => { switch (item.type) { - case 'shareLink': - shareLink(); - break; - case 'copyLink': - copyLink(); - break; - case 'qrCode': - downLoadImg(); - break; - default: - break; + case 'shareLink': + shareLink(); + break; + case 'copyLink': + copyLink(); + break; + case 'qrCode': + downLoadImg(); + break; + default: + break; } }; // 复制链接 -function copyLink () { +function copyLink() { const input = document.createElement('input'); input.value = publishInfo.value.url; document.body.appendChild(input); @@ -116,7 +123,7 @@ function copyLink () { showToast('复制成功'); } // 分享链接 -function shareLink () { +function shareLink() { const params = { type: 'shareToWx', title: publishInfo.value.download_url.title, @@ -126,11 +133,11 @@ function shareLink () { scene: 0 // 朋友圈1 微信好友0 }; console.log('shareUrl', publishInfo.value.url); - appBridge.shareToWeChat(params, () => { }); + appBridge.shareToWeChat(params); } // 下载二维码 -function downLoadImg () { +function downLoadImg() { const { title, url } = publishInfo.value.download_url; if (utils.getSessionStorage('xToken')) { appBridge.save2Album(url, () => { @@ -145,7 +152,7 @@ function downLoadImg () { document.body.removeChild(link); } } -async function openPublishModal () { +async function openPublishModal() { const res = await canPlanetPublish(route.query.sn as string, publishType.value); if (res) { await publishSurvey({ @@ -161,7 +168,7 @@ async function openPublishModal () { } } -function getCode () { +function getCode() { getQrcode(sn) .then((res) => { if (res.data) { @@ -172,7 +179,7 @@ function getCode () { showFailToast(error.data?.message || error.message || '服务器错误'); }); } -function fetchInfo () { +function fetchInfo() { getSurveyInfo(sn) .then((res) => { status.value = Number(res.data.data.status); @@ -186,7 +193,7 @@ watch(status, (val) => { getCode(); } }); -onMounted(async () => { +onMounted(async() => { // status.value = 0; // publishInfo.value.img_url // = 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png';