liyongli 2 år sedan
förälder
incheckning
255f67196b
1 ändrade filer med 47 tillägg och 46 borttagningar
  1. 47 46
      src/view/CalligraphyAndPaintingCompetition/index.vue

+ 47 - 46
src/view/CalligraphyAndPaintingCompetition/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="CalligraphyAndPaintingCompetition">
     <div class="total">
-        已有
-        <span class="num">
-            <countTo :startVal="0" :endVal="total" :duration="3000"></countTo>
-        </span>
+      已有
+      <span class="num">
+        <countTo :startVal="0" :endVal="total" :duration="3000"></countTo>
+      </span>
       人报名
     </div>
     <div class="bottom">
@@ -109,7 +109,7 @@ const showWixin = ref(false);
 const total = ref(0);
 tot();
 window.setInterval(() => {
-    tot();
+  tot();
 }, 5000);
 function getDownloadUrl() {
   let url = 'https://ssp.sxtvs.com.cn';
@@ -132,42 +132,43 @@ function toShanshipinFunc() {
 }
 
 function tougao() {
-    console.log(window.$shanshipin)
-  if (!window.$shanshipin) 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);
+  console.log(window.$shanshipin);
+  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);
+      }
     }
-  } else {
-    try {
-      window.TideApp.startNewsDetail(
-        url,
-        contentId,
-        shareTitle,
-        shareSummary,
-        shareIcon,
-        shareUrl
-      );
-    } catch (e) {
-      console.log(e);
-    }
-  }
 }
 
 function tot() {
@@ -277,17 +278,17 @@ function tot() {
     height: 100vh;
   }
 
-  .total{
+  .total {
     color: #fff;
     position: absolute;
     top: 50%;
-    left:50%;
+    left: 50%;
     transform: translate(-50%, -50%);
 
-    .num{
-        background-color: rgba(0, 0, 0, 0.4);
-        border-radius: 3px;
-        padding: .5em;
+    .num {
+      background-color: rgba(0, 0, 0, 0.4);
+      border-radius: 3px;
+      padding: 0.5em;
     }
   }
 }