{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "undz",
  "home_page_url": "https://undz.cn/",
  "feed_url": "https://undz.cn/feed.json",
  "description": "AeYunDian的博客",
  "items": [
    {
      "title": "为 VuePress 主题添加动态导航栏美化",
      "url": "https://undz.cn/posts/top_nav_beautify.2026-06-13.html",
      "id": "https://undz.cn/posts/top_nav_beautify.2026-06-13.html",
      "summary": "在搭建 undz.cn 的过程中，我希望博客首页能有一个沉浸式的Hero，并且导航栏在滚动时能够平滑过渡，同时在非首页时恢复正常的样式。本文将分享我实现这一效果的 TopNavBeautify 组件的设计思路与完整代码。",
      "content_html": "\n<p>在搭建 <code>undz.cn</code> 的过程中，我希望博客首页能有一个沉浸式的Hero，并且导航栏在滚动时能够平滑过渡，同时在非首页时恢复正常的样式。本文将分享我实现这一效果的 <code>TopNavBeautify</code> 组件的设计思路与完整代码。</p>\n<!-- more -->\n<h2>效果预览</h2>\n<ul>\n<li><strong>首页滚动到顶部</strong>：导航栏背景透明，无阴影，无毛玻璃。</li>\n<li><strong>向下滚动离开Hero</strong>：导航栏自动添加背景模糊（毛玻璃），文字颜色变浅，并出现阴影。</li>\n<li><strong>非首页（文章页、关于页等）</strong>：导航栏保持正常的主题样式，不受滚动影响。</li>\n<li><strong>侧边栏切换按钮</strong>：同样跟随滚动状态改变颜色。</li>\n</ul>\n<h2>组件功能概述</h2>\n<p><code>TopNavBeautify</code> 是一个无渲染组件（不产生实际 UI 元素），通过监听滚动事件和路由变化，动态为 <code>.theme-container</code> 添加/移除特定的 CSS 类，从而触发导航栏的样式变化。它的主要作用包括：</p>\n<ul>\n<li>检测当前页面是否为博客首页（是否存在 <code>.vp-blog-hero</code> 元素）。</li>\n<li>监听滚动位置，当滚动距离 <code>&lt; 60px</code> 时添加 <code>ayund-scroll-top</code> 类。</li>\n<li>在首页时，根据滚动距离是否小于Hero高度减去 30px，添加 <code>ayund-scroll-blog-hero-inner</code> 类。</li>\n<li>监听路由变化，离开首页时移除首页专属的样式类。</li>\n<li>为侧边栏切换按钮绑定事件，确保每次打开/关闭侧边栏后重新检测滚动状态。</li>\n</ul>\n<h2>实现细节</h2>\n<h3>1. 检测博客Hero</h3>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">const</span><span style=\"--shiki-light:#986801;--shiki-dark:#E5C07B\"> blogHeroElms</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> document</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">getElementsByClassName</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'vp-blog-hero'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">const</span><span style=\"--shiki-light:#986801;--shiki-dark:#E5C07B\"> hasHero</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> blogHeroElms</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\">length</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> &gt;</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\"> 0</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">if</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> (</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">hasHero</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">) {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">add</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-blog-hero'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">} </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">else</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">remove</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-blog-hero'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">}</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><p><code>vuepress-theme-hope</code> 的主题中，博客首页会自动生成 <code>vp-blog-hero</code> 容器。我们通过它的存在来判断当前页面是否为博客首页。</p>\n<h3>2. 滚动监听与类切换</h3>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">const</span><span style=\"--shiki-light:#986801;--shiki-dark:#E5C07B\"> scrollTop</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> document</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">documentElement</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\">scrollTop</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">if</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> (</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">scrollTop</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> &lt;</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\"> 60</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">) {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">add</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-scroll-top'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">} </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">else</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">remove</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-scroll-top'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">}</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><p>滚动距离小于 60px 时，我们认为导航栏位于“顶部透明区域”，此时移除阴影和背景。这个阈值可以根据您的页面布局微调。</p>\n<p>对于首页Hero，我们还需要一个更精细的控制：当滚动距离小于Hero高度减 30px 时，导航栏文字使用亮色（适合深色Hero背景）；超过该距离后，导航栏恢复默认文字颜色。</p>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">if</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> (</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">scrollTop</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> &lt;</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> blogHeroElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\">clientHeight</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#56B6C2\"> -</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\"> 30</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">) {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">add</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-scroll-blog-hero-inner'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">} </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">else</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">  themeElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\">classList</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">remove</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'ayund-scroll-blog-hero-inner'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">}</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><h3>3. 路由变化后</h3>\n<p>使用 <code>vue-router</code> 的 <code>afterEach</code> 钩子，在每次路由跳转后重新执行样式检测。由于 DOM 更新可能有延迟，使用 <code>nextTick</code> 加 <code>setTimeout</code> 等待 50ms。</p>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">router</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">afterEach</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(() </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">=&gt;</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">  nextTick</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(() </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">=&gt;</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">    setTimeout</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(() </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">=&gt;</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">      CheckScrollTopClass</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">();</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    }, </span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\">50</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">  });</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">});</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><p>另外，<code>checkRootPath</code> 函数会在离开首页时强制移除 <code>ayund-scroll-blog-hero-inner</code> 类，避免样式残留。</p>\n<h3>4. 侧边栏切换的适配</h3>\n<p>当用户点击移动端的侧边栏切换按钮时，页面布局会变化，滚动位置可能不变，但我们需要重新检测是否仍满足“滚动距离小于 60px”的条件。因此，我们为 <code>.vp-toggle-sidebar-button</code> 绑定了 <code>click</code> 事件。</p>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">toggleSidebarElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">removeEventListener</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'click'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">CheckSidebarOpen</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">toggleSidebarElm</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">addEventListener</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">'click'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">CheckSidebarOpen</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><p>这里先移除再添加是为了防止重复绑定。</p>\n<h2>样式适配要点</h2>\n<p>在 SCSS 中，我们定义了几个关键的样式规则：</p>\n<ul>\n<li>当同时存在 <code>ayund-scroll-top</code> 和 <code>ayund-blog-hero</code> 时，导航栏 <code>box-shadow: none</code>。</li>\n<li>首页时，导航栏背景默认透明（<code>background: transparent</code>）。</li>\n<li>在 <code>ayund-scroll-blog-hero-inner</code> 状态下，导航栏内的链接、图标、按钮颜色都改为浅色（<code>#eee</code>），并添加文字阴影，以适应深色Hero。</li>\n<li>暗色模式（<code>[data-theme='dark']</code>）下，我们隐藏了下拉箭头（<code>.arrow</code>），保持界面整洁。</li>\n</ul>\n<h2>在主题中集成</h2>\n<p>该组件需要被注册为全局组件。在 <code>.vuepress/client.ts</code> 或 <code>.vuepress/config.ts</code> 中通过 <code>rootComponents</code> 引入：</p>\n<div class=\"language-ts line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"ts\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-ts\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">import</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> TopNavBeautify</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> from</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> './components/TopNavBeautify.vue'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">export</span><span style=\"--shiki-light:#E45649;--shiki-dark:#C678DD\"> default</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\"> defineClientConfig</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">({</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\">  rootComponents</span><span style=\"--shiki-light:#0184BC;--shiki-dark:#ABB2BF\">:</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> [</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\">    TopNavBeautify</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">,</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\">    // 其他全局组件...</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">  ],</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">});</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><p>组件的 <code>&lt;template&gt;</code> 中只包含一个隐藏的占位元素，不会影响页面布局。</p>\n<h2>总结</h2>\n<p><code>TopNavBeautify</code> 组件，以极低的成本实现了导航栏的动态美化，提升了博客首页的视觉体验。这种“无渲染组件 + CSS 类切换”的模式非常适合对第三方主题进行轻量级定制，而无需 fork 整个主题。如果您也在使用 VuePress，希望这篇文章能给您带来一些用途。</p>\n<blockquote>\n<p><strong>相关资源</strong></p>\n<ul>\n<li><a href=\"https://theme-hope.vuejs.press/\" target=\"_blank\" rel=\"noopener noreferrer\">vuepress-theme-hope 官方文档</a></li>\n<li><a href=\"https://github.com/AeYunDian/aeyundian.github.io/blob/main/src/.vuepress/components/TopNavBeautify.vue\" target=\"_blank\" rel=\"noopener noreferrer\">TopNavBeautify.vue 在 GitHub 上的源码</a></li>\n</ul>\n</blockquote>\n",
      "date_published": "2026-06-13T00:00:00.000Z",
      "date_modified": "2026-06-13T14:25:00.000Z",
      "authors": [],
      "tags": [
        "前端",
        "VuePress"
      ]
    },
    {
      "title": "《过年别逼孩子叫人：一句“快叫叔叔”，可能让他更不敢开口》",
      "url": "https://undz.cn/posts/kids_dont_like_to_say_hello_to_people.2026-06-06.html",
      "id": "https://undz.cn/posts/kids_dont_like_to_say_hello_to_people.2026-06-06.html",
      "summary": "《过年别逼孩子叫人：一句“快叫叔叔”，可能让他更不敢开口》 孩子不爱开口叫人（比如见到亲戚不愿意打招呼）其实是很常见的现象，这通常不是“没礼貌”或“性格不好”。 一、先理解孩子为什么不愿意叫人 气质类型：有些孩子天生慢热、谨慎，需要更多时间观察和适应新环境和陌生人。 曾被强迫或负面评价：如果之前被逼着叫、或者叫完后没有得到积极回应，孩子可能产生抗拒。 ...",
      "content_html": "\n<p>孩子不爱开口叫人（比如见到亲戚不愿意打招呼）其实是很常见的现象，这通常不是“没礼貌”或“性格不好”。</p>\n<h2>一、先理解孩子为什么不愿意叫人</h2>\n<ol>\n<li><strong>气质类型</strong>：有些孩子天生慢热、谨慎，需要更多时间观察和适应新环境和陌生人。</li>\n<li><strong>曾被强迫或负面评价</strong>：如果之前被逼着叫、或者叫完后没有得到积极回应，孩子可能产生抗拒。</li>\n<li><strong>模仿和习惯</strong>：家庭中如果较少有主动问候的氛围，孩子也缺乏模仿对象。</li>\n<li><strong>不知道怎么叫</strong>：这是一个非常常见的现象，尤其对4-7岁的孩子甚至7~现在来说，家里亲戚关系复杂（‘这是你三姨姥的儿媳妇’），他们<strong>根本记不住</strong>，越记不住越不敢开口，慢慢的，就不愿意了。</li>\n</ol>\n<h2>二、家长可以怎么做</h2>\n<h3>1. 不强迫孩子</h3>\n<ul>\n<li><strong>不要当场批评</strong>：“你怎么不叫叔叔？太没礼貌了！”</li>\n<li><strong>不要贴标签</strong>：“这孩子就是胆小/内向。”</li>\n<li><strong>强迫只会增加孩子的压力和逆反心理。</strong></li>\n</ul>\n<h3>2. 提前铺垫一下，降低孩子压力</h3>\n<ul>\n<li>在去见人之前，用轻松的语气告诉孩子：“等会儿我们会见到xxx阿姨，你可以跟她挥挥手，或者笑一笑，也可以说‘阿姨好’。如果你不想说，也没关系，妈妈帮你说。”</li>\n<li>给孩子一个“退路”选项（比如微笑、挥手、点头），让他感觉有控制感，<strong>而不是无助地站在那里等着！</strong>。<br>\n如果当场孩子就是不肯叫，家长可以自然接一句：<br>\n“没关系，我们刚睡醒还有点懵。阿姨好，我们先去洗手啦。”<br>\n——既替孩子解了围，也不让对方尴尬，孩子会默默学会这种不硬扛、也不失礼的方式。</li>\n</ul>\n<h3>3. 家长以身作则，自然示范</h3>\n<ul>\n<li>家长主动、热情地跟对方打招呼，孩子会观察模仿。</li>\n<li>比如：“王奶奶，早上好！这是我们家宝贝。”然后可以替孩子说一句：“我们先熟悉一下，等会儿再跟你玩。”</li>\n</ul>\n<h3>4. 事后强化正面行为</h3>\n<ul>\n<li>如果孩子哪怕只是看了对方一眼、小声说了“你好”，事后都要及时肯定：“那位爷爷看到你冲他笑，特别开心。妈妈也觉得那样打招呼很自然。”</li>\n<li><strong>不要拿他跟别的孩子比较</strong>：“你看哥哥都会叫人，你怎么不会？”</li>\n</ul>\n<h3>5. 接纳孩子的节奏</h3>\n<ul>\n<li>有些孩子要到5-6岁甚至更大才能自然大方地主动叫人。只要孩子在其他方面社交正常（能跟熟悉的人互动、愿意跟同龄人玩），就不用过度担心。</li>\n</ul>\n<h2>三、需要警惕的情况</h2>\n<p>如果孩子除了不爱叫人，还有以下表现，可以考虑咨询儿童心理或发育行为医生：</p>\n<ul>\n<li>完全不看人眼睛、对熟悉的人也很少有情感回应</li>\n<li>语言发育明显落后（2岁还不会说10个有意义的词）</li>\n<li>在幼儿园完全不参与集体活动、总是一个人躲在角落</li>\n<li>对任何陌生人（包括同龄孩子）都极度恐惧、尖叫躲避</li>\n</ul>\n<h2>结尾</h2>\n<p>孩子不爱开口叫人，<strong>绝大部分情况下不是教养问题，而是发展阶段的正常现象</strong>。耐心和接纳比任何说教都更重要。给孩子时间，用示范和鼓励代替强迫，慢慢地他会找到自己的社交节奏。</p>\n",
      "date_published": "2026-06-06T00:00:00.000Z",
      "date_modified": "2026-06-06T16:07:10.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "《妈妈，你还没教我》",
      "url": "https://undz.cn/posts/mom_you_have_not_taught_me_yet.2026-06-06.html",
      "id": "https://undz.cn/posts/mom_you_have_not_taught_me_yet.2026-06-06.html",
      "summary": "《妈妈，你还没教我》 门铃响了，我躲在沙发后面。 妈妈去开门，进来的是妈妈的老同学，还有一个我不认识的阿姨。妈妈笑着说：“快，叫阿姨。” 我张了张嘴，声音卡在喉咙里。 妈妈又轻轻推了我一下：“叫阿姨呀。” 我低下了头。 我不知道该怎么叫。这位阿姨是谁呢？是妈妈的同事？还是小时候见过的谁？妈妈没告诉我她叫什么，我也没有任何一个称呼可以叫。 妈妈替我解了围...",
      "content_html": "\n<p>门铃响了，我躲在沙发后面。<br>\n妈妈去开门，进来的是妈妈的老同学，还有一个我不认识的阿姨。妈妈笑着说：“快，叫阿姨。”<br>\n我张了张嘴，声音卡在喉咙里。<br>\n妈妈又轻轻推了我一下：“叫阿姨呀。”<br>\n我低下了头。<br>\n我不知道该怎么叫。这位阿姨是谁呢？是妈妈的同事？还是小时候见过的谁？妈妈没告诉我她叫什么，我也没有任何一个称呼可以叫。<br>\n妈妈替我解了围，说：“这孩子，不太爱说话。”然后她们就聊起来了。我站在旁边，手指绞着衣角，觉得自己的脸热热的。</p>\n",
      "date_published": "2026-06-06T00:00:00.000Z",
      "date_modified": "2026-06-06T16:07:10.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "我们毕业啦！",
      "url": "https://undz.cn/we/have/graduated.html",
      "id": "https://undz.cn/we/have/graduated.html",
      "summary": "我们毕业啦！ 今天，我们真的毕业了。 班级毕业合照 https://net.undz.cn/static/png/d475374f852406e91f793537bbbe6bd2.png 六年，六个故事，六次成长。 一年级，我们是 “捕风的异乡人” ，怯生生地走进校园，一切都是新鲜的。 二年级， “为了没有眼泪的明天” ，我们学会了擦干眼泪，勇敢面对小...",
      "content_html": "\n<p>今天，我们真的毕业了。</p>\n<p><img src=\"https://net.undz.cn/static/png/d475374f852406e91f793537bbbe6bd2.png\" alt=\"班级毕业合照\" loading=\"lazy\"><br>\n<a href=\"https://net.undz.cn/static/png/d475374f852406e91f793537bbbe6bd2.png\" target=\"_blank\" rel=\"noopener noreferrer\">https://net.undz.cn/static/png/d475374f852406e91f793537bbbe6bd2.png</a></p>\n<p>六年，六个故事，六次成长。</p>\n<p>一年级，我们是 <strong>“捕风的异乡人”</strong> ，怯生生地走进校园，一切都是新鲜的。<br>\n二年级， <strong>“为了没有眼泪的明天”</strong> ，我们学会了擦干眼泪，勇敢面对小小的挫折。<br>\n三年级， <strong>“千朵玫瑰带来的黎明”</strong> ，我们在知识的芬芳中迎来每一个充满希望的清晨。<br>\n四年级， <strong>“巨龙与自由之歌”</strong> ，我们在难题面前不再畏惧，唱响属于自己的歌。<br>\n五年级， <strong>“向深水中的晨星”</strong> ，我们开始探索更广阔的世界，追寻心中的光。<br>\n六年级， <strong>“我们终将重逢”</strong> ——今天，我们毕业了，但这不是结束，而是另一段旅程的起点。</p>\n<h2>谢谢您，老师</h2>\n<p>谢谢您，老师。六年的陪伴，您把知识和关爱种在我们心里。老师，您辛苦了！</p>\n<h2>谢谢你们，同学</h2>\n<p>谢谢你们，同学。<em><strong>、</strong></em>、<em><strong>、</strong></em>、<em><strong>、</strong></em>、<em><strong>、</strong></em>、<em><strong>、</strong></em>，还有每一位同窗。<br>\n六年的时光因为有你们而变得热闹、有趣。一起上课，一起吃饭，一起在操场上奔跑……这些平凡的每一天，都是我最珍贵的回忆。</p>\n<p>马上就要分开了，虽然不舍，但我知道，友谊不会因为距离而变淡。无论走到哪里，我们都是六年同窗的好朋友。</p>\n<h2>谢谢您，母校</h2>\n<p>谢谢您，母校。宽敞的教室、绿茵的操场、食堂里香喷喷的饭菜……这里的一草一木，都见证了我们的成长。无论将来走到哪里，我们都不会忘记，这里是我们梦想开始的地方。</p>\n<h2>未来，我们来了</h2>\n<p>毕业不是结束，而是新的开始。九月，我们就要走进不同的中学，开始新的旅程。也许会有新的挑战，但我们已经长大了，不怕。</p>\n<p>我们会在新的学校里继续努力，不辜负老师的期望，不辜负父母的付出，也不辜负自己的梦想。</p>\n<p>最后，祝老师们身体健康，祝同学们前程似锦，祝母校越来越好！</p>\n<p>我们毕业啦！未来，我们来了！</p>\n",
      "image": "https://net.undz.cn/static/png/d475374f852406e91f793537bbbe6bd2.png",
      "date_published": "2026-07-01T00:00:00.000Z",
      "date_modified": "2026-06-06T00:52:42.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "AyWebHosting",
      "url": "https://undz.cn/project/website_hosting.html",
      "id": "https://undz.cn/project/website_hosting.html",
      "summary": "AyWebHosting——更简单的个人静态网站托管 免费托管，无限可能 您将免费获得一个类似 https://undz.cn/yourname/ 的网站路径，或者一个三级子域名（例如 yourname.undz.cn、yourname.io.hb.cn 等）。 支持以下域名格式： yourname.undz.cn yourname.io.hb.cn ...",
      "content_html": "\n<h2>免费托管，无限可能</h2>\n<p>您将免费获得一个类似 <code>https://undz.cn/yourname/</code> 的网站路径，或者一个三级子域名（例如 <code>yourname.undz.cn</code>、<code>yourname.io.hb.cn</code> 等）。</p>\n<p>支持以下域名格式：</p>\n<ul>\n<li><code>yourname.undz.cn</code></li>\n<li><code>yourname.io.hb.cn</code></li>\n<li><code>yourname.exm2.eu.cc</code></li>\n<li><code>yourname.ayd2.eu.cc</code></li>\n<li><code>yourname.net2.eu.cc</code></li>\n<li><code>yourname.net3.eu.cc</code></li>\n<li><code>yourname.eu.cc</code></li>\n</ul>\n<h2>如何申请？</h2>\n<p>如果您需要托管个人静态网站，请联系我：</p>\n<ul>\n<li><strong>QQ好友添加</strong>：<a href=\"https://api.undz.cn/addqq?uid=2768223712\" target=\"_blank\" rel=\"noopener noreferrer\">点击此处唤起QQ</a></li>\n<li><strong>B站私信</strong>：<a href=\"https://space.bilibili.com/3494370328185235\" target=\"_blank\" rel=\"noopener noreferrer\">https://space.bilibili.com/3494370328185235</a></li>\n<li><strong>邮箱</strong>：<a href=\"mailto:admin@exm.undz.cn\" target=\"_blank\" rel=\"noopener noreferrer\">admin@exm.undz.cn</a> 或 <a href=\"mailto:zhanghaoyu19281@gmail.com\" target=\"_blank\" rel=\"noopener noreferrer\">zhanghaoyu19281@gmail.com</a></li>\n</ul>\n<h2>服务承诺</h2>\n<ul>\n<li>✅ <strong>完全免费</strong>：无需信用卡，无隐藏费用。</li>\n<li>🚫 <strong>无广告</strong>：您的网站就是您自己的，我们绝不会在上面投放任何广告。</li>\n<li>⏱️ <strong>99.99% 正常运行时间</strong>：接近100%的可用性，让您的网站全天候开放。</li>\n</ul>\n<div class=\"hint-container info\">\n<p class=\"hint-container-title\">相关信息</p>\n<p>当前自动化部署系统正在开发中，由于正在准备期末考和毕业考，较忙，预计于7月1日开放，预计还有 <span id=\"remaining_days\"></span></p>\n</div>\n",
      "date_published": "2026-06-03T00:00:00.000Z",
      "date_modified": "2026-06-06T14:40:34.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "Ys Post 变更通知",
      "url": "https://undz.cn/posts/announcement.2026-05-06.html",
      "id": "https://undz.cn/posts/announcement.2026-05-06.html",
      "summary": "Ys Post 变更通知 尊敬的 Ys Post 用户： 非常抱歉地通知您，Ys Post 原有服务将于即日起停止运营。 停运原因 近期我们监测到，Ys Post 被大量滥用，成为批量注册海外平台（如各类论坛、社交媒体等）的工具。这种行为严重违反了我们的初心，也对其他正常用户的体验造成了影响。 为了维护服务的公平性与可靠性，我们不得不作出艰难决定：终止...",
      "content_html": "\n<p>尊敬的 Ys Post 用户：<br>\n非常抱歉地通知您，<strong>Ys Post 原有服务将于即日起停止运营</strong>。</p>\n<h2>停运原因</h2>\n<p>近期我们监测到，Ys Post 被大量滥用，成为批量注册海外平台（如各类论坛、社交媒体等）的工具。这种行为严重违反了我们的初心，也对其他正常用户的体验造成了影响。</p>\n<p>为了维护服务的公平性与可靠性，我们不得不作出艰难决定：<strong>终止 Ys Post 原有服务</strong>。</p>\n<h2>全新替代服务：AyExMail</h2>\n<p>作为替代，我们推出全新邮件服务 —— <strong>AyExMail</strong> （ <a href=\"https://exm.undz.cn\" target=\"_blank\" rel=\"noopener noreferrer\">https://exm.undz.cn</a> ）。</p>\n<p>相比 Ys Post，AyExMail 在以下方面进行了重要升级：</p>\n<ol>\n<li><strong>人机校验机制</strong>：注册与使用过程中增加了验证码（CAPTCHA）等校验，有效阻止脚本和自动化工具的批量滥用。</li>\n<li><strong>异常行为监测</strong>：系统会实时分析使用模式，一旦检测到异常（如短时间内大量请求、非人类操作等），将<strong>自动暂停账号</strong>，保障服务环境的健康。</li>\n<li><strong>更稳定的体验</strong>：通过限制非正常流量，确保普通用户获得更流畅、更安全的服务。</li>\n</ol>\n<h2>对现有用户的影响与建议</h2>\n<ul>\n<li>Ys Post 原有账号数据将<strong>自动迁移至AyExMail</strong>，您只需在 <a href=\"https://exm.undz.cn\" target=\"_blank\" rel=\"noopener noreferrer\">https://exm.undz.cn</a> 登录您的旧帐号 。</li>\n<li>若您在 AyExMail 使用中遇到误判，请 <a href=\"https://github.com/AeYunDian/aeyundian.github.io/issues/new?template=need-help.md\" target=\"_blank\" rel=\"noopener noreferrer\">联系客服</a>并提供使用场景说明，我们会手动复核。</li>\n</ul>\n<h2>未来计划</h2>\n<p>我们将持续优化 AyExMail 的反滥用策略，同时保持对合法用户的低门槛。感谢您一直以来的理解与支持。</p>\n<p>给您带来的不便，深表歉意。</p>\n<div style=\"text-align:right\">\n<p>2026-05-26<br>\nAyExMail 运营组织</p>\n</div>\n",
      "date_published": "2026-05-26T00:00:00.000Z",
      "date_modified": "2026-05-26T08:26:10.000Z",
      "authors": [],
      "tags": [
        "公告"
      ]
    },
    {
      "title": "原神魔神任务列表（截止6.5版本）",
      "url": "https://undz.cn/posts/genshin_impact_task_list_as_of_6.5.2026-05-22.html",
      "id": "https://undz.cn/posts/genshin_impact_task_list_as_of_6.5.2026-05-22.html",
      "summary": "原神魔神任务列表（截止6.5版本） 序章（蒙德） 主线序章（蒙德） 序章 第一幕 捕风的异乡人 主线序章（蒙德） 序章 第二幕 为了没有眼泪的明天 主线序章（蒙德） 序章 第三幕 巨龙与自由之歌 第一章（璃月） 主线第一章（璃月） 第一章 第一幕 浮世浮生千岩间 主线第一章（璃月） 第一章 第二幕 辞行久远之躯 主线第一章（璃月） 第一章 第三幕 迫近...",
      "content_html": "\n<h2>序章（蒙德）</h2>\n<p>主线序章（蒙德）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;捕风的异乡人<br>\n主线序章（蒙德）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;为了没有眼泪的明天<br>\n主线序章（蒙德）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;巨龙与自由之歌</p>\n<h2>第一章（璃月）</h2>\n<p>主线第一章（璃月）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;浮世浮生千岩间<br>\n主线第一章（璃月）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;辞行久远之躯<br>\n主线第一章（璃月）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;迫近的客星<br>\n主线第一章（璃月）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;我们终将重逢</p>\n<h2>第二章（稻妻）</h2>\n<p>主线第二章（稻妻）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序幕&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;振袖秋风问红叶<br>\n主线第二章（稻妻）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;不动鸣神，恒常乐土<br>\n主线第二章（稻妻）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;无念无想，泡影断灭<br>\n主线第二章（稻妻）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;千手百眼，天下人间<br>\n主线第二章（稻妻）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;回响渊底的安魂曲</p>\n<h2>第三章（须弥）</h2>\n<p>主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;穿越烟帷与暗林<br>\n主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;千朵玫瑰带来的黎明<br>\n主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;迷梦与空幻与欺骗<br>\n主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;赤土之王与三朝圣者<br>\n主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五幕&nbsp;&nbsp;&nbsp;虚空鼓动，劫火高扬<br>\n主线第三章（须弥）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第六幕&nbsp;&nbsp;&nbsp;卡利贝尔</p>\n<h2>第四章（枫丹）</h2>\n<p>主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;白露与黑潮的序诗<br>\n主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;仿若无因飘落的轻雨<br>\n主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;向深水中的晨星<br>\n主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;谕示胎动的终焉之刻<br>\n主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五幕&nbsp;&nbsp;&nbsp;罪人舞步旋<br>\n主线第四章（枫丹）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第六幕&nbsp;&nbsp;&nbsp;睡前故事</p>\n<h2>第五章（纳塔）</h2>\n<p>主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;荣花与炎日之途<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;黑石湮落白石下<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;镜与谜烟的彼方<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;命定将焚的虹光<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五幕&nbsp;&nbsp;&nbsp;炽烈的还魂诗<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第六幕&nbsp;&nbsp;&nbsp;你存在的时空<br>\n主线第五章（纳塔）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第五章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;幕间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;万火归一</p>\n<h2>独立间章</h2>\n<p>独立间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;风起鹤归<br>\n独立间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;危途疑踪<br>\n独立间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;倾落伽蓝<br>\n独立间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;悖理</p>\n<h2>空月之歌（挪德卡莱）</h2>\n<p>主线空月之歌&nbsp;&nbsp;&nbsp;&nbsp;空月之歌&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一幕&nbsp;&nbsp;&nbsp;雪浪与苍林之舞<br>\n主线空月之歌&nbsp;&nbsp;&nbsp;&nbsp;空月之歌&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第二幕&nbsp;&nbsp;&nbsp;尘与灯的挽歌<br>\n主线空月之歌&nbsp;&nbsp;&nbsp;&nbsp;空月之歌&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第三幕&nbsp;&nbsp;&nbsp;不存在的国土<br>\n主线空月之歌&nbsp;&nbsp;&nbsp;&nbsp;空月之歌&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第四幕&nbsp;&nbsp;&nbsp;回望湮灭的月光</p>\n",
      "date_published": "2026-05-22T00:00:00.000Z",
      "date_modified": "2026-05-22T14:41:31.000Z",
      "authors": [],
      "tags": [
        "原神"
      ]
    },
    {
      "title": "GitHub 加速与代理服务使用指南",
      "url": "https://undz.cn/posts/accelerate_your_github.2026-05-20.html",
      "id": "https://undz.cn/posts/accelerate_your_github.2026-05-20.html",
      "summary": "GitHub 加速与代理服务使用指南 注意 此面向公众的为GitHub加速服务，不是VPN，请注意区分！ 在国内访问 GitHub 及其相关资源（如 raw、gist、各类 assets）时，经常遇到速度慢、甚至无法打开的问题。本文介绍一个基于 Cloudflare Worker 实现的代理服务，提供两种代理模式：无需授权的 GitHub 专用加速 和...",
      "content_html": "\n<div class=\"hint-container warning\">\n<p class=\"hint-container-title\">注意</p>\n<p>此面向公众的为GitHub加速服务，不是VPN，请注意区分！</p>\n</div>\n<p>在国内访问 GitHub 及其相关资源（如 raw、gist、各类 assets）时，经常遇到速度慢、甚至无法打开的问题。本文介绍一个基于 Cloudflare Worker 实现的代理服务，提供两种代理模式：<strong>无需授权的 GitHub 专用加速</strong> 和 <strong>需要授权的通用代理</strong>，帮助你稳定、快速地访问 GitHub 生态资源。</p>\n",
      "date_published": "2026-05-20T00:00:00.000Z",
      "date_modified": "2026-05-20T12:52:03.000Z",
      "authors": [],
      "tags": [
        "GitHub"
      ]
    },
    {
      "title": "",
      "url": "https://undz.cn/go.html",
      "id": "https://undz.cn/go.html",
      "summary": "继续访问 取消",
      "content_html": "<div class=\"go-container\" v-if=\"showConfirm\">\n  <div class=\"confirm\">\n    <p v-html=\"confirmMsg\"></p>\n    <div class=\"buttons\">\n      <button @click=\"continueJump\" class=\"btn primary\">继续访问</button>\n      <button @click=\"cancelJump\" class=\"btn secondary\">取消</button>\n    </div>\n  </div>\n</div>\n<div class=\"go-container\" v-else=\"\">\n  <div class=\"loading\">\n    <div class=\"indeterminate-progress\"></div>\n  </div>\n</div>\n",
      "date_published": "2026-04-23T14:30:43.000Z",
      "date_modified": "2026-04-24T14:01:14.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "网易云音乐在线免费播放",
      "url": "https://undz.cn/posts/free_playback_on_netease_cloud_music.2026-04-23.html",
      "id": "https://undz.cn/posts/free_playback_on_netease_cloud_music.2026-04-23.html",
      "summary": "免费在线解析、播放网易云音乐",
      "content_html": "<p>免费在线解析、播放网易云音乐</p>\n<!-- more -->\n<p><a href=\"/go.html?to=1001&amp;rb=/\" target=\"_blank\">快速启动链接（长按选择复制链接）</a></p>\n<div class=\"music-loader\">\n<fieldset class=\"typeSel\">\n<legend>请选择类型：</legend>\n<input type=\"radio\" id=\"song\" value=\"song\" v-model=\"musicType\" checked=\"\">\n<label for=\"song\">单曲</label>\n<input type=\"radio\" id=\"playlist\" value=\"playlist\" v-model=\"musicType\">\n<label for=\"playlist\">歌单</label>\n</fieldset>\n  <div class=\"input-group\">\n    <input v-model=\"userInput\" type=\"text\" placeholder=\"请输入网易云歌曲ID或网易云歌曲链接\" @keyup.enter=\"loadSong()\">\n    <button @click=\"loadSong()\">加载播放器</button>\n  </div>\n  </div>\n<!-- type=\"song\" -->\n",
      "date_published": "2026-04-23T00:00:00.000Z",
      "date_modified": "2026-05-20T12:52:03.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "《轻涟 La vaguelette》",
      "url": "https://undz.cn/posts/la_vaguelette.2023-11-13.html",
      "id": "https://undz.cn/posts/la_vaguelette.2023-11-13.html",
      "content_html": "<!-- more -->\n",
      "date_published": "2026-04-22T00:00:00.000Z",
      "date_modified": "2026-05-20T12:52:03.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "《花与剑的轮舞》",
      "url": "https://undz.cn/posts/rondeau_des_fleurs_et_des_rapieres.2023-10-02.html",
      "id": "https://undz.cn/posts/rondeau_des_fleurs_et_des_rapieres.2023-10-02.html",
      "content_html": "<!-- more -->\n",
      "date_published": "2026-04-22T00:00:00.000Z",
      "date_modified": "2026-05-20T12:52:03.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "关于为什么要成为IT的工作者？",
      "url": "https://undz.cn/posts/why_i_become_a_programmer.2026-04-20.html",
      "id": "https://undz.cn/posts/why_i_become_a_programmer.2026-04-20.html",
      "summary": "我目前是全能型全栈开发，还会服务器运维现在是做云运维\n关于为什么要成为IT的工作者？\n很简单，对于我来说，因为中国人的人际交往的非常复杂，他是千变万化的，不像机器，虽然是死板的，但你想让她干什么就干什么，他绝不会违抗你。\n这比人要好太多了，所以我就成为了一个IT行业的工作者\n不过呢，到也有一个苦恼（其实可以来说一直是这样的），自己不善于社交，这东西你没...",
      "content_html": "<!-- more -->\n<p>我目前是全能型全栈开发，还会服务器运维现在是做云运维</p>\n<h1>关于为什么要成为IT的工作者？</h1>\n<p>很简单，对于我来说，因为中国人的人际交往的非常复杂，他是千变万化的，不像机器，虽然是死板的，但你想让她干什么就干什么，他绝不会违抗你。<br>\n这比人要好太多了，所以我就成为了一个IT行业的工作者</p>\n<p>不过呢，到也有一个苦恼（其实可以来说一直是这样的），自己不善于社交，这东西你没办法拒绝的，你总要和人交往，</p>\n<p>「社交」百科上的定义为“在一定的历史条件下，个体之间相互往来，进行物质、精神交流的社会活动”，显然这里的个体指的是人。所以社交是指你和其他之间往来的活动能力，那为什么程序员不擅长这项技能呢？我的一点思考</p>\n<p>首先，程序员的工作大部分是面向机器的，程序员善于「机交」，让计算机说一计算机不敢说二。自然相比很多与人打交道的工作来说，程序员缺乏锻炼社交的机会。</p>\n<p>其次，程序员工作中与人打交道的部分，主要也是讨论和解决问题，讨论和解决问题一定是一个很tough的过程，大家关注的核心点还是怎么解决问题，而不是怎么「社交」让对方舒服，这也让程序员养成了直击问题核心的习惯，不绕来绕去的，不玩虚的，不打太极似的玩「社交」。</p>\n<p>最后，能最快最准确的寻找解决方案是最重要的，也能为自己带来可观的回报，所以潜意识里也不会把社交当成一项对自己来说很重要的技能，或者说精力有限，花精力在这些事情上，不如好好提升自己的技术水平、提升自己分析和解决问题的能力。</p>\n<p>其实，不止程序员，很多靠技术吃饭的人，都会比靠人脉、资源吃饭的人社交能力差。本质上还是，什么能力会影响你的饭碗，你就会提升什么能力。</p>\n",
      "date_published": "2026-04-20T00:00:00.000Z",
      "date_modified": "2026-06-06T16:07:10.000Z",
      "authors": [],
      "tags": [
        "个人"
      ]
    },
    {
      "title": "1.计算机和操作系统",
      "url": "https://undz.cn/posts/basic/computer_and_os.html",
      "id": "https://undz.cn/posts/basic/computer_and_os.html",
      "summary": "1.计算机和操作系统\n一、计算机的基本组成和工作原理\n先来一段计算机导论节选：",
      "content_html": "<!-- more -->\n<h1>1.计算机和操作系统</h1>\n<h2>一、计算机的基本组成和工作原理</h2>\n<p>先来一段计算机导论节选：</p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "计算机与操作系统"
      ]
    },
    {
      "title": "10.开源的那些事",
      "url": "https://undz.cn/posts/basic/open_source.html",
      "id": "https://undz.cn/posts/basic/open_source.html",
      "summary": "10.开源的那些事 当我们在伤害开源的时候，在伤害什么？【差评君】 为什么程序员们愿意在 GitHub 上开源，给别人免费使用和学习？ 各种开源协议介绍 提示 看到这里，你应该理解为什么我的项目基本都开放源代码了。",
      "content_html": "\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "开源的那些事"
      ]
    },
    {
      "title": "11.一套最舒适的开发环境",
      "url": "https://undz.cn/posts/basic/dev_env_ready.html",
      "id": "https://undz.cn/posts/basic/dev_env_ready.html",
      "summary": "11.一套最舒适的开发环境\n一套最舒适 最好的开发环境应该是什么样子的呢？\nWindows\n\n将系统更新到最新，包括驱动等\n将系统归属地改为香港，设定好时间日期格式(设定为香港可以访问到更多有趣的内容)\n在系统设置中配置好 开发者选项\n配置好 翻墙和代理服务\n安装 Chrome\n安装并配置 \n安装并配置 VSCode\n安装并配置 WSL\n设定好 WSL...",
      "content_html": "<!-- more -->\n<h1>11.一套最舒适的开发环境</h1>\n<p>一套最舒适 最好的开发环境应该是什么样子的呢？</p>\n<h2>Windows</h2>\n<ol>\n<li>将系统更新到最新，包括驱动等</li>\n<li>将系统归属地改为香港，设定好时间日期格式(设定为香港可以访问到更多有趣的内容)</li>\n<li>在系统设置中配置好 <strong>开发者选项</strong></li>\n<li>配置好 <a href=\"\">翻墙和代理服务</a></li>\n<li>安装 <a href=\"https://www.google.com/chrome/\" target=\"_blank\" rel=\"noopener noreferrer\">Chrome</a></li>\n<li>安装并配置 <a href=\"/bookmark/tools/git/\" target=\"_blank\">Git</a></li>\n<li>安装并配置 <a href=\"\">VSCode</a></li>\n<li>安装并配置 <a href=\"\">WSL</a></li>\n<li>设定好 <a href=\"\">WSL 的系统代理</a></li>\n<li>然后在 WSL 中像 <a href=\"\">Linux</a> 一样去使用 Windows 进行开发和编码</li>\n</ol>\n<h2>macOS</h2>\n<ol>\n<li>检查系统更新</li>\n<li>系统常规性设置，比如 <a href=\"https://support.apple.com/zh-cn/guide/mac-help/mchlp2304/mac\" target=\"_blank\" rel=\"noopener noreferrer\">在 Mac 上显示或隐藏文件扩展名</a></li>\n<li>配置好 <a href=\"\">翻墙和代理服务</a></li>\n<li>安装 <a href=\"https://www.google.com/chrome/\" target=\"_blank\" rel=\"noopener noreferrer\">Chrome</a></li>\n<li>检查并配置好 <a href=\"https://support.apple.com/zh-cn/guide/terminal/welcome/mac\" target=\"_blank\" rel=\"noopener noreferrer\">Terminal</a>，并安装 <a href=\"https://sysin.org/blog/macos-zsh/\" target=\"_blank\" rel=\"noopener noreferrer\">oh-my-zsh </a></li>\n<li>安装 <a href=\"https://brew.sh/\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew</a></li>\n<li>检查并配置 <a href=\"\">Git</a> 等常用命令</li>\n<li>安装并配置 <a href=\"\">VSCode</a></li>\n<li>安装并设置 <a href=\"\">uTools</a></li>\n</ol>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "最舒适的开发环境"
      ]
    },
    {
      "title": "12.关于编程语言的那些事儿",
      "url": "https://undz.cn/posts/basic/coding_market.html",
      "id": "https://undz.cn/posts/basic/coding_market.html",
      "summary": "12.关于编程语言的那些事儿\n编程语言的分类\n1.机器语言：\n机器语言是计算机最原始的语言，是一种指令集的体系。这种指令集称为机器码。仅由 0 和 1 组成。 CPU 在工作的时候只认识机器语言。每台机器都会存在自己的指令集。\n最早计算机是以 穿孔纸带 进行编程的。带孔为 1，无孔为 0，经过光电输入到计算机当中。纸带就充当了存储介质。后面被 磁带 所...",
      "content_html": "<!-- more -->\n<h1>12.关于编程语言的那些事儿</h1>\n<h2>编程语言的分类</h2>\n<h3><strong>1.机器语言：</strong></h3>\n<p>机器语言是计算机最原始的语言，是一种<code>指令集</code>的体系。这种指令集称为<code>机器码</code>。仅由 <code>0</code> 和 <code>1</code> 组成。 CPU 在工作的时候只认识机器语言。每台机器都会存在自己的指令集。<br>\n最早计算机是以 <a href=\"https://baike.baidu.com/item/%E7%A9%BF%E5%AD%94%E7%BA%B8%E5%B8%A6/1234150\" target=\"_blank\" rel=\"noopener noreferrer\">穿孔纸带</a> 进行编程的。带孔为 1，无孔为 0，经过光电输入到计算机当中。纸带就充当了存储介质。后面被 <code>磁带</code> 所取代。<br>\n机器语言的 可读性、可移植性差，编程非常繁杂。<br>\n但是直接和机器打交道，运行速度可以接近硬件的极限，资源占用少；</p>\n<h3><strong>2.汇编语言</strong></h3>\n<p><a href=\"https://baike.baidu.com/item/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/61826\" target=\"_blank\" rel=\"noopener noreferrer\">汇编语言</a>，即一种低级语言，他用人类容易记忆的语言和符号来表示一组 <code>0</code> 和 <code>1</code> 的代码。相当于是 0 和 1 的一种高层次封装，一组 0 和 1 用一个单词表示。</p>\n<p>不同的处理器有不同的汇编语言语法和编译器，编译的程序无法在不同的处理器上执行，缺乏可移植性，难于从汇编语言代码上理解程序设计意图，可维护性差，即使是完成简单的工作也需要大量的汇编语言代码，很容易产生 bug，难于调试，使用汇编语言必须对某种处理器非常了解，而且只能针对特定的体系结构和处理器进行优化，开发效率很低，周期长且单调。<br>\n能够保持机器语言的一致性，直接、简捷，并能像机器指令一样访问、控制计算机的各种硬件设备，如磁盘、存储器、CPU、I/O 端口等。使用汇编语言，可以访问所有能够被访问的软、硬件资源，目标代码简短，占用内存少，执行速度快。</p>\n<p>所以汇编语言一般用来开发 CPU 指令集，驱动程序，逆向工程，破解，单片机，嵌入式开发，系统底层开发等。</p>\n<h3><strong>3.高级语言</strong></h3>\n<p>运行速度和执行效率低于汇编语言，程序大小与编译器有关。<br>\n高级语言接近 <a href=\"https://baike.baidu.com/item/%E7%AE%97%E6%B3%95%E8%AF%AD%E8%A8%80/10654294\" target=\"_blank\" rel=\"noopener noreferrer\">算法语言</a> ，易学、易掌握，提供结构化程序设计的环境和工具，使得设计出来的程序可读性好，可维护性强，可靠性高；高级语言远离机器语言，与具体的计算机硬件关系不大，可移植性好，重用率高；由于把繁杂琐碎的事务交给了编译程序去做，所以自动化程度高，开发周期短，且程序员得到解脱，可以集中时间和精力去从事对于他们来说更为重要的创造性劳动，以提高程序的质量。</p>\n<p>高级语言按照执行方式又可以被分为 <a href=\"https://zh.wikipedia.org/wiki/%E7%B7%A8%E8%AD%AF%E8%AA%9E%E8%A8%80\" target=\"_blank\" rel=\"noopener noreferrer\">编译型语言</a> 和 <a href=\"https://zh.wikipedia.org/zh-sg/%E7%9B%B4%E8%AD%AF%E8%AA%9E%E8%A8%80\" target=\"_blank\" rel=\"noopener noreferrer\">解释型语言</a></p>\n<p><strong>编译型语言：</strong><br>\n编译语言，一般会通过<a href=\"https://zh.wikipedia.org/wiki/%E7%B7%A8%E8%AD%AF%E5%99%A8\" target=\"_blank\" rel=\"noopener noreferrer\">编译器</a>处理，先将<strong>代码</strong>编译为<strong>机器码</strong>，再加以执行。比如 <code>exe</code> 文件，以后需要运行的时候就不用再重新编译了，运行时不需要再编译，所以执行效率很高。</p>\n<p><strong>解释型语言：</strong><br>\n解释型语言，一般通过 <a href=\"https://zh.wikipedia.org/wiki/%E7%9B%B4%E8%AD%AF%E5%99%A8\" target=\"_blank\" rel=\"noopener noreferrer\">解释器</a> 将代码一句一句直接执行，不需要像编译语言一样先编译为机器码之后再执行。在执行期，动态将代码逐句解释并执行。典型的如脚本语言。</p>\n<p><strong>脚本语言：</strong><br>\n脚本语言是一种解释型语言，脚本语言是为了缩短传统的编写-编译-链接-运行（edit-compile-link-run）过程而创建的计算机编程语言。脚本语言一般都 有相应的脚本引擎来解释执行。 他们一般需要解释器才能运行。一个脚本通常是解释运行而非编译。脚本语言通常都有简单、易学、易用的特性，目的就是希望能让程序员快速完成程序的编写工作。而<a href=\"https://baike.baidu.com/item/%E5%AE%8F%E8%AF%AD%E8%A8%80/21500677\" target=\"_blank\" rel=\"noopener noreferrer\">宏语言</a>则可视为脚本语言的分支，两者也有实质上的相同之处。脚本语言一般都是以文本形式存在,类似于一种命令。</p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "关于编程语言的那些事儿"
      ]
    },
    {
      "title": "2.路径和文件",
      "url": "https://undz.cn/posts/basic/file_and_path.html",
      "id": "https://undz.cn/posts/basic/file_and_path.html",
      "summary": "2.路径和文件\n路径-维基百科\n文件路径是用于描述文件系统资源的一个文本标识。 文件系统是对文件存储设备的空间进行组织和分配，负责文件存储并对存入的文件进行保护和检索的系统。 文件存放在外部存储器中的某些位置上，经由文件系统管理后，被系统以文件路径标识，系统可以通过文件路径检索到对应文件。\n文件、文件名、文件后缀名、文件拓展名\n这里放上一篇解释的比较清...",
      "content_html": "<!-- more -->\n<h1>2.路径和文件</h1>\n<p><a href=\"https://zh.wikipedia.org/wiki/%E8%B7%AF%E5%BE%84_(%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6)\" target=\"_blank\" rel=\"noopener noreferrer\">路径-维基百科</a></p>\n<p>文件路径是用于描述文件系统资源的一个文本标识。 文件系统是对文件存储设备的空间进行组织和分配，负责文件存储并对存入的文件进行保护和检索的系统。 文件存放在外部存储器中的某些位置上，经由文件系统管理后，被系统以文件路径标识，系统可以通过文件路径检索到对应文件。</p>\n<h2>文件、文件名、文件后缀名、文件拓展名</h2>\n<p>这里放上一篇解释的比较清楚的文章<br>\n<a href=\"https://www.ecdove.com/p/245.html\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.ecdove.com/p/245.html</a></p>\n<p>文件名就是文件的名称，是为了方便人们区分计算机中的不同文件，而给每个文件设定一个指定的名称。<br>\n文件名不能包含控制字符: <code>&lt; &gt; / \\ | : \" \\* ?</code></p>\n<p><a href=\"https://zh.wikipedia.org/wiki/%E6%96%87%E4%BB%B6%E6%89%A9%E5%B1%95%E5%90%8D\" target=\"_blank\" rel=\"noopener noreferrer\">文件扩展名</a> 也称为文件的延伸文件名、后缀名，是操作系统用来标记文件类型的一种机制。通常来说，一个扩展名是跟在主文件名后面的，由一个分隔符分隔。</p>\n<p>文件扩展名其更重要的作用是让系统决定当用户想打开这个文件的时候用哪种软件运行，如 Windows 系统中 <code>.exe</code> 文件是可执行文件，<code>.doc</code> 文件默认用 <code>Microsoft Word</code> 打开的 Word 文件。</p>\n<div class=\"hint-container tip\">\n<p class=\"hint-container-title\">误区</p>\n<ol>\n<li>\n<p>文件扩展名是一个文件的必要构成部分。❌<br>\n任何一个文件都可以没有扩展名。没有扩展名的文件需要选择程序去打开它，有扩展名的文件会自动用设置好的默认程序去打开。文件扩展名是一个常规文件的构成部分，但一个文件并不一定需要一个扩展名。</p>\n</li>\n<li>\n<p>文件扩展名表明了该文件是何种类型。❌<br>\n文件扩展名可以人为设定，扩展名为 TXT 的文件有可能是一张图片，同样，扩展名为 MP3 的文件，依然可能是一个视频。</p>\n</li>\n</ol>\n<p>ps:凡是可以人为随意修改的东西，都是不可信的</p>\n</div>\n<p>你可以试试 在桌面新建一个 <code>demo.txt</code> 文件，在里面写上一句话，然后修改后缀名为 <code>demo.html</code>，然后刷新桌面看看。它的内容都没有变，只是解析这个文件的默认程序和方法变了。</p>\n<h2>绝对路径与相对路径</h2>\n<p><strong>绝对路径例子：</strong></p>\n<p><code>c:\\user\\www\\index.html</code><br>\n<code>/user/www/index.html</code><br>\n<code>/Users/aeyund</code></p>\n<p>也就是说，路径的起始符号为路径分隔符 <code>/</code> 或者 <code>\\</code> 或者盘符 <code>c:</code> , 该路径就表示为绝对路径，其中 <code>类Unix系统</code> 的路径分隔符都为 <code>/</code> , 只有 windows 系为 <code>\\</code>, 这一点要注意。<br>\n绝对路径指向一个文件路径的固定位置，不会因为当前工作目录的变化而变化，所以为了准确描述，它必须包含根目录。</p>\n<p><strong>相对路径例子：</strong></p>\n<p><code>./www/index.html</code><br>\n<code>../index.html</code><br>\n<code>www/index.html</code></p>\n<p>也就是说，路径起始符号为 <code>./</code> <code>../</code> 或者是 <code>www/</code> 这样的目录名 的就是相对路径。也就是以当前工作目录或文件所在目录为起点表示的相对位置。<br>\n其中 <code>./</code> 表示当前目录。 <code>../</code> 表示上一层目录。<br>\n其中 <code>./www</code> 和 <code>www</code> 是等价的，都表示当前目录下的 <code>www</code> 目录。<br>\n同理 <code>./www/index.html</code> 和 <code>www/index.html</code> 也是等价的，都表示当前目录下的 <code>www</code>目录下的 <code>index.html</code> 文件。</p>\n<div class=\"hint-container tip\">\n<p class=\"hint-container-title\">提示</p>\n<p>通过相对路径和绝对路径，我们就可以在系统中准确的表示和定位一个文件或者目录了。<br>\n一般在项目开发中，一般都是基于于项目所在的目录为基准点使用相对路径来描述项目中文件和文件之间的关系。</p>\n</div>\n<h2>绝对路径和相对路径的应用</h2>\n<p>比如说，我们要在 main.js 文件中引入另一个 tools.js 文件。</p>\n<p>main.js 文件在 <code>/user/aeyund/my-project/main.js</code><br>\ntools.js 文件在 <code>/user/aeyund/my-project/tools.js</code></p>\n<p>绝对路径引用:</p>\n<div class=\"code-block-with-title\">\n  <div class=\"code-block-title-bar\" data-title=\"main.js\">\n    <span>main.js</span>\n  </div>\n  <div class=\"language-js line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"js\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-js\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">import</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> tools</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> from</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> '/user/aeyund/my-project/tools.js'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div></div></div>\n</div><p>相对路径引用:</p>\n<div class=\"code-block-with-title\">\n  <div class=\"code-block-title-bar\" data-title=\"main.js\">\n    <span>main.js</span>\n  </div>\n  <div class=\"language-js line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"js\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-js\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">import</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> tools</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> from</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> './tools.js'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div></div></div>\n</div><p>此时，这两种引用方式都是正确的，代码都可以顺利运行。因为两个文件都在 <code>aeyund/my-project</code> 下。</p>\n<p>这个时候，如果另一个人下载了项目，他的工作目录不是 <code>aeyund</code> ， 是 <code>aeundz</code>，那么文件的的路径就变成了:</p>\n<p>main.js 文件会变成 <code>/user/aeundz/my-project/main.js</code><br>\ntools.js 文件会变成 <code>/user/aeundz/my-project/tools.js</code></p>\n<p>那么绝对路径引用就必须得修改成下面这样:</p>\n<div class=\"code-block-with-title\">\n  <div class=\"code-block-title-bar\" data-title=\"main.js\">\n    <span>main.js</span>\n  </div>\n  <div class=\"language-js line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"js\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-js\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">import</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> tools</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> from</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> '/user/aeundz/my-project/tools.js'</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div></div></div>\n</div><p>而此时，相对路径不需要修改，因为两个文件依然在 <code>my-project</code> 下面。如果一个项目有上百个文件，那么移动项目的位置将会是一场灾难。</p>\n<h2>统一资源定位符</h2>\n<p>windows 下一般定位资源必须得带上盘符，比如 <code>c:\\user\\aeyund\\image</code><br>\nLinux 系统则是 <code>/home/aeyund/image</code><br>\n而一般的网络资源则是 <code>/ma.ico</code></p>\n<p>他们之间的区别是什么呢?</p>\n<p>一般 windows 会存在很多磁盘，<code>c:\\</code>、<code>d:\\</code>、<code>e:\\</code>，没有盘符则无法在系统中准确描述一个文件所在位置的。<br>\n而 Linux 一般会把拓展的硬盘分区放在 <code>/mnt/c</code>、<code>/mnt/d</code>、<code>/mnt/e</code>，下。所以 Linux 下表示根目录有且只有一种方式： <code>/</code>。</p>\n<p>你自己本地的一个文件例如 <code>c:\\user\\aeyund\\my-project\\index.html</code> 要怎么才能共享给别人，让别人都能访问到呢？不太可能把电脑搬到人家里去吧？</p>\n<p>这个时候，如果你的机器有一个公网的 ip 地址，这个时候就可以使用 <a href=\"https://zh.wikipedia.org/wiki/%E7%BB%9F%E4%B8%80%E8%B5%84%E6%BA%90%E5%AE%9A%E4%BD%8D%E7%AC%A6\" target=\"_blank\" rel=\"noopener noreferrer\">统一资源定位符</a> 来表示该文件了。这个时候这个文件又叫做<code>网络资源</code>或者<code>公网资源</code>。</p>\n<p>统一资源定位符的标准格式如下：</p>\n<div class=\"language-txt line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"txt\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-txt\"><span class=\"line\"><span>[协议类型]://[服务器地址]:[端口号]/[资源层级Unix文件路径][文件名]</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div></div></div><p>例如 <a href=\"http://123.123.123.1234:8080/ma.ico\" target=\"_blank\" rel=\"noopener noreferrer\">http://123.123.123.1234:8080/ma.ico</a></p>\n<p>协议类型为 <code>http</code><br>\n服务器地址为 <code>123.123.123.1234</code><br>\n端口号为 <code>8080</code><br>\n资源层级文件路径为 <code>ma.ico</code></p>\n<p>如果你注册了一个域名<code>undz.cn</code> 并指向了你的服务器 IP ，然后资源服务器的端口设定为 <code>80</code>，那么地址就变成了</p>\n<p><a href=\"http://undz.cn/ma.ico\" target=\"_blank\" rel=\"noopener noreferrer\">http://undz.cn/ma.ico</a></p>\n<p>如果设定端口为 <code>443</code>，那么资源地址就会是</p>\n<p><a href=\"https://undz.cn/ma.ico\" target=\"_blank\" rel=\"noopener noreferrer\">https://undz.cn/ma.ico</a></p>\n<div class=\"hint-container tip\">\n<p class=\"hint-container-title\">翻译成白话文就是</p>\n<p>使用 HTTP 协议的方式(如浏览器)，去访问 ip 地址为 <code>123.123.123.1234</code> 的服务器，因为公网的 ip 地址都是唯一的，所以一定可以定位到该服务器。然后端口也有了，那么就可以准确定位到这个服务器上的这个服务了。然后就可以尝试去和这个服务索要 <code>/ma.ico</code> 文件了。</p>\n<p>这个就是，<code>统一资源定位符</code> 的唯一性。而且是全世界唯一，所以任何人都可以通过这个 <strong>唯一性</strong> 去定位和访问这个文件了。</p>\n<p>路径，则是在这台机器上(也就是<code>本地</code>)具有 <code>唯一性</code>，所以<code>本地用户</code>就可以准确的定位这个文件并访问。</p>\n</div>\n<p>一个文件的路径必须具备 <code>本地唯一性</code>，一个公网资源路径则必须具备<code>世界唯一性</code>。</p>\n<div class=\"hint-container warning\">\n<p class=\"hint-container-title\">注意</p>\n<p><code>统一资源定位符</code> 中的域名一般是不区分大小写的<br>\n<a href=\"https://undz.cn/ma.ico\" target=\"_blank\" rel=\"noopener noreferrer\">https://undz.cn/ma.ico</a><br>\n和<br>\n<a href=\"HTTPS://undz.cn/ma.ico\">HTTPS://undz.cn/ma.ico</a><br>\n是一样的</p>\n</div>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "路径和文件"
      ]
    },
    {
      "title": "3.文件编码",
      "url": "https://undz.cn/posts/basic/file_utf8.html",
      "id": "https://undz.cn/posts/basic/file_utf8.html",
      "summary": "3.文件编码\n不知道你有没有遇到过，打开一个.txt文件却发现文件乱码了？这种时候往往是因为使用了不一样的编码格式去打开文件导致的。\n比如当前正在编写的这篇文章，如果采用 GBK 编码打开，就会变成一堆不认识的字符：\n\n但是同样的一篇文章采用 UTF-8 打开则可以正常阅读：\n\n因为这篇文章就是在 UTF-8 编码规则下编写的。 而GBK编码是 win...",
      "content_html": "<!-- more -->\n<h1>3.文件编码</h1>\n<p>不知道你有没有遇到过，打开一个<code>.txt</code>文件却发现文件乱码了？这种时候往往是因为使用了不一样的编码格式去打开文件导致的。</p>\n<p>比如当前正在编写的这篇文章，如果采用 <a href=\"https://zh.wikipedia.org/wiki/%E6%B1%89%E5%AD%97%E5%86%85%E7%A0%81%E6%89%A9%E5%B1%95%E8%A7%84%E8%8C%83\" target=\"_blank\" rel=\"noopener noreferrer\">GBK</a> 编码打开，就会变成一堆不认识的字符：</p>\n<figure><figcaption></figcaption></figure>\n<p>但是同样的一篇文章采用 <a href=\"https://zh.wikipedia.org/wiki/UTF-8\" target=\"_blank\" rel=\"noopener noreferrer\">UTF-8</a> 打开则可以正常阅读：</p>\n<figure><figcaption></figcaption></figure>\n<p>因为这篇文章就是在 <code>UTF-8</code> 编码规则下编写的。 而<code>GBK</code>编码是 windows 系统早期的默认编码。</p>\n<div class=\"hint-container tip\">\n<p class=\"hint-container-title\">提示</p>\n<p>如果没啥特殊需求，一般编写文件内容默认使用 <code>UTF-8</code> 是一定没错的。 <code>UTF-8</code> 现在基本是大多数操作系统的默认编码。</p>\n<p>也是因为编码的问题，所以一般来说，很多国外开发的老式软件无法在 中文目录下成功运行，所以目录名一般不推荐使用中文。</p>\n</div>\n<p>拓展阅读 <a href=\"https://www.cnblogs.com/Rainingday/p/14641104.html\" target=\"_blank\" rel=\"noopener noreferrer\">ASCII 编码、GBK 编码，Unicode 编码和 UTF-8</a></p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "文件编码"
      ]
    },
    {
      "title": "4.终端与 shell",
      "url": "https://undz.cn/posts/basic/cmd_shell.html",
      "id": "https://undz.cn/posts/basic/cmd_shell.html",
      "summary": "4.终端与 shell\n简明扼要\n终端，外表看起来就只是一个窗口，上面可以键入字符，当你输入特定字符的时候它会打印出一些反馈。这个字符一般就是Shell 命令。\nMacOS 现在默认的 shell 解释器是 Zsh;\nLinux 上的一般默认为 Bash;\nWindows 下默认为 PowerShell;\n\n相关阅读\n安装并开始设置 Windows 终...",
      "content_html": "<!-- more -->\n<h1>4.终端与 shell</h1>\n<h2>简明扼要</h2>\n<p>终端，外表看起来就只是一个窗口，上面可以键入字符，当你输入特定字符的时候它会打印出一些反馈。这个字符一般就是<a href=\"https://www.runoob.com/linux/linux-shell.html\" target=\"_blank\" rel=\"noopener noreferrer\">Shell 命令</a>。<br>\nMacOS 现在默认的 shell 解释器是 <a href=\"https://www.duidaima.com/Group/Topic/OtherTools/17940\" target=\"_blank\" rel=\"noopener noreferrer\">Zsh</a>;<br>\nLinux 上的一般默认为 <a href=\"https://zh.wikipedia.org/wiki/Bash\" target=\"_blank\" rel=\"noopener noreferrer\">Bash</a>;<br>\nWindows 下默认为 <a href=\"https://zh.wikipedia.org/wiki/PowerShell\" target=\"_blank\" rel=\"noopener noreferrer\">PowerShell</a>;</p>\n<div class=\"hint-container tip\">\n<p class=\"hint-container-title\">相关阅读</p>\n<p><a href=\"https://learn.microsoft.com/zh-cn/windows/terminal/install\" target=\"_blank\" rel=\"noopener noreferrer\">安装并开始设置 Windows 终端</a></p>\n<p><a href=\"https://support.apple.com/zh-cn/guide/terminal/welcome/mac\" target=\"_blank\" rel=\"noopener noreferrer\">macOS 终端使用手册</a></p>\n<p><a href=\"https://blog.csdn.net/WQY867047910/article/details/134788517\" target=\"_blank\" rel=\"noopener noreferrer\">80 个常用 shell 命令及简单用法</a></p>\n</div>\n<p>命令行使用的示例：</p>\n<figure><figcaption>ls、pwd、cd 命令演示</figcaption></figure>\n<div class=\"hint-container warning\">\n<p class=\"hint-container-title\">注意</p>\n<p><code>PowerShell</code> 的语法和 <code>Bash shell</code> 并不相同，但是在编程领域，<code>Bash shell</code> 无疑是占据领导地位的，在很多场景下都可以开箱即用，所以十分建议专门学习一下 <code>Bash shell</code>。</p>\n<p>在 windows 下推荐使用 <a href=\"https://moshanghua.net/details/2765\" target=\"_blank\" rel=\"noopener noreferrer\">Git bash</a> 或 WSL 来进行日常操作。</p>\n</div>\n<blockquote>\n<p>好了，到这一步为止，你终于学会了命令行的基本使用了。</p>\n</blockquote>\n<h2>拓展阅读</h2>\n<p><a href=\"https://linux.cn/article-16120-1.html\" target=\"_blank\" rel=\"noopener noreferrer\">Bash 脚本编程入门</a></p>\n<blockquote>\n<p>不得不说，微软爸爸家的文档是真的优秀 <br>\n<a href=\"https://learn.microsoft.com/zh-cn/powershell/scripting/overview\" target=\"_blank\" rel=\"noopener noreferrer\">什么是 PowerShell？</a> <br>\n<a href=\"https://learn.microsoft.com/zh-cn/powershell/scripting/learn/ps101/01-getting-started\" target=\"_blank\" rel=\"noopener noreferrer\">PowerShell 入门</a></p>\n</blockquote>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "终端与shell"
      ]
    },
    {
      "title": "5.系统软件包管理器",
      "url": "https://undz.cn/posts/basic/apt_homebrew.html",
      "id": "https://undz.cn/posts/basic/apt_homebrew.html",
      "summary": "5.系统软件包管理器\n当你学会命令行的基本使用之后，那么就相当于一只脚踏入了另一个世界。\n除了从应用商店安装下载之外，一般情况下还可以通过 软件包管理系统 来安装各种好用的命令和工具。\nLinux\n一般 debian 系 的系统比如 Ubuntu 默认的包管理器都是 apt 命令\n\nmacOS\nmacOS 上一般都是用 Homebrew 来进行包管理\n...",
      "content_html": "<!-- more -->\n<h1>5.系统软件包管理器</h1>\n<p>当你学会命令行的基本使用之后，那么就相当于一只脚踏入了另一个世界。<br>\n除了从应用商店安装下载之外，一般情况下还可以通过 <a href=\"https://juejin.cn/post/6884417656699486221\" target=\"_blank\" rel=\"noopener noreferrer\">软件包管理系统</a> 来安装各种好用的命令和工具。</p>\n<h2>Linux</h2>\n<p>一般 debian 系 的系统比如 <code>Ubuntu</code> 默认的包管理器都是 <a href=\"https://blog.csdn.net/qq_50001789/article/details/131401922\" target=\"_blank\" rel=\"noopener noreferrer\">apt 命令</a></p>\n<div class=\"language-bash line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"bash\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-bash\"><span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\"># 例如 安装git命令</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">apt</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> install</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> git</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\"># 卸载 git命令</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">apt</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> remove</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">  git</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\"># 查看一些可更新的包</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">sudo</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> apt</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> update</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\"># 升级软件</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">sudo</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> apt</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> upgrade</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic\"># 安装 curl</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">sudo</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> apt</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> install</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> curl</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><h2>macOS</h2>\n<p>macOS 上一般都是用 <a href=\"https://brew.sh/zh-cn/\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew</a> 来进行包管理</p>\n<p>当然，原版的安装可能需要 科学上网</p>\n<p>那么你可能需要看下面这篇文章<br>\n<a href=\"https://www.zhihu.com/tardis/zm/art/111014448\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew 国内如何自动安装（国内地址）（Mac OS）</a></p>\n<h2>windows</h2>\n<p><a href=\"https://sspai.com/post/65933\" target=\"_blank\" rel=\"noopener noreferrer\">https://sspai.com/post/65933</a></p>\n<p>之前我会在 windows 上使用各种包管理器来安装各种插件，但自从有了 <a href=\"/bookmark/tools/wsl_ready.html\" target=\"_blank\">WSL</a> 之后，我所有的和命令行相关的工作全部用 <code>WSL</code> 去完成了。</p>\n<p>windows 下最适合的方式就是用 <code>git-bash</code> 和 <code>WSL</code> ，以及鼠标点点点。</p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "系统软件包管理器"
      ]
    },
    {
      "title": "6.Git 与 Github",
      "url": "https://undz.cn/posts/basic/git_github.html",
      "id": "https://undz.cn/posts/basic/git_github.html",
      "summary": "6.Git 与 Github\nGithub 入门\n看啥不如看官方文档(可能需要科学上网)\nhttps://docs.github.com/zh/get-started\n也可以看这篇\nhttps://zhuanlan.zhihu.com/p/337959303\n\n在使用过程中可能还需要了解 SSH 密钥 相关的知识:\nhttps://docs.githu...",
      "content_html": "<!-- more -->\n<h1>6.Git 与 Github</h1>\n<h2>Github 入门</h2>\n<p>看啥不如看官方文档(可能需要科学上网)</p>\n<p><a href=\"https://docs.github.com/zh/get-started\" target=\"_blank\" rel=\"noopener noreferrer\">https://docs.github.com/zh/get-started</a></p>\n<p>也可以看这篇<br>\n<a href=\"https://zhuanlan.zhihu.com/p/337959303\" target=\"_blank\" rel=\"noopener noreferrer\">https://zhuanlan.zhihu.com/p/337959303</a></p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "Git与Github"
      ]
    },
    {
      "title": "7.Visual Studio Code",
      "url": "https://undz.cn/posts/basic/vscode.html",
      "id": "https://undz.cn/posts/basic/vscode.html",
      "summary": "7.Visual Studio Code\n这年头什么都有教学视频\nhttps://www.bilibili.com/video/BV1ug4y1571s/",
      "content_html": "<!-- more -->\n<h1>7.Visual Studio Code</h1>\n<p>这年头什么都有教学视频</p>\n<p><a href=\"https://www.bilibili.com/video/BV1ug4y1571s/\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.bilibili.com/video/BV1ug4y1571s/</a></p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": [
        "VisualStudioCode"
      ]
    },
    {
      "title": "8.如何使用搜索引擎",
      "url": "https://undz.cn/posts/basic/search_engine.html",
      "id": "https://undz.cn/posts/basic/search_engine.html",
      "summary": "8.如何使用搜索引擎\n搜索引擎 是一个跨时代的发明，基本上我们每天都会用到。但是你真的会使用搜索引擎吗？\n搜索引擎的选择\n\n注意\n在中国，虽然大部分人都知道 百度 ，但是身为一个搜索引擎它并没有履行好自己的职责。\n有兴趣吃瓜的可以查看以下链接：\nhttps://zh.wikipedia.org/wiki/对百度的争议\n魏则西事件\n以上这些都只是一小部分...",
      "content_html": "<!-- more -->\n<h1>8.如何使用搜索引擎</h1>\n<p><a href=\"https://zh.wikipedia.org/wiki/%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E\" target=\"_blank\" rel=\"noopener noreferrer\">搜索引擎</a> 是一个跨时代的发明，基本上我们每天都会用到。但是你真的会使用搜索引擎吗？</p>\n<h2>搜索引擎的选择</h2>\n<div class=\"hint-container warning\">\n<p class=\"hint-container-title\">注意</p>\n<p>在中国，虽然大部分人都知道 <a href=\"https://www.baidu.com/\" target=\"_blank\" rel=\"noopener noreferrer\">百度</a> ，但是身为一个搜索引擎它并没有履行好自己的职责。</p>\n<p>有兴趣吃瓜的可以查看以下链接：</p>\n<p><a href=\"https://zh.wikipedia.org/wiki/%E5%AF%B9%E7%99%BE%E5%BA%A6%E7%9A%84%E4%BA%89%E8%AE%AE\" target=\"_blank\" rel=\"noopener noreferrer\">https://zh.wikipedia.org/wiki/对百度的争议</a></p>\n<p><a href=\"https://www.zhihu.com/topic/20047674/hot\" target=\"_blank\" rel=\"noopener noreferrer\">魏则西事件</a></p>\n<p><strong>以上这些都只是一小部分。也就是说，你无法信任 百度 查询出来的任何东西。</strong></p>\n</div>\n<p>一般情况下，我推荐的搜索引擎只有两个</p>\n<ol>\n<li>微软出品的 <strong>必应搜索</strong> <a href=\"https://www.bing.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.bing.com</a> 。 <a href=\"https://cn.bing.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://cn.bing.com</a> 在国内也可以用。</li>\n</ol>\n<blockquote>\n<p>不过实践证明，国内的 Bing 属于特供版，内容会不太一样。</p>\n</blockquote>\n<ol start=\"2\">\n<li>靠搜索家的 <strong>Google</strong> <a href=\"https://www.google.com/\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.google.com/</a> 可能需要掌握一定的 科学上网 小技巧。</li>\n</ol>\n<h2>搜索引擎使用技巧</h2>\n<p>只需要认真阅读这篇文章即可：</p>\n<p><a href=\"https://www.runoob.com/w3cnote/search-engines-usage-skills.html\" target=\"_blank\" rel=\"noopener noreferrer\">盘点全球搜索引擎及其使用技巧</a></p>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "如何使用搜索引擎"
      ]
    },
    {
      "title": "9.科学上网和国内镜像",
      "url": "https://undz.cn/posts/basic/proxy_to_net.html",
      "id": "https://undz.cn/posts/basic/proxy_to_net.html",
      "summary": "9.科学上网和国内镜像\n怎么讲呢，网络是自由的，但又不那么的自由。因为国内阻止了 Google 所以 百度 发家，百度又不干好事。\nGithub 被 墙 但是国内的 Gitee 简直 依托答辩。\n墙 成了国内互联网企业发展护城河，让中国在孱弱时期避免被外来互联网技术和文化入侵，但是也一定程度上阻碍了科学技术的普及和发展。\n我们使用的 编程语言、各种命令...",
      "content_html": "<!-- more -->\n<h1>9.科学上网和国内镜像</h1>\n<p>怎么讲呢，网络是自由的，但又不那么的自由。因为国内阻止了 <strong>Google</strong> 所以 <strong>百度</strong> 发家，百度又不干好事。</p>\n<p><strong>Github</strong> 被 <strong>墙</strong> 但是国内的 <strong>Gitee</strong> 简直 <strong>依托答辩</strong>。</p>\n<p><strong>墙</strong> 成了国内互联网企业发展护城河，让中国在孱弱时期避免被外来互联网技术和文化入侵，但是也一定程度上阻碍了科学技术的普及和发展。</p>\n<p>我们使用的 编程语言、各种命令行工具、系统、开源仓库、包管理服务等大部分都是国外创造的。不翻墙，甚至很多工作都无法进行，文件资料无法查阅。</p>\n<p>一般来说，比较大的公司有相关的 <a href=\"http://www.elawcn.com/telecommunication/2020/0531/670.html\" target=\"_blank\" rel=\"noopener noreferrer\">合法的国际专线</a> ，但是对于个人开发者来说，成本是巨大的，也是不现实的。</p>\n<p>这么说吧，如果说 <strong>科学上网</strong> 是违法的，那么没有任何一名程序员是无辜的。出于 <strong>学习</strong> 为目的的翻墙无可厚非，<strong>师夷之长技以制夷</strong>。</p>\n<p>如果想要 <strong>合法</strong> 的使用一些国外的程序相关服务，应该怎么办呢？</p>\n<h2>国内镜像</h2>\n<p>比如 <code>npm</code> 是 <code>Nodejs</code> 的包管理器，它的官网是 <code>https://www.npmjs.com/</code>，国内正常情况下你一定打不开。<br>\n<code>https://registry.npmjs.org/</code> 是 <code>npm</code> 的 <strong>官方源</strong>，<code>npm install</code> 指令依赖这个地址，但是在国内这个指令 90% 一定会执行失败。</p>\n<p>类似的还有 <code>Python</code> 的 <code>pip</code> 指令；<br>\n<code>Golang</code> 的 <code>go get</code> 指令；<br>\n<code>Linux</code> 的 <code>apt install</code> 指令；<br>\n<code>Homebrew</code> 的 <code>brew install</code> 指令；<br>\n.....</p>\n<p>不使用 <code>科学上网</code> 那应该怎么办呢？</p>\n<p><strong>阿里开源镜像站：</strong> <a href=\"https://developer.aliyun.com/mirror/\" target=\"_blank\" rel=\"noopener noreferrer\">https://developer.aliyun.com/mirror/</a><br>\n<strong>网易开源镜像站：</strong> <a href=\"http://mirrors.163.com/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.163.com/</a><br>\n<strong>搜狐开源镜像站：</strong> <a href=\"http://mirrors.sohu.com/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.sohu.com/</a><br>\n<strong>北京交通大学开源镜像站：</strong> <a href=\"http://mirror.bjtu.edu.cn\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.bjtu.edu.cn</a><br>\n<strong>兰州大学开源软件镜像站：</strong> <a href=\"http://mirror.lzu.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.lzu.edu.cn/</a><br>\n<strong>厦门大学开源软件镜像站：</strong> <a href=\"http://mirrors.xmu.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.xmu.edu.cn/</a><br>\n<strong>上海交通大学开源软件镜像站：</strong> <a href=\"http://ftp.sjtu.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://ftp.sjtu.edu.cn/</a><br>\n<strong>清华大学开源软件镜像站：</strong> <a href=\"http://mirrors.tuna.tsinghua.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.tuna.tsinghua.edu.cn/</a><br>\n<strong>天津大学开源软件镜像站：</strong> <a href=\"http://mirror.tju.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.tju.edu.cn/</a><br>\n<strong>中国科学技术大学开源软件镜像站：</strong> <a href=\"http://mirrors.ustc.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.ustc.edu.cn/</a><br>\n<strong>东北大学开源软件镜像站：</strong> <a href=\"http://mirror.neu.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.neu.edu.cn/</a><br>\n<strong>东软信息学院开源软件镜像站：</strong> <a href=\"http://mirrors.neusoft.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.neusoft.edu.cn/</a><br>\n<strong>浙江大学开源软件镜像站：</strong> <a href=\"http://mirrors.zju.edu.cn\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.zju.edu.cn</a><br>\n<strong>北京理工大学开源软件镜像站：</strong> <a href=\"http://mirror.bit.edu.cn\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.bit.edu.cn</a><br>\n<strong>华中科技大学开源软件镜像站：</strong> <a href=\"http://mirrors.hust.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirrors.hust.edu.cn/</a><br>\n<strong>中山大学开源软件镜像站：</strong> <a href=\"http://mirror.sysu.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.sysu.edu.cn/</a><br>\n<strong>大连理工大学开源软件镜像站：</strong> <a href=\"http://mirror.dlut.edu.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">http://mirror.dlut.edu.cn/</a></p>\n<p>通常情况下</p>\n<p><code>go语言</code> 使用 <a href=\"https://goproxy.cn/\" target=\"_blank\" rel=\"noopener noreferrer\">https://goproxy.cn/</a><br>\n<code>npm</code> 使用 <a href=\"https://www.npmmirror.com/\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.npmmirror.com/</a><br>\n<code>Linux Debian</code> 使用 <a href=\"https://mirrors.tuna.tsinghua.edu.cn/help/debian/\" target=\"_blank\" rel=\"noopener noreferrer\">https://mirrors.tuna.tsinghua.edu.cn/help/debian/</a><br>\n<code>Homebrew</code> 使用 <a href=\"https://developer.aliyun.com/mirror/homebrew\" target=\"_blank\" rel=\"noopener noreferrer\">https://developer.aliyun.com/mirror/homebrew</a></p>\n<p>一般来说，阿里镜像源的稳定性最好，使用人数也比较多。</p>\n<blockquote>\n<p>学会使用国内的镜像，一般的编程和包安装下载应该都不是什么大问题了。一般来说，安装类的命令执行失败，90% 的原因都和 <strong>墙(GFW)</strong> 有关。<br>\n在早期，国内的各大镜像源都喜欢<strong>夹带私货</strong>，比如把 官方包 替换成自己的 私人包，在命令行中打广告，甚至是在包中插入病毒和挖矿程序，包版本落后等等等.....<br>\n不过随着国内监管力度的加大，现在这种情况比较少见了。<br>\n<strong>我相信中国人是世界上最聪明的，但是这个世界上最伟大的发明创造却鲜有中国的身影。可能会有中国人参与其中，但他们都非中国籍。</strong><br>\n(中国人的聪明才智，似乎也很少用到正道上。)</p>\n</blockquote>\n<h2>Github 的流畅访问手段</h2>\n<p>很多资源的获取都离不开 <a href=\"https://github.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://github.com</a></p>\n<p>但是大多数时候这个地址都无法被打开，如果还不会 <strong>科学上网</strong> 可以试试下面这个方案。</p>\n<ol>\n<li>打开 <code>Microsoft Store</code> 搜索 <code>Watt Toolkit</code> 并安装。</li>\n</ol>\n<figure><figcaption>微软商店搜索并下载 Watt Toolkit</figcaption></figure>\n<ol start=\"2\">\n<li>启动 <code>Watt Toolkit</code> 并勾选 <code>Github</code></li>\n</ol>\n<figure><figcaption>勾选需要代理的服务并启用加速</figcaption></figure>\n<ol start=\"3\">\n<li>然后点击 <code>一键加速</code> 就可以正常访问 <a href=\"http://github.com\" target=\"_blank\" rel=\"noopener noreferrer\">github.com</a> 了</li>\n</ol>\n<figure><figcaption>Watt Toolkit</figcaption></figure>\n<h2>科学上网</h2>\n<p>如果你想要使用 <code>Google</code>、 <code>ChartGPT</code> 或者想要获取国内外一手资讯等，还是得了解一下 <strong>科学上网</strong> 这件事情的。</p>\n<p><a href=\"https://blog.tsingjyujing.com/spam/gfw-history\" target=\"_blank\" rel=\"noopener noreferrer\">中国网络防火长城简史</a></p>\n<p><a href=\"\">科学上网与本地代理教程</a></p>\n<blockquote>\n<p>请一定要做一个遵纪守法的好公民</p>\n</blockquote>\n",
      "date_published": "2026-04-16T00:00:00.000Z",
      "date_modified": "2026-06-13T08:45:18.000Z",
      "authors": [],
      "tags": [
        "科学上网和国内镜像"
      ]
    },
    {
      "title": "编程开发基础入门",
      "url": "https://undz.cn/posts/basic/",
      "id": "https://undz.cn/posts/basic/",
      "summary": "编程开发基础入门\n前言\n前段时间 淘宝 Steam 安装教程 事件在网上大火。就是在大多数人看来 安装Steam 这么简单的一件事情居然会难倒这么多人。大家只是想玩一个游戏而已，为什么会如此魔幻?\n一方面是国内的大环境下所有厂商都在尽全力让人们把视线转向移动端，尽可能掠夺大家的时间和精力。传统 PC 相关的技能普及度正在降低。\n另一方面是因为一些国家政...",
      "content_html": "<!-- more -->\n<h1>编程开发基础入门</h1>\n<h2>前言</h2>\n<p>前段时间 <a href=\"https://www.douyin.com/search/%E6%B7%98%E5%AE%9Dsteam%E4%BB%A3%E5%AE%89%E8%A3%85\" target=\"_blank\" rel=\"noopener noreferrer\">淘宝 Steam 安装教程</a> 事件在网上大火。就是在大多数人看来 <code>安装Steam</code> 这么简单的一件事情居然会难倒这么多人。大家只是想玩一个游戏而已，为什么会如此魔幻?</p>\n<p>一方面是国内的大环境下所有厂商都在尽全力让人们把视线转向移动端，尽可能<code>掠夺</code>大家的时间和精力。传统 PC 相关的技能普及度正在降低。<br>\n另一方面是因为一些国家政策，<a href=\"https://zhidao.baidu.com/question/2137758630299885628.html\" target=\"_blank\" rel=\"noopener noreferrer\">GFW</a> 的存在也让信息闭塞了起来，间接的增加了很多<code>门槛</code>。其中也包括了国内计算机基础知识的普及与落后。</p>\n<p>我自己也是从编程小白一步步走过来的，我很清楚 对于一个小白来说， 想要靠自己打破认知壁垒入门编程是多么困难的一件事情。而编程在这个时代能做的事情实在是太多了太多了。掌握一定的编程技术无论是生活还是工作方便程度都能够带来质的飞跃。所以我特意花了几天时间编写了这篇 <code>基础教程</code>，希望可以帮助更多人。</p>\n<div class=\"hint-container info\">\n<p class=\"hint-container-title\">相关信息</p>\n<p>这些都是基础中的基础，如果不懂得这些知识和概念，你不是 <strong>计算机零基础</strong>，而是 <strong>负基础</strong> 。</p>\n</div>\n",
      "date_published": "2026-04-16T13:25:48.000Z",
      "date_modified": "2026-04-21T14:08:16.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "原神 6.5版本 风景图",
      "url": "https://undz.cn/posts/genshin_impact_6.5_scenery_pictures.2026-04-12.html",
      "id": "https://undz.cn/posts/genshin_impact_6.5_scenery_pictures.2026-04-12.html",
      "summary": "原神 6.5版本 风景图\n空之神殿\n\n荆夫港\n\n风车镇\n\n去空之神殿的路",
      "content_html": "<!-- more -->\n<h1>原神 6.5版本 风景图</h1>\n<h3>空之神殿</h3>\n\n<h3>荆夫港</h3>\n\n<h3>风车镇</h3>\n\n<h3>去空之神殿的路</h3>\n\n",
      "image": "https://cdn.jsdmirror.com/gh/aeyundian/aeyundian.github.io/src/.vuepress/public/6.5gi_images/1.png",
      "date_published": "2026-04-12T00:00:00.000Z",
      "date_modified": "2026-05-20T12:52:03.000Z",
      "authors": [],
      "tags": [
        "原神"
      ]
    },
    {
      "title": "AyCanvars",
      "url": "https://undz.cn/project/aycanvars.html",
      "id": "https://undz.cn/project/aycanvars.html",
      "summary": "适用于触屏和鼠标的简易绘图软件。 安装包下载",
      "content_html": "<p>适用于触屏和鼠标的简易绘图软件。 <a href=\"/aycanvars/download/release/1.2.0.exe\">安装包下载</a></p>\n<!-- more -->\n<h2>简介</h2>\n<p>AyCanvars 是一款基于 C# 和 .NET Framework 4.6.2 开发的绘图程序，专为课堂批注、自由绘画等场景设计。支持触屏与鼠标双重操作，界面原创，图标独立设计。</p>\n<h2>主要功能</h2>\n<ul>\n<li>画笔：可调节颜色、粗细（1~100px），抗锯齿渲染。</li>\n<li>橡皮擦：大小自动为画笔的10倍，二次点击可清空画板。</li>\n<li>文本工具：自定义字体、字号、样式、颜色，点击画布输入。</li>\n<li>撤销重做：最多64步历史记录。</li>\n<li>导出图片：支持 PNG、JPEG、BMP、GIF。</li>\n<li>画板缩放：窗口自适应。</li>\n<li>触屏优化：多点触控，文本输入时自动弹出屏幕键盘。</li>\n</ul>\n<h2>技术参数</h2>\n<ul>\n<li>语言：C#</li>\n<li>框架：.NET Framework 4.6.2</li>\n<li>开发环境：Visual Studio 2026</li>\n<li>图形：Graphics Device Interface+</li>\n<li>触摸：Windows Touch API</li>\n<li>配置存储：Initialization File</li>\n<li>日志：自研 LogFile</li>\n<li>安装包：Inno Setup，大小约2.26 MB，实际程序大小约124 KB</li>\n</ul>\n<h2>下载与安装</h2>\n<p>当前版本：v1.2.0（2026-04-08）<br>\n<a href=\"/aycanvars/download/release/1.2.0.exe\">下载链接</a><br>\n支持系统：Windows 7/8/10/11（需 .NET Framework 4.6.2）<br>\n安装步骤：运行安装包，按提示选择安装模式、路径，同意 GPL v3.0 协议即可。</p>\n<h2>使用说明</h2>\n<ol>\n<li>启动后底部工具栏：鼠标选择、画笔、橡皮擦、更多功能。</li>\n<li>单击画笔橡皮擦激活，再次单击打开设置（颜色、粗细）。</li>\n<li>更多菜单中包含撤销、重做、文本工具、导出图片、清理内存。</li>\n<li>左侧边栏：菜单（关于、设置、更新）、退出。</li>\n<li>文本工具：点击画布弹出输入框，支持字体、颜色设置。</li>\n<li>触屏设备：单指多指绘图，文本输入时自动弹出系统键盘。</li>\n</ol>\n<h2>更新日志</h2>\n<p>v1.2.0（2026-04-08）</p>\n<ul>\n<li>修复权限问题导致的日志与设置无法写入</li>\n<li>增加更新下载时显示进度</li>\n</ul>\n<p>v1.1.0（2026-04-06）</p>\n<ul>\n<li>新增关于对话框、设置窗口（自动保存、管理员启动、更新渠道）</li>\n<li>新增检查更新功能（正式版测试版自定义源）</li>\n<li>优化撤销重做栈限制为64步</li>\n<li>修复画板缩放偏移及触屏橡皮擦大小问题</li>\n</ul>\n<p>v1.0.0（2026-03-28）</p>\n<ul>\n<li>首个稳定版本。</li>\n<li>实现画笔、橡皮擦、文本、撤销/重做、导出图片等核心功能。</li>\n<li>支持触屏和鼠标。</li>\n</ul>\n<h2>许可与版权</h2>\n<p>开源协议：GNU General Public License v3.0<br>\n作者：韵典（AeYunDian）<br>\n版权年份：2025-2026<br>\nGitHub：<a href=\"https://github.com/AeYunDian/AyCanvars\" target=\"_blank\" rel=\"noopener noreferrer\">https://github.com/AeYunDian/AyCanvars</a><br>\n著作权：已提交中国版权保护中心（受理中）</p>\n<h2>联系</h2>\n<p>网站：<a href=\"https://undz.cn\" target=\"_blank\" rel=\"noopener noreferrer\">https://undz.cn</a><br>\nB站：<a href=\"https://space.bilibili.com/3494370328185235/\" target=\"_blank\" rel=\"noopener noreferrer\">https://space.bilibili.com/3494370328185235/</a><br>\n邮箱：admin@undz.cn</p>\n",
      "date_published": "2026-04-08T00:00:00.000Z",
      "date_modified": "2026-04-08T12:30:14.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "游戏打不开？你该修复系统运行库了",
      "url": "https://undz.cn/posts/taps/repair_system_runtime_library.html",
      "id": "https://undz.cn/posts/taps/repair_system_runtime_library.html",
      "summary": "使用DirectX_Repair、微软 .NET 运行库安装工具和微软常用运行库合集 修复系统",
      "content_html": "<p>使用<code>DirectX_Repair</code>、<code>微软 .NET 运行库安装工具</code>和<code>微软常用运行库合集 </code>修复系统</p>\n<!-- more -->\n<h1>游戏打不开？你该修复系统运行库了</h1>\n<h2>引言</h2>\n<p>下载好的游戏打不开，提示缺少 xxx.dll，如：<br>\n<img src=\"https://duba-seo-cdn.jinshan3.cn/img/8e9ab042713ac11c61bdfe4be0dcc6b0.png\" alt=\"计算机缺失d3d12.dll\" loading=\"lazy\"><br>\n这多半是因为系统缺少运行库，特别是在精简系统中，这篇文章教你快速修复运行库。</p>\n<h3>游戏运行库核心功能：</h3>\n<ul>\n<li>图形引擎支持：让游戏能直接与显卡说话，最直接的就是DX9/DX11的区别</li>\n<li>基础环境依赖：C++写的游戏需要这些运行时组件，就像安卓APP需要对应版本的框架</li>\n<li>多媒体解码库：没有它，游戏可能没有声音</li>\n</ul>\n<h3>游戏运行库隐藏特性：</h3>\n<ul>\n<li>版本兼容性：运行库可以智能匹配游戏需求（比如同时安装DX11和DX12互不冲突）</li>\n<li>性能优化：像DX12比DX11能更高效调度多核CPU（高帧率）</li>\n<li>错误防护：部分运行库自带崩溃保护机制</li>\n</ul>\n<h2>修复DirectX</h2>\n<p>如果你的游戏提示“d3dx9_43.dll丢失”“DirectX错误”等，则需要修复DirectX运行库。<br>\n步骤详解：</p>\n<ul>\n<li>下载 <a href=\"https://www.123684.com/s/ay6VVv-itS4H\" target=\"_blank\" rel=\"noopener noreferrer\">DirectX_Repair</a> 这款修复工具<br>\n工具罗列出的是可以修复的 dll 文件列表，内置 dll 完全够用</li>\n<li>点击 “检测并修复”<br>\n只需点击 “检测并修复”，软件就会自动扫描丢失的 dll 文件并进行修复<br>\n修复完后还会顺带修复 C++ 运行库，但我们使用这款软件主要是修复 DirectX 的，只要 DirectX 修复完成即可， C++ 修复失败或没有修复可以看下面的步骤。</li>\n</ul>\n<p>在导航栏 - 工具 - 高级筛选 中，也可以手动选择要修复的 dll 文件<br>\n当然，这款软件修复 C++ 运行库没有那么全，这时候就要接下来这款软件了。</p>\n<p>未完待续</p>\n",
      "image": "https://duba-seo-cdn.jinshan3.cn/img/8e9ab042713ac11c61bdfe4be0dcc6b0.png",
      "date_published": "2026-03-10T00:00:00.000Z",
      "date_modified": "2026-04-13T13:24:08.000Z",
      "authors": [],
      "tags": [
        "教程"
      ]
    },
    {
      "title": "列表",
      "url": "https://undz.cn/list/",
      "id": "https://undz.cn/list/",
      "summary": "查看文章列表",
      "content_html": "<p>查看文章列表</p>\n<!-- more -->\n<p>您可以在左边选个一个项目查看</p>\n",
      "date_published": "2026-03-12T13:12:19.000Z",
      "date_modified": "2026-03-22T13:06:47.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "Crossfire: Ys 正式发布",
      "url": "https://undz.cn/project/crossfire.html",
      "id": "https://undz.cn/project/crossfire.html",
      "summary": "Crossfire: Ys 4.0.6 版本 正式发布",
      "content_html": "<p>Crossfire: Ys 4.0.6 版本 正式发布</p>\n<!-- more -->\n<p>这款游戏使用Unity引擎构建，目前只支持Windows端，短期时间内没有支持其他端的计划</p>\n<h2>下载</h2>\n<p><a href=\"https://api.undz.cn/proxy/github.com/AeYunDian/Crossfire-Ys/releases/download/4.0.6_beta_0.4/4.0.6.beta.0.4.26-02-13.7z\" style=\"text-decoration: none;\" download=\"\">直链快速下载（推荐）</a></p>\n<p><a href=\"https://github.com/AeYunDian/Crossfire-Ys/releases/download/4.0.6_beta_0.4/4.0.6.beta.0.4.26-02-13.7z\" style=\"text-decoration: none;\" download=\"\">Github下载</a></p>\n<h2>目前版本优点</h2>\n<ul>\n<li>云端账号：使用网络保存您的游戏进度</li>\n<li>多关卡，多武器，完善您的游戏体验</li>\n<li>智能怪物。</li>\n</ul>\n<h2>配置</h2>\n<ul>\n<li>\n<p>最低配置</p>\n<ul>\n<li>1.系统：Windows 7 SP1 64-bit 或 Windows 8.1 64-bit 或 Windows 10 64-bit</li>\n<li>2.储存：512MB</li>\n<li>3.内存：2GB RAM</li>\n<li>4.DirectX 版本：11</li>\n</ul>\n</li>\n<li>\n<p>推荐配置：</p>\n<ul>\n<li>1.系统：Windows 10 64-bit 或 Windows 11 64-bit</li>\n<li>2.储存：1GB～2GB</li>\n<li>3.内存：8GB RAM</li>\n<li>4.DirectX 版本：11</li>\n</ul>\n</li>\n</ul>\n",
      "date_published": "2026-04-09T00:00:00.000Z",
      "date_modified": "2026-05-22T14:41:31.000Z",
      "authors": [],
      "tags": []
    },
    {
      "title": "POST网络请求",
      "url": "https://undz.cn/posts/unity_notes/post_request.html",
      "id": "https://undz.cn/posts/unity_notes/post_request.html",
      "summary": "Unity POST网络请求实现教程",
      "content_html": "<p>Unity POST网络请求实现教程</p>\n<!-- more -->\n<h1>POST网络请求</h1>\n<h2>前言</h2>\n<p>此文章只是POST请求，没有GET、DELETE、PULL等其它类型<br>\n为什么一开始是这个呢？因为这是我遇到的第一个问题</p>\n<h2>教程</h2>\n<p>代码使用系统的Http库<br>\n<code>using System.Net.Http;</code></p>\n<h3>1.新建文件</h3>\n<p>在Unity项目内新建一个名为<code>GameApiClient.cs</code>的C#代码文件。</p>\n<h3>2.输入以下内容</h3>\n<div class=\"language-cs line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"cs\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-cs\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Collections</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Collections</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Generic</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Net</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Net</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Http</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Text</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> System</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Threading</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Tasks</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> UnityEngine</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">public</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> class</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> GameApiClient</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> : </span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">MonoBehaviour</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">{</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    public</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> static</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> GameApiClient</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#ABB2BF\"> Instance</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> { </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">get</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">; </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">private</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> set</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">; }</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    private</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">  HttpClient</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> Client</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\">  =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> new </span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">HttpClient</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">();</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    private</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">  string</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> Domain</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> \"https://api.io.hb.cn/api/\"</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    private</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">  HttpResponseMessage</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E06C75\"> response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    void</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\"> Awake</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">()</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    {</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        if</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> (</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">Instance</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> ==</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\"> null</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">)</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">        {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">            Instance</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#E45649;--shiki-dark:#E5C07B\"> this</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">            DontDestroyOnLoad</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">gameObject</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">            Debug</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">Log</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">\"GameApiClent创建成功！\"</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">        }</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        else</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">        {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">            Destroy</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">gameObject</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">            Debug</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">Log</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">\"已存在GameApiClent，销毁重复的\"</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">        }</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    }</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    public</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">  async</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> Task</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&lt;</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">HttpResponseMessage</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&gt;  </span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">PostNetData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">string</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> path</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">string</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> json</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">)</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    {</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        var</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> content</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> new </span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">StringContent</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">json</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">Encoding</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">UTF8</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\">\"application/json\"</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">        Client</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">Timeout</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> TimeSpan</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">FromSeconds</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\">5</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">        response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> await </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">Client</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">PostAsync</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">Domain</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> +</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> path</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">content</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        return</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    }</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">}</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><h3>3.加载</h3>\n<p>在游戏第一个场景创建一个空游戏对象，绑定这个代码文件，启动游戏，如果游戏的日志有一条<code>GameApiClient创建成功！</code>，则代表以上步骤你都完成了</p>\n<h3>4.调用</h3>\n<p>一个应用应该写一个类来处理网络请求，在其它类中处理返回<br>\n要想在其他代码中发送POST请求，只需调用 <code>GameApiClient.Instance.PostNetData(string path, string json)</code></p>\n<div class=\"hint-container warning\">\n<p class=\"hint-container-title\">警告</p>\n<p>网络请求是异步的，所以需要使用<code>await</code>来调用<br>\n在<code>GameApiClient.cs</code>中写了API的地址，这里是<code>https://api.io.hb.cn/api/</code>，你需要替换为自己服务器的地址。</p>\n</div>\n<h3>5.处理</h3>\n<p>该函数的返回格式是<code>HttpResponseMessage</code>，所以需要定义一个<code>HttpResponseMessage</code>类型的变量</p>\n<div class=\"language-cs line-numbers-mode\" data-highlighter=\"shiki\" data-ext=\"cs\" style=\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\"><pre class=\"shiki shiki-themes one-light one-dark-pro vp-code\"><code class=\"language-cs\"><span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">using</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> Newtonsoft</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">Json</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">private</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> string</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> Path_BagGet</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#50A14F;--shiki-dark:#98C379\"> \"/v1/bag/get\"</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">public</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> async</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> Task</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&lt;</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">int</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&gt; </span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">GetBagData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">()</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">{</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    var</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> data</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> new { </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">uuid</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">token</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> };</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    string</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> json</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> JsonConvert</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">SerializeObject</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">data</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">    HttpResponseMessage</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> await </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">GameApiClient</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">Instance</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">PostNetData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">Path_BagGet</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">, </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">json</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    string</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> responseBody</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> await </span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">Content</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">ReadAsStringAsync</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">();</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">    Debug</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">Log</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">StatusCode</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">    switch</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\"> (</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">response</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">StatusCode</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">)</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    {</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        case</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\"> HttpStatusCode</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">OK</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">:</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">            var</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\"> bagData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> =</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\"> JsonConvert</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">DeserializeObject</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&lt;</span><span style=\"--shiki-light:#C18401;--shiki-dark:#E5C07B\">BagData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">&gt;(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E06C75\">responseBody</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">);</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">            return</span><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\"> int</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">Parse</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">(</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">bagData</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#383A42;--shiki-dark:#E5C07B\">level</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">.</span><span style=\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\">ToLower</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">());</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">        default</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">:</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#A626A4;--shiki-dark:#C678DD\">            return</span><span style=\"--shiki-light:#383A42;--shiki-dark:#56B6C2\"> -</span><span style=\"--shiki-light:#986801;--shiki-dark:#D19A66\">1</span><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">    }</span></span>\n<span class=\"line\"><span style=\"--shiki-light:#383A42;--shiki-dark:#ABB2BF\">}</span></span></code></pre>\n<div class=\"line-numbers\" aria-hidden=\"true\" style=\"counter-reset:line-number 0\"><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div><div class=\"line-number\"></div></div></div><div class=\"hint-container info\">\n<p class=\"hint-container-title\">关于此代码</p>\n<p>该代码取自 <a href=\"https://github.com/AeYunDian/Crossfire-Ys\" style=\"text-decoration: none;\">Crossfire: Ys</a> 的部分片段，可能无法直接运行</p>\n</div>\n<p><code>switch</code>语句处理需要根据服务器具体返回做判断， <a href=\"https://github.com/AeYunDian/Crossfire-Ys\" style=\"text-decoration: none;\">Crossfire: Ys</a> 的网络处理逻辑是专门写几个类，游戏启动时自动加载，在其他需要用户信息时直接调用，<br>\n我也推荐你使用这种做法，更加规范，如以后有变动，只需改几个文件，而不是在各个犄角旮旯一个个改。</p>\n",
      "date_published": "2026-03-10T00:00:00.000Z",
      "date_modified": "2026-03-10T14:25:56.000Z",
      "authors": [],
      "tags": [
        "Unity"
      ]
    }
  ]
}