-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
441 lines (390 loc) · 86.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"><title>WaterBoat的博客 - 正因你我生于繁华,弥足之花方显珍贵</title><meta name="author" content="WaterBoat"><meta name="copyright" content="WaterBoat"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#f7f9fe"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="apple-mobile-web-app-title" content="WaterBoat的博客"><meta name="application-name" content="WaterBoat的博客"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="#f7f9fe"><meta property="og:type" content="website"><meta property="og:title" content="WaterBoat的博客"><meta property="og:url" content="https://silence-dream.github.io/index.html"><meta property="og:site_name" content="WaterBoat的博客"><meta property="og:description" content="正因你我生于繁华,弥足之花方显珍贵"><meta property="og:locale" content="zh-CN"><meta property="og:image" content="https://avatars.githubusercontent.com/u/42824008?v=4"><meta property="article:author" content="WaterBoat"><meta property="article:tag"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://avatars.githubusercontent.com/u/42824008?v=4"><meta name="description" content="正因你我生于繁华,弥足之花方显珍贵"><link rel="shortcut icon" href="/favicon.ico"><link rel="canonical" href="https://silence-dream.github.io/"><link rel="preconnect" href="//cdn.cbd.int"/><meta name="google-site-verification" content="xxx"/><meta name="baidu-site-verification" content="code-xxx"/><meta name="msvalidate.01" content="xxx"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.cbd.int/[email protected]/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.cbd.int/@fancyapps/[email protected]/dist/fancybox/fancybox.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/[email protected]/swiper/swiper.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
linkPageTop: undefined,
peoplecanvas: {"enable":true,"img":"https://upload-bbs.miyoushe.com/upload/2023/09/03/125766904/ee23df8517f3c3e3efc4145658269c06_5714860933110284659.png"},
postHeadAiDescription: {"enable":true,"gptName":"AnZhiYu","mode":"local","switchBtn":false,"btnLink":"https://afdian.net/item/886a79d4db6711eda42a52540025c377","randomNum":3,"basicWordCount":1000,"key":"xxxx","Referer":"https://xx.xx/"},
diytitle: {"enable":true,"leaveTitle":"w(゚Д゚)w 不要走!再看看嘛!","backTitle":"♪(^∇^*)欢迎肥来!"},
LA51: undefined,
greetingBox: {"enable":true,"default":"晚上好👋","list":[{"greeting":"晚安😴","startTime":0,"endTime":5},{"greeting":"早上好鸭👋, 祝你一天好心情!","startTime":6,"endTime":9},{"greeting":"上午好👋, 状态很好,鼓励一下~","startTime":10,"endTime":10},{"greeting":"11点多啦, 在坚持一下就吃饭啦~","startTime":11,"endTime":11},{"greeting":"午安👋, 宝贝","startTime":12,"endTime":14},{"greeting":"🌈充实的一天辛苦啦!","startTime":14,"endTime":18},{"greeting":"19点喽, 奖励一顿丰盛的大餐吧🍔。","startTime":19,"endTime":19},{"greeting":"晚上好👋, 在属于自己的时间好好放松😌~","startTime":20,"endTime":24}]},
twikooEnvId: '',
commentBarrageConfig:undefined,
root: '/',
preloader: {"source":3},
friends_vue_info: undefined,
navMusic: true,
mainTone: undefined,
authorStatus: undefined,
algolia: undefined,
localSearch: undefined,
translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"简","rightMenuMsgToTraditionalChinese":"转为繁体","rightMenuMsgToSimplifiedChinese":"转为简体"},
noticeOutdate: undefined,
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":330},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
simplehomepage: false,
post: false
},
runtime: '天',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: {"copy":true,"copyrightEbable":false,"limitCount":50,"languages":{"author":"作者: WaterBoat","link":"链接: ","source":"来源: WaterBoat的博客","info":"著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。","copySuccess":"复制成功,复制和转载请标注本文地址"}},
lightbox: 'fancybox',
Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#425AEF","bgDark":"#1f1f1f","position":"top-center"},
source: {
justifiedGallery: {
js: 'https://cdn.cbd.int/[email protected]/dist/fjGallery.min.js',
css: 'https://cdn.cbd.int/[email protected]/dist/fjGallery.css'
}
},
isPhotoFigcaption: false,
islazyload: true,
isAnchor: false,
shortcutKey: undefined,
autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
configTitle: 'WaterBoat的博客',
title: 'WaterBoat的博客',
postAI: '',
pageFillDescription: '正因你我生于繁华弥足之花方显珍贵',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2025-01-11 01:15:58',
postMainColor: '',
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: (key, value, ttl) => {
if (ttl === 0) return
const now = Date.now()
const expiry = now + ttl * 86400000
const item = {
value,
expiry
}
localStorage.setItem(key, JSON.stringify(item))
},
get: key => {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = Date.now()
if (now > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
Object.keys(attr).forEach(key => {
script.setAttribute(key, attr[key])
})
document.head.appendChild(script)
})
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
win.activateDarkMode = () => {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#18171d')
}
}
win.activateLightMode = () => {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#f7f9fe')
}
}
const t = saveToLocal.get('theme')
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body data-type="anzhiyu"><div id="web_bg"></div><div id="an_music_bg"></div><div id="loading-box" onclick="document.getElementById("loading-box").classList.add("loaded")"><div class="loading-bg"><img class="loading-img nolazyload" alt="加载头像" src="https://avatars.githubusercontent.com/u/42824008?v=4"/><div class="loading-image-dot"></div></div></div><script>const preloader = {
endLoading: () => {
document.getElementById('loading-box').classList.add("loaded");
},
initLoading: () => {
document.getElementById('loading-box').classList.remove("loaded")
}
}
window.addEventListener('load',()=> { preloader.endLoading() })
setTimeout(function(){preloader.endLoading();},10000)
if (true) {
document.addEventListener('pjax:send', () => { preloader.initLoading() })
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}</script><link rel="stylesheet" href="https://cdn.cbd.int/[email protected]/progress_bar/progress_bar.css"/><script async="async" src="https://cdn.cbd.int/[email protected]/pace.min.js" data-pace-options="{ "restartOnRequestAfter":false,"eventLag":false}"></script><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><div id="nav-group"><span id="blog_name"><div class="back-home-button"><i class="anzhiyufont anzhiyu-icon-grip-vertical"></i><div class="back-menu-list-groups"><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener" href="https://blog.yichengloong.cn/" title="博客"><img class="back-menu-item-icon" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="/img/favicon.ico" alt="博客"/><span class="back-menu-item-text">博客</span></a></div></div><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener" href="https://blog.yichengloong.cn/" title="博客"><img class="back-menu-item-icon" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="/img/favicon.ico" alt="博客"/><span class="back-menu-item-text">博客</span></a></div></div></div></div><a id="site-name" href="/" accesskey="h"><div class="title">WaterBoat的博客</div><i class="anzhiyufont anzhiyu-icon-house-chimney"></i></a></span><div class="mask-name-container"><div id="name-container"><a id="page-name" href="javascript:anzhiyu.scrollToDest(0, 500)">PAGE_NAME</a></div></div><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 文章</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><i class="anzhiyufont anzhiyu-icon-box-archive faa-tada" style="font-size: 0.9em;"></i><span> 隧道</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><i class="anzhiyufont anzhiyu-icon-shapes faa-tada" style="font-size: 0.9em;"></i><span> 分类</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags faa-tada" style="font-size: 0.9em;"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 友链</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><i class="anzhiyufont anzhiyu-icon-link faa-tada" style="font-size: 0.9em;"></i><span> 友人帐</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 我的</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/music/"><i class="anzhiyufont anzhiyu-icon-music faa-tada" style="font-size: 0.9em;"></i><span> 音乐馆</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/album/"><i class="anzhiyufont anzhiyu-icon-images faa-tada" style="font-size: 0.9em;"></i><span> 相册集</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 关于</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/about/"><i class="anzhiyufont anzhiyu-icon-paper-plane faa-tada" style="font-size: 0.9em;"></i><span> 关于本人</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/essay/"><i class="anzhiyufont anzhiyu-icon-lightbulb faa-tada" style="font-size: 0.9em;"></i><span> 闲言碎语</span></a></li><li><a class="site-page child faa-parent animated-hover" href="javascript:toRandomPost()"><i class="anzhiyufont anzhiyu-icon-shoe-prints1 faa-tada" style="font-size: 0.9em;"></i><span> 随便逛逛</span></a></li></ul></div></div></div><div id="nav-right"><div class="nav-button only-home" id="travellings_button" title="随机前往一个开往项目网站"><a class="site-page" onclick="anzhiyu.totraveling()" title="随机前往一个开往项目网站" href="javascript:void(0);" rel="external nofollow" data-pjax-state="external"><i class="anzhiyufont anzhiyu-icon-train"></i></a></div><div class="nav-button" id="randomPost_button"><a class="site-page" onclick="toRandomPost()" title="随机前往一个文章" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-dice"></i></a></div><input id="center-console" type="checkbox"/><label class="widget" for="center-console" title="中控台" onclick="anzhiyu.switchConsole();"><i class="left"></i><i class="widget center"></i><i class="widget right"></i></label><div id="console"><div class="console-card-group-reward"><ul class="reward-all console-card"><li class="reward-item"><a href="https://npm.elemecdn.com/[email protected]/img/post/common/qrcode-weichat.png" target="_blank"><img class="post-qr-code-img" alt="微信" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://npm.elemecdn.com/[email protected]/img/post/common/qrcode-weichat.png"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="https://npm.elemecdn.com/[email protected]/img/post/common/qrcode-alipay.png" target="_blank"><img class="post-qr-code-img" alt="支付宝" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://npm.elemecdn.com/[email protected]/img/post/common/qrcode-alipay.png"/></a><div class="post-qr-code-desc">支付宝</div></li></ul></div><div class="console-card-group"><div class="console-card-group-left"><div class="console-card" id="card-newest-comments"><div class="card-content"><div class="author-content-item-tips">互动</div><span class="author-content-item-title"> 最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></div></div><div class="console-card-group-right"><div class="console-card tags"><div class="card-content"><div class="author-content-item-tips">兴趣点</div><span class="author-content-item-title">寻找你感兴趣的领域</span><div class="card-tags"><div class="item-headline"></div><div class="card-tag-cloud"><a href="/tags/Cypress/" style="font-size: 1.05rem;">Cypress<sup>1</sup></a><a href="/tags/JavaScript/" style="font-size: 1.05rem;">JavaScript<sup>6</sup></a><a href="/tags/Nuxt/" style="font-size: 1.05rem;">Nuxt<sup>1</sup></a><a href="/tags/React/" style="font-size: 1.05rem;">React<sup>5</sup></a><a href="/tags/Solidity/" style="font-size: 1.05rem;">Solidity<sup>1</sup></a><a href="/tags/TypeScript/" style="font-size: 1.05rem;">TypeScript<sup>1</sup></a><a href="/tags/Vue/" style="font-size: 1.05rem;">Vue<sup>6</sup></a><a href="/tags/npm/" style="font-size: 1.05rem;">npm<sup>1</sup></a><a href="/tags/shell/" style="font-size: 1.05rem;">shell<sup>1</sup></a><a href="/tags/sql/" style="font-size: 1.05rem;">sql<sup>2</sup></a><a href="/tags/%E5%8C%BA%E5%9D%97%E9%93%BE/" style="font-size: 1.05rem;">区块链<sup>1</sup></a><a href="/tags/%E5%8E%9F%E7%A5%9E/" style="font-size: 1.05rem;">原神<sup>1</sup></a><a href="/tags/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/" style="font-size: 1.05rem;">开发工具<sup>2</sup></a><a href="/tags/%E6%95%99%E7%A8%8B/" style="font-size: 1.05rem;">教程<sup>1</sup></a><a href="/tags/%E6%B5%8B%E8%AF%95/" style="font-size: 1.05rem;">测试<sup>1</sup></a></div></div><hr/></div></div><div class="console-card history"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-box-archiv"></i><span>文章</span></div><div class="card-archives"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="anzhiyufont anzhiyu-icon-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/07/"><span class="card-archive-list-date">七月 2023</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/10/"><span class="card-archive-list-date">十月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/09/"><span class="card-archive-list-date">九月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">六月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">4</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/05/"><span class="card-archive-list-date">五月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">8</span><span>篇</span></div></a></li></ul></div><hr/></div></div></div><div class="button-group"><div class="console-btn-item"><a class="darkmode_switchbutton" title="显示模式切换" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-moon"></i></a></div><div class="console-btn-item" id="consoleHideAside" onclick="anzhiyu.hideAsideBtn()" title="边栏显示控制"><a class="asideSwitch"><i class="anzhiyufont anzhiyu-icon-arrows-left-right"></i></a></div><div class="console-btn-item" id="consoleMusic" onclick="anzhiyu.musicToggle()" title="音乐开关"><a class="music-switch"><i class="anzhiyufont anzhiyu-icon-music"></i></a></div></div><div class="console-mask" onclick="anzhiyu.hideConsole()" href="javascript:void(0);"></div></div><div class="nav-button" id="nav-totop"><a class="totopbtn" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i><span id="percent" onclick="anzhiyu.scrollToDest(0,500)">0</span></a></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);" title="切换"><i class="anzhiyufont anzhiyu-icon-bars"></i></a></div></div></div></nav></header><main id="blog-container"><div class="bbTimeList container" id="bbTimeList"><i class="anzhiyufont anzhiyu-icon-jike bber-logo fontbold" onclick="pjax.loadUrl("/essay/");" title="即刻短文" href="javascript:void(0);" aria-hidden="true"></i><div class="swiper-container swiper-no-swiping essay_bar_swiper_container" id="bbtalk" tabindex="-1"><div class="swiper-wrapper" id="bber-talk" onclick="pjax.loadUrl("/essay/");"><a class="li-style swiper-slide" href="javascript:void(0);">高强度学习中....</a><a class="li-style swiper-slide" href="javascript:void(0);">大伟哥:技术宅拯救世界真的很酷!!!</a><a class="li-style swiper-slide" href="javascript:void(0);">今天在深圳去阳光国风认识了一位桂林老表,2333</a><a class="li-style swiper-slide" href="javascript:void(0);">JOJO是真的好看!</a></div></div><a class="bber-gotobb anzhiyufont anzhiyu-icon-circle-arrow-right" onclick="pjax.loadUrl("/essay/");" href="javascript:void(0);" title="查看全文"></a></div><script src="https://npm.elemecdn.com/[email protected]/swiper/swiper.min.js"></script><div id="home_top"><div class="swiper_container_card" style="height: auto;width: 100%"><div id="bannerGroup"><div id="random-banner"><canvas id="peoplecanvas"></canvas><a id="random-hover" href="javascript:toRandomPost()"><i class="anzhiyufont anzhiyu-icon-paper-plane"></i><div class="bannerText">随便逛逛<i class="anzhiyufont anzhiyu-icon-arrow-right"></i></div></a></div><div class="categoryGroup"><div class="categoryItem" style="box-shadow:var(--anzhiyu-shadow-blue)"><a class="categoryButton blue" href="/categories/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/"><span class="categoryButtonText">前端</span><i class="anzhiyufont anzhiyu-icon-dove"></i></a></div><div class="categoryItem" style="box-shadow:var(--anzhiyu-shadow-red)"><a class="categoryButton red" href="/categories/%E5%A4%A7%E5%AD%A6%E7%94%9F%E6%B6%AF/"><span class="categoryButtonText">大学</span><i class="anzhiyufont anzhiyu-icon-fire"></i></a></div><div class="categoryItem" style="box-shadow:var(--anzhiyu-shadow-green)"><a class="categoryButton green" href="/categories/%E7%94%9F%E6%B4%BB%E6%97%A5%E5%B8%B8/"><span class="categoryButtonText">生活</span><i class="anzhiyufont anzhiyu-icon-book"></i></a></div></div></div><div class="topGroup"><div class="recent-post-item" onclick="pjax.loadUrl("/2021/06/08/%E4%BF%A1%E5%AE%89%E5%B7%A5%E5%85%B7/01-%E5%B7%A5%E5%85%B7%E4%B8%8B%E8%BD%BD%E9%93%BE%E6%8E%A5/")"><div class="post_cover left_radius"><a href="2021/06/08/信安工具/01-工具下载链接/" title="工具下载"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/ganyuxiaozhongli.jpg?_r_=8b4fee0f-87cb-c2ca-e034-3b4a065efef3"></a></div><div class="recent-post-info"><a class="article-title" href="2021/06/08/信安工具/01-工具下载链接/" title="工具下载">工具下载</a></div></div><div class="recent-post-item" onclick="pjax.loadUrl("/2022/05/20/%E5%89%8D%E7%AB%AF/01-npm%E5%88%AB%E5%90%8D/")"><div class="post_cover left_radius"><a href="2022/05/20/前端/01-npm别名/" title="npm 别名---让小明变成小红"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=b9318d79-d1f9-d531-6e41-e98e4acf2d25"></a></div><div class="recent-post-info"><a class="article-title" href="2022/05/20/前端/01-npm别名/" title="npm 别名---让小明变成小红">npm 别名---让小明变成小红</a></div></div><div class="recent-post-item" onclick="pjax.loadUrl("/2020/05/20/%E5%8E%9F%E7%A5%9E/%E5%8E%9F%E7%A5%9E%E6%8A%BD%E5%8D%A1%E8%AE%B0%E5%BD%95%E6%8A%93%E5%8F%96/")"><div class="post_cover left_radius"><a href="2020/05/20/原神/原神抽卡记录抓取/" title="原神抽卡记录抓取"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/2e14526398b61894d3c1b91167c3b5461672071558236.jpeg?_r_=0e219677-9d6f-9c06-5ac4-fe5a23e63df2"></a></div><div class="recent-post-info"><a class="article-title" href="2020/05/20/原神/原神抽卡记录抓取/" title="原神抽卡记录抓取">原神抽卡记录抓取</a></div></div><div class="recent-post-item" onclick="pjax.loadUrl("/2021/05/01/%E5%90%8E%E7%AB%AF/01-Sql%E5%9F%BA%E7%A1%80/")"><div class="post_cover left_radius"><a href="2021/05/01/后端/01-Sql基础/" title="SQL 基础"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=ed4d125a-e7df-212b-5bce-703154ca9276"></a></div><div class="recent-post-info"><a class="article-title" href="2021/05/01/后端/01-Sql基础/" title="SQL 基础">SQL 基础</a></div></div><div class="recent-post-item" onclick="pjax.loadUrl("/2021/05/01/%E5%90%8E%E7%AB%AF/03-MySQL%E8%B8%A9%E5%9D%91/")"><div class="post_cover left_radius"><a href="2021/05/01/后端/03-MySQL踩坑/" title="MySQL踩坑记录"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/aced09b7b3413ac843e3cd4bb9e8b1361672071528562.jpeg?_r_=53bbe942-aac0-c926-43db-9c027fe0a4ba"></a></div><div class="recent-post-info"><a class="article-title" href="2021/05/01/后端/03-MySQL踩坑/" title="MySQL踩坑记录">MySQL踩坑记录</a></div></div><div class="recent-post-item" onclick="pjax.loadUrl("/2023/07/17/%E5%89%8D%E7%AB%AF/Cypress/01-Cypress%20%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/")"><div class="post_cover left_radius"><a href="2023/07/17/前端/Cypress/01-Cypress 使用指南/" title="Cypress 使用指南"><span class="recent-post-top-text">荐</span><img class="post_bg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/1c95585cf59b5774cbbdd637827736bf1667192584163.jpeg?_r_=016811fb-b952-5524-4259-7902b2c6e4fd"></a></div><div class="recent-post-info"><a class="article-title" href="2023/07/17/前端/Cypress/01-Cypress 使用指南/" title="Cypress 使用指南">Cypress 使用指南</a></div></div><a class="todayCard" id="todayCard" target="_blank" rel="noopener" href="https://blog.anheyu.com/docs" style="z-index: 1;"><div class="todayCard-info"><div class="todayCard-tips">正因你我生于繁华</div><div class="todayCard-title">弥足之花方显珍贵</div></div><img class="todayCard-cover" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://bu.dusays.com/2023/05/13/645fa3cf90d70.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="封面"><div class="banner-button-group"><div class="banner-button" onclick="event.stopPropagation();event.preventDefault();anzhiyu.hideTodayCard();"><i class="anzhiyufont anzhiyu-icon-arrow-circle-right"></i><span class="banner-button-text">更多推荐</span></div></div></a></div><link rel="stylesheet"></div></div><div class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div id="categoryBar"><div class="category-bar" id="category-bar"><div id="catalog-bar"><div id="catalog-list"><div class="catalog-list-item" id="首页"><a href="/">首页</a></div>
<div class="catalog-list-item" id="/categories/开发工具/">
<a href="/categories/开发工具/">
开发工具
</a>
</div>
<div class="catalog-list-item" id="/categories/npm/">
<a href="/categories/npm/">
npm
</a>
</div>
<div class="catalog-list-item" id="/categories/前端/">
<a href="/categories/前端/">
前端
</a>
</div>
<div class="catalog-list-item" id="/categories/JavaScript/">
<a href="/categories/JavaScript/">
JavaScript
</a>
</div>
<div class="catalog-list-item" id="/categories/Solidity/">
<a href="/categories/Solidity/">
Solidity
</a>
</div>
<div class="catalog-list-item" id="/categories/前端/设计模式/">
<a href="/categories/前端/设计模式/">
设计模式
</a>
</div>
<div class="catalog-list-item" id="/categories/前端/设计模式/JavaScript/">
<a href="/categories/前端/设计模式/JavaScript/">
JavaScript
</a>
</div>
</div><div class="category-bar-next" id="category-bar-next" onclick="anzhiyu.scrollCategoryBarToRight()"><i class="anzhiyufont anzhiyu-icon-angle-double-right"></i></div><a class="catalog-more" href="/categories/">更多</a></div></div></div><div class="recent-post-item lastestpost-item" onclick="pjax.loadUrl('/2024/01/01/%E5%8C%BA%E5%9D%97%E9%93%BE/Solidity/01-Solidity%20%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/')"><div class="post_cover left"><a href="/2024/01/01/%E5%8C%BA%E5%9D%97%E9%93%BE/Solidity/01-Solidity%20%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/" title="Solidity 龟速入门教程" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/1c95585cf59b5774cbbdd637827736bf1667192584163.jpeg?_r_=45cbb841-f350-4ab3-395e-36549e19170d" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Solidity 龟速入门教程" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">Solidity</div><span class="newPost">最新</span><a class="unvisited-post" href="/2024/01/01/%E5%8C%BA%E5%9D%97%E9%93%BE/Solidity/01-Solidity%20%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/" title="Solidity 龟速入门教程">未读</a></div><a class="article-title" href="/2024/01/01/%E5%8C%BA%E5%9D%97%E9%93%BE/Solidity/01-Solidity%20%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/" title="Solidity 龟速入门教程">Solidity 龟速入门教程</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2024-01-01T00:00:00.000Z" title="发表于 2024-01-01 00:00:00" time="2024-01-01 00:00:00">2024-01-01</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.289Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/Solidity/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Solidity</span></a><a class="article-meta__tags" href="/tags/%E5%8C%BA%E5%9D%97%E9%93%BE/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>区块链</span></a><a class="article-meta__tags" href="/tags/%E6%95%99%E7%A8%8B/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>教程</span></a></span></div><div class="content">Solidity 入门教程Solidity 是什么
Solidity 是一门面向合约的、为实现智能合约而创建的高级编程语言。这门语言受到了 C++,Python 和 Javascript 语言的影响,设计的目的是能在以太坊虚拟机(EVM)上运行。
Solidity 是静态类型语言,支持继承、库和复杂的用户定义类型等特性。
开发工具Remixremix是以太坊官方推荐的智能合约开发IDE(集成开发环境),适合新手,可以在浏览器中快速部署测试智能合约,你不需要在本地安装任何程序。
网址:remix.ethereum.org
进入remix,我们可以看到最左边的菜单有三个按钮,分别对应文件(写代码的地方),编译(跑代码),部署(部署到链上)。我们点新建(Create New File)按钮,就可以创建一个空白的solidity合约
我们来编写一段代码
1234567// SPDX-License-Identifier: MIT // 不写这个编辑器会警告,但是不影响运行pragma solidity ^0.8.0; // 指定编译器版本 不允许小于 0.8.0 或大于 0.9.0的编译器 ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2023/07/17/%E5%89%8D%E7%AB%AF/Cypress/01-Cypress%20%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/')"><div class="post_cover right"><a href="/2023/07/17/%E5%89%8D%E7%AB%AF/Cypress/01-Cypress%20%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/" title="Cypress 使用指南" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/1c95585cf59b5774cbbdd637827736bf1667192584163.jpeg?_r_=016811fb-b952-5524-4259-7902b2c6e4fd" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Cypress 使用指南" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">前端</div><a class="unvisited-post" href="/2023/07/17/%E5%89%8D%E7%AB%AF/Cypress/01-Cypress%20%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/" title="Cypress 使用指南">未读</a></div><a class="article-title" href="/2023/07/17/%E5%89%8D%E7%AB%AF/Cypress/01-Cypress%20%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/" title="Cypress 使用指南">Cypress 使用指南</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-07-17T00:00:00.000Z" title="发表于 2023-07-17 00:00:00" time="2023-07-17 00:00:00">2023-07-17</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.208Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/Cypress/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Cypress</span></a><a class="article-meta__tags" href="/tags/%E6%B5%8B%E8%AF%95/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>测试</span></a></span></div><div class="content">什么是 CypressCypress 是一个现代化的前端端到端(End-to-End,E2E)测试框架。它被设计用于对 Web 应用程序进行自动化测试,可以模拟用户在真实环境中与应用程序的交互行为。
以下是 Cypress 的一些关键特点和优势:
简单易用: Cypress 具有简洁而直观的 API,使得编写和维护测试用例非常容易。
强大的调试能力: Cypress 提供了丰富的调试工具,开发人员可以通过断点、控制台日志和实时命令行等方式方便地调试测试用例。
可见即可信: Cypress 在测试过程中会记录并生成视频,可以可视化地查看每个测试用例的执行过程,方便回放和排查问题。
为什么要用 Cypress?
JavaScript 技术栈: Cypress 是以 JavaScript 为技术栈编写的,而我们团队 BCS 端都是使用 JavaScript 技术栈为主,切换为以 JavaScript 为主的自动化测试框架是一件低成本的事情。
简化测试流程: Cypress 提供了一个全面的测试解决方案,可以覆盖从用户界面到后端服务器的整个应用程序。它集成了测试框架、断言库和模拟工具,使得 ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2022/05/20/%E5%89%8D%E7%AB%AF/01-npm%E5%88%AB%E5%90%8D/')"><div class="post_cover left"><a href="/2022/05/20/%E5%89%8D%E7%AB%AF/01-npm%E5%88%AB%E5%90%8D/" title="npm 别名---让小明变成小红" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=b9318d79-d1f9-d531-6e41-e98e4acf2d25" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="npm 别名---让小明变成小红" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">npm</div><a class="unvisited-post" href="/2022/05/20/%E5%89%8D%E7%AB%AF/01-npm%E5%88%AB%E5%90%8D/" title="npm 别名---让小明变成小红">未读</a></div><a class="article-title" href="/2022/05/20/%E5%89%8D%E7%AB%AF/01-npm%E5%88%AB%E5%90%8D/" title="npm 别名---让小明变成小红">npm 别名---让小明变成小红</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-05-20T00:00:00.000Z" title="发表于 2022-05-20 00:00:00" time="2022-05-20 00:00:00">2022-05-20</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.208Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/npm/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>npm</span></a></span></div><div class="content">12345npm i lodash@npm:wuhu # 这样就把 lodash 的名称配置成了 wuhu# 实际使用一般来说 node-sass 是业界毒瘤,用 dart-sass 就可以替换掉 node-sassnpm install node-sass@npm:dart-sass# 如果你使用的是 yarnyarn add node-sass@yarn:dart-sass
</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2022/05/10/%E5%89%8D%E7%AB%AF/JavaScript/JavaScript%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/08-%E5%8F%91%E5%B8%83-%E8%AE%A2%E9%98%85%E6%A8%A1%E5%BC%8F/')"><div class="post_cover right"><a href="/2022/05/10/%E5%89%8D%E7%AB%AF/JavaScript/JavaScript%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/08-%E5%8F%91%E5%B8%83-%E8%AE%A2%E9%98%85%E6%A8%A1%E5%BC%8F/" title="发布-订阅模式" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=3a83f6c4-e061-1f33-3b82-6e9a38bca4de" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="发布-订阅模式" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">前端</div><div class="article-categories-original">设计模式</div><div class="article-categories-original">JavaScript</div><a class="unvisited-post" href="/2022/05/10/%E5%89%8D%E7%AB%AF/JavaScript/JavaScript%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/08-%E5%8F%91%E5%B8%83-%E8%AE%A2%E9%98%85%E6%A8%A1%E5%BC%8F/" title="发布-订阅模式">未读</a></div><a class="article-title" href="/2022/05/10/%E5%89%8D%E7%AB%AF/JavaScript/JavaScript%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/08-%E5%8F%91%E5%B8%83-%E8%AE%A2%E9%98%85%E6%A8%A1%E5%BC%8F/" title="发布-订阅模式">发布-订阅模式</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-05-10T00:00:00.000Z" title="发表于 2022-05-10 00:00:00" time="2022-05-10 00:00:00">2022-05-10</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.209Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/JavaScript/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>JavaScript</span></a></span></div><div class="content">什么是发布-订阅模式以我们使用过的 documeng.body.addEventListener(“click”,function(){}) 为例,这样的就是发布-订阅模式的具体实现。我们订阅了 documeng.body 上的 click 事件,当被点击的时候 body 节点便会向订阅者发布者消息。
如果用生活中的例子举例,那就是我们订阅微信公众号,公众号发送消息,订阅的用户就会接收到消息。
基于以上的例子,我们总结出发布订阅模式的三要素:
一个订阅者
一个发布者
一个处理 订阅和发布的中间人
接下来让我们来实现一个发布-订阅模式。我们规定 listen-订阅 trigger-发布 -remove 取消订阅
一个简单的发布订阅模式调用的形式如下:
123456salesOffices.listen(function (price) { console.log("价格", price);});salesOffices.trigger(100);salesOffices.remove(100);
具体实现如下:
12345678910111 ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/04-VueCli/')"><div class="post_cover left"><a href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/04-VueCli/" title="Vue Cli 配置" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/0fae1a35217854d8d7686bb6f6e1a42c1667192828148.jpeg?_r_=aa79af7e-6a6e-f718-dc73-f96f4ebd5b36" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue Cli 配置" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><a class="unvisited-post" href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/04-VueCli/" title="Vue Cli 配置">未读</a></div><a class="article-title" href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/04-VueCli/" title="Vue Cli 配置">Vue Cli 配置</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-02-08T00:00:00.000Z" title="发表于 2022-02-08 00:00:00" time="2022-02-08 00:00:00">2022-02-08</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.213Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/Vue/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Vue</span></a></span></div><div class="content">引入 cdnvue.config.js
12345678910111213141516171819202122232425262728293031323334353637const isProduction = process.env.NODE_ENV === "production";const cdn = { // 开发环境 dev: { css: [], js: [], }, // 生产环境 build: { css: ["//lib.baomitu.com/swiper/7.4.1/swiper-bundle.css"], js: [ "//lib.baomitu.com/vue/3.2.26/vue.cjs.js", "//lib.baomitu.com/vuex/4.0.0/vuex.cjs.min.js", "//lib.baomitu.com/vue-router/4.0.0/v ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/05-Vu3-Setup%E8%AF%AD%E6%B3%95%E7%B3%96/')"><div class="post_cover right"><a href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/05-Vu3-Setup%E8%AF%AD%E6%B3%95%E7%B3%96/" title="Vue3-Setup语法糖" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/0fae1a35217854d8d7686bb6f6e1a42c1667192828148.jpeg?_r_=18bc0542-9ea2-dbbd-e7be-b05a06cc5e27" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue3-Setup语法糖" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><a class="unvisited-post" href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/05-Vu3-Setup%E8%AF%AD%E6%B3%95%E7%B3%96/" title="Vue3-Setup语法糖">未读</a></div><a class="article-title" href="/2022/02/08/%E5%89%8D%E7%AB%AF/Vue/05-Vu3-Setup%E8%AF%AD%E6%B3%95%E7%B3%96/" title="Vue3-Setup语法糖">Vue3-Setup语法糖</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-02-08T00:00:00.000Z" title="发表于 2022-02-08 00:00:00" time="2022-02-08 00:00:00">2022-02-08</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.213Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/Vue/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Vue</span></a></span></div><div class="content"><script setup></script> 是一种编译时语法糖,用于在单文件组件中使用组合式 API,如果你同时使用单文件组件和组合式 API,建议使用该语法。
它与普通语法相比,代码更加简洁、性能更加强悍、更好的 TS 支持。
1npm install -g @vue/cli
1234567891011121314<script setup>// 此处代码将会被编译为 setup 函数代码// 也就是说此处代码将会在组件每次创建实例时执行// 在内部声明的顶级变量和函数都可以在模板中你直接使用const msg = "Hello Vue3 setup";function log() { console.log(msg);}</script><template> <div @click="log">{{ msg }}</div></template>
12345678910< ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/01-JavaScript%E5%B0%8F%E6%8A%80%E5%B7%A7/')"><div class="post_cover left"><a href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/01-JavaScript%E5%B0%8F%E6%8A%80%E5%B7%A7/" title="JavaScript 小技巧" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=1a3228a8-8c6c-9d51-59e0-a945eefe17fd" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JavaScript 小技巧" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">JavaScript</div><a class="unvisited-post" href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/01-JavaScript%E5%B0%8F%E6%8A%80%E5%B7%A7/" title="JavaScript 小技巧">未读</a></div><a class="article-title" href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/01-JavaScript%E5%B0%8F%E6%8A%80%E5%B7%A7/" title="JavaScript 小技巧">JavaScript 小技巧</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-10-28T00:00:00.000Z" title="发表于 2021-10-28 00:00:00" time="2021-10-28 00:00:00">2021-10-28</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.209Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/JavaScript/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>JavaScript</span></a></span></div><div class="content">1.sleep 延迟函数1234567891011121314function sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() - start < delay) { continue; }}function test() { console.log("111"); sleep(2000); console.log("222");}test();
2.获取 URL 参数1234decodeURI("%E5%95%8A%E5%93%88%E5%93%88"); // 解码中文// window.location.search 获取 URL 参数let params = new URLSearchParams("?project=js&type=1").get("type");console.l ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/02-JavsScript%E9%AB%98%E7%BA%A7/')"><div class="post_cover right"><a href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/02-JavsScript%E9%AB%98%E7%BA%A7/" title="JavaScript 高级" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/aced09b7b3413ac843e3cd4bb9e8b1361672071528562.jpeg?_r_=0547cf3b-e62c-a5c0-c67b-fb62bc25bc9d" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JavaScript 高级" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><div class="article-categories-original">JavaScript</div><a class="unvisited-post" href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/02-JavsScript%E9%AB%98%E7%BA%A7/" title="JavaScript 高级">未读</a></div><a class="article-title" href="/2021/10/28/%E5%89%8D%E7%AB%AF/JavaScript/02-JavsScript%E9%AB%98%E7%BA%A7/" title="JavaScript 高级">JavaScript 高级</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-10-28T00:00:00.000Z" title="发表于 2021-10-28 00:00:00" time="2021-10-28 00:00:00">2021-10-28</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.209Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/JavaScript/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>JavaScript</span></a></span></div><div class="content">01.call, apply 和 bind 的区别call 的使用方式:123456789101112131415161718192021222324252627//#region call// 定义一个对象let character = { name: "派蒙", weapon: [], // 得到一把武器 getWeapon: function (weapon, weapon2) { this.weapon = [weapon, weapon2]; },};let character2 = { name: "行秋", weapon: [],};console.log(character);// 调用方法获取了一把护摩character.getWeapon("护摩", "薙草之稻光");console.log(character);// character2也想得到一把武器,但是没有这个方法获得.character1表示可以把 ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2021/09/29/%E5%89%8D%E7%AB%AF/Nuxt/01-Nuxt/')"><div class="post_cover left"><a href="/2021/09/29/%E5%89%8D%E7%AB%AF/Nuxt/01-Nuxt/" title="Nuxt 笔记" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/f17310415885e63a13694c1c031a58261672071545196.jpeg?_r_=a450ea5a-1252-7d69-6d6d-9139c051e899" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nuxt 笔记" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><a class="unvisited-post" href="/2021/09/29/%E5%89%8D%E7%AB%AF/Nuxt/01-Nuxt/" title="Nuxt 笔记">未读</a></div><a class="article-title" href="/2021/09/29/%E5%89%8D%E7%AB%AF/Nuxt/01-Nuxt/" title="Nuxt 笔记">Nuxt 笔记</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-09-29T00:00:00.000Z" title="发表于 2021-09-29 00:00:00" time="2021-09-29 00:00:00">2021-09-29</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.210Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/Vue/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Vue</span></a><a class="article-meta__tags" href="/tags/Nuxt/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>Nuxt</span></a></span></div><div class="content">Nuxt 是什么?Nuxt.js 是一个基于 Vue.js 的通用应用框架。
通过对客户端/服务端基础架构的抽象组织,Nuxt.js 主要关注的是应用的 UI 渲染。
我们的目标是创建一个灵活的应用框架,你可以基于它初始化新项目的基础结构代码,或者在已有 Node.js 项目中使用 Nuxt.js。
Nuxt.js 预设了利用 Vue.js 开发服务端渲染的应用所需要的各种配置。
除此之外,我们还提供了一种命令叫:nuxt generate ,为基于 Vue.js 的应用提供生成对应的静态站点的功能。
我们相信这个命令所提供的功能,是向开发集成各种微服务(Microservices)的 Web 应用迈开的新一步。
作为框架,Nuxt.js 为 客户端/服务端 这种典型的应用架构模式提供了许多有用的特性,例如异步数据加载、中间件支持、布局支持等。
目录结构Nuxt.js 的默认应用目录架构提供了良好的代码分层结构,适用于开发或大或小的应用。当然,你也可以根据自己的偏好组织应用代码。
pages 目录Nuxt.js 会依据 pages 目录中的所有 *.vue 文件生成应用的路由 ...</div></div></div><div class="recent-post-item" onclick="pjax.loadUrl('/2021/06/10/%E5%89%8D%E7%AB%AF/React/03-React-hooks/')"><div class="post_cover right"><a href="/2021/06/10/%E5%89%8D%E7%AB%AF/React/03-React-hooks/" title="React-hooks" style="display: flex;height: 100%;"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/2e14526398b61894d3c1b91167c3b5461672071558236.jpeg?_r_=40d9dc54-f712-9bc4-1d96-5d3a0037a3ce" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="React-hooks" style="pointer-events: none"></a></div><div class="recent-post-info"><div class="recent-post-info-top"><div class="recent-post-info-top-tips"><a class="unvisited-post" href="/2021/06/10/%E5%89%8D%E7%AB%AF/React/03-React-hooks/" title="React-hooks">未读</a></div><a class="article-title" href="/2021/06/10/%E5%89%8D%E7%AB%AF/React/03-React-hooks/" title="React-hooks">React-hooks</a></div><div class="article-meta-wrap"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-alt"></i><span class="article-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-06-10T00:00:00.000Z" title="发表于 2021-06-10 00:00:00" time="2021-06-10 00:00:00">2021-06-10</time><span class="article-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history" style="font-size: 15px; "></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-01-11T01:15:44.210Z" title="更新于 2025-01-11 01:15:44" time="2025-01-11 01:15:44">2025-01-11</time></span><span class="article-meta tags"><a class="article-meta__tags" href="/tags/React/" event.cancelbubble onclick="window.event.cancelBubble=true;"><span> <i class="anzhiyufont anzhiyu-icon-hashtag"></i>React</span></a></span></div><div class="content">什么是 hooks?Hook 是 React 16.8 的新增特性。它可以让你在不编写 class 的情况下使用 state 以及其他的 React 特性。
我们先来看一个例子,这是传统的 class 组件的
12345678910111213141516171819import React from "react";class index extends React.component { state = { msg: "你好", }; updateMsg = () => { this.setState({ msg: "真好", }); }; render() { <div> <span>{this.state.msg}</span> <button onClick={this.updateMsg} ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><a class="page-number" href="/page/3/#content-inner">3</a><a class="extend next" rel="next" href="/page/2/#content-inner"><div class="pagination_tips_next">下页</div><i style="font-weight: inherit; font-size: 1rem;" class="anzhiyufont anzhiyu-icon-chevron-right fa-fw"></i></a><div class="toPageGroup"><input id="toPageText" oninput="value=value.replace(/[^0-9]/g,'')" maxlength="3" onkeyup="this.value=this.value.replace(/[^u4e00-u9fa5w]/g,'')" aria-label="toPage"><a id="toPageButton" onclick="anzhiyu.toPage()"><i class="anzhiyufont anzhiyu-icon-angles-right" style="font-weight: inherit; font-size: 1rem;"></i></a></div></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-content"><div class="author-info-avatar"><img class="avatar-img" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://avatars.githubusercontent.com/u/42824008?v=4" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__description">正因你我生于繁华,弥足之花方显珍贵</div><div class="author-info__bottom-group"><a class="author-info__bottom-group-left" href="/"><h1 class="author-info__name">WaterBoat</h1><div class="author-info__desc">正因你我生于繁华,弥足之花方显珍贵</div></a><div class="card-info-social-icons is-center"><a class="social-icon faa-parent animated-hover" href="https://github.com/Silence-dream" target="_blank" title="Github"><i class="anzhiyufont anzhiyu-icon-github"></i></a><a class="social-icon faa-parent animated-hover" href="tencent://Message/?Uin=1971743001&amp;websiteName=local.edu.com:8888=&amp;Menu=yes" target="_blank" title="QQ"><i class="anzhiyufont anzhiyu-icon-qq"></i></a></div></div></div></div><div class="card-widget anzhiyu-right-widget" id="card-wechat" onclick="null"><div id="flip-wrapper"><div id="flip-content"><div class="face" style="background: url(https://bu.dusays.com/2023/01/13/63c02edf44033.png) center center / 100% no-repeat"></div><div class="back face" style="background: url(https://bu.dusays.com/2023/05/13/645fa415e8694.png) center center / 100% no-repeat"></div></div></div></div><div class="sticky_layout"><div class="card-widget"><div class="card-tags"><div class="item-headline"></div><div class="card-tag-cloud"><a href="/tags/Cypress/" style="font-size: 1.05rem;">Cypress<sup>1</sup></a><a href="/tags/JavaScript/" style="font-size: 1.05rem;">JavaScript<sup>6</sup></a><a href="/tags/Nuxt/" style="font-size: 1.05rem;">Nuxt<sup>1</sup></a><a href="/tags/React/" style="font-size: 1.05rem;">React<sup>5</sup></a><a href="/tags/Solidity/" style="font-size: 1.05rem;">Solidity<sup>1</sup></a><a href="/tags/TypeScript/" style="font-size: 1.05rem;">TypeScript<sup>1</sup></a><a href="/tags/Vue/" style="font-size: 1.05rem;">Vue<sup>6</sup></a><a href="/tags/npm/" style="font-size: 1.05rem;">npm<sup>1</sup></a><a href="/tags/shell/" style="font-size: 1.05rem;">shell<sup>1</sup></a><a href="/tags/sql/" style="font-size: 1.05rem;">sql<sup>2</sup></a><a href="/tags/%E5%8C%BA%E5%9D%97%E9%93%BE/" style="font-size: 1.05rem;">区块链<sup>1</sup></a><a href="/tags/%E5%8E%9F%E7%A5%9E/" style="font-size: 1.05rem;">原神<sup>1</sup></a><a href="/tags/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/" style="font-size: 1.05rem;">开发工具<sup>2</sup></a><a href="/tags/%E6%95%99%E7%A8%8B/" style="font-size: 1.05rem;">教程<sup>1</sup></a><a href="/tags/%E6%B5%8B%E8%AF%95/" style="font-size: 1.05rem;">测试<sup>1</sup></a></div></div><hr/><div class="card-archives"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="anzhiyufont anzhiyu-icon-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/07/"><span class="card-archive-list-date">七月 2023</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/10/"><span class="card-archive-list-date">十月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/09/"><span class="card-archive-list-date">九月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">1</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">六月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">4</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/05/"><span class="card-archive-list-date">五月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">8</span><span>篇</span></div></a></li></ul></div><hr/><div class="card-webinfo"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="webinfo-item-title"><i class="anzhiyufont anzhiyu-icon-file-lines"></i><div class="item-name">文章总数 :</div></div><div class="item-count">26</div></div><div class="webinfo-item"><div class="webinfo-item-title"><i class="anzhiyufont anzhiyu-icon-stopwatch"></i><div class="item-name">建站天数 :</div></div><div class="item-count" id="runtimeshow" data-publishDate="2021-04-01T00:00:00.000Z"><i class="anzhiyufont anzhiyu-icon-spinner anzhiyu-spin"></i></div></div></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div id="footer_deal"><a class="deal_link" href="mailto:[email protected]" title="email"><i class="anzhiyufont anzhiyufont anzhiyu-icon-envelope"></i></a><img class="footer_mini_logo" title="返回顶部" alt="返回顶部" onclick="anzhiyu.scrollToDest(0, 500)" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="https://cdn.jsdelivr.net/gh/Silence-dream/bed@master/img/202303061352769.png" size="50px"/><a class="deal_link" target="_blank" rel="noopener" href="https://github.com/Silence-dream" title="Github"><i class="anzhiyufont anzhiyu-icon-github"></i></a></div></div><div id="footer-bar"><div class="footer-bar-links"><div class="footer-bar-left"><div id="footer-bar-tips"><div class="copyright">©2019 - 2025 By <a class="footer-bar-link" href="/" title="WaterBoat" target="_blank">WaterBoat</a></div></div><div id="footer-type-tips"></div></div><div class="footer-bar-right"><a class="footer-bar-link" target="_blank" rel="noopener" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu" title="主题">主题</a></div></div></div></footer></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="sidebar-site-data site-data is-center"><a href="/archives/" title="archive"><div class="headline">文章</div><div class="length-num">26</div></a><a href="/tags/" title="tag"><div class="headline">标签</div><div class="length-num">15</div></a><a href="/categories/" title="category"><div class="headline">分类</div><div class="length-num">7</div></a></div><span class="sidebar-menu-item-title">功能</span><div class="sidebar-menu-item"><a class="darkmode_switchbutton menu-child" href="javascript:void(0);" title="显示模式"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i><span>显示模式</span></a></div><div class="back-menu-list-groups"><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener" href="https://blog.yichengloong.cn/" title="博客"><img class="back-menu-item-icon" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="/img/favicon.ico" alt="博客"/><span class="back-menu-item-text">博客</span></a></div></div><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener" href="https://blog.yichengloong.cn/" title="博客"><img class="back-menu-item-icon" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror="this.onerror=null,this.src="/img/404.jpg"" data-lazy-src="/img/favicon.ico" alt="博客"/><span class="back-menu-item-text">博客</span></a></div></div></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 文章</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><i class="anzhiyufont anzhiyu-icon-box-archive faa-tada" style="font-size: 0.9em;"></i><span> 隧道</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><i class="anzhiyufont anzhiyu-icon-shapes faa-tada" style="font-size: 0.9em;"></i><span> 分类</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags faa-tada" style="font-size: 0.9em;"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 友链</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><i class="anzhiyufont anzhiyu-icon-link faa-tada" style="font-size: 0.9em;"></i><span> 友人帐</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 我的</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/music/"><i class="anzhiyufont anzhiyu-icon-music faa-tada" style="font-size: 0.9em;"></i><span> 音乐馆</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/album/"><i class="anzhiyufont anzhiyu-icon-images faa-tada" style="font-size: 0.9em;"></i><span> 相册集</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> 关于</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/about/"><i class="anzhiyufont anzhiyu-icon-paper-plane faa-tada" style="font-size: 0.9em;"></i><span> 关于本人</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/essay/"><i class="anzhiyufont anzhiyu-icon-lightbulb faa-tada" style="font-size: 0.9em;"></i><span> 闲言碎语</span></a></li><li><a class="site-page child faa-parent animated-hover" href="javascript:toRandomPost()"><i class="anzhiyufont anzhiyu-icon-shoe-prints1 faa-tada" style="font-size: 0.9em;"></i><span> 随便逛逛</span></a></li></ul></div></div><span class="sidebar-menu-item-title">标签</span><div class="card-tags"><div class="item-headline"></div><div class="card-tag-cloud"><a href="/tags/Cypress/" style="font-size: 0.88rem;">Cypress<sup>1</sup></a><a href="/tags/JavaScript/" style="font-size: 0.88rem;">JavaScript<sup>6</sup></a><a href="/tags/Nuxt/" style="font-size: 0.88rem;">Nuxt<sup>1</sup></a><a href="/tags/React/" style="font-size: 0.88rem;">React<sup>5</sup></a><a href="/tags/Solidity/" style="font-size: 0.88rem;">Solidity<sup>1</sup></a><a href="/tags/TypeScript/" style="font-size: 0.88rem;">TypeScript<sup>1</sup></a><a href="/tags/Vue/" style="font-size: 0.88rem;">Vue<sup>6</sup></a><a href="/tags/npm/" style="font-size: 0.88rem;">npm<sup>1</sup></a><a href="/tags/shell/" style="font-size: 0.88rem;">shell<sup>1</sup></a><a href="/tags/sql/" style="font-size: 0.88rem;">sql<sup>2</sup></a><a href="/tags/%E5%8C%BA%E5%9D%97%E9%93%BE/" style="font-size: 0.88rem;">区块链<sup>1</sup></a><a href="/tags/%E5%8E%9F%E7%A5%9E/" style="font-size: 0.88rem;">原神<sup>1</sup></a><a href="/tags/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/" style="font-size: 0.88rem;">开发工具<sup>2</sup></a><a href="/tags/%E6%95%99%E7%A8%8B/" style="font-size: 0.88rem;">教程<sup>1</sup></a><a href="/tags/%E6%B5%8B%E8%AF%95/" style="font-size: 0.88rem;">测试<sup>1</sup></a></div></div><hr/></div></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="anzhiyufont anzhiyu-icon-arrows-left-right"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="anzhiyufont anzhiyu-icon-gear"></i></button><button id="go-up" type="button" title="回到顶部"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></button></div></div><div id="nav-music"><a id="nav-music-hoverTips" onclick="anzhiyu.musicToggle()" accesskey="m">播放音乐</a><div id="console-music-bg"></div><meting-js id="8152976493" server="netease" type="playlist" mutex="true" preload="none" theme="var(--anzhiyu-main)" data-lrctype="0" order="random" volume="0.7"></meting-js></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="anzhiyufont anzhiyu-icon-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="anzhiyufont anzhiyu-icon-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="anzhiyufont anzhiyu-icon-arrow-rotate-right" style="font-size: 1rem;"></i></div><div class="rightMenu-item" id="menu-top"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></div></div><div class="rightMenu-group rightMenu-line rightMenuPlugin"><div class="rightMenu-item" id="menu-copytext"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制选中文本</span></div><div class="rightMenu-item" id="menu-pastetext"><i class="anzhiyufont anzhiyu-icon-paste"></i><span>粘贴文本</span></div><a class="rightMenu-item" id="menu-commenttext"><i class="anzhiyufont anzhiyu-icon-comment-medical"></i><span>引用到评论</span></a><div class="rightMenu-item" id="menu-newwindow"><i class="anzhiyufont anzhiyu-icon-window-restore"></i><span>新窗口打开</span></div><div class="rightMenu-item" id="menu-copylink"><i class="anzhiyufont anzhiyu-icon-link"></i><span>复制链接地址</span></div><div class="rightMenu-item" id="menu-copyimg"><i class="anzhiyufont anzhiyu-icon-images"></i><span>复制此图片</span></div><div class="rightMenu-item" id="menu-downloadimg"><i class="anzhiyufont anzhiyu-icon-download"></i><span>下载此图片</span></div><div class="rightMenu-item" id="menu-newwindowimg"><i class="anzhiyufont anzhiyu-icon-window-restore"></i><span>新窗口打开图片</span></div><div class="rightMenu-item" id="menu-search"><i class="anzhiyufont anzhiyu-icon-magnifying-glass"></i><span>站内搜索</span></div><div class="rightMenu-item" id="menu-searchBaidu"><i class="anzhiyufont anzhiyu-icon-magnifying-glass"></i><span>百度搜索</span></div><div class="rightMenu-item" id="menu-music-toggle"><i class="anzhiyufont anzhiyu-icon-play"></i><span>播放音乐</span></div><div class="rightMenu-item" id="menu-music-back"><i class="anzhiyufont anzhiyu-icon-backward"></i><span>切换到上一首</span></div><div class="rightMenu-item" id="menu-music-forward"><i class="anzhiyufont anzhiyu-icon-forward"></i><span>切换到下一首</span></div><div class="rightMenu-item" id="menu-music-playlist" onclick="window.open("https://y.qq.com/n/ryqq/playlist/8802438608", "_blank");" style="display: none;"><i class="anzhiyufont anzhiyu-icon-radio"></i><span>查看所有歌曲</span></div><div class="rightMenu-item" id="menu-music-copyMusicName"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制歌名</span></div></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" id="menu-randomPost"><i class="anzhiyufont anzhiyu-icon-shuffle"></i><span>随便逛逛</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="anzhiyufont anzhiyu-icon-cube"></i><span>博客分类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags"></i><span>文章标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item" id="menu-copy" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制地址</span></a><a class="rightMenu-item" id="menu-commentBarrage" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-message"></i><span class="menu-commentBarrage-text">关闭热评</span></a><a class="rightMenu-item" id="menu-darkmode" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i><span class="menu-darkmode-text">深色模式</span></a><a class="rightMenu-item" id="menu-translate" href="javascript:void(0);"><i class="anzhiyufont anzhiyu-icon-language"></i><span>轉為繁體</span></a></div></div><div id="rightmenu-mask"></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.cbd.int/@fancyapps/[email protected]/dist/fancybox/fancybox.umd.js"></script><script src="https://cdn.cbd.int/[email protected]/instantpage.js" type="module"></script><script src="https://cdn.cbd.int/[email protected]/dist/lazyload.iife.min.js"></script><script src="https://cdn.cbd.int/[email protected]/dist/snackbar.min.js"></script><canvas id="universe"></canvas><script async src="https://npm.elemecdn.com/[email protected]/dark/dark.js"></script><script>// 消除控制台打印
var HoldLog = console.log;
console.log = function () {};
let now1 = new Date();
queueMicrotask(() => {
const Log = function () {
HoldLog.apply(console, arguments);
}; //在恢复前输出日志
const grt = new Date("04/01/2019 00:00:00"); //此处修改你的建站时间或者网站上线时间
now1.setTime(now1.getTime() + 250);
const days = (now1 - grt) / 1000 / 60 / 60 / 24;
const dnum = Math.floor(days);
const ascll = [
`欢迎使用安知鱼!`,
`生活明朗, 万物可爱`,
`
█████╗ ███╗ ██╗███████╗██╗ ██╗██╗██╗ ██╗██╗ ██╗
██╔══██╗████╗ ██║╚══███╔╝██║ ██║██║╚██╗ ██╔╝██║ ██║
███████║██╔██╗ ██║ ███╔╝ ███████║██║ ╚████╔╝ ██║ ██║
██╔══██║██║╚██╗██║ ███╔╝ ██╔══██║██║ ╚██╔╝ ██║ ██║
██║ ██║██║ ╚████║███████╗██║ ██║██║ ██║ ╚██████╔╝
╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
`,
"已上线",
dnum,
"天",
"©2019 By 安知鱼 V1.6.12",
];
const ascll2 = [`NCC2-036`, `调用前置摄像头拍照成功,识别为【小笨蛋】.`, `Photo captured: `, `🤪`];
setTimeout(
Log.bind(
console,
`\n%c${ascll[0]} %c ${ascll[1]} %c ${ascll[2]} %c${ascll[3]}%c ${ascll[4]}%c ${ascll[5]}\n\n%c ${ascll[6]}\n`,
"color:#425AEF",
"",
"color:#425AEF",
"color:#425AEF",
"",
"color:#425AEF",
""
)
);
setTimeout(
Log.bind(
console,
`%c ${ascll2[0]} %c ${ascll2[1]} %c \n${ascll2[2]} %c\n${ascll2[3]}\n`,
"color:white; background-color:#4fd953",
"",
"",
'background:url("https://npm.elemecdn.com/[email protected]/img/post/common/tinggge.gif") no-repeat;font-size:450%'
)
);
setTimeout(Log.bind(console, "%c WELCOME %c 你好,小笨蛋.", "color:white; background-color:#4f90d9", ""));
setTimeout(
console.warn.bind(
console,
"%c ⚡ Powered by 安知鱼 %c 你正在访问 WaterBoat 的博客.",
"color:white; background-color:#f0ad4e",
""
)
);
setTimeout(Log.bind(console, "%c W23-12 %c 你已打开控制台.", "color:white; background-color:#4f90d9", ""));
setTimeout(
console.warn.bind(console, "%c S013-782 %c 你现在正处于监控中.", "color:white; background-color:#d9534f", "")
);
});</script><script async src="/anzhiyu/random.js"></script><div class="js-pjax"><script>if (typeof gsap === "object") {
getScript("/js/anzhiyu/people.js", {defer:true})
} else {
getScript("https://cdn.cbd.int/[email protected]/gsap/gsap.min.js").then(()=>{
getScript("/js/anzhiyu/people.js", {defer:true})
});
}</script><input type="hidden" name="page-type" id="page-type" value="anzhiyu"></div><script>var visitorMail = "";
</script><script async data-pjax src="https://cdn.cbd.int/[email protected]/waterfall/waterfall.js"></script><script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script><link rel="stylesheet" href="https://cdn.cbd.int/[email protected]/icon/ali_iconfont_css.css"><link rel="stylesheet" href="https://cdn.cbd.int/[email protected]/aplayer/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.cbd.int/[email protected]/js/APlayer.min.js"></script><script src="https://cdn.cbd.int/[email protected]/assets/js/Meting2.min.js"></script><script src="https://cdn.cbd.int/[email protected]/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]
var pjax = new Pjax({
elements: 'a:not([target="_blank"])',
selectors: pjaxSelectors,
cacheBust: false,
analytics: false,
scrollRestoration: false
})
document.addEventListener('pjax:send', function () {
// removeEventListener scroll
anzhiyu.removeGlobalFnEvent('pjax')
anzhiyu.removeGlobalFnEvent('themeChange')
document.getElementById('rightside').classList.remove('rightside-show')
if (window.aplayers) {
for (let i = 0; i < window.aplayers.length; i++) {
if (!window.aplayers[i].options.fixed) {
window.aplayers[i].destroy()
}
}
}
typeof typed === 'object' && typed.destroy()
//reset readmode
const $bodyClassList = document.body.classList
$bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')
})
document.addEventListener('pjax:complete', function () {
window.refreshFn()
document.querySelectorAll('script[data-pjax]').forEach(item => {
const newScript = document.createElement('script')
const content = item.text || item.textContent || item.innerHTML || ""
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
newScript.appendChild(document.createTextNode(content))
item.parentNode.replaceChild(newScript, item)
})
GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()
typeof panguInit === 'function' && panguInit()
// google analytics
typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});
// baidu analytics
typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
// prismjs
typeof Prism === 'object' && Prism.highlightAll()
})
document.addEventListener('pjax:error', e => {
if (e.request.status === 404) {
pjax.loadUrl('/404.html')
}
})</script><script charset="UTF-8" src="https://cdn.cbd.int/[email protected]/accesskey/accesskey.js"></script><div id="greetingBox"></div></div><div id="popup-window"><div class="popup-window-title">通知</div><div class="popup-window-divider"></div><div class="popup-window-content"><div class="popup-tip">你好呀</div><div class="popup-link"><i class="anzhiyufont anzhiyu-icon-arrow-circle-right"></i></div></div></div></body></html>