数据库允许空值(null),往往是悲剧的开始(1分钟系列)-阿里云开发者社区

开发者社区> 开发与运维> 正文

数据库允许空值(null),往往是悲剧的开始(1分钟系列)

简介: 数据库字段允许空值,会遇到一些问题,此处包含的一些知识点,和大家聊一聊。
    <!-- <span style="color: red">currentVersion </span>
            <div style="color:red;padding-left: 50px;">is IOS</div>
                    <span style="color: red">111</span>
    <span style="color: red">222170009FF</span> -->

var biz = "MjM5ODYxMDA5OQ=="||"";
var sn = "74e9e0dc9d03a872fd5bce5769f6c22a" || ""|| "";
var mid = "2651962495" || ""|| "";
var idx = "1" || "" || "";
window.__allowLoadResFromMp = true; 

    



    <link rel="dns-prefetch" href="//res.wx.qq.com">






String.prototype.html = function(encode) {
    var replace =["&#39;", "'", "&quot;", '"', "&nbsp;", " ", "&gt;", ">", "&lt;", "<", "&yen;", "¥", "&amp;", "&"];
    
    
    
    
    
    
    var replaceReverse = ["&", "&amp;", "¥", "&yen;", "<", "&lt;", ">", "&gt;", " ", "&nbsp;", '"', "&quot;", "'", "&#39;"];
    var target;
    if (encode) {
        target = replaceReverse;
    } else {
        target = replace;
    }
    for (var i=0,str=this;i< target.length;i+= 2) {
         str=str.replace(new RegExp(target[i],'g'),target[i+1]);
    }
    return str;
};

window.isInWeixinApp = function() {
    return /MicroMessenger/.test(navigator.userAgent);
};

window.getQueryFromURL = function(url) {
    url = url || 'http://qq.com/s?a=b#rd'; 
    var tmp = url.split('?'),
        query = (tmp[1] || "").split('#')[0].split('&'),
        params = {};
    for (var i=0; i<query.length; i++) {
        var arg = query[i].split('=');
        params[arg[0]] = arg[1];
    }
    if (params['pass_ticket']) {
        params['pass_ticket'] = encodeURIComponent(params['pass_ticket'].html(false).html(false).replace(/\s/g,"+"));
    }
    return params;
};

(function() {
    var params = getQueryFromURL(location.href);
    window.uin = params['uin'] || "" || '';
    window.key = params['key'] || "" || '';
    window.wxtoken = params['wxtoken'] || '';
    window.pass_ticket = params['pass_ticket'] || '';
    window.appmsg_token = "";
})();

function wx_loaderror() {
    if (location.pathname === '/bizmall/reward') {
        new Image().src = '/mp/jsreport?key=96&content=reward_res_load_err&r=' + Math.random();
    }
}

    window.__moon_report_uin = "0";
        window.no_moon_ls = 0;
</script>

    

var write_sceen_time = (+new Date());


<div id="js_top_ad_area" class="top_banner"></div>

<div class="rich_media_inner">

    
    
    <div id="page-content" class="rich_media_area_primary">

      <div class="rich_media_area_primary_inner">

        
                    
                    

        <div id="img-content" class="rich_media_wrp">
            
            <h2 class="rich_media_title" id="activity-name">
                
                
                

