|
@@ -15,7 +15,7 @@
|
|
|
<div class="btn" @click="tougao">我要投稿</div>
|
|
|
</div>
|
|
|
<div class="bottom_item">
|
|
|
- <div class="btn" @click="tougao">我的作品</div>
|
|
|
+ <div class="btn" @click="toupiao">我的作品</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
isWechat,
|
|
|
} from '../../utils/isTerminal';
|
|
|
import countTo from '@/components/counto/vue-countTo.vue';
|
|
|
-import { getTotalNum } from '@/api/SilkRoadSpringGala.js';
|
|
|
+import { getTotalNum, getToupiaoUrl } from '@/api/SilkRoadSpringGala.js';
|
|
|
/**
|
|
|
* window.$originData.orginParames.title 页面标题
|
|
|
* window.$originData.orginParames.parameters 固定参数值
|
|
@@ -107,6 +107,7 @@ const toShanshipin = ref(false);
|
|
|
const toDetail = ref(false);
|
|
|
const showWixin = ref(false);
|
|
|
const total = ref(0);
|
|
|
+const toJianjie = ref(false);
|
|
|
tot();
|
|
|
window.setInterval(() => {
|
|
|
tot();
|
|
@@ -132,48 +133,68 @@ function toShanshipinFunc() {
|
|
|
}
|
|
|
|
|
|
function tougao() {
|
|
|
- console.log(window.$shanshipin);
|
|
|
+ const newDate = Date.now();
|
|
|
+ const inTime = newDate >= 1682870400000 && newDate < 1683734400000;
|
|
|
+ if (inTime) {
|
|
|
+ // 2023-5-1 00:00:00 到 2023-5-10 24:00:00 跳转到投票界面
|
|
|
+ getToupiaoUrl().then(r => {
|
|
|
+ const res = r || { toupiaourl: '' };
|
|
|
+ openShanshipinDetail(res.toupiaourl);
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ // 否则打开简介
|
|
|
+ toJianjie.value = true;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function toupiao() {
|
|
|
if (!window.$shanshipin || !window.$shanshipin.invitedIp)
|
|
|
return (toShanshipin.value = true);
|
|
|
- const url =
|
|
|
- 'https://ssp-api.sxtvs.com.cn/tapi/form/index.html?ChannelID=20441',
|
|
|
- contentId = '',
|
|
|
- shareTitle = '',
|
|
|
- shareSummary = '',
|
|
|
- shareIcon = '',
|
|
|
- shareUrl = '';
|
|
|
- if (isIphone || isIpad || isIpod) {
|
|
|
- try {
|
|
|
- window.webkit.messageHandlers.TideAppStartNewsDetail.postMessage([
|
|
|
- url,
|
|
|
- contentId,
|
|
|
- shareTitle,
|
|
|
- shareSummary,
|
|
|
- shareIcon,
|
|
|
- shareUrl,
|
|
|
- ]);
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
- } else {
|
|
|
- try {
|
|
|
- window.TideApp.startNewsDetail(
|
|
|
- url,
|
|
|
- contentId,
|
|
|
- shareTitle,
|
|
|
- shareSummary,
|
|
|
- shareIcon,
|
|
|
- shareUrl
|
|
|
- );
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
+ openShanshipinDetail(
|
|
|
+ 'https://ssp-api.sxtvs.com.cn/tapi/form/index.html?ChannelID=20441'
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+function openShanshipinDetail(url = '') {
|
|
|
+ const contentId = '',
|
|
|
+ shareTitle = '',
|
|
|
+ shareSummary = '',
|
|
|
+ shareIcon = '',
|
|
|
+ shareUrl = '';
|
|
|
+ if (isIphone || isIpad || isIpod) {
|
|
|
+ try {
|
|
|
+ window.webkit.messageHandlers.TideAppStartNewsDetail.postMessage([
|
|
|
+ url,
|
|
|
+ contentId,
|
|
|
+ shareTitle,
|
|
|
+ shareSummary,
|
|
|
+ shareIcon,
|
|
|
+ shareUrl,
|
|
|
+ ]);
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ window.TideApp.startNewsDetail(
|
|
|
+ url,
|
|
|
+ contentId,
|
|
|
+ shareTitle,
|
|
|
+ shareSummary,
|
|
|
+ shareIcon,
|
|
|
+ shareUrl
|
|
|
+ );
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function tot() {
|
|
|
getTotalNum().then(r => {
|
|
|
- total.value = r || 0;
|
|
|
+ const res = r || {real: 0, unreal: 0}
|
|
|
+ total.value = Number(res.real || 0) + Number(res.unreal || 0);
|
|
|
});
|
|
|
}
|
|
|
</script>
|