diff --git a/components.d.ts b/components.d.ts index a50d18f..e5047fc 100644 --- a/components.d.ts +++ b/components.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -export {} +export {}; /* prettier-ignore */ declare module 'vue' { diff --git a/src/assets/img/publish/baoming.png b/src/assets/img/publish/baoming.png new file mode 100644 index 0000000..4c797e3 Binary files /dev/null and b/src/assets/img/publish/baoming.png differ diff --git a/src/assets/img/publish/phone.png b/src/assets/img/publish/phone.png new file mode 100644 index 0000000..315d1f5 Binary files /dev/null and b/src/assets/img/publish/phone.png differ diff --git a/src/assets/img/publish/time.png b/src/assets/img/publish/time.png new file mode 100644 index 0000000..6cac97f Binary files /dev/null and b/src/assets/img/publish/time.png differ diff --git a/src/views/Home/components/LastSurvey/Index.vue b/src/views/Home/components/LastSurvey/Index.vue index 8e92d01..08aba4e 100644 --- a/src/views/Home/components/LastSurvey/Index.vue +++ b/src/views/Home/components/LastSurvey/Index.vue @@ -18,16 +18,21 @@

{{ survey.answer_num }}份

-
- +
+ {{ survey.scene_name }} |
-
- +
+ + {{ survey.source === 1 ? '移动端' : 'PC端' }} |
-
- +
+ {{ survey.created_at }}
@@ -55,6 +60,17 @@ const fetchSurveys = async () => { const res = await getSurveysPage(params); if (res.data.code === 0) { survey.value = res.data.data[0]; + + const sceneName = JSON.parse(JSON.stringify(survey.value.scene_name)); + const nameList = sceneName.split('-'); + if (nameList.length > 0) { + survey.value.scene_name = nameList[1] ? nameList[1] : nameList[0]; + } + + const timeList = survey.value.created_at.split(' '); + if (nameList.length) { + survey.value.created_at = timeList[0]; + } } else { // Toast() } @@ -95,6 +111,10 @@ onMounted(() => { border-radius: 10px; background: #fff; color: #000; + img { + height: 12px; + margin-right: 3px; + } .survey_con_title { //border: 1px solid red; diff --git a/src/views/Survey/Index.vue b/src/views/Survey/Index.vue index 28b7f2b..0fb99b9 100644 --- a/src/views/Survey/Index.vue +++ b/src/views/Survey/Index.vue @@ -19,18 +19,19 @@
-
- +
+ {{ item.scene_name }}
-
- +
+ + {{ item.source === 1 ? '移动端' : 'PC端' }}
-
- +
+ {{ item.created_at }}
@@ -259,6 +260,11 @@ onMounted(() => { .survey_item_info { .survey_item_info_status { margin-bottom: 15px; + display: flex; + img { + height: 12px; + margin-right: 3px; + } } .survey_item_status { diff --git a/src/views/Survey/views/Publish/Index.vue b/src/views/Survey/views/Publish/Index.vue index 267d558..2f97137 100644 --- a/src/views/Survey/views/Publish/Index.vue +++ b/src/views/Survey/views/Publish/Index.vue @@ -24,8 +24,13 @@
点击"启用"按钮后,问卷才可以开始回收数据
- + @@ -103,7 +108,7 @@ const operateBtn = (item: OperateItem) => { } }; // 复制链接 -function copyLink () { +function copyLink() { const input = document.createElement('input'); input.value = publishInfo.value.url; document.body.appendChild(input); @@ -113,7 +118,7 @@ function copyLink () { showToast('复制成功'); } // 分享链接 -function shareLink () { +function shareLink() { const params = { type: 'shareToWx', title: publishInfo.value.download_url.title, @@ -130,7 +135,7 @@ function shareLink () { } // 下载二维码 -function downLoadImg () { +function downLoadImg() { const { title, url } = publishInfo.value.download_url; if (utils.getSessionStorage('xToken')) { appBridge.save2Album(url, () => { @@ -145,7 +150,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 +166,7 @@ async function openPublishModal () { } } -function getCode () { +function getCode() { getQrcode(sn) .then((res) => { if (res.data) { @@ -172,7 +177,7 @@ function getCode () { showFailToast(error.data?.message || error.message || '服务器错误'); }); } -function fetchInfo () { +function fetchInfo() { getSurveyInfo(sn) .then((res) => { status.value = Number(res.data.data.status);