数据库允许空值(null),往往是悲剧的开始(1分钟系列)

            </h2>
            <div id="meta_content" class="rich_media_meta_list">
                                                            <span id="copyright_logo" class="rich_media_meta icon_appmsg_tag appmsg_title_tag">原创</span>
                                                                                        <span class="rich_media_meta rich_media_meta_text">
                                                                                                        <span id="js_author_name" class="" datarewardsn="" datatimestamp="" datacanreward="0">58沈剑</span>
                                                                                            </span>
                                                            
                                                                                                        <span class="rich_media_meta rich_media_meta_nickname" id="profileBt">
                  <a href="javascript:void(0);" id="js_name">
                    架构师之路                      </a>
                  <div id="js_profile_qrcode" class="profile_container" style="display:none;">
                      <div class="profile_inner">
                          <strong class="profile_nickname">架构师之路</strong>
                          <img class="profile_avatar" id="js_profile_qrcode_img" src="" alt="">

                          <p class="profile_meta">
                          <label class="profile_meta_label">微信号</label>
                          <span class="profile_meta_value">road5858</span>
                          </p>

                          <p class="profile_meta">
                          <label class="profile_meta_label">功能介绍</label>
                          <span class="profile_meta_value">架构师之路,坚持撰写接地气的架构文章</span>
                          </p>
                          
                      </div>
                      <span class="profile_arrow_wrp" id="js_profile_arrow_wrp">
                          <i class="profile_arrow arrow_out"></i>
                          <i class="profile_arrow arrow_in"></i>
                      </span>
                  </div>
                </span>
                <em id="publish_time" class="rich_media_meta rich_media_meta_text">2019-07-03</em>
            </div>
            

            

            

            
                            
            
            
            
            
                                            
                                                            
                            
                            
            
            <div class="rich_media_content " id="js_content" style="visibility: visible;">
                

                

                
                
                <p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">数据库字段允许空值,会遇到一些问题,此处包含的一些知识点,和大家聊一聊。</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">数据准备</span><span style="font-size: 15px;letter-spacing: 1px;">:</span></strong><span style="font-size: 15px;letter-spacing: 1px;"></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">create table user (</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">id int,</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">name varchar(20),</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">index(id)</span></em></span><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;"></span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">)engine=innodb;</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">&nbsp;</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">insert into user values(1,'shenjian');</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">insert into user values(2,'zhangsan');</span></em></span></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">insert into user values(3,'lisi');</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">说明</span><span style="font-size: 15px;letter-spacing: 1px;">:</span></strong></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;"></span><span style="font-size: 15px;letter-spacing: 1px;">id为索引,非唯一</span><span style="letter-spacing: 1px;font-size: 12px;">(non unique)</span><span style="font-size: 15px;letter-spacing: 1px;">,允许空</span><span style="letter-spacing: 1px;font-size: 12px;">(null)</span><span style="font-size: 15px;letter-spacing: 1px;">。</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">知识点1(热身):</span></strong><strong><span style="font-size: 15px;letter-spacing: 1px;">负向查询不能命中索引,会导致全表扫描。</span></strong></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.27589743589743587" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FSTkJ6ic5JrAtMl5F6z8bdyhkCW66KOEVsbUIzy34rmPrpLab7SNcCiag/640?wx_fmt=png" data-type="png" data-w="975" style="width: 677px !important; height: auto !important; visibility: visible !important;" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FSTkJ6ic5JrAtMl5F6z8bdyhkCW66KOEVsbUIzy34rmPrpLab7SNcCiag/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">explain select * from user where id!=1;</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">索引字段id上的不等于查询,如上图所示:</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)type=ALL,全表扫描;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)rows=3,全表只有3行;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">知识点2(划重点):</span></strong><strong><span style="font-size: 15px;letter-spacing: 1px;">允许空值,不等于</span></strong><span style="font-size: 12px;"><strong><span style="letter-spacing: 1px;">(!=)</span></strong></span><strong><span style="font-size: 15px;letter-spacing: 1px;">查询,可能导致不符合预期的结果。</span></strong></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.44715447154471544" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F5MnZ8er4kLuQNQqSsEz0gyKTRYh3op0zXDuBrxicvrrZBr07M19ysCA/640?wx_fmt=png" data-type="png" data-w="492" style="width: 492px !important; height: auto !important; visibility: visible !important;" _width="492px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F5MnZ8er4kLuQNQqSsEz0gyKTRYh3op0zXDuBrxicvrrZBr07M19ysCA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">insert into user(name) values('wangwu');</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">先构造一条id为NULL的数据,可以看到</span><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">共有4条记录</span><span style="font-size: 15px;letter-spacing: 1px;">。</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">select * from user where </span></em><span style="color: rgb(255, 76, 0);"><em><span style="letter-spacing: 1px;font-size: 12px;">id!=1</span></em></span><em><span style="letter-spacing: 1px;font-size: 12px;">;</span></em></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">再次执行不等于查询。</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">你猜结果集有几条记录(共4条,不等于排除1条)?</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">答</span><span style="font-size: 15px;letter-spacing: 1px;">错了!</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">结果集只有2条记录</span><span style="font-size: 15px;letter-spacing: 1px;">,空值记录记录并未出现在结果集里。</span></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.5648854961832062" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F5ncufBpZytNicTl3Xia3htiastbjxtq0Pu4zACcRf9yATZNlKqSYo2ZNQ/640?wx_fmt=png" data-type="png" data-w="524" style="width: 524px !important; height: auto !important; visibility: visible !important;" _width="524px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F5ncufBpZytNicTl3Xia3htiastbjxtq0Pu4zACcRf9yATZNlKqSYo2ZNQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">select * from user where id!=1 or id is null;</span></em></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">如果想到得到符合预期的结果集,必须加上一个or条件。</span></p><p style="line-height: 1.75em;"><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em></span><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 15px;letter-spacing: 1px;">恶心不恶心,这个大坑你踩过没有?</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">知识点3(附加):</span></strong><strong><span style="font-size: 15px;letter-spacing: 1px;">某些or条件,又可能导致全表扫描,此时应该优化为union。</span></strong></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.2698924731182796" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FW7DATAFr9u0fTwye60SwNZ3v9FDw0iaJLM473w2mFDZ4kSZU4sHeMeA/640?wx_fmt=png" data-type="png" data-w="930" style="width: 677px !important; height: auto !important; visibility: visible !important;" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FW7DATAFr9u0fTwye60SwNZ3v9FDw0iaJLM473w2mFDZ4kSZU4sHeMeA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">explain select * from user where id=1;</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">索引字段</span><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">id上的等值查询</span><span style="font-size: 15px;letter-spacing: 1px;">,<strong>能</strong>命中索引,如上图所示:</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)type=ref,走非唯一索引;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)rows=1,预估扫描1行;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.23027522935779818" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FF1eY51npQ7f3YI1MIgadXuESicIlAtHWhib9UuHJRLicHndHrpbTN9Edg/640?wx_fmt=png" data-type="png" data-w="1090" style="width: 677px !important; height: auto !important; visibility: visible !important;" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FF1eY51npQ7f3YI1MIgadXuESicIlAtHWhib9UuHJRLicHndHrpbTN9Edg/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">explain select * from user where id is null;</span></em></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">索引字段</span><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">id上的null查询</span><span style="font-size: 15px;letter-spacing: 1px;">,也<strong>能</strong>命中索引,如上图所示:</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)type=ref,走非唯一索引;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)rows=1,预估扫描1行;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.27401415571284127" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FmfHoicE2oC05zHLibtSUD61QkHYB25VeK9CRyKZBdn1sZ4jeorH5UaqA/640?wx_fmt=png" data-type="png" data-w="989" style="width: 677px !important; height: auto !important; visibility: visible !important;" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FmfHoicE2oC05zHLibtSUD61QkHYB25VeK9CRyKZBdn1sZ4jeorH5UaqA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">explain select * from user where id=1 or id is null;</span></em></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">如果放到一个SQL语句里</span><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">用or查询</span><span style="font-size: 15px;letter-spacing: 1px;">,则会<strong>全表扫描</strong>,如上图所示:</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)type=ALL,全表扫描;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)rows=4,全表只有4行;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><img class="rich_pages " data-ratio="0.25366695427092323" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F7bKCPtmQv3THXl51CN7TcbXDFMmDvARfYAZRYatJ6iciagE7mx3EfXJw/640?wx_fmt=png" data-type="png" data-w="1159" style="width: 677px !important; height: auto !important; visibility: visible !important;" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOw70icmDQkm3CkvFHfuNGq5F7bKCPtmQv3THXl51CN7TcbXDFMmDvARfYAZRYatJ6iciagE7mx3EfXJw/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">explain select * from user where id=1&nbsp;</span></em></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">union</span></em></p><p style="line-height: normal;"><em><span style="letter-spacing: 1px;font-size: 12px;">select * from user where id is null;</span></em></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">此时应该</span><span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">优化为union查询</span><span style="font-size: 15px;letter-spacing: 1px;">,又能够<strong>命中索引</strong>了,如上图所示:</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)type=ref,走非唯一索引;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)rows=1,预估扫描1行;</span></p><p style="line-height: 1.75em;"><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em></span><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 15px;letter-spacing: 1px;">第三行临时表的ALL,是两次结果集的合并。</span></em></span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><strong><span style="font-size: 15px;letter-spacing: 1px;">总结</span></strong></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(1)<strong>负向比较</strong>(例如:</span><span style="font-size: 15px;letter-spacing: 1px;">!=)会引发<strong>全表扫描</strong>;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(2)如果允许空值,</span><strong><span style="font-size: 15px;letter-spacing: 1px;">不等于(!=)的查询,不会将空值行</span><span style="letter-spacing: 1px;font-size: 12px;">(row)</span><span style="font-size: 15px;letter-spacing: 1px;">包含进来</span></strong><span style="font-size: 15px;letter-spacing: 1px;">,此时的结果集往往是不符合预期的,此时往往要加上一个or条件,把空值</span><span style="letter-spacing: 1px;font-size: 12px;">(is null)</span><span style="font-size: 15px;letter-spacing: 1px;">结果包含进来;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(3)or可能会导致全表扫描,此时可以优化为union查询;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(4)建表时加上</span><strong><span style="font-size: 15px;letter-spacing: 1px;">默认</span><span style="letter-spacing: 1px;font-size: 12px;">(default)</span><span style="font-size: 15px;letter-spacing: 1px;">值</span></strong><span style="font-size: 15px;letter-spacing: 1px;">,这样能避免空值的坑;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">(5)<strong>explain</strong>工具是一个好东西;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">&nbsp;</span></p><p style="line-height: 1.75em;"><span style="font-size: 15px;letter-spacing: 1px;">希望大家有收获!</span></p><p style="max-width: 100%;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-variant-numeric: normal;font-variant-east-asian: normal;white-space: normal;line-height: 1.75em;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(0, 82, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 1px;font-size: 15px;box-sizing: border-box !important;word-wrap: break-word !important;">画外音:本文测试于MySQL5.6。</span></em></span><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-align: center;line-height: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;"><strong style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;"><img width="auto" data-ratio="1" data-w="250" data-s="300,640" data-type="jpeg" class="" data-src="https://mmbiz.qpic.cn/mmbiz_jpg/Ir1gRyhAx7udO2WibD2tcDg4rqPvjo7jhbqZ6SFJZIxBo6N8ZZDptOCp8rYrRlXh8LiaAatFLtJdaWukz7qMvbDQ/640?wx_fmt=jpeg" style="max-width: 677px; box-sizing: border-box; overflow-wrap: break-word; visibility: visible !important; width: 130px !important; height: auto !important;" _width="130px" src="https://mmbiz.qpic.cn/mmbiz_jpg/Ir1gRyhAx7udO2WibD2tcDg4rqPvjo7jhbqZ6SFJZIxBo6N8ZZDptOCp8rYrRlXh8LiaAatFLtJdaWukz7qMvbDQ/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></strong></span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-align: center;line-height: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 12px;letter-spacing: 1px;"><strong style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;"><strong style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;">架构师之路</strong>-分享技术思路</strong></span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;">相关推荐:</span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962450&amp;idx=1&amp;sn=ce17c4da8d20ce275f75d0f2ef5e40c9&amp;chksm=bd2d098e8a5a809834aaa07da0d7546555385543fb6d687a7cf94d183ab061cd301a76547411&amp;scene=21#wechat_redirect" target="_blank" data-linktype="2" data-itemshowtype="0" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box;word-wrap: break-word;">缓冲池(buffer pool),这次彻底懂了!!!</a>》</span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962467&amp;idx=1&amp;sn=899ea157b0fc6f849ec80a4d055a309b&amp;chksm=bd2d09bf8a5a80a972a2e16a190ed7dffe03f89015ead707bdfcc5aeb8388fb278f397c125f1&amp;scene=21#wechat_redirect" target="_blank" data-linktype="2" data-itemshowtype="0" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;">写缓冲(change buffer),这次彻底懂了!!!</a>》</span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962477&amp;idx=1&amp;sn=3a7617781a095243953fed8f236abab3&amp;chksm=bd2d09b18a5a80a756784da67c636e518ca006c16a0ff4e7165de5fa01b82454403dc7c6d83b&amp;scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2" hasload="1">两类非常隐蔽的全表扫描 | 1分钟系列</a>》</span></p><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box;word-wrap: break-word;font-size: 15px;letter-spacing: 1px;"><span style="font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);">《</span><a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651961494&amp;idx=1&amp;sn=34f1874c1e36c2bc8ab9f74af6546ec5&amp;chksm=bd2d0d4a8a5a845c566006efce0831e610604a43279aab03e0a6dde9422b63944e908fcc6c05&amp;scene=21#wechat_redirect" target="_blank" data-linktype="2" data-itemshowtype="0" hasload="1" style="font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;letter-spacing: 1px;white-space: normal;background-color: rgb(255, 255, 255);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box;word-wrap: break-word;">MyISAM与InnoDB的索引差异 | 1分钟系列</a><span style="font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);">》</span></span></p>
            </div>

            
                                    

            <script nonce="" type="text/javascript">
                var first_sceen__time = (+new Date());

                if ("" == 1 && document.getElementById('js_content')) {
                    document.getElementById('js_content').addEventListener("selectstart",function(e){ e.preventDefault(); });
                }

                
                (function(){
                    if (navigator.userAgent.indexOf("WindowsWechat") != -1){
                        var link = document.createElement('link');
                        var head = document.getElementsByTagName('head')[0];
                        link.rel = 'stylesheet';
                        link.type = 'text/css';
                        link.href = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/winwx492bcc.css";
                        head.appendChild(link);
                    }
                })();
            </script>

            

            
            <div class="read-more__area" id="js_more_read_area" style="display:none;">
                
            </div>

             
                                        
                    <div class="reward_area tc reward_area_primary" id="js_reward_area" style="display:none;">
                        <div class="reward-avatar" style="display: none;" id="js_reward_avatar">
                            <img src="" alt="" id="js_reward_author_head">
                        </div>

                        
                                                        <div class="reward-author" style="display: none;" id="js_reward_author">58沈剑</div>
                                                                                <p class="reward_tips js_reward_wording">能吃鸡腿么</p>
                                                    <p class="reward_button_wrp">
                        <span id="js_author_reward_qrcode" class="reward_pop_panel">
                            <img id="js_author_reward_qrcode_img" src="" alt="赞赏二维码">
                            <strong>微信扫一扫赞赏作者</strong>
                        </span>
                            <a class="reward_button weui-btn" id="js_reward_link" href="##"><span id="js_reward_link_text">赞赏</span></a>
                        </p>
                        <div id="js_reward_inner" class="reward_area_inner" style="display: none; width: 540px;">
                            <p class="weui-loadmore weui-loadmore_line reward_user_tips" id="js_reward_total_parent">
                            <span class="weui-loadmore__tips">
                                <a href="javascript:;" id="js_reward_total"></a>&nbsp;<span id="js_reward_total_text">人赞赏</span>
                            </span>
                            </p>
                            
                            <div id="js_reward_list" class="reward_user_list"></div>
                            <div id="js_reward_pagination" class="simple_pagination" style="display: none;">
                            <button disabled="" class="btn_sp_prev js_reward_pagination_prev">上一页</button>
                            <span class="sp_page_num_area">
                                <a class="sp_page_current js_reward_pagination_curpage" href="javascript:;">1</a>/<span class="sp_page_num js_reward_pagination_totalpage">3</span>
                            </span>
                            <button class="btn_sp_next js_reward_pagination_next">下一页</button>
                            </div>
                        </div>
                    </div>
                                                <div class="reward_qrcode_area reward_area tc" id="js_reward_qrcode" style="display:none;">
                            <p class="tips_global">长按二维码向我转账</p>
                                                            <p class="reward_tips">能吃鸡腿么</p>
                            <span class="reward_qrcode_img_wrp"><img class="reward_qrcode_img" id="js_reward_qrcode_img"></span>
                            <p class="tips_global">受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。</p>
                        </div>
                                                                    </div>
                                
                    
                    
        <ul id="js_hotspot_area" class="article_extend_area"></ul>


<div class="weui-flex__item">
              
  
        <a class="media_tool_meta meta_primary" id="js_view_source" href="##">阅读原文</a>
              <div id="js_read_area3" class="media_tool_meta tips_global_primary meta_primary" style="display:none;">
    <span id="readTxt">阅读</span>
    <span id="readNum3"></span>
  </div>
      </div>

        <span style="display:none;" class="media_tool_meta meta_extra meta_praise" id="like_old">
      <i class="icon_praise_gray"></i><span class="praise_num" id="likeNum_old"></span>
  </span>

      

<span id="js_like_wording">在看</span><span class="like_num" id="likeNum3"></span>


      
    </div> 


<div class="weui-mask"></div>
<div class="weui-dialog">
  <div class="weui-dialog__hd"><strong class="weui-dialog__title">看一看入口已关闭</strong></div>
  <div class="weui-dialog__bd">
    在“设置”-“通用”-“发现页管理”打开“看一看”入口      </div>
  <div class="weui-dialog__ft" id="wow_close_ack">
    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">我知道了</a>
  </div>
</div>



<i class="weui-icon-success-no-circle weui-icon_toast"></i>
<p class="weui-toast__content" id="js_toast_msg">已发送</p>





<div class="weui-mask_transparent"></div>
<div class="weui-toast">
    <i class="weui-loading weui-icon_toast"></i>
    <p class="weui-toast__content">发送中</p>
</div>

                  </div>
    </div>

    <div class="rich_media_area_primary sougou" id="sg_tj" style="display:none"></div>
    
    <div class="rich_media_area_extra">
      <div class="rich_media_area_extra_inner">
          
          <div id="js_share_appmsg">
          </div>

          

          
          <div id="js_iframetest" style="display:none;"></div>
                        
          <div class="rich_media_extra rich_media_extra_discuss" id="js_cmt_container" style="display:none">
            

            
            <div class="discuss_mod" id="js_friend_cmt_area" style="display:none">
              
              
              
            </div>

                            <div class="discuss_mod" id="js_cmt_area" style="display:none">
            </div>
                          </div>

          <div class="function_mod function_mod_index" id="js_related_area" style="display:none;">
            <div class="function_hd">相关阅读</div>
            <div class="function_bd">
                <div id="js_related"></div>
                <a href="javascript:;" class="weui-media-box weui-media-box_loadmore hide" id="js_related_load_more">
                  <div class="weui-media-box__bd">更多文章</div>
                  <div class="weui-media-box__ft"></div>
                </a>
            </div>
          </div>
      </div>
    </div>

    
    <div id="js_pc_qr_code" class="qr_code_pc_outer" style="display: block;">
        <div class="qr_code_pc_inner">
            <div class="qr_code_pc">
                <img id="js_pc_qr_code_img" class="qr_code_pc_img" src="/mp/qrcode?scene=10000004&amp;size=102&amp;__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962495&amp;idx=1&amp;sn=74e9e0dc9d03a872fd5bce5769f6c22a&amp;send_time=">
                <p>微信扫一扫<br>关注该公众号</p>
            </div>
        </div>
    </div>
</div>


<div class="weui-mask"></div>
<div class="weui-dialog weui-dialog_link">
    <div class="weui-dialog__hd">
        <strong class="weui-dialog__title" id="js_minipro_dialog_head"></strong>
    </div>
    <div class="weui-dialog__bd" id="js_minipro_dialog_body"></div>
    
    <div class="weui-dialog__ft">
        <a id="js_minipro_dialog_cancel" href="javascript:void(0);" class="weui-dialog__btn weui-dialog__btn_default">取消</a>
        <a id="js_minipro_dialog_ok" href="javascript:void(0);" class="weui-dialog__btn weui-dialog__btn_primary">允许</a>
    </div>
</div>


<div class="weui-mask"></div>
<div class="weui-dialog weui-dialog_link">
    <div class="weui-dialog__hd">
        <strong class="weui-dialog__title" id="js_link_dialog_head"></strong>
    </div>
    <div class="weui-dialog__bd" id="js_link_dialog_body"></div>
    
    <div class="weui-dialog__ft">
        <a id="js_link_dialog_cancel" href="javascript:void(0);" class="weui-dialog__btn weui-dialog__btn_default">取消</a>
        <a id="js_link_dialog_ok" href="javascript:void(0);" class="weui-dialog__btn weui-dialog__btn_primary">允许</a>
    </div>
</div>

<div class="weui-mask"></div>
<div class="weui-dialog weui-dialog_link">
    <div class="weui-dialog__bd" id="js_weapp_without_auth_dialog_name"></div>
    <div class="weui-dialog__ft">
        <a id="js_weapp_without_auth_dialog_ok" href="javascript:void(0);" class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
    </div>
</div>

    <script nonce="" type="text/javascript">

window.logs.pagetime.page_begin = Date.now();

    <script nonce="" type="text/javascript">

(function () {


var ajaxWhiteList = {
  1: { 
    reg: /^https?:\/\/mp\.weixin\.qq\.com\/mp\/appmsg_like/,
    times: 0
  },
  2: { 
    reg: /^https?:\/\/mp\.weixin\.qq\.com\/mp\/appmsg_comment((\?|&)[^=]*?=[^&]*?)*?(\?|&)action=likecomment/,
    times: 0
  },
  3: { 
    reg: /^https?:\/\/mp\.weixin\.qq\.com\/mp\/appmsg_comment((\?|&)[^=]*?=[^&]*?)*?(\?|&)action=addcomment/,
    times: 0
  },
  4: { 
    reg: /^https?:\/\/mp\.weixin\.qq\.com\/mp\/authorreward/,
    times: 0
  }
  
  
  
  
};


if (!performance || !performance.getEntries) return;


var hasReported = false;


var reportResLoadTime = function () {
  
  if (hasReported) return;

  
  var notSupport = false;

  
  var ajaxEntries = [];

  
  var entries = performance.getEntries().map(function (entry) {
    if (typeof entry !== 'object') {
      notSupport = true;
    } else if (entry.entryType === undefined) {
      notSupport = true;
    } else if (
      entry.entryType !== 'navigation' &&
      entry.entryType !== 'resource'
    ) {
      
      return null;
    } else if (entry.initiatorType === undefined) {
      notSupport = true;
    } else if (entry.initiatorType === 'xmlhttprequest') {
      
      if (entry.name === undefined || entry.duration === undefined) {
        notSupport = true;
      } else {
        for (var scene in ajaxWhiteList) {
          if (Object.prototype.hasOwnProperty.call(ajaxWhiteList, scene)) {
            var ajaxItem = ajaxWhiteList[scene];
            if (ajaxItem.times < 10 && ajaxItem.reg.test(entry.name)) {
              ajaxEntries.push({
                scene: scene,
                protocol: entry.nextHopProtocol,
                is_https: isHttps(entry),
                time: entry.duration
              });
              ajaxItem.times++;
            }
          }
        }
      }
      return null;
    }
    return entry;
  });

  
  if (notSupport || ajaxEntries.length === 0) return;

  
  var data = {
    stat_list: ajaxEntries
  };
  var img = new Image();
  img.src = 'https://mp.weixin.qq.com/mp/timereport?data=' + JSON.stringify(data);
  hasReported = true;
};


window.addEventListener('beforeunload', reportResLoadTime, false);
window.addEventListener('unload', reportResLoadTime, false);

function isHttps(entry) {
  if (/^https/.test(entry.name)) return 1;
  else return 0;
}

})();

    <script nonce="">
var __DEBUGINFO = {
    debug_js : "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/debug/console42f400.js",
    safe_js : "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/safe/moonsafe42f400.js",
    res_list: []
};

var totalCount = 0,
        finishCount = 0;

function _loadVConsolePlugin() {
    window.vConsole = new window.VConsole();
    while (window.vConsolePlugins.length > 0) {
        var p = window.vConsolePlugins.shift();
        window.vConsole.addPlugin(p);
    }
}

function _addVConsole(uri, cb) {
    totalCount++;
    var node = document.createElement('SCRIPT');
    node.type = 'text/javascript';
    node.src = uri;
    node.setAttribute('nonce', '1031527308');
    if (cb) {
        node.onload = cb;
    }
    document.getElementsByTagName('head')[0].appendChild(node);
}
if (
    (document.cookie && document.cookie.indexOf('vconsole_open=1') > -1)
    || location.href.indexOf('vconsole=1') > -1
) {
    window.vConsolePlugins = [];
    _addVConsole('//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.2.2/vconsole.min440203.js', function() {
        
        _addVConsole('//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/plugin/vconsole-mpopt/1.0.1/vconsole-mpopt42f400.js', _loadVConsolePlugin);
    });
}

try {

var adIframeUrl = localStorage.getItem('__WXLS_ad_iframe_url');
if (window === top) {
  if (adIframeUrl) {
    if (navigator.userAgent.indexOf('iPhone') > -1) {
      var img = new Image();
      img.src = adIframeUrl;
    } else {
      var link = document.createElement('link');
      link.rel = 'prefetch';
      link.href = adIframeUrl;
      document.getElementsByTagName('head')[0].appendChild(link);
    }
  }
}

} catch (err) {

}

})();

var m=location.href.match(/fontScale=(\d*)/);
var map={
    "94":1,
    "100":2,
    "109":3,
    "119":4,
    "131":5,
}
if(m&&m[1]&&map[m[1]]){
    document.getElementsByTagName("body")[0].className+=" appmsg_skin_fontscale_"+map[m[1]];
    console.log("appmsg_skin_fontscale_:"+map[m[1]]);
}

}


if (!window.console) window.console = { log: function() {} };

if (typeof getComputedStyle == 'undefined') {

if (document.body.currentStyle) {
    window.getComputedStyle = function(el) {
        return el.currentStyle;
    }
} else {
    window.getComputedStyle = {};
}

}

