-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
645 lines (416 loc) · 18.4 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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta charset="utf-8">
<title>linxun | linxunzyf</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="theme-color" content="#77AAFF">
<meta name="keywords" content="">
<!-- Baidu Push -->
<script>
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
var _hmt = _hmt || [];
</script>
<meta name="description" content="林寻的博客">
<meta property="og:type" content="website">
<meta property="og:title" content="linxun">
<meta property="og:url" content="https://jx-zyf.github.io/index.html">
<meta property="og:site_name" content="linxun">
<meta property="og:description" content="林寻的博客">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linxun">
<meta name="twitter:description" content="林寻的博客">
<link rel="alternate" type="application/atom+xml" title="linxun" href="/atom.xml">
<link rel="shortcut icon" href="/img/logo.png">
<link id="style" rel="stylesheet" href="/css/style.css?v=2.0">
<script>window.lazyScripts=[]</script>
<!-- custom head -->
</head>
<body>
<div id="loading" class="active"></div>
<aside id="menu" >
<div class="inner flex-row-vertical">
<a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
<i class="icon icon-lg icon-close"></i>
</a>
<div class="brand-wrap" >
<div class="brand">
<a href="/" class="avatar waves-effect waves-circle waves-light">
<img src="/img/avatar.jpg" alt="avatar">
</a>
<hgroup class="introduce">
<h5 class="nickname" id="name">linxunzyf</h5>
<div id="yiyanmotto" class="motto"> </div>
</hgroup>
</div>
</div>
<div class="scroll-wrap flex-col">
<ul class="nav">
<li class="waves-block waves-effect active">
<a href="/" >
<i class="icon icon-lg icon-home"></i>
<span>主 页</span><i class="icon icon-lg icon-caret-left"></i>
</a>
</li>
<li class="waves-block waves-effect">
<a href="/archives" >
<i class="icon icon-lg icon-archives"></i>
<span>随 笔</span><i class="icon icon-lg icon-caret-left"></i>
</a>
</li>
<li class="waves-block waves-effect">
<a href="/tags" >
<i class="icon icon-lg icon-tags"></i>
<span>标 签</span><i class="icon icon-lg icon-caret-left"></i>
</a>
</li>
<li class="waves-block waves-effect">
<a href="/about" >
<i class="icon icon-lg icon-smile-o"></i>
<span>关 于</span><i class="icon icon-lg icon-caret-left"></i>
</a>
</li>
<div class="nav2">
<a class="nav2item" data-title="Github" href="https://github.com/jx-zyf" target="_blank"title="Github" >
<i class="icon icon-lg icon-github github"></i>
</a>
<a class="nav2item" data-title="微博" href="https://weibo.com/linxun001" target="_blank"title="微博" >
<i class="icon icon-lg icon-weibo weibo"></i>
</a>
<a class="nav2item" data-title="微信" href="javascript:;" title="微信" >
<i class="icon icon-lg icon-wechat wechat"></i>
</a>
<a class="nav2item" data-title="Email" href="/linxunzyf@gmail.com" target="_parent"title="Email" >
<i class="icon icon-lg icon-envelope-o envelope-o"></i>
</a>
</div>
</ul>
</div>
</div>
</aside>
<main id="main">
<header class="top-header" id="header">
<div class="flex-row">
<a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
<i class="icon icon-lg icon-navicon"></i>
</a>
<div class="flex-col header-title ellipsis">linxun</div>
<div class="search-wrap" id="search-wrap">
<a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
<i class="icon icon-lg icon-chevron-left"></i>
</a>
<input type="text" id="key" class="search-input" autocomplete="off" placeholder="Search">
<a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
<i class="icon icon-lg icon-search"></i>
</a>
</div>
<a href="../../atom.xml" target="_blank" class="header-icon waves-effect waves-circle waves-light" id="Rss">
<i class="icon icon-lg icon-rss"></i>
</a>
</div>
</header>
<header class="content-header index-header">
<div class="container fade-scale">
<div id="myheader">
<h1 class="title">
linxun
</h1>
<h5 class="subtitle">
在前端的坑里继续爬行
</h5>
</div>
</div>
</header>
<div class="container body-wrap">
<ul class="post-list">
<li class="post-list-item fade">
<article id="post-react父组件使用子组件中的方法"
class="article-card article-type-post" itemprop="blogPost">
<h3 class="post-title" itemprop="name">
<a href="/posts/e527abd2/">React父组件中使用子组件的方法</a>
</h3>
<div class="post-meta">
<time class="post-time" title="2019-02-16 10:05:44" datetime="2019-02-16T02:05:44.554Z" itemprop="datePublished">2019-02-16</time>
<!--
<i class="icon icon-lg icon-folder-o"></i>
分类:<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/coder/">coder</a></li></ul>
-->
</span>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
父组件中使用子组件的方法12345678910111213141516171819202122232425262728293031323334import React, { Component, Fragment } from 'react';class Child extends Component { ...
<div>
<a href="/posts/e527abd2/" class="post-more waves-button">
阅读全文 »»»
</a>
</div>
</div>
<div class="post-footer">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/react/">react</a></li></ul>
</div>
</article>
</li>
<li class="post-list-item fade">
<article id="post-js小技巧(2)"
class="article-card article-type-post" itemprop="blogPost">
<h3 class="post-title" itemprop="name">
<a href="/posts/cfcdf77d/">js小技巧(二)</a>
</h3>
<div class="post-meta">
<time class="post-time" title="2019-02-16 09:57:07" datetime="2019-02-16T01:57:07.126Z" itemprop="datePublished">2019-02-16</time>
<!--
<i class="icon icon-lg icon-folder-o"></i>
分类:<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/coder/">coder</a></li></ul>
-->
</span>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
获取当前浏览器信息12window.navigator// 里面包含当前设备操作系统信息 platform oscpu
JS判断是否为闰年123if (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)) { // 是闰年}
JS求当天是本...
<div>
<a href="/posts/cfcdf77d/" class="post-more waves-button">
阅读全文 »»»
</a>
</div>
</div>
<div class="post-footer">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li></ul>
</div>
</article>
</li>
<li class="post-list-item fade">
<article id="post-微信小程序遇到的坑"
class="article-card article-type-post" itemprop="blogPost">
<h3 class="post-title" itemprop="name">
<a href="/posts/8cc9dda6/">小程序学习</a>
</h3>
<div class="post-meta">
<time class="post-time" title="2018-07-04 22:18:09" datetime="2018-07-04T14:18:09.185Z" itemprop="datePublished">2018-07-04</time>
<!--
<i class="icon icon-lg icon-folder-o"></i>
分类:<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/coder/">coder</a></li></ul>
-->
</span>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
START最近公司需要开发一个简单微信小程序,记录下遇到的一些问题(本人第一次开发小程序,UI库使用weui)
PROBLEM1.图片显示问题在微信小程序image图片标签中,如果在样式中只设置了宽度,没有设置高度或者高度设置为auto,将会导致图片不显示,需要指定图片的高度才能显示。不过image标签封装了mode属性,可以根据需要设置。
...
<div>
<a href="/posts/8cc9dda6/" class="post-more waves-button">
阅读全文 »»»
</a>
</div>
</div>
<div class="post-footer">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/小程序/">小程序</a></li></ul>
</div>
</article>
</li>
<li class="post-list-item fade">
<article id="post-node反向代理"
class="article-card article-type-post" itemprop="blogPost">
<h3 class="post-title" itemprop="name">
<a href="/posts/11645e24/">Node反向代理请求</a>
</h3>
<div class="post-meta">
<time class="post-time" title="2018-06-23 10:44:48" datetime="2018-06-23T02:44:48.523Z" itemprop="datePublished">2018-06-23</time>
<!--
<i class="icon icon-lg icon-folder-o"></i>
分类:<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/coder/">coder</a></li></ul>
-->
</span>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
前一阵子有个需求是上传文件,遇到跨域的问题,我的解决办法是使用node搭建本地静态服务器,把请求转发到后端服务器。
撸起袖子就是干,却发现一个问题,node这里拿不到上传过来的formData格式的文件,然后疯狂查资料,花了我一个上午的时间,还是不行。最后在老大的帮助下解决了,其实很简单,我不需要拿到上传的文件,只需要把请求原封不动的全部转发...
<div>
<a href="/posts/11645e24/" class="post-more waves-button">
阅读全文 »»»
</a>
</div>
</div>
<div class="post-footer">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Node/">Node</a></li></ul>
</div>
</article>
</li>
<li class="post-list-item fade">
<article id="post-js小技巧(1)"
class="article-card article-type-post" itemprop="blogPost">
<h3 class="post-title" itemprop="name">
<a href="/posts/60fc6c1f/">js小技巧(一)</a>
</h3>
<div class="post-meta">
<time class="post-time" title="2018-06-23 10:41:30" datetime="2018-06-23T02:41:30.362Z" itemprop="datePublished">2018-06-23</time>
<!--
<i class="icon icon-lg icon-folder-o"></i>
分类:<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/coder/">coder</a></li></ul>
-->
</span>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
将浮点数(或字符串)转化为整数123456~~'1.2' // 1~~'1' // 1~~1.2 // 11.2|0 // 1'1.2'|0 // 1'1'|0 // 1
不声明第三个变量的值交换123let a = 2, b = 1;a = [b, b=a][0];consol...
<div>
<a href="/posts/60fc6c1f/" class="post-more waves-button">
阅读全文 »»»
</a>
</div>
</div>
<div class="post-footer">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li></ul>
</div>
</article>
</li>
</ul>
<nav id="page-nav">
<div class="inner">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">…</span><a class="page-number" href="/page/5/">5</a><a class="extend next" rel="next" href="/page/2/">下一页</a>
</div>
</nav>
</div>
<footer class="footer">
<div class="footer-content">
<span class="power">
<i class="icon icon-lg icon-copyright"></i>
2017-
2019
<i class="icon icon-lg icon-heart"></i>
<a href="https://jx-zyf.github.io">linxunzyf.cn</a>
<br/>
<!-- Power by
<a href="https://hexo.io/" target="_blank" rel="external nofollow">Hexo</a> ·
Theme
<a href="https://github.com/tomotoes/hexo-theme-tomotoes/" target="_blank" rel="external nofollow">tomotoes</a> -->
</span>
<br/>
<!-- <span id="RunTime" style="color:#a7a7a2;"></span>
<br/>
<span>
<i class="icon icon-lg icon-user">
<span id="busuanzi_container_site_uv" style='display:none'>
访问用户:<span id="busuanzi_value_site_uv"></span>
</span>人</i>
·
<i class="icon icon-lg icon-eye">
<span id="busuanzi_container_site_pv" style='display:none'>
访问次数:<span id="busuanzi_value_site_pv"></span>
</span>次
</i>
</span>
<br/> -->
<!-- <span class="license">This blog is licensed under a <a rel="license" rel="external nofollow" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</span> -->
</div>
</footer>
</main>
-
<div id="wechat" class="page-modal reward-lay">
<a class="close" href="javascript:;">
<i class="icon icon-close"></i>
</a>
<h4 class="reward-title">
<i class="icon icon-quote-left"></i>
<span>欢迎关注林寻丶</span>
<i class="icon icon-quote-right"></i>
</h4>
<img id="wechat_img" data-img="/img/linxun.jpg" alt="欢迎您的关注!">
</div>
<div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>
<!-- waves按钮特效 -->
<script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<!-- 主题配置脚本 -->
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };
</script>
<!-- jquery -->
<script src="/js/jquery.min.js?v=2.0"></script>
<!-- 搜索 -->
<div class="search-panel" id="search-panel">
<ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item waves-block waves-effect" onclick="location.href='{path}'">
<div class="title ellipsis" title="{title}">{title}</div>
</li>
</template>
<!-- main博客脚本 -->
<script src="/js/main.min.js?v=2.0" ></script>
<!-- 动画&配置 -->
<script src="/js/script.min.js?v=2.0" ></script>
<!-- 脚本管理 -->
<script>
if(window.innerWidth > 800){
/* 3D标题 */
$(".content-header").on("mousemove", threedee);
/* 底部追随鼠标 */
$(".footer").hover(2);
/* gotop键的涟漪 */
$("#gotop").hover(1);
/* 赞赏的粒子雨 */
$("#reward").hover(3);
/* 微信公众号的底部渲染 */
$("#wechat").hover(4);
/* 标题跳动 */
$(".archivestitle").bumpyText();
/* 图片点击放大 */
const postimg = jQuery(".post-content img:not(.github-emoji)");
postimg.on("click",function(){
mask.classList.add("in");
main.classList.add("Mask");
menu.classList.add("Mask");
var myimg = this.cloneNode(true);
myimg.classList.add("imgShow");
setTimeout(function(){
jQuery(myimg).animate({
opacity:"1"
},1000);
},0);
document.body.appendChild(myimg);
myimg.onclick=function(){
document.body.removeChild(myimg);
mask.classList.remove("in");
main.classList.remove("Mask");
menu.classList.remove("Mask");
};
});
}
/* 名字跳动 */
$("#name").bumpyText();
/* 网站运行时间 */
// setInterval(function () {
// setTime("2017/10/11");
// }, 1000);
/* 文章块的淡出 */
postshow();
/* 座右铭 */
getHitokoto();
/* 粘贴提示 */
G($(".post-content"), location.href, "linxunzyf");
/* 控制台 */
if (window.console && window.console.log) {
setTimeout(function () {
// console.log("\n %c 一个坏掉的番茄 %c © Simon Ma http://tomotoes.com \n\n", "color:#FFFFFB;background:#1abc9c;padding:5px 0;border-radius:.5rem 0 0 .5rem;", "color:#FFFFFB;background:#080808;padding:5px 0;border-radius:0 .5rem .5rem 0;");
console.log('hello, I`m LinXun')
}, 0);
}
</script>
<!-- 公式渲染 -->
<!-- 不蒜子 -->
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js" async></script>
</body>
</html>