资讯专栏INFORMATION COLUMN

Vue 初始化性能优化

graf / 859人阅读

摘要:在最近开发的一个里,初始化一个较重的页面竟然用了,这让我开始重视的初始化性能,并最终优化到,这篇文章分享我的优化思路。初始化时,会对做改造,在现代浏览器里,这个过程实际上挺快的,但仍然有优化空间。

原文: https://github.com/Coffcer/Bl...

前言

一般来说,你不需要太关心vue的运行时性能,它在运行时非常快,但付出的代价是初始化时相对较慢。在最近开发的一个Hybrid APP里,Android Webview初始化一个较重的vue页面竟然用了1200ms ~ 1400ms,这让我开始重视vue的初始化性能,并最终优化到200 ~ 300ms,这篇文章分享我的优化思路。

性能瓶颈在哪里?

先看一下常见的vue写法:在html里放一个app组件,app组件里又引用了其他的子组件,形成一棵以app为根节点的组件树。


     

而正是这种做法引发了性能问题,要初始化一个父组件,必然需要先初始化它的子组件,而子组件又有它自己的子组件。那么要初始化根标签,就需要从底层开始冒泡,将页面所有组件都初始化完。所以我们的页面会在所有组件都初始化完才开始显示。

这个结果显然不是我们要的,更好的结果是页面可以从上到下按顺序流式渲染,这样可能总体时间增长了,但首屏时间缩减,在用户看来,页面打开速度就更快了。

要实现这种渲染模式,我总结了下有3种方式实现。第3种方式是我认为最合适的,也是我在项目中实际使用的优化方法。

第一种:不使用根组件

这种方式非常简单,例如:


    
    
    

抛弃了根组件,从而使A、B、C每一个组件初始化完都立刻展示。但根组件在SPA里是非常必要的,所以这种方式只适用小型页面。

第二种:异步组件

异步组件在官方文档已有说明,使用非常简单:


    
    
new Vue({
    components: {
        A: { /*component-config*/ },
        B (resolve) {
            setTimeout(() => {
                resolve({ /*component-config*/ })
            }, 0);
        }
    }
})

这里组件是一个异步组件,会等到手动调用resolve函数时才开始初始化,而父组件也不必等待先初始化完。

我们利用setTimeout(fn, 0)将的初始化放在队列最后,结果就是页面会在初始化完后立刻显示,然后再显示。如果你的页面有几十个组件,那么把非首屏的组件全设成异步组件,页面显示速度会有明显的提升。

你可以封装一个简单的函数来简化这个过程:

function deferLoad (component, time = 0) {
    return (resolve) => {
        window.setTimeout(() => resolve(component), time)
    };
}

new Vue({
    components: {
        B: deferLoad( /*component-config*/ ),
        // 100ms后渲染
        C: deferLoad( /*component-config*/, 100 )
    }
})

看起来很美好,但这种方式也有问题,考虑下这样的结构:


    
    
    
    
    
    