(function(){

window.__zoom = 1;

(function(){
    var validArr = ","+([0.875, 1, 1.125, 1.25, 1.375]).join(",")+",";
    var match = window.location.href.match(/winzoom=(\d+(?:\.\d+)?)/);
    if (match && match[1]) {
        var winzoom = parseFloat(match[1]);
        if (validArr.indexOf(","+winzoom+",")>=0) {
            window.__zoom = winzoom;
        }
    }
})();

var ua = navigator.userAgent.toLowerCase();
var re = new RegExp("msie ([0-9]+[\.0-9]*)");
var version;
if (re.exec(ua) != null) {
    version = parseInt(RegExp.$1);
}
var isIE = false;
if (typeof version != 'undefined' && version >= 6 && version <= 9) {
    isIE = true;
}
var getMaxWith=function(){
    var container = document.getElementById('img-content');
    var max_width = container.offsetWidth;
    var container_padding = 0;
    var container_style = getComputedStyle(container);
    container_padding = parseFloat(container_style.paddingLeft) + parseFloat(container_style.paddingRight);
    max_width -= container_padding;
    if (!max_width) {
        max_width = window.innerWidth - 30;      
    }
    return max_width;
};
var getParentWidth = function(dom){
    var parent_width = 0;
    var parent = dom.parentNode;
    var outerWidth = 0;
    while (true) {
        if(!parent||parent.nodeType!=1) break;
        var parent_style = getComputedStyle(parent);
        if (!parent_style) break;
        parent_width = parent.clientWidth - parseFloat(parent_style.paddingLeft) - parseFloat(parent_style.paddingRight) - outerWidth;
        if (parent_width > 0) break;
        outerWidth += parseFloat(parent_style.paddingLeft) + parseFloat(parent_style.paddingRight) + parseFloat(parent_style.marginLeft) + parseFloat(parent_style.marginRight) + parseFloat(parent_style.borderLeftWidth) + parseFloat(parent_style.borderRightWidth);
        parent = parent.parentNode;
    }
    return parent_width;
}
var getOuterW=function(dom){
    var style=getComputedStyle(dom),
        w=0;
    if(!!style){
        w = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
    }
    return w;
};
var getOuterH =function(dom){
    var style=getComputedStyle(dom),
        h=0;
    if(!!style){
        h = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
    }
    return h;
};
var insertAfter = function(dom,afterDom){
    var _p = afterDom.parentNode;
    if(!_p){
        return;
    }
    if(_p.lastChild === afterDom){
        _p.appendChild(dom);
    }else{
        _p.insertBefore(dom,afterDom.nextSibling);
    }
};
var getQuery = function(name,url){
    
    var u  = arguments[1] || window.location.search,
        reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"),
        r = u.substr(u.indexOf("\?")+1).match(reg);
    return r!=null?r[2]:"";
};


function setImgSize(item, widthNum, widthUnit, ratio, breakParentWidth) {
    setTimeout(function () {
        var img_padding_border = getOuterW(item) || 0;
        var img_padding_border_top_bottom = getOuterH(item) || 0;
        
        if (widthNum > getParentWidth(item) && !breakParentWidth) {
            widthNum = getParentWidth(item);
        }

        height = (widthNum - img_padding_border) * ratio + img_padding_border_top_bottom;

        if (isIE) {
            var url = item.getAttribute('data-src');
            item.src = url;
        } else {
            if(parseFloat(widthNum, 10) > 40 && height > 40 && breakParentWidth) {
                item.className += ' img_loading';
            }
            item.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==";
        }
        item.style.cssText += ";width: " + widthNum + widthUnit + " !important;";
        item.style.cssText += ";height: " + height + widthUnit + " !important;";
    }, 10);
}

(function(){
    var images = document.getElementsByTagName('img');
    var length = images.length;
    var max_width = getMaxWith();
    for (var i = 0; i < length; ++i) {
        if (window.__second_open__ && images[i].getAttribute('__sec_open_place_holder__')) {
            continue;
        }
        var imageItem = images[i];
        var src_ = imageItem.getAttribute('data-src');
        var realSrc = imageItem.getAttribute('src');
        if (!src_ || realSrc) continue;
        
        var originWidth = imageItem.getAttribute('data-w');
        var ratio_ = 1 * imageItem.getAttribute('data-ratio');

        var height = 100;
        if (ratio_ && ratio_ > 0) {
            var parent_width = getParentWidth(imageItem) || max_width;
            var initWidth = imageItem.style.width || imageItem.getAttribute('width') || originWidth || parent_width;
            initWidth = parseFloat(initWidth, 10) > max_width ? max_width : initWidth;
            
            if (initWidth) {
                imageItem.setAttribute('_width', !isNaN(initWidth * 1) ? initWidth + 'px' : initWidth);
            }
            
            if (typeof initWidth === 'string' && initWidth.indexOf('%') !== -1) {
                initWidth = parseFloat(initWidth.replace('%', ''), 10) / 100 * parent_width;
            }
            
            if (initWidth === 'auto') {
                initWidth = originWidth;
            }

            var res = /^(\d+(?:\.\d+)?)([a-zA-Z%]+)?$/.exec(initWidth);
            var widthNum = res && res.length >= 2 ? res[1] : 0;
            var widthUnit = res && res.length >= 3 && res[2] ? res[2] : 'px';

            
            setImgSize(imageItem, widthNum, widthUnit, ratio_, true);
            
            (function (item, widthNumber, unit, ratio) {
                setTimeout(function () {
                    setImgSize(item, widthNumber, unit, ratio, false);
                });
            })(imageItem, widthNum, widthUnit, ratio_);
        } else {
            imageItem.style.cssText += ";visibility: hidden !important;";
        }

    }
})();
window.__videoDefaultRatio=16/9;
window.__getVideoWh = function(dom){
    var max_width = getMaxWith(),
        width = max_width,
        ratio_ = dom.getAttribute('data-ratio')*1,
        arr = [4/3, 16/9],
        ret = arr[0],
        abs = Math.abs(ret - ratio_);
    if (!ratio_) { 
        if (dom.getAttribute("data-mpvid")) { 
            ratio_ = 16/9;
        } else { 
            ratio_ = 4/3;
        }
    } else { 
        for (var j = 1, jl = arr.length; j < jl; j++) {
            var _abs = Math.abs(arr[j] - ratio_);
            if (_abs < abs) {
                abs = _abs;
                ret = arr[j];
            }
        }
        ratio_ = ret;
    }

    var parent_width = getParentWidth(dom)||max_width,
        width = width > parent_width ? parent_width : width,
        outerW = getOuterW(dom)||0,
        outerH = getOuterH(dom)||0,
        videoW = width - outerW,
        videoH = videoW/ratio_,
        height = videoH + outerH;
    return {w:Math.ceil(width),h:Math.ceil(height),vh:videoH,vw:videoW,ratio:ratio_};
};


(function(){
    var iframe = document.getElementsByTagName('iframe');
    for (var i=0,il=iframe.length;i<il;i++) {
        if (window.__second_open__ && iframe[i].getAttribute('__sec_open_place_holder__')) {
            continue;
        }
        var a = iframe[i];
        var src_ = a.getAttribute('src')||a.getAttribute('data-src')||"";
        if(!/^http(s)*\:\/\/v\.qq\.com\/iframe\/(preview|player)\.html\?/.test(src_)
            && !/^http(s)*\:\/\/mp\.weixin\.qq\.com\/mp\/readtemplate\?t=pages\/video_player_tmpl/.test(src_)
        ){
            continue;
        }
        var vid = getQuery("vid",src_);
        if(!vid){
            continue;
        }
        vid=vid.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");
        a.removeAttribute('src');
        a.style.display = "none";
        var obj = window.__getVideoWh(a),
            videoPlaceHolderSpan = document.createElement('span'),
            videoPlayerIconSpan = document.createElement('span'),
            mydiv = document.createElement('img');

        videoPlaceHolderSpan.className = "js_img_loading db";
        videoPlaceHolderSpan.setAttribute("data-vid", vid);
        

        videoPlayerIconSpan.className = 'wx_video_context db'; 
        videoPlayerIconSpan.style.display = 'none';
        videoPlayerIconSpan.innerHTML = '<span class="wx_video_thumb_primary"></span><button class="wx_video_play_btn">播放</button><span class="wx_video_mask"></span>'; 

        mydiv.className = "img_loading";

        mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==";
        
        
        videoPlaceHolderSpan.style.cssText = "width: " + obj.w + "px !important;";
        mydiv.style.cssText += ";width: " + obj.w + "px";
        videoPlaceHolderSpan.appendChild(videoPlayerIconSpan);
        videoPlaceHolderSpan.appendChild(mydiv);
        insertAfter(videoPlaceHolderSpan, a); 

        a.style.cssText += ";width: " + obj.w + "px !important;";
        a.setAttribute("width",obj.w);
        if(window.__zoom!=1){
            a.style.display = "block";
            videoPlaceHolderSpan.style.display = "none";
            a.setAttribute("_ratio",obj.ratio);
            a.setAttribute("_vid",vid);
        }else{
            videoPlaceHolderSpan.style.cssText += "height: " + obj.h + "px !important;";
            mydiv.style.cssText += "height: " + obj.h + "px !important;";
            a.style.cssText += "height: " + obj.h + "px !important;";
            a.setAttribute("height",obj.h);
        }
        a.setAttribute("data-vh",obj.vh);
        a.setAttribute("data-vw",obj.vw);
        if(a.getAttribute("data-mpvid")){
            a.setAttribute("data-src",location.protocol+"//mp.weixin.qq.com/mp/readtemplate?t=pages/video_player_tmpl&auto=0&vid="+vid);
        }else{
            a.setAttribute("data-src",location.protocol+"//v.qq.com/iframe/player.html?vid="+ vid + "&width="+obj.vw+"&height="+obj.vh+"&auto=0");
        }
    }
})();

(function(){
    if(window.__zoom!=1){
        if (!window.__second_open__) {
            document.getElementById('page-content').style.zoom = window.__zoom;
            var a = document.getElementById('activity-name');
            var b = document.getElementById('meta_content');
            if(!!a){
                a.style.zoom = 1/window.__zoom;
            }
            if(!!b){
                b.style.zoom = 1/window.__zoom;
            }
        }
        var images = document.getElementsByTagName('img');
        for (var i = 0,il=images.length;i<il;i++) {
            if (window.__second_open__ && images[i].getAttribute('__sec_open_place_holder__')) {
                continue;
            }
            images[i].style.zoom = 1/window.__zoom;
        }
        var iframe = document.getElementsByTagName('iframe');
        for (var i = 0,il=iframe.length;i<il;i++) {
            if (window.__second_open__ && iframe[i].getAttribute('__sec_open_place_holder__')) {
                continue;
            }
            var a = iframe[i];
            a.style.zoom = 1/window.__zoom;
            var src_ = a.getAttribute('data-src')||"";
            if(!/^http(s)*\:\/\/v\.qq\.com\/iframe\/(preview|player)\.html\?/.test(src_)
                && !/^http(s)*\:\/\/mp\.weixin\.qq\.com\/mp\/readtemplate\?t=pages\/video_player_tmpl/.test(src_)
            ){
                continue;
            }
            var ratio = a.getAttribute("_ratio");
            var vid = a.getAttribute("_vid");
            a.removeAttribute("_ratio");
            a.removeAttribute("_vid");
            var vw = a.offsetWidth - (getOuterW(a)||0);
            var vh = vw/ratio;
            var h = vh + (getOuterH(a)||0)
            a.style.cssText += "height: " + h + "px !important;"
            a.setAttribute("height",h);
            if (/^http(s)*\:\/\/v\.qq\.com\/iframe\/(preview|player)\.html\?/.test(src_)) {
                a.setAttribute("data-src", location.protocol + "//v.qq.com/iframe/player.html?vid=" + vid + "&width=" + vw + "&height=" + vh + "&auto=0");
            }
            a.style.display = "none";
            var parent = a.parentNode;
            if(!parent){
                continue;
            }
            for(var j=0,jl=parent.children.length;j<jl;j++){
                var child = parent.children[j];
                if(child.className.indexOf("img_loading")>=0 && child.getAttribute("data-vid")==vid){
                    child.style.cssText += "height: " + h + "px !important;";
                    child.style.display = "";
                }
            }
        }
    }
})();

})();



var whiteList = 'rich_pages,blockquote_info,blockquote_biz,blockquote_other,blockquote_article,js_jump_icon,h5_image_link,js_banner_container,js_list_container,js_cover,js_tx_video_container,js_product_err_container,js_product_loop_content,js_product_container,img_loading,list-paddingleft-1,list-paddingleft-2,list-paddingleft-3,selectTdClass,noBorderTable,ue-table-interlace-color-single,ue-table-interlace-color-double,__bg_gif,weapp_text_link,weapp_image_link,js_img_loading,wx_video_context,db,wx_video_thumb_primary,wx_video_play_btn,wx_video_mask,qqmusic_area,tc,tips_global,unsupport_tips,qqmusic_wrp,appmsg_card_context,appmsg_card_active,qqmusic_bd,play_area,icon_qqmusic_switch,pic_qqmusic_default,qqmusic_thumb,access_area,qqmusic_songname,qqmusic_singername,qqmusic_source,js_audio_frame,share_audio_context,flex_context,pages_reset,share_audio_switch,icon_share_audio_switch,share_audio_info,flex_bd,share_audio_title,share_audio_tips,share_audio_progress_wrp,share_audio_progress,share_audio_progress_inner,share_audio_progress_buffer,share_audio_progress_loading,share_audio_progress_loading_inner,share_audio_progress_handle,share_audio_desc,share_audio_length_current,share_audio_length_total,video_iframe,vote_iframe,js_editor_vote_card,res_iframe,card_iframe,js_editor_card,weapp_display_element,js_weapp_display_element,weapp_card,app_context,weapp_card_bd,weapp_card_profile,radius_avatar,weapp_card_avatar,weapp_card_nickname,weapp_card_info,weapp_card_title,weapp_card_thumb_wrp,weapp_card_ft,weapp_card_logo,js_pay_btn,pay,pay__mask,wx_video_loading,js_redpacketcover,js_uneditable,js_uneditablemouseover,js_editor_qqmusic,js_editor_audio'.split(',');
var qaClassPrefix = 'qa__';
var dmClassPrefix = 'js_darkmode__';
var whiteListReg = [
    new RegExp("^weui"),
    new RegExp("^appmsg"),
    new RegExp("^audio"),
    new RegExp("^music"),
    new RegExp("^cps_inner"),
    new RegExp("^bizsvr_"), 
    new RegExp("^code-snippet"), 
    new RegExp("^" + qaClassPrefix), 
    new RegExp("^wx-edui-"), 
    new RegExp('^' + dmClassPrefix), 
];


case"hwb":
t=l.get.hwb(r),e="hwb";
break;

