Files
pages/2021/02/26/serverchancorp.html
2025-12-31 16:00:29 +00:00

380 lines
26 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>做一个Server酱·TurboMini企业应用版 | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="做一个Server酱·TurboMini企业应用版" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="简单的事情应该自己去做" />
<meta property="og:description" content="简单的事情应该自己去做" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2021-02-26T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="做一个Server酱·TurboMini企业应用版" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2021-02-26T00:00:00+08:00","datePublished":"2021-02-26T00:00:00+08:00","description":"简单的事情应该自己去做","headline":"做一个Server酱·TurboMini企业应用版","mainEntityOfPage":{"@type":"WebPage","@id":"/2021/02/26/serverchancorp.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2021/02/26/serverchancorp.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2021/02/26/serverchancorp.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1767196818" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Thu, 01 Jan 2026 00:00:18 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2021-02-26T00:00:00+08:00">26 February 2021</time> - 字数统计2209 - 阅读大约需要7分钟 - Hits: <span id="/2021/02/26/serverchancorp.html" class="visitors">Loading...</span></small>
<h1 class="p-name">做一个Server酱·TurboMini企业应用版</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Fri, 26 Feb 2021 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章主要介绍了作者开发Server酱·TurboMini企业应用版的原因源于Server酱服务即将结束且收费。作者通过对比发现企业微信的应用相比Server酱有自定义主页、更多API调用次数的优点但配置过程稍显复杂且Markdown支持不足。作者指出Server酱的收费和广告过多以及对模板消息功能的误解认为如果去掉了不合理的收费和广告Server酱原本是一个不错的产品。最后作者考虑到Server酱的商业模式认为开发者可能会转向其他选择如利用微信企业微信的功能来替代。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#如何制作">如何制作?</a></li><li><a href="#如何配置">如何配置?</a><ul><li><a href="#第一步注册企业">第一步,注册企业</a></li><li><a href="#第二步创建应用">第二步,创建应用</a></li><li><a href="#第三步获取企业id">第三步获取企业ID</a></li><li><a href="#第四步推送消息到微信">第四步,推送消息到微信</a></li></ul></li><li><a href="#可以改进的地方">可以改进的地方</a></li><li><a href="#总结">总结</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>简单的事情应该自己去做<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>这个月初由于Server酱要挂了然后Turbo版又要钱所以我特地写了一个<a href="/2021/02/02/serverchan.html">Server酱·TurboMini测试号版</a>然而据那个开发Server酱的人说微信要下掉的是模板消息而不是故意坑人不做这个东西了。过了一段时间后那个开发者说可以用企业微信啥的通道继续搞顺便还给普通账户使用Turbo版的一点点权限然后价格似乎也稍微降了一点 </p><p>
但问题是我们之所以使用Server酱只是因为注册服务号很麻烦微信认证要主体所以我们才用用这个的人也应该都是开发者吧那如果说资源都是我们出的话还何必用那个一堆广告的Server酱呢而且想好好用还要花钱都是开发者了没必要交这种智商税吧 </p><p>
不过看在它还给我们推荐了些路子,那也就不用太过分的说它了吧。</p>
<h1 id="如何制作">
<a href="#如何制作"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 如何制作?
</h1>
<p>我也倒是去看了看企业微信的开发文档,和公众号的开发文档那就是大同小异啊,所以今天依然是一句话解决问题:</p>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">&lt;?php</span>
<span class="nv">$cid</span><span class="o">=</span><span class="s1">'企业ID'</span><span class="p">;</span>
<span class="nv">$agentId</span><span class="o">=</span><span class="s1">'应用ID/AgentId'</span><span class="p">;</span>
<span class="nv">$secret</span><span class="o">=</span><span class="s1">'应用Secret'</span><span class="p">;</span>
<span class="nv">$userid</span><span class="o">=</span><span class="s1">'@all'</span><span class="p">;</span><span class="c1">//用户ID不知道可以不改</span>
<span class="nv">$title</span><span class="o">=</span><span class="s1">'标题'</span><span class="p">;</span>
<span class="nv">$content</span><span class="o">=</span><span class="s1">'内容'</span><span class="p">;</span>
<span class="nb">file_get_contents</span><span class="p">(</span><span class="s1">'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token='</span><span class="mf">.</span><span class="nb">json_decode</span><span class="p">(</span><span class="nb">file_get_contents</span><span class="p">(</span><span class="s1">'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid='</span><span class="mf">.</span><span class="nv">$cid</span><span class="mf">.</span><span class="s1">'&amp;corpsecret='</span><span class="mf">.</span><span class="nv">$secret</span><span class="p">),</span><span class="kc">true</span><span class="p">)[</span><span class="s1">'access_token'</span><span class="p">],</span><span class="kc">false</span><span class="p">,</span><span class="nb">stream_context_create</span><span class="p">([</span><span class="s1">'http'</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="s1">'method'</span><span class="o">=&gt;</span><span class="s1">'POST'</span><span class="p">,</span><span class="s1">'header'</span><span class="o">=&gt;</span><span class="s2">"content-type: application/json; charset=UTF-8"</span><span class="p">,</span><span class="s1">'content'</span><span class="o">=&gt;</span><span class="s1">'{"touser":"'</span><span class="mf">.</span><span class="nv">$userid</span><span class="mf">.</span><span class="s1">'","msgtype":"text","agentid":'</span><span class="mf">.</span><span class="nv">$agentId</span><span class="mf">.</span><span class="s1">',"text":{"content":"'</span><span class="mf">.</span><span class="nv">$title</span><span class="mf">.</span><span class="s1">'\n'</span><span class="mf">.</span><span class="nv">$content</span><span class="mf">.</span><span class="s1">'"}}'</span><span class="p">)]));</span>
</code></pre></div></div>
<p>从体验上来说的话这个企业应用版的体验还是不错的和测试号相比首先可以在主页显示虽然有二级但是两边的图标和名字都是可以自定义的而且API的调用次数也要比测试号多很多用起来还是挺不错的和测试号比唯一的缺点应该就是首次配置有点麻烦。 </p><p>
另外我在写这个东西的时候发现这个API还是和测试号的API不太一样测试号那个在发post请求的时候post可以小写但是这个垃圾企业微信的API的POST必须大写不然就400搞得我调试了半天才调试好。</p>
<h1 id="如何配置">
<a href="#如何配置"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 如何配置?
</h1>
<p>一样这个是兼容Server酱的需要的参数和Server酱需要的一样多所以配置也是完全兼容的。不过考虑到Server酱可怜的连每月5kw次请求都受不住配置方法我就在这里再写一遍吧</p>
<h2 id="第一步注册企业">
<a href="#第一步注册企业"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 第一步,注册企业
</h2>
<p>用电脑打开<a href="https://work.weixin.qq.com/">企业微信官网</a>,注册一个企业</p>
<h2 id="第二步创建应用">
<a href="#第二步创建应用"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 第二步,创建应用
</h2>
<p>注册成功后,点「管理企业」进入管理界面,选择「应用管理」 → 「自建」 → 「创建应用」 </p><p>
应用名称随便填比如「Mayx的机器人」应用logo随便找一个就行可见范围可以选择自己如果想推送给其他人就选公司。 </p><p>
创建完成后进入应用详情页可以得到应用ID(agentid)应用Secret(secret),复制并填到代码中。</p>
<h2 id="第三步获取企业id">
<a href="#第三步获取企业id"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 第三步获取企业ID
</h2>
<p>进入「<a href="https://work.weixin.qq.com/wework_admin/frame#profile">我的企业</a>」页面拉到最下边可以看到企业ID复制并填到上方。 </p><p>
推送UID不知道怎么填就直接填<code class="language-plaintext highlighter-rouge">@all</code>,推送给公司全员。</p>
<h2 id="第四步推送消息到微信">
<a href="#第四步推送消息到微信"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 第四步,推送消息到微信
</h2>
<p>进入「我的企业」 → 「<a href="https://work.weixin.qq.com/wework_admin/frame#profile/wxPlugin">微信插件</a>」,拉到下边扫描二维码,关注以后即可收到推送的消息。 </p><p>
这里一样图标觉得不好看也可以自己改。</p>
<h1 id="可以改进的地方">
<a href="#可以改进的地方"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 可以改进的地方
</h1>
<p>首先目前的这个版本是直接发送的信息所以不支持Markdown看起来也很丑。其实呢我看文档里有说可以直接发Markdown消息不过这样的话微信接收不到…… </p><p>
其实测试号版那个我看完文档之后就在想如果能把内容写到图文消息里也不错啊,可惜图文消息那个要一张头图,做不到开箱即用,这个企业微信版一样也有这个问题…… </p><p>
另外我还看到在文档里有一个文本卡片消息非常的不错但是有一个问题是我不知道为啥它的URL是必选的那这样的话同样我也没办法做到开箱即用…… </p><p>
当然要做的话也不难,自己去看<a href="https://work.weixin.qq.com/api/doc/90000/90135/90236">官方文档</a>就好了,也没有多复杂。 </p><p>
另外测试号版就算模板消息不能用,那也不是不能推送啊,用<a href="https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html">群发预览接口</a>不好吗虽然有每天100次的限制但又不是不能用啊而且还能减少对Server酱服务器的压力我看这所谓要捐助维护就是想着赚钱那么多广告早就够交服务器费用了我也是维护网站的还能不知道这请求要多少钱的服务器 </p><p>
然后看微信发的<a href="https://developers.weixin.qq.com/community/develop/doc/000a4e1df800d82acb9b7fb5e5b001">下线模板消息的通知</a>,应该大概率不会下线这个功能,只是说了灰度测试而已,有可能只是多加了比如授权之类的操作而已。</p>
<h1 id="总结">
<a href="#总结"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 总结
</h1>
<p>其实要不是Server酱有那么多广告还以捐赠名义收费而且还限制那么多的话其实也还算不错的产品而且也是它给了我看微信开发文档的动力让我在假期里还有点事干。只是既然最重要的服务号就要没了那么它也该被开发者们放弃了吧。</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=Server"><em>Server</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=PHP"><em>PHP</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E5%BE%AE%E4%BF%A1"><em>微信</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2021-02-26-serverchancorp.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2021/02/26/serverchancorp.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2021/02/23/picbotpro.html">
上一篇:快速自制微信图片机器人
</a>
</span>
<br />
<span class="next">
<a href="/2021/02/28/discuz.html">
下一篇如何给DiscuzX添加像原生一样的404页面
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2021/02/26/serverchancorp', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2021/02/26/serverchancorp.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-01 00:00:18<br /> 总字数614622 - 文章数178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>