guoziyun 11 月之前
父節點
當前提交
d64d845c59
共有 7 個文件被更改,包括 33 次插入14 次删除
  1. 2 2
      dist/anc/index.html
  2. 12 7
      routes/v2/index.js
  3. 1 1
      test/another-contact.html
  4. 1 1
      views/v2/contact.ejs
  5. 1 1
      views/v2/footer.ejs
  6. 1 1
      views/v2/how-to-color-mandala.ejs
  7. 15 1
      views/v2/play.ejs

+ 2 - 2
dist/anc/index.html

@@ -15,7 +15,7 @@
             <div class="logo">Art Number Coloring</div>
             <div class="logo-name">Art Number Coloring</div>
             <div class="header-link">
-                <a href="https://www.facebook.com/artnumbercoloring/" class="link-fb"></a>
+                <a href="https://www.facebook.com/artcoloring/" class="link-fb"></a>
                 <a href="mailto:ares.nju@gmail.com" class="link-email"></a>
             </div>
         </div>
@@ -47,7 +47,7 @@
             <div class="line"></div>
             <ul class="footer-nav">
                 <li>Follow us on 
-                    <a class="icon-blue-fb" href="https://www.facebook.com/artnumbercoloring/"></a>
+                    <a class="icon-blue-fb" href="https://www.facebook.com/artcoloring/"></a>
                 </li>
                 <li>
                     <a href="/color_number_policy.html">Privacy Policy</a>

+ 12 - 7
routes/v2/index.js

@@ -74,17 +74,22 @@ router.get('/play/:id', function (req, res, next) {
     let host = config.cdnHost ?? config.resHost;
     let workUrl = `${host}/thumbs/coloring-page/work/480/${id}.webp`;
 
-    let cacheKey = `${CACHE_PREFIX}_play_${id}`;
-    let htmlData = await redis.getAsync(cacheKey);
+    // let cacheKey = `${CACHE_PREFIX}_play_${id}`;
+    // let htmlData = await redis.getAsync(cacheKey);
+    let htmlData = null;
     if (!htmlData) {
 
       let doc = await models.Art.findById(id);
       if (!doc) throw createError(404, 'Art Not Found!');
 
+      // deeplink 相关
+      let applink = `https://art.pcoloring.com${req.originalUrl}`;
+
       let data = {
         id,
         uri: req.originalUrl,
         imageUrl: workUrl,
+        applink,
       };
 
       // 渲染EJS模板到内存中
@@ -96,11 +101,11 @@ router.get('/play/:id', function (req, res, next) {
 
         // 渲染成功,存redis, 发送数据到客户端
         htmlData = html;
-        try {
-          await redis.set(cacheKey, htmlData, 'EX', CACHE_EXPIRES);
-        } catch (e) {
-          console.error(e);
-        }
+        // try {
+        //   await redis.set(cacheKey, htmlData, 'EX', CACHE_EXPIRES);
+        // } catch (e) {
+        //   console.error(e);
+        // }
 
         res.send(htmlData);
       });

+ 1 - 1
test/another-contact.html

@@ -503,7 +503,7 @@
                                     style="font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 15px;">
                                     Follow Us</h3>
                                 <div class="social-links">
-                                    <a href="https://www.facebook.com/yourcommunity" target="_blank"
+                                    <a href="https://www.facebook.com/artcoloring" target="_blank"
                                         class="social-link facebook">
                                         <span>Facebook</span>
                                     </a>

+ 1 - 1
views/v2/contact.ejs

@@ -281,7 +281,7 @@
                                 </svg>
                             </div>
                             <div class="social-text">
-                                <a href="https://www.facebook.com/profile.php?id=61577207309831" target="_blank">Facebook Community</a>
+                                <a href="https://www.facebook.com/artcoloring" target="_blank">Facebook Community</a>
                             </div>
                         </div>
                         

+ 1 - 1
views/v2/footer.ejs

@@ -53,7 +53,7 @@
         <div class="footer-bottom">
             <p class="copyright">© 2025 Art Number Coloring. All rights reserved.</p>
             <div class="footer-social">
-                <a href="https://www.facebook.com/profile.php?id=61577207309831" aria-label="Facebook"><img src="/assets/svg/facebook.svg" alt="Facebook"></a>
+                <a href="https://www.facebook.com/artcoloring" aria-label="Facebook"><img src="/assets/svg/facebook.svg" alt="Facebook"></a>
                 <a href="#" aria-label="Twitter"><img src="/assets/svg/twitter.svg" alt="Twitter"></a>
                 <a href="#" aria-label="Instagram"><img src="/assets/svg/instagram.svg" alt="Instagram"></a>
                 <a href="#" aria-label="Pinterest"><img src="/assets/svg/pinterest.svg" alt="Pinterest"></a>

+ 1 - 1
views/v2/how-to-color-mandala.ejs

@@ -638,7 +638,7 @@
                 <h3>Explore Our Mandala Collection</h3>
                 <p>Ready to create your own mandala masterpiece? Browse our extensive collection of free printable mandala coloring pages and start coloring today!</p>
                 <a href="/mandala-coloring-pages" class="cta-btn">Browse Mandala Pages</a>
-                <a href="https://www.facebook.com/profile.php?id=61577207309831" class="cta-btn">Join Our Coloring Community</a>
+                <a href="https://www.facebook.com/artcoloring" class="cta-btn">Join Our Coloring Community</a>
             </div>
         </div>
     </div>

+ 15 - 1
views/v2/play.ejs

@@ -7,12 +7,26 @@
   <link rel="icon" href="/assets/icon/favicon.ico" type="image/x-icon">
   <title>Coloring Page Paint On Line | Coloring Game</title>
   <meta name="description" content="Welcome to the coloring game! You&#39;ll see a line drawing waiting to be colored. Please color the picture according to the number instructions below the game panel. Bring it to life and complete it. You&#39;ll get a &#34;masterpiece&#34; and can freely save, collect, or share it with your friends." />
-  <meta property="og:title" content="Coloring Page Paint On Line | Coloring Game">
+  <meta property="og:title" content="Coloring Page Paint OnLine | Coloring Game">
   <meta property="og:description" content="Welcome to the coloring game! You&#39;ll see a line drawing waiting to be colored. Please color the picture according to the number instructions below the game panel. Bring it to life and complete it. You&#39;ll get a &#34;masterpiece&#34; and can freely save, collect, or share it with your friends.">
   <meta property="og:image" content="<%= imageUrl %>" />
 
   <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
 
+  <!-- MARK: Universal Link / Android App Link 的核心配置 -->
+  <!-- 这些 meta 标签的值应该是完整的 HTTPS 链接,Facebook 会识别并尝试拉起 App -->
+  <meta property="og:url" content="<%= applink %>" />
+  <!-- **Universal Link 路径** -->
+  <meta property="al:ios:url" content="<%= applink %>" />
+  <!-- **Universal Link 路径** -->
+  <meta property="al:ios:app_store_id" content="1575480118" /> <!-- **iOS App Store ID** -->
+  <meta property="al:ios:app_name" content="Art Number Coloring Book" /> <!-- **iOS 应用名称** -->
+
+  <meta property="al:android:package" content="com.pcoloring.art.puzzle.color.by.number" /> <!-- **Android 包名** -->
+  <meta property="al:android:url" content="<%= applink %>>" />
+  <!-- ** Universal Link 路径** -->
+  <meta property="al:android:app_name" content="Art Number Coloring Book" /> <!-- **Android 应用名称** -->
+
 
   <script type="module" crossorigin src="/assets/main-BVJfb_x5.js"></script>
   <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">