default:
t=l.get.rgb(r),e="rgb";
}
return t?{
model:e,
value:t
}:null;
},l.get.rgb=function(r){
if(!r)return null;
var e,a,o,i=/^#([a-f0-9]{3,4})$/i,l=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,s=/^rgba?(s([+-]?d+)s,s([+-]?d+)s,s([+-]?d+)s(?:,s([+-]?[d.]+)s)?)$/,u=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,c=/(D+)/,h=[0,0,0,1];
if(e=r.match(l)){
for(o=e[2],e=e[1],a=0;3>a;a++){
var f=2*a;
h[a]=parseInt(e.slice(f,f+2),16);
}
o&&(h[3]=Math.round(parseInt(o,16)/255*100)/100);
}else if(e=r.match(i)){
for(e=e[1],o=e[3],a=0;3>a;a++)h[a]=parseInt(e[a]+e[a],16);
o&&(h[3]=Math.round(parseInt(o+o,16)/255*100)/100);
}else if(e=r.match(s)){
for(a=0;3>a;a++)h[a]=parseInt(e[a+1],0);
e[4]&&(h[3]=parseFloat(e[4]));
}else{
if(!(e=r.match(u)))return(e=r.match(c))?"transparent"===e[1]?[0,0,0,0]:(h=n[e[1]])?(h[3]=1,
h):null:null;
for(a=0;3>a;a++)h[a]=Math.round(2.55*parseFloat(e[a+1]));
e[4]&&(h[3]=parseFloat(e[4]));
}
for(a=0;3>a;a++)h[a]=t(h[a],0,255);
return h[3]=t(h[3],0,1),h;
},l.get.hsl=function(r){
if(!r)return null;
var e=/^hsla?(s([+-]?(?:d.)?d+)(?:deg)?s,s([+-]?[d.]+)%s,s([+-]?[d.]+)%s(?:,s([+-]?[d.]+)s*)?)$/,n=r.match(e);
if(n){
var a=parseFloat(n[4]),o=(parseFloat(n[1])+360)%360,i=t(parseFloat(n[2]),0,100),l=t(parseFloat(n[3]),0,100),s=t(isNaN(a)?1:a,0,1);
return[o,i,l,s];
}
return null;
},l.get.hwb=function(r){
if(!r)return null;
var e=/^hwb(s([+-]?d[.]?d+)(?:deg)?s,s([+-]?[d.]+)%s,s([+-]?[d.]+)%s(?:,s([+-]?[d.]+)s*)?)$/,n=r.match(e);
if(n){
var a=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,i=t(parseFloat(n[2]),0,100),l=t(parseFloat(n[3]),0,100),s=t(isNaN(a)?1:a,0,1);
return[o,i,l,s];
}
return null;
},l.to.hex=function(){
var r=a(arguments);
return"#"+e(r[0])+e(r[1])+e(r[2])+(r[3]<1?e(Math.round(255*r[3])):"");
},l.to.rgb=function(){
var r=a(arguments);
return r.length<4||1===r[3]?"rgb("+Math.round(r[0])+", "+Math.round(r[1])+", "+Math.round(r[2])+")":"rgba("+Math.round(r[0])+", "+Math.round(r[1])+", "+Math.round(r[2])+", "+r[3]+")";
},l.to.rgb.percent=function(){
var r=a(arguments),t=Math.round(r[0]/255100),e=Math.round(r[1]/255100),n=Math.round(r[2]/255*100);
return r.length<4||1===r[3]?"rgb("+t+"%, "+e+"%, "+n+"%)":"rgba("+t+"%, "+e+"%, "+n+"%, "+r[3]+")";
},l.to.hsl=function(){
var r=a(arguments);
return r.length<4||1===r[3]?"hsl("+r[0]+", "+r[1]+"%, "+r[2]+"%)":"hsla("+r[0]+", "+r[1]+"%, "+r[2]+"%, "+r[3]+")";
},l.to.hwb=function(){
var r=a(arguments),t="";
return r.length>=4&&1!==r[3]&&(t=", "+r[3]),"hwb("+r[0]+", "+r[1]+"%, "+r[2]+"%"+t+")";
},l.to.keyword=function(r){
return o[r.slice(0,3)];
},l;
}(),u=function(){
function t(r){
var t=function(t){
return void 0===t||null===t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),
r(t));
};
return"conversion"in r&&(t.conversion=r.conversion),t;
}
function e(r){
var t=function(t){
if(void 0===t||null===t)return t;
arguments.length>1&&(t=Array.prototype.slice.call(arguments));
var e=r(t);
if("object"===("undefined"==typeof e?"undefined":_typeof(e)))for(var n=e.length,a=0;n>a;a++)e[a]=Math.round(e[a]);
return e;
};
return"conversion"in r&&(t.conversion=r.conversion),t;
}
var n=function(){
function t(r,t){
return Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2)+Math.pow(r[2]-t[2],2);
}
var e=r,n={};
for(var a in e)e.hasOwnProperty(a)&&(n[e[a]]=a);
var o={
rgb:{
channels:3,
labels:"rgb"
},
hsl:{
channels:3,
labels:"hsl"
},
hsv:{
channels:3,
labels:"hsv"
},
hwb:{
channels:3,
labels:"hwb"
},
cmyk:{
channels:4,
labels:"cmyk"
},
xyz:{
channels:3,
labels:"xyz"
},
lab:{
channels:3,
labels:"lab"
},
lch:{
channels:3,
labels:"lch"
},
hex:{
channels:1,
labels:["hex"]
},
keyword:{
channels:1,
labels:["keyword"]
},
ansi16:{
channels:1,
labels:["ansi16"]
},
ansi256:{
channels:1,
labels:["ansi256"]
},
hcg:{
channels:3,
labels:["h","c","g"]
},
apple:{
channels:3,
labels:["r16","g16","b16"]
},
gray:{
channels:1,
labels:["gray"]
}
};
for(var i in o)if(o.hasOwnProperty(i)){
if(!("channels"in o[i]))throw new Error("missing channels property: "+i);
if(!("labels"in o[i]))throw new Error("missing channel labels property: "+i);
if(o[i].labels.length!==o[i].channels)throw new Error("channel and label counts mismatch: "+i);
var l=o[i].channels,s=o[i].labels;
delete o[i].channels,delete o[i].labels,Object.defineProperty(o[i],"channels",{
value:l
}),Object.defineProperty(o[i],"labels",{
value:s
});
}
return o.rgb.hsl=function(r){
var t,e,n,a=r[0]/255,o=r[1]/255,i=r[2]/255,l=Math.min(a,o,i),s=Math.max(a,o,i),u=s-l;
return s===l?t=0:a===s?t=(o-i)/u:o===s?t=2+(i-a)/u:i===s&&(t=4+(a-o)/u),t=Math.min(60*t,360),
0>t&&(t+=360),n=(l+s)/2,e=s===l?0:.5>=n?u/(s+l):u/(2-s-l),[t,100e,100n];
},o.rgb.hsv=function(r){
var t,e,n,a,o,i=r[0]/255,l=r[1]/255,s=r[2]/255,u=Math.max(i,l,s),c=u-Math.min(i,l,s),h=function(r){
return(u-r)/6/c+.5;
};
return 0===c?a=o=0:(o=c/u,t=h(i),e=h(l),n=h(s),i===u?a=n-e:l===u?a=1/3+t-n:s===u&&(a=2/3+e-t),
0>a?a+=1:a>1&&(a-=1)),[360a,100o,100*u];
},o.rgb.hwb=function(r){
var t=r[0],e=r[1],n=r[2],a=o.rgb.hsl(r)[0],i=1/255*Math.min(t,Math.min(e,n));
return n=1-1/255Math.max(t,Math.max(e,n)),[a,100i,100*n];
},o.rgb.cmyk=function(r){
var t,e,n,a,o=r[0]/255,i=r[1]/255,l=r[2]/255;
return a=Math.min(1-o,1-i,1-l),t=(1-o-a)/(1-a)||0,e=(1-i-a)/(1-a)||0,n=(1-l-a)/(1-a)||0,
[100t,100e,100n,100a];
},o.rgb.keyword=function(r){
var a=n[r];
if(a)return a;
var o,i=1/0;
for(var l in e)if(e.hasOwnProperty(l)){
var s=e[l],u=t(r,s);
i>u&&(i=u,o=l);
}
return o;
},o.keyword.rgb=function(r){
return e[r];
},o.rgb.xyz=function(r){
var t=r[0]/255,e=r[1]/255,n=r[2]/255;
t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,
n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;
var a=.4124t+.3576e+.1805n,o=.2126t+.7152e+.0722n,i=.0193t+.1192e+.9505*n;
return[100a,100o,100*i];
},o.rgb.lab=function(r){
var t,e,n,a=o.rgb.xyz(r),i=a[0],l=a[1],s=a[2];
return i/=95.047,l/=100,s/=108.883,i=i>.008856?Math.pow(i,1/3):7.787i+16/116,l=l>.008856?Math.pow(l,1/3):7.787l+16/116,
s=s>.008856?Math.pow(s,1/3):7.787s+16/116,t=116l-16,e=500(i-l),n=200(l-s),[t,e,n];
},o.hsl.rgb=function(r){
var t,e,n,a,o,i=r[0]/360,l=r[1]/100,s=r[2]/100;
if(0===l)return o=255*s,[o,o,o];
e=.5>s?s(1+l):s+l-sl,t=2*s-e,a=[0,0,0];
for(var u=0;3>u;u++)n=i+1/3-(u-1),0>n&&n++,n>1&&n--,o=1>6n?t+6(e-t)n:1>2n?e:2>3n?t+(e-t)(2/3-n)6:t,
a[u]=255*o;
return a;
},o.hsl.hsv=function(r){
var t,e,n=r[0],a=r[1]/100,o=r[2]/100,i=a,l=Math.max(o,.01);
return o=2,a=1>=o?o:2-o,i=1>=l?l:2-l,e=(o+a)/2,t=0===o?2i/(l+i):2a/(o+a),[n,100t,100*e];
},o.hsv.rgb=function(r){
var t=r[0]/60,e=r[1]/100,n=r[2]/100,a=Math.floor(t)%6,o=t-Math.floor(t),i=255n(1-e),l=255n(1-eo),s=255n(1-e(1-o));
switch(n*=255,a){
case 0:
return[n,s,i];

case 1:
return[l,n,i];

case 2:
return[i,n,s];

case 3:
return[i,l,n];

case 4:
return[s,i,n];

case 5:
return[n,i,l];
}
},o.hsv.hsl=function(r){
var t,e,n,a=r[0],o=r[1]/100,i=r[2]/100,l=Math.max(i,.01);
return n=(2-o)i,t=(2-o)l,e=ol,e/=1>=t?t:2-t,e=e||0,n/=2,[a,100e,100*n];
},o.hwb.rgb=function(r){
var t,e,n,a,o=r[0]/360,i=r[1]/100,l=r[2]/100,s=i+l;
s>1&&(i/=s,l/=s),t=Math.floor(6o),e=1-l,n=6o-t,0!==(1&t)&&(n=1-n),a=i+n*(e-i);
var u,c,h;
switch(t){
default:
case 6:
case 0:
u=e,c=a,h=i;
break;

case 1:
u=a,c=e,h=i;
break;

case 2:
u=i,c=e,h=a;
break;

case 3:
u=i,c=a,h=e;
break;

case 4:
u=a,c=i,h=e;
break;

case 5:
u=e,c=i,h=a;
}
return[255u,255c,255*h];
},o.cmyk.rgb=function(r){
var t,e,n,a=r[0]/100,o=r[1]/100,i=r[2]/100,l=r[3]/100;
return t=1-Math.min(1,a(1-l)+l),e=1-Math.min(1,o(1-l)+l),n=1-Math.min(1,i*(1-l)+l),
[255t,255e,255*n];
},o.xyz.rgb=function(r){
var t,e,n,a=r[0]/100,o=r[1]/100,i=r[2]/100;
return t=3.2406a+-1.5372o+i-.4986,e=a-.9689+1.8758o+.0415i,n=.0557a+o-.204+1.057*i,
t=t>.0031308?1.055Math.pow(t,1/2.4)-.055:12.92t,e=e>.0031308?1.055Math.pow(e,1/2.4)-.055:12.92e,
n=n>.0031308?1.055Math.pow(n,1/2.4)-.055:12.92n,t=Math.min(Math.max(0,t),1),e=Math.min(Math.max(0,e),1),
n=Math.min(Math.max(0,n),1),[255t,255e,255*n];
},o.xyz.lab=function(r){
var t,e,n,a=r[0],o=r[1],i=r[2];
return a/=95.047,o/=100,i/=108.883,a=a>.008856?Math.pow(a,1/3):7.787a+16/116,o=o>.008856?Math.pow(o,1/3):7.787o+16/116,
i=i>.008856?Math.pow(i,1/3):7.787i+16/116,t=116o-16,e=500(a-o),n=200(o-i),[t,e,n];
},o.lab.xyz=function(r){
var t,e,n,a=r[0],o=r[1],i=r[2];
e=(a+16)/116,t=o/500+e,n=e-i/200;
var l=Math.pow(e,3),s=Math.pow(t,3),u=Math.pow(n,3);
return e=l>.008856?l:(e-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,
t=95.047,e=100,n*=108.883,[t,e,n];
},o.lab.lch=function(r){
var t,e,n,a=r[0],o=r[1],i=r[2];
return t=Math.atan2(i,o),e=360t/2/Math.PI,0>e&&(e+=360),n=Math.sqrt(oo+i*i),[a,n,e];
},o.lch.lab=function(r){
var t,e,n,a=r[0],o=r[1],i=r[2];
return n=i/3602Math.PI,t=oMath.cos(n),e=oMath.sin(n),[a,t,e];
},o.rgb.ansi16=function(r){
var t=r[0],e=r[1],n=r[2],a=1 in arguments?arguments[1]:o.rgb.hsv(r)[2];
if(a=Math.round(a/50),0===a)return 30;
var i=30+(Math.round(n/255)<<2|Math.round(e/255)<<1|Math.round(t/255));
return 2===a&&(i+=60),i;
},o.hsv.ansi16=function(r){
return o.rgb.ansi16(o.hsv.rgb(r),r[2]);
},o.rgb.ansi256=function(r){
var t=r[0],e=r[1],n=r[2];
if(t===e&&e===n)return 8>t?16:t>248?231:Math.round((t-8)/247*24)+232;
var a=16+36Math.round(t/2555)+6Math.round(e/2555)+Math.round(n/255*5);
return a;
},o.ansi16.rgb=function(r){
var t=r%10;
if(0===t||7===t)return r>50&&(t+=3.5),t=t/10.5*255,[t,t,t];
var e=.5(~~(r>50)+1),n=(1&t)e255,a=(t>>1&1)e255,o=(t>>2&1)e*255;
return[n,a,o];
},o.ansi256.rgb=function(r){
if(r>=232){
var t=10*(r-232)+8;
return[t,t,t];
}
r-=16;
var e,n=Math.floor(r/36)/5255,a=Math.floor((e=r%36)/6)/5255,o=e%6/5*255;
return[n,a,o];
},o.rgb.hex=function(r){
var t=((255&Math.round(r[0]))<<16)+((255&Math.round(r[1]))<<8)+(255&Math.round(r[2])),e=t.toString(16).toUpperCase();
return"000000".substring(e.length)+e;
},o.hex.rgb=function(r){
var t=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
if(!t)return[0,0,0];
var e=t[0];
3===t[0].length&&(e=e.split("").map(function(r){
return r+r;
}).join(""));
var n=parseInt(e,16),a=n>>16&255,o=n>>8&255,i=255&n;
return[a,o,i];
},o.rgb.hcg=function(r){
var t,e,n=r[0]/255,a=r[1]/255,o=r[2]/255,i=Math.max(Math.max(n,a),o),l=Math.min(Math.min(n,a),o),s=i-l;
return t=1>s?l/(1-s):0,e=0>=s?0:i===n?(a-o)/s%6:i===a?2+(o-n)/s:4+(n-a)/s+4,e/=6,
e%=1,[360e,100s,100*t];
},o.hsl.hcg=function(r){
var t=r[1]/100,e=r[2]/100,n=1,a=0;
return n=.5>e?2te:2t(1-e),1>n&&(a=(e-.5n)/(1-n)),[r[0],100n,100*a];
},o.hsv.hcg=function(r){
var t=r[1]/100,e=r[2]/100,n=t*e,a=0;
return 1>n&&(a=(e-n)/(1-n)),[r[0],100n,100a];
},o.hcg.rgb=function(r){
var t=r[0]/360,e=r[1]/100,n=r[2]/100;
if(0===e)return[255n,255n,255*n];
var a=[0,0,0],o=t%1*6,i=o%1,l=1-i,s=0;
switch(Math.floor(o)){
case 0:
a[0]=1,a[1]=i,a[2]=0;
break;

case 1:
a[0]=l,a[1]=1,a[2]=0;
break;

case 2:
a[0]=0,a[1]=1,a[2]=i;
break;

case 3:
a[0]=0,a[1]=l,a[2]=1;
break;

case 4:
a[0]=i,a[1]=0,a[2]=1;
break;

default:
a[0]=1,a[1]=0,a[2]=l;
}
return s=(1-e)n,[255(ea[0]+s),255(ea[1]+s),255(e*a[2]+s)];
},o.hcg.hsv=function(r){
var t=r[1]/100,e=r[2]/100,n=t+e*(1-t),a=0;
return n>0&&(a=t/n),[r[0],100a,100n];
},o.hcg.hsl=function(r){
var t=r[1]/100,e=r[2]/100,n=e(1-t)+.5t,a=0;
return n>0&&.5>n?a=t/(2n):n>=.5&&1>n&&(a=t/(2(1-n))),[r[0],100a,100n];
},o.hcg.hwb=function(r){
var t=r[1]/100,e=r[2]/100,n=t+e*(1-t);
return[r[0],100(n-t),100(1-n)];
},o.hwb.hcg=function(r){
var t=r[1]/100,e=r[2]/100,n=1-e,a=n-t,o=0;
return 1>a&&(o=(n-a)/(1-a)),[r[0],100a,100o];
},o.apple.rgb=function(r){
return[r[0]/65535255,r[1]/65535255,r[2]/65535*255];
},o.rgb.apple=function(r){
return[r[0]/25565535,r[1]/25565535,r[2]/255*65535];
},o.gray.rgb=function(r){
return[r[0]/100255,r[0]/100255,r[0]/100*255];
},o.gray.hsl=o.gray.hsv=function(r){
return[0,0,r[0]];
},o.gray.hwb=function(r){
return[0,100,r[0]];
},o.gray.cmyk=function(r){
return[0,0,0,r[0]];
},o.gray.lab=function(r){
return[r[0],0,0];
},o.gray.hex=function(r){
var t=255&Math.round(r[0]/100*255),e=(t<<16)+(t<<8)+t,n=e.toString(16).toUpperCase();
return"000000".substring(n.length)+n;
},o.rgb.gray=function(r){
var t=(r[0]+r[1]+r[2])/3;
return[t/255*100];
},o;
}(),a=function(){
function r(){
for(var r={},t=Object.keys(o),e=t.length,n=0;e>n;n++)r[t[n]]={
distance:-1,
parent:null
};
return r;
}
function t(t){
var e=r(),n=[t];
for(e[t].distance=0;n.length;)for(var a=n.pop(),i=Object.keys(o[a]),l=i.length,s=0;l>s;s++){
var u=i[s],c=e[u];
-1===c.distance&&(c.distance=e[a].distance+1,c.parent=a,n.unshift(u));
}
return e;
}
function e(r,t){
return function(e){
return t(r(e));
};
}
function a(r,t){
for(var n=[t[r].parent,r],a=o[t[r].parent][r],i=t[r].parent;t[i].parent;)n.unshift(t[i].parent),
a=e(o[t[i].parent][i],a),i=t[i].parent;
return a.conversion=n,a;
}
var o=n;
return function(r){
for(var e=t(r),n={},o=Object.keys(e),i=o.length,l=0;i>l;l++){
var s=o[l],u=e[s];
null!==u.parent&&(n[s]=a(s,e));
}
return n;
};
}(),o={},i=Object.keys(n);
return i.forEach(function(r){
o[r]={},Object.defineProperty(o[r],"channels",{
value:n[r].channels
}),Object.defineProperty(o[r],"labels",{
value:n[r].labels
});
var i=a(r),l=Object.keys(i);
l.forEach(function(n){
var a=i[n];
or=e(a),or.raw=t(a);
});
}),o;
}(),c=[].slice,h=["keyword","gray","hex"],f={};
Object.keys(u).forEach(function(r){
f[c.call(u[r].labels).sort().join("")]=r;
});
var g={};
return t.prototype={
toString:function(){
return this.string();
},
toJSON:function(){
return this[this.model]();
},
string:function(r){
var t=this.model in s.to?this:this.rgb();
t=t.round("number"==typeof r?r:1);
var e=1===t.valpha?t.color:t.color.concat(this.valpha);
return s.tot.model;
},
percentString:function(r){
var t=this.rgb().round("number"==typeof r?r:1),e=1===t.valpha?t.color:t.color.concat(this.valpha);
return s.to.rgb.percent(e);
},
array:function(){
return 1===this.valpha?this.color.slice():this.color.concat(this.valpha);
},
object:function(){
for(var r={},t=u[this.model].channels,e=u[this.model].labels,n=0;t>n;n++)r[e[n]]=this.color[n];
return 1!==this.valpha&&(r.alpha=this.valpha),r;
},
unitArray:function(){
var r=this.rgb().color;
return r[0]/=255,r[1]/=255,r[2]/=255,1!==this.valpha&&r.push(this.valpha),r;
},
unitObject:function(){
var r=this.rgb().object();
return r.r/=255,r.g/=255,r.b/=255,1!==this.valpha&&(r.alpha=this.valpha),r;
},
round:function(r){
return r=Math.max(r||0,0),new t(this.color.map(n(r)).concat(this.valpha),this.model);
},
alpha:function(r){
return arguments.length?new t(this.color.concat(Math.max(0,Math.min(1,r))),this.model):this.valpha;
},
red:a("rgb",0,o(255)),
green:a("rgb",1,o(255)),
blue:a("rgb",2,o(255)),
hue:a(["hsl","hsv","hsl","hwb","hcg"],0,function(r){
return(r%360+360)%360;
}),
saturationl:a("hsl",1,o(100)),
lightness:a("hsl",2,o(100)),
saturationv:a("hsv",1,o(100)),
value:a("hsv",2,o(100)),
chroma:a("hcg",1,o(100)),
gray:a("hcg",2,o(100)),
white:a("hwb",1,o(100)),
wblack:a("hwb",2,o(100)),
cyan:a("cmyk",0,o(100)),
magenta:a("cmyk",1,o(100)),
yellow:a("cmyk",2,o(100)),
black:a("cmyk",3,o(100)),
x:a("xyz",0,o(100)),
y:a("xyz",1,o(100)),
z:a("xyz",2,o(100)),
l:a("lab",0,o(100)),
a:a("lab",1),
b:a("lab",2),
keyword:function(r){
return arguments.length?new t(r):u[this.model].keyword(this.color);
},
hex:function(r){
return arguments.length?new t(r):s.to.hex(this.rgb().round().color);
},
rgbNumber:function(){
var r=this.rgb().color;
return(255&r[0])<<16|(255&r[1])<<8|255&r[2];
},
luminosity:function(){
for(var r=this.rgb().color,t=[],e=0;evar n=r[e]/255;
t[e]=.03928>=n?n/12.92:Math.pow((n+.055)/1.055,2.4);
}
return.2126t[0]+.7152t[1]+.0722*t[2];
},
contrast:function(r){
var t=this.luminosity(),e=r.luminosity();
return t>e?(t+.05)/(e+.05):(e+.05)/(t+.05);
},
level:function(r){
var t=this.contrast(r);
return t>=7.1?"AAA":t>=4.5?"AA":"";
},
isDark:function(){
var r=this.rgb().color,t=(299r[0]+587r[1]+114*r[2])/1e3;
return 128>t;
},
isLight:function(){
return!this.isDark();
},
negate:function(){
for(var r=this.rgb(),t=0;3>t;t++)r.color[t]=255-r.color[t];
return r;
},
lighten:function(r){
var t=this.hsl();
return t.color[2]+=t.color[2]*r,t;
},
darken:function(r){
var t=this.hsl();
return t.color[2]-=t.color[2]*r,t;
},
saturate:function(r){
var t=this.hsl();
return t.color[1]+=t.color[1]*r,t;
},
desaturate:function(r){
var t=this.hsl();
return t.color[1]-=t.color[1]*r,t;
},
whiten:function(r){
var t=this.hwb();
return t.color[1]+=t.color[1]*r,t;
},
blacken:function(r){
var t=this.hwb();
return t.color[2]+=t.color[2]*r,t;
},
grayscale:function(){
var r=this.rgb().color,e=.3r[0]+.59r[1]+.11*r[2];
return t.rgb(e,e,e);
},
fade:function(r){
return this.alpha(this.valpha-this.valpha*r);
},
opaquer:function(r){
return this.alpha(this.valpha+this.valpha*r);
},
rotate:function(r){
var t=this.hsl(),e=t.color[0];
return e=(e+r)%360,e=0>e?360+e:e,t.color[0]=e,t;
},
mix:function(r,e){
if(!r||!r.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+("undefined"==typeof r?"undefined":_typeof(r)));
var n=r.rgb(),a=this.rgb(),o=void 0===e?.5:e,i=2o-1,l=n.alpha()-a.alpha(),s=((il===-1?i:(i+l)/(1+i*l))+1)/2,u=1-s;
return t.rgb(sn.red()+ua.red(),sn.green()+ua.green(),sn.blue()+ua.blue(),n.alpha()o+a.alpha()(1-o));
}
},Object.keys(u).forEach(function(r){
if(-1===h.indexOf(r)){
var e=u[r].channels;
t.prototype[r]=function(){
if(this.model===r)return new t(this);
if(arguments.length)return new t(arguments,r);
var n="number"==typeof arguments[e]?e:this.valpha;
return new t(i(uthis.model.raw(this.color)).concat(n),r);
},t[r]=function(n){
return"number"==typeof n&&(n=l(c.call(arguments),e)),new t(n,r);
};
}
}),t;
}(),e=new RegExp(Object.keys(r).join("|"),"ig"),n="#666",a="data-darkmode-color",o="data-darkmode-bgcolor",i="data-darkmode-bgimage",l=window.dmClassPrefix,s=new RegExp(l+"\d+","g"),u=window.getInnerHeight&&window.getInnerHeight()||window.innerHeight||document.documentElement.clientHeight,c=navigator.userAgent,h=/windowssnt/i.test(c)&&!/WindowssPhone/i.test(c)||/macsos/i.test(c)&&!/(iPhone|iPad|iPod|iOS)/i.test(c),f=0,g=[],b=[],d=["mpcps","iframe"],v=[],p=[],m=["",""],y=!0,w=function(r,t){
return r+": "+t+" !important;";
},M=function(r){
var t;
return(t=[r]).concat.apply(t,_toConsumableArray(r.querySelectorAll("*")));
},k=function(r){
return r&&document.head.insertAdjacentHTML("beforeend",'");
},x=function(r,e,n){
var a=r.rgb().array(),l=r.hsl().array(),s=r.alpha(),u=(299a[0]+587a[1]+114*a[2])/1e3,c=250,h=190,f=void 0;
if(n.isBgColor)if(0===l[1]&&l[2]>40||u>c)f=t.hsl(0,0,Math.min(100,114-l[2]));else if(u>h){
var g=1e3h/(299a[0]+587a[1]+114a[2]);
f=t.rgb(a[0]g,a[1]g,a[2]*g);
}else l[2]<26&&(l[2]=26,f=t.hsl.apply(t,_toConsumableArray(l)));else if(n.isTextColor||n.isBorderColor){
var b=!1,d=e.getAttribute(o);
if(!e.getAttribute(i)){
if(d){
var v=t(d).rgb().array();
b=(299v[0]+587v[1]+114*v[2])/1e3>h-20;
}
(!b&&l[2]<40||b&&c>u&&u>=h)&&(l[2]=90-l[2],f=t.hsl.apply(t,_toConsumableArray(l)));
}
}
return f&&f.alpha(s).rgb();
},A=function(s){
if(d.indexOf(s.nodeName.toLowerCase())>-1||Array.prototype.some.call(s.classList,function(r){
return g.indexOf(r)>-1||b.some(function(t){
return t.test(r);
});
}))return"";
var u=s.style,c="";
try{
!function(){
var l=!1;
(u.cssText&&u.cssText.split(";")||[]).map(function(r){
var t=r.indexOf(":");
return[r.slice(0,t).toLowerCase(),r.slice(t+1)].map(function(r){
return(r||"").replace(/^[suFEFFxA0]+|[suFEFFxA0]+$/g,"");
});
}).filter(function(r){
var t=_slicedToArray(r,1),e=t[0];
return["-webkit-border-image","border-image","color","background-color","background-image","background","border","border-top","border-right","border-bottom","border-left","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color"].indexOf(e)>-1;
}).sort(function(r){
var t=_slicedToArray(r,1),e=t[0];
return"color"===e?(l=!0,0):-1;
}).forEach(function(u){
var h=_slicedToArray(u,2),f=h[0],g=h[1],b=!1;
g=g.replace(e,function(t){
return"rgb("+r[t.toLowerCase()].toString()+")";
});
var d=/rgba?(2+)/gi;
d.test(g)&&!function(){
var r=!1;
g=g.replace(d,function(e){
var n=/^background/.test(f),l="color"===f,u=/^border/.test(f),c=x(t(e),s,{
isBgColor:n,
isTextColor:l,
isBorderColor:u
});
return c&&!r&&(n||l)&&!function(){
r=!0;
var t=n?o:a,e=c.toString();
M(s).forEach(function(r){
r.setAttribute(t,e),n&&r.getAttribute(i)&&r.removeAttribute(i);
});
}(),c&&(b=!0),c||e;
}).replace(/s?!s?important/gi,"");
}();
var v=.15;
(/^background/.test(f)||/^(-webkit-)?border-image/.test(f))&&/url(3*)/i.test(g)&&(b=!0,
g=g.replace(/^(.?)url((4))(.*)$/i,function(r,t,e,n){
return"1"!==s.getAttribute(i)&&M(s).forEach(function(r){
return r.setAttribute(i,"1");
}),t+"linear-gradient(rgba(0, 0, 0, "+v+"), rgba(0, 0, 0, "+v+")), url("+e+")"+n;
}),!s.getAttribute(a)&&!l&&(c+=w("color",n))),b&&(c+=w(f,g));
});
}();
}catch(v){
console.error(v);
}
if(c){
h&&s.setAttribute("data-style",u.cssText);
var p=""+l+f++;
return s.classList.add(p),"."+p+"{"+c+"}";
}
return"";
},O=function(r){
if(null!==m)try{
r?v.forEach(function(r){
if(r.className&&"string"==typeof r.className&&(r.className=r.className.replace(s,"")),
y){
var t=r.getBoundingClientRect(),e=t.top,n=t.bottom;
0>=e&&0>=n?m[1]+=A(r):e>0&&u>e||n>0&&u>n?(p.push(r),m[0]+=A(r)):(y=!1,k(m[0]),p.forEach(function(r){
r.style.visibility="visible";
}),m[0]="",m[1]+=A(r));
}else m[1]+=A(r);
}):y=!1,m[1]=m[0]+m[1],m[1]&&(k(m[1]),m=null,v=null,p=null);
}catch(t){
console.error(t);
}
},j=window.matchMedia("(prefers-color-scheme: dark)"),C=function(r){
var t=r.matches;
return O(t);
};
return j.addListener(C),function(r){
v=r.nodes||[],g=g.concat(r.whiteListClass||[]),b=b.concat(r.whiteListClassReg||[]),
d=d.concat(r.whiteListName||[]),C(j),document.getElementById("js_content").style.visibility="visible";
};
});