还是按照上面的异步组件做法,这时候就需要考虑把哪些组件设成异步的了。如果把A、B、C都设成异步的,那结果就是3个</b>会首先渲染出来,页面渲染的过程在用户看来非常奇怪,并不是预期中的从上到下顺序渲染。</p> <b>第三种:v-if 和 terminal指令</b> <p>这是我推荐的一种做法,简单有效。还是那个结构,我们给要延迟渲染的组件加上v-if:</p> <pre><app> <A></A> <B v-if="showB"></B> <C v-if="showC"></C> </app></pre> <pre>new Vue({ data: { showB: false, showC: false }, created () { // 显示B setTimeout(() => { this.showB = true; }, 0); // 显示C setTimeout(() => { this.showC = true; }, 0); } });</pre> <p>这个示例写起来略显啰嗦,但它已经实现了我们想要的顺序渲染的效果。页面会在A组件初始化完后显示,然后再按顺序渲染其余的组件,整个页面渲染方式看起来是流式的。</p> <p>有些人可能会担心<b>v-if</b>存在一个编译/卸载过程,会有性能影响。但这里并不需要担心,因为<b>v-if</b>是惰性的,只有当第一次值为true时才会开始初始化。</p> <p>这种写法看起来很麻烦,如果我们能实现一个类似<b>v-if</b>的组件,然后直接指定多少秒后渲染,那就更好了,例如:</p> <pre><app> <A></A> <B v-lazy="0"></B> <C v-lazy="100"></C> </app></pre> <p>一个简单的指令即可,不需要js端任何配合,并且可以用在普通dom上面,Nice!</p> <p>在vue里,类似<b>v-if</b>和<b>v-for</b>这种是terminal指令,会在指令内部编译组件。如果你想要自己实现一个terminal指令,需要加上<b>terminal: true</b>,例如:</p> <pre>Vue.directive("lazy", { terminal: true, bind () {}, update () {}, unbind () {} });</pre> <p>这是vue在1.0.19+新增的功能,由于比较冷门,文档也没有特别详细的叙述,最好的方式是参照着<b>v-if</b>和<b>v-for</b>的源码来写。</p> <p>我已经为此封装了一个terminal指令,你可以直接使用:<br>https://github.com/Coffcer/vu...</p> <b>其他的优化点</b> <p>除了组件上的优化,我们还可以对vue的依赖改造入手。初始化时,vue会对data做getter、setter改造,在现代浏览器里,这个过程实际上挺快的,但仍然有优化空间。</p> <p><b>Object.freeze()</b>是ES5新增的API,用来冻结一个对象,禁止对象被修改。vue 1.0.18+以后,不会对已冻结的data做getter、setter转换。</p> <p>如果你确保某个data不需要跟踪依赖,可以使用Object.freeze将其冻结。但请注意,被冻结的是对象的值,你仍然可以将引用整个替换调。看下面例子:</p> <pre><p v-for="item in list">{{ item.value }}</p></pre> <pre>new Vue({ data: { // vue不会对list里的object做getter、setter绑定 list: Object.freeze([ { value: 1 }, { value: 2 } ]) }, created () { // 界面不会有响应 this.list[0].value = 100; // 下面两种做法,界面都会响应 this.list = [ { value: 100 }, { value: 200 } ]; this.list = Object.freeze([ { value: 100 }, { value: 200 } ]); } })</pre> <b>后记</b> <p>vue 1.0+ 的组件其实不算轻量,初始化一个组件包括依赖收集、转换等过程,但其实有些是可以放在编译时提前完成的。vue 2.0+ 已经在这方面做了不少的改进:分离了编译时和运行时、提供函数组件等,可以预见,vue 2.0的性能将有很大的提升。</p> <p>v-lazy-component: https://github.com/Coffcer/vu...</p> </div> <div class="mt-64 tags-seach" > <div class="tags-info"> <a style="width:120px;" title="服务器托管" href="https://www.ucloud.cn/site/active/new/uhybrid.html?ytag=seo#datacenter">服务器托管</a> <a style="width:120px;" title="云服务器" href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo">云服务器</a> <a style="width:120px;" title="性能优化" href="https://www.ucloud.cn/yun/tag/xingnengyouhua/">性能优化</a> <a style="width:120px;" title="优化系统性能" href="https://www.ucloud.cn/yun/tag/youhuaxitongxingneng/">优化系统性能</a> <a style="width:120px;" title="网站性能优化" href="https://www.ucloud.cn/yun/tag/wangzhanxingnengyouhua/">网站性能优化</a> <a style="width:120px;" title="页面性能优化" href="https://www.ucloud.cn/yun/tag/yemianxingnengyouhua/">页面性能优化</a> </div> </div> <div class="entry-copyright mb-30"> <p class="mb-15"> 文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。</p> <p>转载请注明本文地址:https://www.ucloud.cn/yun/90975.html</p> </div> <ul class="pre-next-page"> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/90974.html">上一篇:前端单元测试之Karma环境搭建</a></li> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/90976.html">下一篇:一个关于回调的故事</a></li> </ul> </div> <div class="about_topicone-mid"> <h3 class="top-com-title mb-0"><span data-id="0">相关文章</span></h3> <ul class="com_white-left-mid atricle-list-box"> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/88926.html"><b>前端每周清单第 34 期:<em>Vue</em> 现状盘点与 3.0 展望,React 代码迁移与<em>优化</em>,图片<em>优化</em>详论</b></a></h2> <p class="ellipsis2 good">摘要:工程实践立足实践,提示实际水平内联函数与性能很多关于性能优化的文章都会谈及内联函数,其也是常见的被诟病为拖慢性能表现的元凶之一不过本文却是打破砂锅问到底,论证了内联函数并不一定就会拖慢性能,过度的性能优化反而会有损于应用性能。 showImg(https://segmentfault.com/img/remote/1460000011481413?w=1240&h=825); 前端每周...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-661.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000661.jpg" alt=""><span class="layui-hide64">CoderStudy</span></a> <time datetime="">2019-08-21 16:56</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/110215.html"><b><em>Vue</em>.js应用<em>性能</em><em>优化</em>:第一部分---介绍<em>性能</em><em>优化</em>和懒加载</b></a></h2> <p class="ellipsis2 good">摘要:我的目标是使本系列成为关于应用程序性能的完整指南。代码分割就是将应用程序分割成这些延迟加载的块。总结延迟加载是提高应用程序性能并减少其大小的最佳方法之一。在本系列的下一部分中,我将向您展示如何使用和路由来分割应用程序代码。 当移动优先(mobile-first)的方式逐渐成为一种标准,而不确定的网络环境因素应该始终是我们考虑的一点,因此保持让应用程序快速加载变得越来越困难。在本系列文章...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-1552.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/15/small_000001552.jpg" alt=""><span class="layui-hide64">ZweiZhao</span></a> <time datetime="">2019-08-26 18:27</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/109448.html"><b><em>Vue</em>.js应用<em>性能</em><em>优化</em>:第二部分---路由懒加载和 Vendor bundle 反模式</b></a></h2> <p class="ellipsis2 good">摘要:现在,我们将更深入地研究,并学习用于分割应用程序最实用的模式。本系列文章基于对性能优化过程的学习。路径时才被下载。为了便于理解,文件名称并不是由生成的真实名称。接下来,我们将学习其他部分和单独的组件也能够从主文件分割出来并延迟加载。 在前一篇文章中,我们学习了什么是代码分割,它是如何与 Webpack 一起工作的,以及如何在Vue应用程序中使用延迟加载。现在,我们将更深入地研究,并学习...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-643.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000643.jpg" alt=""><span class="layui-hide64">0x584a</span></a> <time datetime="">2019-08-26 13:45</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/109635.html"><b><em>Vue</em>.js应用<em>性能</em><em>优化</em>:第三部分-延迟加载<em>Vue</em>x模块</b></a></h2> <p class="ellipsis2 good">摘要:静态模块不能被取消注册也不能延迟注册,并且在初始化后不能更改静态模块的结构不是状态。为此,我们将在路由对应的组件中加载模块,而不是在中导入并注册它。能代码分割模块是一个强大的工具。 在前一部分,我们学习了足够强大的模式,可以显着提高应用程序的性能 - 按每个路由分割代码。虽然按路由分割代码非常有用,但是在用户访问我们的站点后,仍然有很多代码是不需要的。在本系列的这一部分中,我们将重点关...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-762.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/07/small_000000762.jpg" alt=""><span class="layui-hide64">charles_paul</span></a> <time datetime="">2019-08-26 13:50</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/92676.html"><b>前端每周清单第 48 期:Slack Webpack 构建<em>优化</em>,CSS 命名规范与用户追踪,<em>Vue</em>.</b></a></h2> <p class="ellipsis2 good">摘要:发布是由团队开源的,操作接口库,已成为事实上的浏览器操作标准。本周正式发布,为我们带来了,,支持自定义头部与脚部,支持增强,兼容原生协议等特性变化。新特性介绍日前发布了大版本更新,引入了一系列的新特性与提升,本文即是对这些变化进行深入解读。 showImg(https://segmentfault.com/img/remote/1460000012940044); 前端每周清单专注前端...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-886.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/08/small_000000886.jpg" alt=""><span class="layui-hide64">sean</span></a> <time datetime="">2019-08-22 13:57</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> </ul> </div> <div class="topicone-box-wangeditor"> <h3 class="top-com-title mb-64"><span>发表评论</span></h3> <div class="xcp-publish-main flex_box_zd"> <div class="unlogin-pinglun-box"> <a href="javascript:login()" class="grad">登陆后可评论</a> </div> </div> </div> <div class="site-box-content"> <div class="site-content-title"> <h3 class="top-com-title mb-64"><span>0条评论</span></h3> </div> <div class="pages"></ul></div> </div> </div> <div class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right"> <div class=""> <div class="com_layuiright-box user-msgbox"> <a href="https://www.ucloud.cn/yun/u-580.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/05/small_000000580.jpg" alt=""></a> <h3><a href="https://www.ucloud.cn/yun/u-580.html" rel="nofollow">graf</a></h3> <h6>男<span>|</span>高级讲师</h6> <div class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(580)" id="attenttouser_580" class="grad follow-btn notfollow attention">我要关注</a> <a href="javascript:login()" title="发私信" >我要私信</a> </div> <div class="user-msgbox-list flex_box_zd"> <h3 class="hpf">TA的文章</h3> <a href="https://www.ucloud.cn/yun/ut-580.html" class="box_hxjz">阅读更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/124668.html">web技术分享| LRU 缓存淘汰算法</a></h3> <p>阅读 3641<span>·</span>2021-11-24 09:39</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/124123.html">自定义 OpenShift s2i 镜像与模板——OracleJDK8</a></h3> <p>阅读 3508<span>·</span>2021-11-22 12:07</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/122857.html">便宜腾讯云云服务器选择推荐(优先新客三年实惠套餐)</a></h3> <p>阅读 826<span>·</span>2021-11-04 16:10</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/119400.html">求C n m(从n个数中选m个数,有多少种组合?问题)暴力—递归——回归数学公式,三种方法,层层优化</a></h3> <p>阅读 582<span>·</span>2021-09-07 09:59</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/117417.html">Less 日常用法</a></h3> <p>阅读 1718<span>·</span>2019-08-30 15:55</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/116812.html">埋坑一: vue中子组件调用兄弟组件方法</a></h3> <p>阅读 751<span>·</span>2019-08-30 15:54</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/112917.html">Javascript图片懒加载</a></h3> <p>阅读 556<span>·</span>2019-08-29 14:06</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/110354.html">MyBatis插件使用--分页插件与性能拦截器</a></h3> <p>阅读 2326<span>·</span>2019-08-27 10:54</p></li> </ul> </div> <!-- 文章详情右侧广告--> <div class="com_layuiright-box"> <h6 class="top-com-title"><span>最新活动</span></h6> <div class="com_adbox"> <div class="layui-carousel" id="right-item"> <div carousel-item> <div> <a href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/zYeoGo8M.png" alt="云服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/gpu.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/29R6rrOS.png" alt="GPU服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo#global-uhost" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/FFBiRWaT.png" alt="海外云主机"> </a> </div> <div> <a href="https://www.ucloudstack.com/?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/VEgKnwRX.png" alt="私有云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/new/uhybrid.html?ytag=seo#datacenter" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/Z1o6CMPK.png" alt="服务器托管"> </a> </div> </div> </div> </div> <!-- banner结束 --> <div class="adhtml"> </div> <script> $(function(){ $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/ad/getad/1.html", cache: false, success: function(text){ $(".adhtml").html(text); } }); }) </script> </div> </div> </div> </div> </div> </section> <!-- wap拉出按钮 --> <div class="site-tree-mobile layui-hide"> <i class="layui-icon layui-icon-spread-left"></i> </div> <!-- wap遮罩层 --> <div class="site-mobile-shade"></div> <!--付费阅读 --> <div id="payread"> <div class="layui-form-item">阅读需要支付1元查看</div> <div class="layui-form-item"><button class="btn-right">支付并查看</button></div> </div> <script> var prei=0; $(".site-seo-depict pre").each(function(){ var html=$(this).html().replace("<code>","").replace("</code>","").replace('<code class="javascript hljs" codemark="1">',''); $(this).attr('data-clipboard-text',html).attr("id","pre"+prei); $(this).html("").append("<code>"+html+"</code>"); prei++; }) $(".site-seo-depict img").each(function(){ if($(this).attr("src").indexOf('data:image/svg+xml')!= -1){ $(this).remove(); } }) $("LINK[href*='style-49037e4d27.css']").remove(); $("LINK[href*='markdown_views-d7a94ec6ab.css']").remove(); layui.use(['jquery', 'layer','code'], function(){ $("pre").attr("class","layui-code"); $("pre").attr("lay-title",""); $("pre").attr("lay-skin",""); layui.code(); $(".layui-code-h3 a").attr("class","copycode").html("复制代码 ").attr("onclick","copycode(this)"); }); function copycode(target){ var id=$(target).parent().parent().attr("id"); var clipboard = new ClipboardJS("#"+id); clipboard.on('success', function(e) { e.clearSelection(); alert("复制成功") }); clipboard.on('error', function(e) { alert("复制失败") }); } //$(".site-seo-depict").html($(".site-seo-depict").html().slice(0, -5)); </script> <link rel="stylesheet" type="text/css" href="https://www.ucloud.cn/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css"> <script src="https://www.ucloud.cn/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script> <script src="https://www.ucloud.cn/yun/static/js/clipboard.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script> function setcode(){ var _html=''; document.querySelectorAll('pre code').forEach((block) => { var _tmptext=$.trim($(block).text()); if(_tmptext!=''){ _html=_html+_tmptext; console.log(_html); } }); } </script> <script> function payread(){ layer.open({ type: 1, title:"付费阅读", shadeClose: true, content: $('#payread') }); } // 举报 function jupao_tip(){ layer.open({ type: 1, title:false, shadeClose: true, content: $('#jubao') }); } $(".getcommentlist").click(function(){ var _id=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); $("#articlecommentlist"+_id).toggleClass("hide"); var flag=$("#articlecommentlist"+_id).attr("dataflag"); if(flag==1){ flag=0; }else{ flag=1; //加载评论 loadarticlecommentlist(_id,_tid); } $("#articlecommentlist"+_id).attr("dataflag",flag); }) $(".add-comment-btn").click(function(){ var _id=$(this).attr("dataid"); $(".formcomment"+_id).toggleClass("hide"); }) $(".btn-sendartcomment").click(function(){ var _aid=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); var _content=$.trim($(".commenttext"+_aid).val()); if(_content==''){ alert("评论内容不能为空"); return false; } var touid=$("#btnsendcomment"+_aid).attr("touid"); if(touid==null){ touid=0; } addarticlecomment(_tid,_aid,_content,touid); }) $(".button_agree").click(function(){ var supportobj = $(this); var tid = $(this).attr("id"); $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/index.php?topic/ajaxhassupport/" + tid, cache: false, success: function(hassupport){ if (hassupport != '1'){ $.ajax({ type: "GET", cache:false, url: "https://www.ucloud.cn/yun/index.php?topic/ajaxaddsupport/" + tid, success: function(comments) { supportobj.find("span").html(comments+"人赞"); } }); }else{ alert("您已经赞过"); } } }); }); function attenquestion(_tid,_rs){ $.ajax({ //提交数据的类型 POST GET type:"POST", //提交的网址 url:"https://www.ucloud.cn/yun/favorite/topicadd.html", //提交的数据 data:{tid:_tid,rs:_rs}, //返回数据的格式 datatype: "json",//"xml", "html", "script", "json", "jsonp", "text". //在请求之前调用的函数 beforeSend:function(){}, //成功返回之后调用的函数 success:function(data){ var data=eval("("+data+")"); console.log(data) if(data.code==2000){ layer.msg(data.msg,function(){ if(data.rs==1){ //取消收藏 $(".layui-layer-tips").attr("data-tips","收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart-o"></i>'); } if(data.rs==0){ //收藏成功 $(".layui-layer-tips").attr("data-tips","已收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart"></i>') } }) }else{ layer.msg(data.msg) } } , //调用执行后调用的函数 complete: function(XMLHttpRequest, textStatus){ postadopt=true; }, //调用出错执行的函数 error: function(){ //请求出错处理 postadopt=false; } }); } </script> <footer> <div class="layui-container"> <div class="flex_box_zd"> <div class="left-footer"> <h6><a href="https://www.ucloud.cn/"><img src="https://www.ucloud.cn/yun/static/theme/ukd//images/logo.png" alt="UCloud (优刻得科技股份有限公司)"></a></h6> <p>UCloud (优刻得科技股份有限公司)是中立、安全的云计算服务平台,坚持中立,不涉足客户业务领域。公司自主研发IaaS、PaaS、大数据流通平台、AI服务平台等一系列云计算产品,并深入了解互联网、传统企业在不同场景下的业务需求,提供公有云、混合云、私有云、专有云在内的综合性行业解决方案。</p> </div> <div class="right-footer layui-hidemd"> <ul class="flex_box_zd"> <li> <h6>UCloud与云服务</h6> <p><a href="https://www.ucloud.cn/site/about/intro/">公司介绍</a></p> <p><a href="https://zhaopin.ucloud.cn/" >加入我们</a></p> <p><a href="https://www.ucloud.cn/site/ucan/onlineclass/">UCan线上公开课</a></p> <p><a href="https://www.ucloud.cn/site/solutions.html" >行业解决方案</a></p> <p><a href="https://www.ucloud.cn/site/pro-notice/">产品动态</a></p> </li> <li> <h6>友情链接</h6> <p><a href="https://www.compshare.cn/?ytag=seo">GPU算力平台</a></p> <p><a href="https://www.ucloudstack.com/?ytag=seo">UCloud私有云</a></p> <p><a href="https://www.surfercloud.com/">SurferCloud</a></p> <p><a href="https://www.uwin-link.com/">工厂仿真软件</a></p> <p><a href="https://pinex.it/">Pinex</a></p> <p><a href="https://www.picpik.ai/zh">AI绘画</a></p> </li> <li> <h6>社区栏目</h6> <p><a href="https://www.ucloud.cn/yun/column/index.html">专栏文章</a></p> <p><a href="https://www.ucloud.cn/yun/udata/">专题地图</a></p> </li> <li> <h6>常见问题</h6> <p><a href="https://www.ucloud.cn/site/ucsafe/notice.html" >安全中心</a></p> <p><a href="https://www.ucloud.cn/site/about/news/recent/" >新闻动态</a></p> <p><a href="https://www.ucloud.cn/site/about/news/report/">媒体动态</a></p> <p><a href="https://www.ucloud.cn/site/cases.html">客户案例</a></p> <p><a href="https://www.ucloud.cn/site/notice/">公告</a></p> </li> <li> <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="优刻得"></span> <p>扫扫了解更多</p></div> </div> <div class="copyright">Copyright © 2012-2023 UCloud 优刻得科技股份有限公司<i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/">沪公网安备 31011002000058号</a><i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/"></a> 沪ICP备12020087号-3</a><i>|</i> <script type="text/javascript" src="https://gyfk12.kuaishang.cn/bs/ks.j?cI=197688&fI=125915" charset="utf-8"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?290c2650b305fc9fff0dbdcafe48b59d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-DZSMXQ3P9N"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-DZSMXQ3P9N'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?99f50ea166557aed914eb4a66a7a70a4709cbb98a54ecb576877d99556fb4bfc3d72cd14f8a76432df3935ab77ec54f830517b3cb210f7fd334f50ccb772134a"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script></div> </div> </footer> </body> <script src="https://www.ucloud.cn/yun/static/theme/ukd/js/common.js"></script> <<script type="text/javascript"> $(".site-seo-depict *,.site-content-answer-body *,.site-body-depict *").css("max-width","100%"); </script> </html>