diff --git a/src/assets/img/publish/bg.png b/src/assets/img/publish/bg.png
new file mode 100644
index 0000000..f174e6f
Binary files /dev/null and b/src/assets/img/publish/bg.png differ
diff --git a/src/assets/img/publish/copy_icon.png b/src/assets/img/publish/copy_icon.png
index 3816763..44b1350 100644
Binary files a/src/assets/img/publish/copy_icon.png and b/src/assets/img/publish/copy_icon.png differ
diff --git a/src/assets/img/publish/download_icon.png b/src/assets/img/publish/download_icon.png
index 6ccdd68..46d55c1 100644
Binary files a/src/assets/img/publish/download_icon.png and b/src/assets/img/publish/download_icon.png differ
diff --git a/src/assets/img/publish/share_icon.png b/src/assets/img/publish/share_icon.png
index cee047e..8354724 100644
Binary files a/src/assets/img/publish/share_icon.png and b/src/assets/img/publish/share_icon.png differ
diff --git a/src/views/Survey/views/Publish/Index.vue b/src/views/Survey/views/Publish/Index.vue
index 4399ab1..08fc3e5 100644
--- a/src/views/Survey/views/Publish/Index.vue
+++ b/src/views/Survey/views/Publish/Index.vue
@@ -2,36 +2,30 @@
-
+
-

+
{{ publishInfo?.download_url?.title || '' }}
-
扫码填写问卷
+
扫码填写问卷
-
移动端仅做数据回收,问卷数据分析请前往PC端浏览
+
移动端仅做数据回收,问卷数据分析请前往PC端浏览
-
+
{{ item.title }}
-
+
点击"启用"按钮后,问卷才可以开始回收数据
-
+
@@ -52,6 +46,7 @@ import appBridge from '@/assets/js/appBridge';
import { getQrcode, getSurveyInfo, publishSurvey } from '@/api/survey';
import { canPlanetPublish } from '@/layouts/utils.js';
// import configUrl from '../../../../config';
+import bg from '@/assets/img/publish/bg.png';
import copyIcon from '@/assets/img/publish/copy_icon.png';
import shareIcon from '@/assets/img/publish/share_icon.png';
import downloadIcon from '@/assets/img/publish/download_icon.png';
@@ -60,15 +55,13 @@ const route = useRoute();
const surveyTitle = route.meta.title as string;
appBridge.setTitle(surveyTitle);
const sn = route.query.sn;
-// `0`: 编辑中 `1`: 投放中 `2`: 已结束
-const status = ref(0);
+const status = ref(0); // `0`: 编辑中 `1`: 投放中 `2`: 已结束
const publishType = ref(0);
const operateList = reactive([
{
title: '复制链接',
type: 'copyLink',
icon: copyIcon
- // icon: 'https://files.axshare.com/gsc/DR6075/44/1a/03/441a03a8b1004755a7a392b311acf97f/images/%E6%8A%95%E6%94%BE/u21.png?pageId=2f9ba10c-92b8-4c9b-b40b-04e65a0b4333'
},
{
title: '转发到微信',
@@ -97,21 +90,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);
@@ -121,22 +114,22 @@ function copyLink() {
showToast('复制成功');
}
// 分享链接
-function shareLink() {
+function shareLink () {
const params = {
type: 'shareToWx',
title: publishInfo.value.download_url.title,
description: publishInfo.value.desc || '',
thumbImageUrl: publishInfo.value.img_url,
webpageUrl: publishInfo.value.url,
- // 朋友圈1 微信好友0
- scene: 0
+ scene: 0 // 朋友圈1 微信好友0
};
- // console.log('shareUrl', publishInfo.value.url);
- appBridge.shareToWeChat(params);
+ console.log('shareUrl', publishInfo.value.url);
+ appBridge.shareToWeChat(params, () => {
+ });
}
// 下载二维码
-function downLoadImg() {
+function downLoadImg () {
const { title, url } = publishInfo.value.download_url;
if (utils.getSessionStorage('xToken')) {
appBridge.save2Album(url, () => {
@@ -151,7 +144,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({
@@ -167,7 +160,7 @@ async function openPublishModal() {
}
}
-function getCode() {
+function getCode () {
getQrcode(sn)
.then((res) => {
if (res.data) {
@@ -178,7 +171,7 @@ function getCode() {
showFailToast(error.data?.message || error.message || '服务器错误');
});
}
-function fetchInfo() {
+function fetchInfo () {
getSurveyInfo(sn)
.then((res) => {
status.value = Number(res.data.data.status);
@@ -192,8 +185,8 @@ watch(status, (val) => {
getCode();
}
});
-onMounted(async() => {
- // status.value = 0;
+onMounted(async () => {
+ // status.value = 1;
// publishInfo.value.img_url
// = 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png';
// publishInfo.value.url = `${configUrl.proxyDomain}/publish?sn=${sn && sn !== undefined ? sn : ''}`;
@@ -208,41 +201,49 @@ onMounted(async() => {