var new_appmsg = 1;
var item_show_type = "0";
var can_see_complaint = "0";
var not_in_mm_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm492bcc.css";
var windowwx_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/winwx492bcc.css";
var article_improve_combo_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo4b3caf.css";
var tid = "";
var aid = "";
var clientversion = "";
var appuin = "MjM5ODYxMDA5OQ=="||"";

var source = "21";
var ascene = "";
var subscene = "";
var sessionid = ""||"svr_5135f444a82";
var abtest_cookie = "";

var scene = 75;

var itemidx = "";
var appmsg_token   = "";
var _copyright_stat = "1";
var _ori_article_type = "科技互联网";

var is_follow = "";
var nickname = "架构师之路";
var nickname_new = "";
var appmsg_type = "9";
var ct = "1562152500";
var user_name = "gh_10a6b96351a9";
var user_name_new = "";
var fakeid   = "";
var version   = "";
var is_limit_user   = "0";
var round_head_img = "http://mmbiz.qpic.cn/mmbiz_png/YrezxckhYOxbibeY4UQvLjjG76dIsbXYGaaKCJpqU0kzRuu3r2CXosccgtc57I15CePibfpQMd5dBibXZDNNZYtkg/0?wx_fmt=png";
var hd_head_img = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7y5qQSdicmVzpBia0v6ZQQhk1KGF7eX9BqzV3ufRfUKs0g/0"||"";
var ori_head_img_url = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7y5qQSdicmVzpBia0v6ZQQhk1KGF7eX9BqzV3ufRfUKs0g/132";
var msg_title = "数据库允许空值(null),往往是悲剧的开始(1分钟系列)";
var msg_desc = "null, f*ck.";
var msg_cdn_url = "http://mmbiz.qpic.cn/mmbiz_jpg/YrezxckhYOw70icmDQkm3CkvFHfuNGq5Fhwl77YYOkib6vXts5ryicpiaEMbdvM80icgIuTcSicBMS749SaOpibloJy1A/0?wx_fmt=jpeg"; 
var cdn_url_1_1  = "https://mmbiz.qlogo.cn/mmbiz_jpg/YrezxckhYOw70icmDQkm3CkvFHfuNGq5FG97JhT7IUpnGjIaBWNF8ZnlznicCibswjJs18oQmEvAlNibWsoRMjm4lQ/0?wx_fmt=jpeg"; 
var cdn_url_235_1 = "https://mmbiz.qlogo.cn/mmbiz_jpg/YrezxckhYOw70icmDQkm3CkvFHfuNGq5Fhwl77YYOkib6vXts5ryicpiaEMbdvM80icgIuTcSicBMS749SaOpibloJy1A/0?wx_fmt=jpeg"; 

var msg_link = "http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962495&amp;idx=1&amp;sn=74e9e0dc9d03a872fd5bce5769f6c22a&amp;chksm=bd2d09a38a5a80b50da3b67c03da8417426cbb201427557959fa91e9094a848a14e0db214370#rd"; 
var user_uin = ""*1;
var msg_source_url = 'https://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==\x26amp;mid=2651962477\x26amp;idx=1\x26amp;sn=3a7617781a095243953fed8f236abab3\x26amp;chksm=bd2d09b18a5a80a756784da67c636e518ca006c16a0ff4e7165de5fa01b82454403dc7c6d83b\x26amp;token=1503604618\x26amp;lang=zh_CN#rd';
var img_format = 'jpeg';
var srcid = '';
var req_id = '0509mxvDwLJxwElKw1CVa1Oe';
var networkType;
var appmsgid = '' || '2651962495'|| "";
var comment_id = "881795543335321601" || "881795543335321601" * 1;
var comment_enabled = "" * 1;
var is_need_reward = '0' * 1 ? 0 : "1" * 1; 
var is_https_res = ("" * 1) && (location.protocol == "https:");
var msg_daily_idx = "1" || "";
var profileReportInfo = "" || "";

var devicetype = "";
var source_encode_biz = ""; 
var source_username = "";

var reprint_ticket = "";
var source_mid = "";
var source_idx = "";
var source_biz = "";
var author_id = "ofMoI45GoFbE-k31dB82rkB_zKks";


var optimizing_flag = "0" * 1;




var show_comment = "";
var __appmsgCgiData = {
    wxa_product : ""*1,
    wxa_cps : ""*1,
    show_msg_voice: "0"*1,
    can_use_page : ""*1,
    is_wxg_stuff_uin : "0"*1,
    card_pos : "",
    copyright_stat : "1",
    source_biz : "",
    hd_head_img : "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7y5qQSdicmVzpBia0v6ZQQhk1KGF7eX9BqzV3ufRfUKs0g/0"||(window.location.protocol+"//"+window.location.host + "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/appmsg/pic_rumor_link.2x42f400.jpg"),
    has_red_packet_cover: "0" * 1 || 0
};
var _empty_v = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/pages/voice/empty42f400.mp3";

var copyright_stat = "1" * 1;
var hideSource = "" * 1;

var pay_fee = "" * 1;
var pay_timestamp = "";
var need_pay = "" * 1;

var need_report_cost = "0" * 1;
var use_tx_video_player = "0" * 1;
var appmsg_fe_filter = "contenteditable";

var friend_read_source = "" || "";
var friend_read_version = "" || "";
var friend_read_class_id = "" || "";

var is_only_read = "1" * 1;
var read_num = "" * 1;
var like_num = "" * 1;
var liked = "" == 'true' ? true : false;
var is_temp_url = "" ? 1 : 0;
var send_time = "";
var icon_emotion_switch = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch46b604.svg";
var icon_emotion_switch_active = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active46b604.svg";
var icon_emotion_switch_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_primary46b604.svg";
var icon_emotion_switch_active_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active_primary46b604.svg";
var icon_loading_white = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white42f400.gif";
var icon_audio_unread = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/audio/icon_audio_unread42f400.png";
var icon_qqmusic_default = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_default.2x42f400.png";
var icon_qqmusic_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_source4abca9.svg";
var icon_kugou_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/kugou/icon_kugou_source42f400.png";

var topic_default_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/topic/pic_book_thumb.2x42f400.png';
var comment_edit_icon = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg_new/icon_edit42f400.png';
var comment_loading_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white42f400.gif';

var voice_in_appmsg = {
    "1":"1"
        };

var reprint_style = ''*1;
var wxa_img_alert = "" != 'false';


var img_popup = 1; 


var more_read_type = '0'*1;







var weapp_sn_arr_json = "" || "";


var ban_scene = "0" * 1;

var svr_time = "1580867426" * 1;

var is_transfer_msg = ""*1||0;

var malicious_title_reason_id = "0" * 1; 
var malicious_content_type = "0" * 1; 


var modify_time = "";


var isprofileblock = "0";


var hotspotInfoList = [
                ];

var jumpInfo = [
                ];

var hasRelatedArticleInfo = '0' * 1 || 0; 

    window.wxtoken = "777";
    




window.is_login = '' * 1; 

window.__moon_initcallback = function(){
    if(!!window.__initCatch){
        window.__initCatch({
            idkey : 27611+2,
            startKey : 0,
            limit : 128,
            badjsId: 43,
            reportOpt : {
                uin : uin,
                biz : biz,
                mid : mid,
                idx : idx,
                sn  : sn
            },
            extInfo : {
                network_rate : 0.01,    
                badjs_rate: 0.1 
            }
        });
    }
}
    
var title ="架构师之路";

var is_new_msg=true;



var is_wash = '' * 1;
var topbarEnable = false;
var enterid = "" * 1 || "" * 1 || Date.now();
var appid_list = ""; 

var defaultAvatarUrl = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/common/avatar_default46e3e2.svg';

document.addEventListener('DOMContentLoaded', function () {
    window.domCompleteTime = Date.now();
});


                    var hasRecommendMsg = 0;
    ;
    
var isPaySubscribe = '0' * 1; 
var isPaid = '0' * 1; 
var payShowIAPPrice = 1; 
var payProductId = '' || ''; 
var previewPercent = '0' || ''; 
var is_finished_preview = 0; 
var jump2pay = '' * 1; 

_g.appmsg_like_type = "2" * 1 ? "2" * 1 : 1;

_g.clientversion = "";
_g.passparam = ""; 
if(!_g.msg_link) {
  _g.msg_link = "http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&amp;mid=2651962495&amp;idx=1&amp;sn=74e9e0dc9d03a872fd5bce5769f6c22a&amp;chksm=bd2d09a38a5a80b50da3b67c03da8417426cbb201427557959fa91e9094a848a14e0db214370#rd";
}
_g.appmsg_type = "9"; 
_g.devicetype = ""; 

})(window);

    <script nonce="">window.__moon_host = 'res.wx.qq.com';window.__moon_mainjs = 'appmsg/index.js';window.moon_map = {"new_video/plugin/util.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/plugin/util4a091e.js","pages/iframe_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/iframe_communicate4848aa.js","new_video/player.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/player.html4b3caf.js","biz_wap/zepto/touch.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/touch42f400.js","biz_wap/zepto/event.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/event42f400.js","biz_wap/zepto/zepto.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/zepto440203.js","page/pages/video.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/pages/video.css4b3caf.js","a/tpl/smallbanner_msg_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallbanner_msg_tpl.html42f400.js","a/tpl/smallbanner_info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallbanner_info_tpl.html44c2e3.js","a/tpl/banner_info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/banner_info_tpl.html42f400.js","a/tpl/promote_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/promote_tpl.html42f400.js","a/tpl/smallcard_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallcard_tpl.html42f400.js","a/tpl/info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/info_tpl.html42f400.js","a/tpl/cardticket_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/cardticket_tpl.html42f400.js","a/tpl/banner_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/banner_tpl.html47af5b.js","a/tpl/sponsor_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/sponsor_tpl.html42f400.js","a/tpl/new_cpc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/new_cpc_tpl.html45178d.js","appmsg/emotion/caret.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/caret42f400.js","biz_wap/utils/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/localstorage42f400.js","a/appdialog_confirm.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm.html42f400.js","widget/wx_profile_dialog_primary.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/widget/wx_profile_dialog_primary.css42f400.js","new_video/player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/player4b3caf.js","a/tpl/mpda_bottom_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/mpda_bottom_tpl.html450c68.js","a/tpl/crt_size_map.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/crt_size_map4602fc.js","biz_wap/jsapi/cardticket.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/cardticket42f400.js","biz_common/utils/emoji_panel_data.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/emoji_panel_data42f400.js","appmsg/emotion/textarea.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/textarea42f400.js","appmsg/emotion/nav.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/nav42f400.js","appmsg/emotion/common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/common42f400.js","appmsg/emotion/slide.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/slide49f7d6.js","biz_common/utils/emoji_data.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/emoji_data45112f.js","pages/audition_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/audition_tpl.html47a8e6.js","pages/musicUrlReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/musicUrlReport47f34b.js","biz_wap/jsapi/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/log4673d5.js","pages/music_report_conf.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_report_conf42f400.js","pages/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/report4a2c10.js","pages/player_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_adaptor42f400.js","pages/music_player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_player473e5d.js","appmsg/more_read_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read_tpl.html42f400.js","appmsg/friend_comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/friend_comment_tpl.html42f400.js","appmsg/comment_pc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_pc_tpl.html4830e1.js","appmsg/comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_tpl.html4a2c3f.js","appmsg/emotion/emotion_pc.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion_pc4a091e.js","appmsg/emotion/dom.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/dom42f400.js","biz_wap/utils/fakehash.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/fakehash42f400.js","appmsg/emotion/selection.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/selection4830e1.js","appmsg/comment_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_report4690d8.js","appmsg/retry_ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/retry_ajax451cc4.js","complain/tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/tips42f400.js","appmsg/i18n.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/i18n4b3caf.js","appmsg/related_article_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article_tpl.html4a789c.js","pages/loadscript.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/loadscript42f400.js","biz_wap/utils/ajax_load_js.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_load_js42f400.js","appmsg/reward_entry.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_entry4b33c6.js","a/ios.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/ios42f400.js","a/android.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/android457bcb.js","a/profile.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/profile455ab4.js","a/app_card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/app_card485189.js","a/sponsor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/sponsor4b3caf.js","a/tpl/cpc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/cpc_tpl.html450c68.js","a/appdialog_confirm.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm471cb1.js","biz_common/dom/offset.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/offset4690d8.js","a/video.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/video482376.js","a/tpl/crt_tpl_manager.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/crt_tpl_manager450d79.js","a/cpc_a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/cpc_a_tpl.html485189.js","a/sponsor_a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/sponsor_a_tpl.html42f400.js","a/a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_tpl.html485189.js","a/mpshop.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/mpshop42f400.js","a/wxopen_card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/wxopen_card42f400.js","a/card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/card42f400.js","biz_wap/utils/position.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/position42f400.js","a/a_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_report4402ec.js","biz_wap/utils/show_time.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/show_time4543c6.js","biz_common/utils/get_para_list.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/get_para_list4b504f.js","biz_wap/utils/openUrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/openUrl4402ec.js","a/a_sign.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_sign452c49.js","appmsg/my_comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/my_comment_tpl.html4a41a2.js","appmsg/cmt_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cmt_tpl.html4b3caf.js","sougou/a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/a_tpl.html42f400.js","appmsg/emotion/emotion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion46b604.js","biz_common/utils/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/report42f400.js","appmsg/articleReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/articleReport42f400.js","appmsg/topic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/topic_tpl.html42f400.js","pages/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/utils4b5552.js","question_answer/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/utils4b3caf.js","question_answer/appmsg_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/appmsg_tpl.html4a2c10.js","pages/weapp_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/weapp_tpl.html4b3caf.js","biz_common/utils/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/monitor42f400.js","pages/player_tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_tips47a8e6.js","redpackage/tpl/card_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/redpackage/tpl/card_tpl.html4b33c6.js","pages/voice_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_tpl.html4b3caf.js","pages/kugoumusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/kugoumusic_ctrl47cb36.js","pages/qqmusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_ctrl47cb36.js","pages/voice_component.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_component4b5552.js","pages/qqmusic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_tpl.html4b3caf.js","new_video/ctl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/ctl4a46b1.js","biz_wap/jsapi/leaveReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/leaveReport482a87.js","biz_wap/utils/hand_up_state.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/hand_up_state42f400.js","biz_wap/utils/storage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/storage42f400.js","biz_common/utils/http.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/http42f400.js","biz_common/utils/cookie.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/cookie42f400.js","appmsg/open_url_with_webview.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/open_url_with_webview440203.js","appmsg/more_read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read4576f8.js","appmsg/comment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment4b5552.js","appmsg/like.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like4b5552.js","appmsg/related_article.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article4a52fe.js","appmsg/share_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share_tpl.html42f400.js","appmsg/appmsgext.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsgext4b3caf.js","appmsg/img_copyright_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/img_copyright_tpl.html42f400.js","pages/video_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_ctrl42f400.js","pages/create_txv.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/create_txv42f400.js","appmsg/pay_read_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_read_utils4b5552.js","appmsg/reward_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_utils4b3caf.js","biz_common/ui/imgonepx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/ui/imgonepx42f400.js","appmsg/malicious_wording.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/malicious_wording42f400.js","biz_common/jquery.md5.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/jquery.md542f400.js","biz_common/utils/comm_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/comm_report4a789c.js","tpl/appmsg/loading.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/tpl/appmsg/loading.html4ab744.js","biz_common/base64.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/base6442f400.js","biz_common/utils/wxgspeedsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/wxgspeedsdk42f400.js","pages/version4video.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/version4video4b3caf.js","a/a_config.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_config4b3caf.js","a/a_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_utils482376.js","a/a.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a4b3caf.js","rt/appmsg/getappmsgext.rt.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/rt/appmsg/getappmsgext.rt42f400.js","pages/video_communicate_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_communicate_adaptor4b3caf.js","biz_wap/utils/ajax_wx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_wx4b9e55.js","biz_common/utils/respTypes.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/respTypes42f400.js","biz_wap/utils/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/log42f400.js","sougou/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/index42f400.js","biz_wap/safe/mutation_observer_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/safe/mutation_observer_report42f400.js","appmsg/fereport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport438bee.js","appmsg/fereport_without_localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport_without_localstorage438bee.js","appmsg/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report4765b8.js","appmsg/report_and_source.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report_and_source450c68.js","appmsg/appmsg_copy_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_copy_report4ab744.js","appmsg/cdn_speed_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_speed_report4765b8.js","appmsg/wxtopic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/wxtopic42f400.js","question_answer/appmsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/appmsg4a2c10.js","appmsg/weapp.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp4a2c10.js","appmsg/weproduct.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weproduct4576f8.js","appmsg/voicemsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voicemsg42f400.js","appmsg/autoread.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/autoread42f400.js","redpackage/redpacketcover.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/redpackage/redpacketcover4b3f9a.js","appmsg/voice.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voice4b3caf.js","appmsg/qqmusic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/qqmusic4b33c6.js","appmsg/iframe.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/iframe4b3caf.js","appmsg/page_pos.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/page_pos4b3caf.js","appmsg/product.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/product4576f8.js","appmsg/review_image.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/review_image46a084.js","appmsg/outer_link.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/outer_link4a2b2d.js","appmsg/copyright_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/copyright_report4a2c10.js","appmsg/async.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/async4b4eea.js","biz_wap/ui/lazyload_img.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/lazyload_img42f400.js","biz_common/log/jserr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/log/jserr42f400.js","appmsg/share.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share475580.js","appmsg/cdn_img_lib.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_img_lib42f400.js","page/appmsg_new/not_in_mm.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm.css492bcc.js","page/appmsg_new/combo.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo.css4b3caf.js","common/comm_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/comm_report49d6de.js","appmsg/finance_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/finance_communicate4a41a2.js","appmsg/loading.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/loading4af382.js","appmsg/pay_report_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_report_utils4b5552.js","appmsg/popup_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/popup_report488f96.js","complain/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/localstorage42f400.js","common/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/utils4b3caf.js","biz_wap/utils/wapsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/wapsdk4b504f.js","a/mpAdAsync.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/mpAdAsync4b3f9a.js","biz_common/utils/url/parse.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse440451.js","appmsg/appmsg_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_report4b59d9.js","biz_common/moment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/moment42f400.js","biz_wap/jsapi/core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core48ce4f.js","biz_common/dom/event.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/event4b3caf.js","appmsg/test.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/test42f400.js","biz_wap/utils/mmversion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion45fc7f.js","appmsg/max_age.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/max_age42f400.js","biz_common/dom/attr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/attr42f400.js","biz_wap/utils/ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax4a2b2d.js","appmsg/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/log42f400.js","biz_common/dom/class.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/class42f400.js","biz_wap/utils/device.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/device4830e1.js","appmsg/weapp_common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp_common48ce4f.js","biz_common/utils/string/html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html42f400.js","cps/tpl/list_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/list_tpl.html4b3caf.js","cps/tpl/card_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/card_tpl.html4b3caf.js","cps/tpl/banner_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/banner_tpl.html4b3caf.js","biz_common/tmpl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/tmpl485189.js","appmsg/set_font_size.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/set_font_size499238.js","biz_wap/ui/weui.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/weui4b3caf.js","appmsg/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/index4b5552.js"};</script><script nonce="" type="text/javascript" id="moon_inline"> window.__mooninline=1; window.setTimeout(function() {  function __moonf__(){

if(!window.__moonhasinit){
window.__moonhasinit=!0,window.__moonclientlog=[],window.__wxgspeeds&&(window.__wxgspeeds.moonloadedtime=+new Date),
"object"!=typeof JSON&&(window.JSON={
stringify:function(){
return"";
},
parse:function(){
return{};
}
});
var e=function(){
function e(e){
try{
var o;
/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?o="writeLog":/(Android)/i.test(navigator.userAgent)&&(o="log"),
o&&n(o,e);
}catch(t){
throw console.error(t),t;
}
}
function n(e,o){
var t,r,i={};
t=top!=window?top.window:window;
try{
r=t.WeixinJSBridge,i=t.document;
}catch(a){}
e&&r&&r.invoke?r.invoke(e,{
level:"info",
msg:"WechatFe"+o
}):setTimeout(function(){
i.addEventListener?i.addEventListener("WeixinJSBridgeReady",function(){
n(e,o);
},!1):i.attachEvent&&(i.attachEvent("WeixinJSBridgeReady",function(){
n(e,o);
}),i.attachEvent("onWeixinJSBridgeReady",function(){
n(e,o);
}));
},0);
}
var t;
localStorage&&JSON.parse(localStorage.getItem("__WXLS__moonarg"))&&"fromls"==JSON.parse(localStorage.getItem("__WXLS__moonarg")).method&&(t=!0),
e(" moon init, moon_inline:"+window.__mooninline+", moonls:"+t),function(){
var e={},o={},n={};
e.COMBO_UNLOAD=0,e.COMBO_LOADING=1,e.COMBO_LOADED=2;
var t=function(e,n,t){
if(!o[e]){
o[e]=t;
for(var r=3;r--;)try{
moon.setItem(moon.prefix+e,t.toString()),moon.setItem(moon.prefix+e+"_ver",moon_map[e]);
break;
}catch(i){
moon.clear();
}
}
},r=window.alert;
window.__alertList=[],window.alert=function(e){
r(e),window.__alertList.push(e);
};
var i=function(e){
if(!e||!o[e])return null;
var t=o[e];
if("function"==typeof t&&!n[e]){
var a={},s={
exports:a
},c=t(i,a,s,r);
t=o[e]=c||s.exports,n[e]=!0;
}
if(".css"===e.substr(-4)){
var d=document.getElementById(e);
if(!d){
d=document.createElement("style"),d.id=e;
var _=/urls(s/("(?:5|\[sS])"|'(?:6|\[sS])'|7+)s*)/g,l=window.testenv_reshost||window.__moon_host||"res.wx.qq.com";
t=t.replace(_,"url(//"+l+"/$1)"),d.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(d);
}
}
return t;
};
e.combo_status=e.COMBO_UNLOAD,e.run=function(){
var o=e.run.info,n=o&&o[0],t=o&&o[1];
if(n&&e.combo_status==e.COMBO_LOADED){
var r=i(n);
t&&t(r);
}
},e.use=function(o,n){
window.__wxgspeeds&&(window.__wxgspeeds.seajs_use_time=+new Date),e.run.info=[o,n],
e.run();
},window.define=t,window.seajs=e;
}(),function(){
if(window.__nonce_str){
var e=document.createElement;
document.createElement=function(o){
var n=e.apply(this,arguments);
return"object"==typeof o&&(o=o.toString()),"string"==typeof o&&"script"==o.toLowerCase()&&n.setAttribute("nonce",window.__nonce_str),
n;
};
}
window.addEventListener&&window.__DEBUGINFO&&Math.random()<.01&&window.addEventListener("load",function(){
var e=document.createElement("script");
e.src=__DEBUGINFO.safe_js,e.type="text/javascript",e.async=!0;
var o=document.head||document.getElementsByTagName("head")[0];
o.appendChild(e);
});
}(),function(){
function n(e){
return"[object Array]"===Object.prototype.toString.call(e);
}
function t(e){
return"[object Object]"===Object.prototype.toString.call(e);
}
function r(e){
var n=e.stack+" "+e.toString()||"";
try{
if(window.testenv_reshost){
var t="http(s)?://"+window.testenv_reshost,r=new RegExp(t,"g");
n=n.replace(r,"");
}else n=n.replace(/http(s)?://res.wx.qq.com/g,"");
for(var r=//(8+)/js/(S+?).js(,|:)?/g;r.test(n);)n=n.replace(r,function(e,o,n,t){
return n+t;
});
}catch(e){
n=e.stack?e.stack:"";
}
var i=[];
for(o in m)m.hasOwnProperty(o)&&i.push(o+":"+m[o]);
return i.push("STK:"+n.replace(/n/g,"")),i.join("|");
}
function i(e,o,n){
if(!/^mp.weixin.qq.com$/.test(location.hostname)){
var t=[];
n=n.replace(location.href,(location.origin||"")+(location.pathname||"")).replace("#wechat_redirect","").replace("#rd","").split("&");
for(var r=0,i=n.length;i>r;r++){
var a=n[r].split("=");
a[0]&&a[1]&&t.push(a[0]+"="+encodeURIComponent(a[1]));
}
var s=new window.Image;
return void(s.src=(o+t.join("&")).substr(0,1024));
}
var c;
if(window.ActiveXObject)try{
c=new ActiveXObject("Msxml2.XMLHTTP");
}catch(d){
try{
c=new ActiveXObject("Microsoft.XMLHTTP");
}catch(_){
c=!1;
}
}else window.XMLHttpRequest&&(c=new XMLHttpRequest);
c&&(c.open(e,o,!0),c.setRequestHeader("cache-control","no-cache"),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),
c.setRequestHeader("X-Requested-With","XMLHttpRequest"),c.send(n));
}
function a(e){
return function(o,n){
if("string"==typeof o)try{
o=new Function(o);
}catch(t){
throw t;
}
var r=[].slice.call(arguments,2),i=o;
return o=function(){
try{
return i.apply(this,r.length&&r||arguments);
}catch(e){
throw e.stack&&console&&console.error&&console.error("[TryCatch]"+e.stack),h&&window.__moon_report&&window.__moon_report([{
offset:O,
log:"timeout_error;host:"+location.host,
e:e
}]),e;
}
},e(o,n);
};
}
function s(e){
return function(o,n,t){
if("undefined"==typeof t)var t=!1;
var r=this,i=n||function(){};
return n=function(){
try{
return i.apply(r,arguments);
}catch(e){
throw e.stack&&console&&console.error&&console.error("[TryCatch]"+e.stack),h&&window.__moon_report&&window.__moon_report([{
offset:v,
log:"listener_error;type:"+o+";host:"+location.host,
e:e
}]),e;
}
},i.moon_lid=j,x[j]=n,j++,e.call(r,o,n,t);
};
}
function c(e){
return function(o,n,t){
if("undefined"==typeof t)var t=!1;
var r=this;
return n=x[n.moon_lid],e.call(r,o,n,t);
};
}
var d,_,l,m,w,u=/MicroMessenger/i.test(navigator.userAgent),f=/MPAPP/i.test(navigator.userAgent),p=window.define,h=121261,g=0,v=2,y=4,O=9,E=10;
if(window.__initCatch=function(e){
h=e.idkey,d=e.startKey||0,_=e.limit,l=e.badjsId,m=e.reportOpt||"",w=e.extInfo||{},
w.rate=w.rate||.5;
},window.__moon_report=function(e,o){
var a=!1,s="";
try{
s=top.location.href;
}catch(c){
a=!0;
}
var m=.5;
if(w&&w.rate&&(m=w.rate),o&&"number"==typeof o&&(m=o),!/mp.weixin.qq.com/.test(location.href)&&!/payapp.weixin.qq.com/.test(location.href)||Math.random()>m||!u&&!f||top!=window&&!a&&!/mp.weixin.qq.com/.test(s),
t(e)&&(e=[e]),n(e)&&""!=h){
var p="",g=[],v=[],O=[],E=[];
"number"!=typeof _&&(_=1/0);
for(var x=0;xvar j=e[x]||{};
if(!(j.offset>_||"number"!=typeof j.offset||j.offset==y&&w&&w.network_rate&&Math.random()>=w.network_rate)){
var b=1/0==_?d:d+j.offset;
g[x]="[moon]"+h+"_"+b+";"+j.log+";"+r(j.e||{})||"",v[x]=b,O[x]=1;
}
}
for(var D=0;Dif(E.length>0){
i("POST",location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?","idkey="+E.join(";")+"&r="+Math.random()+"&lc="+g.length+p);
var m=1;
if(w&&w.badjs_rate&&(m=w.badjs_rate),Math.random()if(p=p.replace(/uin:(.)|biz:(.)|mid:(.)|idx:(.)|sn:(.)*|/,""),l){
var B=new Image,S="https://badjs.weixinbridge.com/badjs?id="+l+"&level=4&from="+encodeURIComponent(location.host)+"&msg="+encodeURIComponent(p);
B.src=S.slice(0,1024);
}
if("undefined"!=typeof WX_BJ_REPORT&&WX_BJ_REPORT.BadJs)for(var x=0;xvar j=e[x]||{};
if(j.e)WX_BJ_REPORT.BadJs.onError(j.e);else{
var I=/9*/.exec(j.log)[0];
WX_BJ_REPORT.BadJs.report(I,j.log,{
mid:"mmbizwap:Monitor"
});
}
}
}else for(var x=0;xvar j=e[x]||{};
j.e&&(j.e.BADJS_EXCUTED=!0);
}
}
}
},window.setTimeout=a(window.setTimeout),window.setInterval=a(window.setInterval),
Math.random()<.01&&window.Document&&window.HTMLElement){
var x={},j=0;
Document.prototype.addEventListener=s(Document.prototype.addEventListener),Document.prototype.removeEventListener=c(Document.prototype.removeEventListener),
HTMLElement.prototype.addEventListener=s(HTMLElement.prototype.addEventListener),
HTMLElement.prototype.removeEventListener=c(HTMLElement.prototype.removeEventListener);
}
var b=window.navigator.userAgent;
if((/ip(hone|ad|od)/i.test(b)||/android/i.test(b))&&!/windows phone/i.test(b)&&window.localStorage&&window.localStorage.setItem){
var D=window.localStorage.setItem,B=0;
window.localStorage.setItem=function(e,o){
if(!(B>=10))try{
D.call(window.localStorage,e,o);
}catch(n){
n.stack&&console&&console.error&&console.error("[TryCatch]"+n.stack),window.__moon_report([{
offset:E,
log:"localstorage_error;"+n.toString(),
e:n
}]),B++,B>=3&&window.moon&&window.moon.clear&&moon.clear();
}
};
}
window.seajs&&p&&(window.define=function(){
for(var o,n=[],t=arguments&&arguments[0],i=0,a=arguments.length;a>i;i++){
var s=o=arguments[i];
"function"==typeof o&&(o=function(){
try{
return s.apply(this,arguments);
}catch(o){
throw"string"==typeof t&&console.error("TryCatchid:"+t),o.stack&&console&&console.error&&console.error("[TryCatch]"+o.stack),
h&&window.__moon_report&&window.__moon_report([{
offset:g,
log:"define_error;id:"+t+";",
e:o
}]),e(" [define_error]"+JSON.stringify(r(o))),o;
}
},o.toString=function(e){
return function(){
return e.toString();
};
}(arguments[i])),n.push(o);
}
return p.apply(this,n);
});
}(),function(o){
function n(e,o,n){
return window.__DEBUGINFO?(window.__DEBUGINFO.res_list||(window.__DEBUGINFO.res_list=[]),
window.__DEBUGINFO.res_list[e]?(window.__DEBUGINFO.res_liste=n,!0):!1):!1;
}
function t(e){
var o=new TextEncoder("utf-8").encode(e),n=crypto.subtle||crypto.webkitSubtle;
return n.digest("SHA-256",o).then(function(e){
return r(e);
});
}
function r(e){
for(var o=[],n=new DataView(e),t=0;tvar r=n.getUint32(t),i=r.toString(16),a="00000000",s=(a+i).slice(-a.length);
o.push(s);
}
return o.join("");
}
function i(e,o,n){
if("object"==typeof e){
var t=Object.prototype.toString.call(e).replace(/^[object (.+)]$/,function(e,o){
return o;
});
if(n=n||e,"Array"==t){
for(var r=0,i=e.length;i>r;++r)if(o.call(n,e[r],r,e)===!1)return;
}else{
if("Object"!==t&&a!=e)throw"unsupport type";
if(a==e){
for(var r=e.length-1;r>=0;r--){
var s=a.key(r),c=a.getItem(s);
if(o.call(n,c,s,e)===!1)return;
}
return;
}
for(var r in e)if(e.hasOwnProperty(r)&&o.call(n,e[r],r,e)===!1)return;
}
}
}
var a=o.localStorage,s=document.head||document.getElementsByTagName("head")[0],c=1,d=11,_=12,l=13,m=window.__allowLoadResFromMp?1:2,w=window.__allowLoadResFromMp?1:0,u=m+w,f=window.testenv_reshost||window.__moon_host||"res.wx.qq.com",p=new RegExp("^(http(s)?:)?//"+f);
window.__loadAllResFromMp&&(f="mp.weixin.qq.com",m=0,u=m+w);
var h={
prefix:"__MOON__",
loaded:[],
unload:[],
clearSample:!0,
hit_num:0,
mod_num:0,
version:1003,
cacheData:{
js_mod_num:0,
js_hit_num:0,
js_not_hit_num:0,
js_expired_num:0,
css_mod_num:0,
css_hit_num:0,
css_not_hit_num:0,
css_expired_num:0
},
init:function(){
h.loaded=[],h.unload=[];
var e,n,r;
if(window.no_moon_ls&&(h.clearSample=!0),a){
var s="_moon_ver_key_",c=a.getItem(s);
c!=h.version&&(h.clear(),a.setItem(s,h.version));
}
if((-1!=location.search.indexOf("no_moon1=1")||-1!=location.search.indexOf("no_lshttps=1"))&&h.clear(),
a){
var d=1*a.getItem(h.prefix+"clean_time"),_=+new Date;
if(_-d>=1296e6){
h.clear();
try{
!!a&&a.setItem(h.prefix+"clean_time",+new Date);
}catch(l){}
}
}
i(moon_map,function(i,s){
if(n=h.prefix+s,r=!!i&&i.replace(p,""),e=!!a&&a.getItem(n),version=!!a&&(a.getItem(n+"_ver")||"").replace(p,""),
h.mod_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_mod_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_mod_num++,
h.clearSample||!e||r!=version)h.unload.push(r.replace(p,"")),r&&-1!=r.indexOf(".css")?e?r!=version&&h.cacheData.css_expired_num++:h.cacheData.css_not_hit_num++:r&&-1!=r.indexOf(".js")&&(e?r!=version&&h.cacheData.js_expired_num++:h.cacheData.js_not_hit_num++);else{
if("https:"==location.protocol&&window.moon_hash_map&&window.moon_hash_map[s]&&window.crypto)try{
t(e).then(function(e){
window.moon_hash_map[s]!=e&&console.log(s);
});
}catch(c){}
try{
var d="//# sourceURL="+s+"n//@ sourceURL="+s;
o.eval.call(o,'define("'+s+'",[],'+e+")"+d),h.hit_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_hit_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_hit_num++;
}catch(c){
h.unload.push(r.replace(p,""));
}
}
}),h.load(h.genUrl());
},
genUrl:function(){
var e=h.unload;
if(!e||e.length<=0)return[];
var o,n,t="",r=[],i={},a=-1!=location.search.indexOf("no_moon2=1"),s="//"+f;
-1!=location.href.indexOf("moon_debug2=1")&&(s="//mp.weixin.qq.com");
for(var c=0,d=e.length;d>c;++c){
/^/(.*?)//.test(e[c]);
var _=/^/(.*?)//.exec(e[c]);
_.length<2||!_[1]||(n=_[1],t=i[n],t?(o=t+","+e[c],o.length>1e3||a?(r.push(t+"?v="+h.version),
t=location.protocol+s+e[c],i[n]=t):(t=o,i[n]=t)):(t=location.protocol+s+e[c],i[n]=t));
}
for(var l in i)i.hasOwnProperty(l)&&r.push(i[l]);
return r;
},
load:function(e){
if(window.__wxgspeeds&&(window.__wxgspeeds.mod_num=h.mod_num,window.__wxgspeeds.hit_num=h.hit_num),
!e||e.length<=0)return seajs.combo_status=seajs.COMBO_LOADED,seajs.run(),console.debug&&console.debug("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num),
void window.__moonclientlog.push("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num);
seajs.combo_status=seajs.COMBO_LOADING;
var o=0,n=+new Date;
window.__wxgspeeds&&(window.__wxgspeeds.combo_times=[],window.__wxgspeeds.combo_times.push(n)),
i(e,function(t){
h.request(t,u,function(){
if(window.__wxgspeeds&&window.__wxgspeeds.combo_times.push(+new Date),o++,o==e.length){
var t=+new Date-n;
window.__wxgspeeds&&(window.__wxgspeeds.mod_downloadtime=t),seajs.combo_status=seajs.COMBO_LOADED,
seajs.run(),console.debug&&console.debug("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms"),
window.__moonclientlog.push("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms");
}
});
});
},
request:function(o,t,r){
if(o){
t=t||0,o.indexOf("mp.weixin.qq.com")>-1&&((new Image).src=location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?idkey=27613_32_1&r="+Math.random(),
window.__moon_report([{
offset:_,
log:"load_script_from_mp: "+o
}],1));
var i=-1;
window.__DEBUGINFO&&(__DEBUGINFO.res_list||(__DEBUGINFO.res_list=[]),__DEBUGINFO.res_list.push({
type:"js",
status:"pendding",
start:+new Date,
end:0,
url:o
}),i=__DEBUGINFO.res_list.length-1),-1!=location.search.indexOf("no_lshttps=1")&&(o=o.replace("http://","https://"));
var a=document.createElement("script");
a.src=o,a.type="text/javascript",a.async=!0,a.down_time=+new Date,a.onerror=function(s){
n(i,"status","error"),n(i,"end",+new Date);
var _=new Error(s);
if(t>=0)if(w>t){
var m=o.replace("res.wx.qq.com","mp.weixin.qq.com");
h.request(m,t,r);
}else h.request(o,t,r);else window.__moon_report&&window.__moon_report([{
offset:c,
log:"load_script_error: "+o,
e:_
}],1);
if(t==w-1&&window.__moon_report([{
offset:d,
log:"load_script_error: "+o,
e:_
}],1),-1==t){
var u="ua: "+window.navigator.userAgent+", time="+(+new Date-a.down_time)+", load_script_error -1 : "+o;
window.__moon_report([{
offset:l,
log:u
}],1);
}
window.__moonclientlog.push("moon load js error : "+o+", error -> "+_.toString()),
e("moon_request_error url:"+o);
},"undefined"!=typeof moon_crossorigin&&moon_crossorigin&&a.setAttribute("crossorigin",!0),
a.onload=a.onreadystatechange=function(){
n(i,"status","loaded"),n(i,"end",+new Date),!a||a.readyState&&!/loaded|complete/.test(a.readyState)||(n(i,"status","200"),
a.onload=a.onreadystatechange=null,"function"==typeof r&&r());
},t--,s.appendChild(a),e("moon_request url:"+o+" retry:"+t);
}
},
setItem:function(e,o){
!!a&&a.setItem(e,o);
},
clear:function(){
a&&(i(a,function(e,o){
~o.indexOf(h.prefix)&&a.removeItem(o);
}),console.debug&&console.debug("[moon] clear"));
},
idkeyReport:function(e,o,n){
n=n||1;
var t=e+"_"+o+"_"+n;
(new Image).src="/mp/jsmonitor?idkey="+t+"&r="+Math.random();
}
};
seajs&&seajs.use&&"string"==typeof window.__moon_mainjs&&seajs.use(window.__moon_mainjs),
window.moon=h;
}(window),function(){
try{
Math.random()<1;
}catch(e){}
}(),window.moon.init();
};
e(),!!window.__moon_initcallback&&window.__moon_initcallback(),window.__wxgspeeds&&(window.__wxgspeeds.moonendtime=+new Date);
}
}
var WX_BJ_REPORT=window.WX_BJ_REPORT||{};
!function(e){
function o(e,o,n,t,r,i){
return{
name:e||"",
message:o||"",
file:n||"",
line:t||"",
col:r||"",
stack:i&&i.stack||""
};
}
function n(e){
var o=t(e);
return{
name:e.name,
key:e.message,
msg:e.message,
stack:o.info,
file:o.file,
line:o.line,
col:o.col,
client_version:"",
_info:e._info
};
}
function t(o){
o._info=o._info||"";
var n=o.stack||"",t={
info:n,
file:o.file||"",
line:o.line||"",
col:o.col||""
};
if(""==t.file){
var r=n.split(/batb/);
if(r&&r[1]){
var i=/(https?://10+):(d+):(d+)/.exec(r[1]);
i&&(i[1]&&i[1]!=t.file&&(t.file&&(o._info+=" [file: "+t.file+" ]"),t.file=i[1]),
i[2]&&i[2]!=t.line&&(t.line&&(o._info+=" [line: "+t.line+" ]"),t.line=i[2]),i[3]&&i[3]!=t.col&&(t.col&&(o._info+=" [col: "+t.col+" ]"),
t.col=i[3]));
}
}
return t&&t.file&&t.file.length>0&&(t.info=t.info.replace(new RegExp(t.file.split("?")[0],"gi"),"__FILE__")),
e.BadJs.ignorePath&&(t.info=t.info.replace(/http(s)?:11*//gi,"").replace(/n/gi,"")),
t;
}
if(!e.BadJs){
var r="BadjsWindowError",i=function(e,o){
for(var n in o)e[n]=o[n];
return e;
};
return e.BadJs={
uin:0,
mid:"",
view:"wap",
_cache:{},
_info:{},
_hookCallback:null,
ignorePath:!0,
"throw":function(e,o){
throw this.onError(e,o),e;
},
onError:function(o,t){
try{
if(1==o.BADJS_EXCUTED)return;
o.BADJS_EXCUTED=!0;
var r=n(o);
if(r.uin=this.uin,r.mid=this.mid,r.view=this.view,r.cmdb_module="mmbizwap",t&&(r=i(r,t)),
r.cid&&(r.key="["+r.cid+"]:"+r.key),o._info&&(r.msg+=" || e.info:"+o._info),"{}"!=JSON.stringify(this._info)&&(r.msg+=" || info:"+JSON.stringify(this._info)),
"function"==typeof this._hookCallback&&this._hookCallback(r)===!1)return;
return this._send(r),e.BadJs;
}catch(o){
console.error(o);
}
},
winErr:function(n){
n.error&&n.error.BADJS_EXCUTED||e.BadJs.onError(o(r,n.message,n.filename,n.lineno,n.colno,n.error));
},
init:function(o,n,t){
return this.uin=o||this.uin,this.mid=n||this.mid,this.view=t||this.view,e.BadJs;
},
hook:function(o){
return this._hookCallback=o,e.BadJs;
},
_send:function(o){
if(!o.mid){
if("undefined"==typeof window.PAGE_MID||!window.PAGE_MID)return;
o.mid=window.PAGE_MID;
}
o.uin||(o.uin=window.user_uin||0);
var n=[o.mid,o.name,o.key].join("|");
if(!this._cache||!this._cache[n])return this._cache&&(this._cache[n]=!0),this._xhr(o),
e.BadJs;
},
_xhr:function(e){
var o;
if(window.ActiveXObject)try{
o=new ActiveXObject("Msxml2.XMLHTTP");
}catch(n){
try{
o=new ActiveXObject("Microsoft.XMLHTTP");
}catch(t){
o=!1;
}
}else window.XMLHttpRequest&&(o=new XMLHttpRequest);
var r="";
for(var i in e)i&&e[i]&&(r+=[i,"=",encodeURIComponent(e[i]),"&"].join(""));
if(o&&o.open)o.open("POST","https://badjs.weixinbridge.com/report",!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),
o.onreadystatechange=function(){},o.send(r.slice(0,-1));else{
var a=new Image;
a.src="https://badjs.weixinbridge.com/report?"+r;
}
},
report:function(e,n,t){
return this.onError(o(e,n),t),this;
},
mark:function(e){
this._info=i(this._info,e);
},
nocache:function(){
return this._cache=!1,e.BadJs;
}
},window.addEventListener&&window.addEventListener("error",e.BadJs.winErr),e.BadJs;
}
}(WX_BJ_REPORT),window.WX_BJ_REPORT=WX_BJ_REPORT,__moonf__(); }, 25);


(function() {
    var ua = navigator.userAgent;
    if (ua.indexOf("MicroMessenger") != -1 && ua.indexOf("Android") != -1){
        var script = document.createElement('script');
        var head = document.getElementsByTagName('head')[0];
        script.type = 'text/javascript';
        script.src = "https://midas.gtimg.cn/h5sdk/js/api/h5sdk.js";
        head.appendChild(script);
    }
})();


var real_show_page_time = +new Date();
if (!!window.addEventListener){
    window.addEventListener("load", function(){
        window.onload_endtime = +new Date();
    });
}



<i class="weui-loading weui-icon_toast"></i>
<p class="weui-toast__content js_loading_content"></p>


版权声明:如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件至:developerteam@list.alibaba-inc.com 进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:

集结各类场景实战经验,助你开发运维畅行无忧

其他文章