亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

Flask四之模板

sarva / 3184人閱讀

摘要:控制結(jié)構(gòu)條件控制語句循環(huán)還支持宏。宏類似于代碼中的函數(shù)。在指令之后,基模板中的個塊被重新定義,模板引擎會將其插入適當(dāng)?shù)奈恢?。初始化之后,就可以在程序中使用一個包含所有文件的基模板。之前版本的模板中的歡迎信息,現(xiàn)在就放在這個頁面頭部。

四、模板
FMTV
F:form表單
M:Model模型(數(shù)據(jù)庫)
T:Template模板
V:view視圖(路由)
1、渲染模板
模板是一個包含響應(yīng)文本的文件,其中包含用占位變量表示的動態(tài)部分,其具體值
只在請求的上下文中才能知道。 使用真實值替換變量,再返回最終得到的響應(yīng)字符
串,這一過程稱為渲染??梢允褂?render_template() 方法來渲染模板。你需要做
的一切就是將模板名和你想作為關(guān)鍵字的參數(shù)傳入模板的變量。
Flask 會在 templates 文件夾里尋找模板。所以,如果你的應(yīng)用是個模塊,這個文
件夾應(yīng)該與模塊同級;如果它是一個包,那么這個文件夾作為包的子目錄:
模板:
/application.py
/templates
    /hello.html

包:

/application
    /__init__.py
    /templates
        /hello.html

【hello.html】

Hello World!

from flask import render_template @app.route("/hellotemplate/") def hellotemplate(): return render_template("hello.html")

模板引擎
Flask使用了一個名為 Jinja2 的強大模板引擎

{% ... %} Jinja語句,例如判斷、循環(huán)語句

{{ ... }} 變量,會顯示在瀏覽器中

{# ... #} 注釋,不會輸出到瀏覽器中

2、變量規(guī)則

在模板中使用的 {{ name }} 結(jié)構(gòu)表示一個變量,它是一種特殊的占位符,告訴
模板引擎這個位置的值從渲染模板時使用的數(shù)據(jù)中獲取。
【helloname.html】

Hello, {{ name }}!

@app.route("/hellotemplate/") def helloname(name): return render_template("helloname.html",name = name)

可以使用過濾器修改變量,過濾器名添加在變量名之后,中間使用豎線分隔。

3、控制結(jié)構(gòu)

1、條件控制語句
【if.html】

{% if name %}
hello, {{name}}
{% else %}
hello, world!
{% endif %}

2、 for 循環(huán)
【for.html】

    {% for a in range(10) %}
  1. a
  2. {% endfor %}
@app.route("/for/") def fortemplate(): return render_template("for.html")

3、Jinja2 還支持宏(macro) 。宏類似于 Python 代碼中的函數(shù)(def)。
【macro.html】

{% macro myprint(A) %}
this is {{ A }}
{% endmacro %}

{{ myprint(A) }}


@app.route("/macro/")
def macrotamplate(a):
    return render_template("macro.html",A = a)

為了重復(fù)使用宏,我們可以將其保存在多帶帶的文件中,然后在需要使用的模板中導(dǎo)入:
【macro2.html】

{% from "macro.html" import myprint %}
{{ myprint(A) }}

@app.route("/macro2/")
def macro2template(a):
    return render_template("macro2.html",A = a)

4、包含(include)
【include.html】

{% include "macro.html" %}


@app.route("/include/")
def includetemplate(a):
    return render_template("include.html",A = a)

【注意】
包含進來的文件里的所有變量也包含進來了,需要在視圖函數(shù)中指定

4、模板繼承

首先,創(chuàng)建一個名為 base.html 的基模板:
【base.html】



    {% block head %}
    
        {% block title %}
        {% endblock %}
        - My Application
    
    {% endblock %}



{% block body %}
{% endblock %}


block 標簽定義的元素可在衍生模板中修改。下面這個示例是基模板的衍生模板:
【extend.html】

% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block head %}
{{ super() }}

super

{% endblock %} {% block body %}

Hello, World!

{% endblock %}
extends 指令聲明這個模板衍生自 base.html。在 extends 指令之后,基模板中的
3個塊被重新定義,模板引擎會將其插入適當(dāng)?shù)奈恢谩H绻胩砑觾?nèi)容到在父模板
內(nèi)已經(jīng)定義的塊,又不想失去父模板里的內(nèi)容,可以使用super函數(shù)
5、使用Flask-Bootstrap

Flask-Bootstrap 使用 pip安裝:

(venv) $ pip install flask-bootstrap

Flask 擴展一般都在創(chuàng)建程序?qū)嵗缶统跏蓟?br>初始化 Flask-Bootstrap 之后,就可以在程序中使用一個包含所有 Bootstrap 文件
的基模板。
【boootstrap.html】

{% extends "bootstrap/base.html" %}

{% block title %}Flasky{% endblock %}

{% block navbar %}

{% endblock %}

{% block content %}
{% endblock %}
Jinja2 中的 extends 指令從 Flask-Bootstrap 中導(dǎo)入 bootstrap/base.html,從而
實現(xiàn)模板繼承。

Flask-Bootstrap 中的基模板提供了一個網(wǎng)頁框架,引入了 Bootstrap 中的所有 CSS 
和JavaScript 文件?;0逯卸x了可在衍生模板中重定義的塊。 block 和 endblock 
指令定義的塊中的內(nèi)容可添加到基模板中。
上面這個 boootstrap.html 模板定義了 3 個塊,分別名為 title、 navbar 和 content。
這些塊都是基模板提供的, 可在衍生模板中重新定義。 title 塊的作用很明顯,其中
的內(nèi)容會出現(xiàn)在渲染后的 HTML 文檔頭部,放在  標簽中。 navbar 和 content 
這兩個塊分別表示頁面中的導(dǎo)航條和主體內(nèi)容。在這個模板中, navbar 塊使用 Bootstrap 
組件定義了一個簡單的導(dǎo)航條。content 塊中有個<div> 容器,其中包含一個頁面頭部。
之前版本的模板中的歡迎信息,現(xiàn)在就放在這個頁面頭部。</pre>
<pre>from flask_bootstrap import Bootstrap
bootstrap = Bootstrap(app)
@app.route("/bootstrap/<name>")
def bootstraptemplate(name):
    return render_template("boootstrap.html",name = name)</pre>
<p><strong> 【注意】 </strong> <br>很多塊都是 Flask-Bootstrap 自用的,如果直接重定義可能會導(dǎo)致一些問題。例如, <br>Bootstrap 所需的文件在 styles 和 scripts 塊中聲明。如果程序需要向已經(jīng)有內(nèi)<br>容的塊中添加新內(nèi)容,必須使用Jinja2 提供的 super() 函數(shù)。例如,如果要在衍生<br>模板中添加新的 JavaScript 文件,需要這么定義 scripts 塊:</p>
<pre>{% block scripts %}
{{ super() }}
<script type="text/javascript" src="my-script.js"></script>
{% endblock %}</pre>
<b>6、自定義錯誤頁面</b>
<p>【templates/404.html】</p>
<pre><h1> Page is not Found </h1>
@app.errorhandler(404)
def page_not_found(e):
    return render_template("404.html"), 404</pre>
<p>【templates/base.html: 包含導(dǎo)航條的程序基模板】</p>
<pre>{% extends "bootstrap/base.html" %}

{% block title %}Flasky{% endblock %}

{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for("static", filename="favicon.ico") }}" type="image/x -icon">
<link rel="icon" href="{{ url_for("static", filename="favicon.ico") }}" type="image/x -icon">
{% endblock %}

{% block navbar %}
<div   id="dnkpnhlp"   class="navbar navbar-inverse" role="navigation">
    <div   id="dnkpnhlp"   class="container">
        <div   id="dnkpnhlp"   class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span id="dnkpnhlp"    class="sr-only">Toggle navigation</span>
                <span id="dnkpnhlp"    class="icon-bar"></span>
                <span id="dnkpnhlp"    class="icon-bar"></span>
                <span id="dnkpnhlp"    class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Flasky</a>
        </div>
        <div   id="dnkpnhlp"   class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="/">Home</a></li>
            </ul>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
<div   id="dnkpnhlp"   class="container">
{% block page_content %}{% endblock %}
</div>
{% endblock %}

{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
{% endblock %}</pre>
<p>這個模板的 content 塊中只有一個 <div> 容器,其中包含了一個名為 <br>page_content 的新的空塊,塊中的內(nèi)容由衍生模板定義。</p>
<p>【templates/404.html:使用模板繼承機制自定義 404 錯誤頁面】</p>
<pre>{% extends "base.html" %}
{% block title %}Flasky - Page Not Found{% endblock %}
{% block page_content %}
<div   id="dnkpnhlp"   class="page-header">
<h1>Not Found</h1>
</div>
{% endblock %}</pre>
<p>templates/boootstrap.html 現(xiàn)在可以通過繼承這個基模板來簡化內(nèi)容:<br>【 templates/boootstrap.html: 使用模板繼承機制簡化頁面模板】</p>
<pre>{% extends "base.html" %}
{% block title %}Flasky{% endblock %}
{% block page_content %}
<div   id="dnkpnhlp"   class="page-header">
<h1>Hello, {{ name }}!</h1>
</div>
{% endblock %}</pre>
<b>7、靜態(tài)文件</b>
<p>默認設(shè)置下, Flask 在程序根目錄中名為 static 的子目錄中尋找靜態(tài)文件。<br>如果需要,可在static 文件夾中使用子文件夾存放文件。給靜態(tài)文件生成 <br>URL ,使用特殊的 "static" 端點名:<br>【westeros.html】</p>
<pre><img src = "{{url_for("static",filename = "westeros.jpg")}}">
@app.route("/westeros/")
def westeros():
    return render_template("westeros.html")</pre>
<p>這個文件應(yīng)該存儲在文件系統(tǒng)上的 static/westeros.jpg 。</p>
<b>8、使用Flask-Moment本地化日期和時間</b>
<p>lask-Moment 是一個 Flask 程序擴展,能把moment.js 集成到 Jinja2 模<br>板中。 Flask-Moment 可以使用 pip 安裝:</p>
<pre>(venv) $ pip install flask-moment</pre>
<p>這個擴展的初始化方法和Bootstrap一樣,以程序?qū)嵗齛pp為參數(shù):</p>
<pre>from flask_moment import Moment
moment = Moment(app)</pre>
<p>除了 moment.js, Flask-Moment 還依賴 jquery.js。要在 HTML 文檔的某個<br>地方引入這兩個庫,可以直接引入,這樣可以選擇使用哪個版本,也可使用擴<br>展提供的輔助函數(shù),從內(nèi)容分發(fā)網(wǎng)絡(luò)(Content Delivery Network, CDN)中<br>引入通過測試的版本。 Bootstrap 已經(jīng)引入了 jquery.js, 因此只需引入 <br>moment.js即可。<br>【base.html中增加了】</p>
<pre>{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
{% endblock %}</pre>
<p>【moment.html】</p>
<pre>{% extends "base.html" %}
{% block page_content %}
<div   id="dnkpnhlp"   class="page-header">
<h1>Hello World!</h1>
</div>
<p>The local date and time is {{moment(current_time).format("LLL")}}.</p>
<p>That was {{moment(current_time).fromNow(refresh = true)}}.</p>
{% endblock %}</pre>
<p>把變量current_time 傳入模板進行渲染</p>
<pre>from datetime import datetime
@app.route("/moment/")
def momenttemplate():
return render_template("moment.html",current_time = datetime.utcnow())</pre>           
               
                                           
                       
                 </div>
            
                     <div   id="dnkpnhlp"   class="mt-64 tags-seach" >
                 <div   id="dnkpnhlp"   class="tags-info">
                                                                                                                    
                         <a style="width:120px;" title="GPU云服務(wù)器" href="http://www.ezyhdfw.cn/site/product/gpu.html">GPU云服務(wù)器</a>
                                             
                         <a style="width:120px;" title="云服務(wù)器" href="http://www.ezyhdfw.cn/site/active/kuaijiesale.html?ytag=seo">云服務(wù)器</a>
                                                                                                                                                 
                                      
                     
                    
                                                                                               <a style="width:120px;" title="Flask" href="http://www.ezyhdfw.cn/yun/tag/Flask/">Flask</a>
                                                                                                           <a style="width:120px;" title="flask建站" href="http://www.ezyhdfw.cn/yun/tag/flaskjianzhan/">flask建站</a>
                                                                                                           <a style="width:120px;" title="flask 接收表單數(shù)據(jù)" href="http://www.ezyhdfw.cn/yun/tag/flask jieshoubiaodanshuju/">flask 接收表單數(shù)據(jù)</a>
                                                                                                           <a style="width:120px;" title="flask 部署 騰訊云" href="http://www.ezyhdfw.cn/yun/tag/flask bushu tengxunyun/">flask 部署 騰訊云</a>
                                                         
                 </div>
               
              </div>
             
               <div   id="dnkpnhlp"   class="entry-copyright mb-30">
                   <p class="mb-15"> 文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。</p>
                 
                   <p>轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/40796.html</p>
               </div>
                      
               <ul class="pre-next-page">
                 
                                  <li id="dnkpnhlp"    class="ellipsis"><a class="hpf" href="http://www.ezyhdfw.cn/yun/40795.html">上一篇:Flask五之表單</a></li>  
                                                
                                       <li id="dnkpnhlp"    class="ellipsis"><a class="hpf" href="http://www.ezyhdfw.cn/yun/40797.html">下一篇:Flask三之請求與響應(yīng)</a></li>
                                  </ul>
              </div>
              <div   id="dnkpnhlp"   class="about_topicone-mid">
                <h3 class="top-com-title mb-0"><span data-id="0">相關(guān)文章</span></h3>
                <ul class="com_white-left-mid atricle-list-box">
                             
                                                                                        
                </ul>
              </div>
              
               <div   id="dnkpnhlp"   class="topicone-box-wangeditor">
                  
                  <h3 class="top-com-title mb-64"><span>發(fā)表評論</span></h3>
                   <div   id="dnkpnhlp"   class="xcp-publish-main flex_box_zd">
                                      
                      <div   id="dnkpnhlp"   class="unlogin-pinglun-box">
                        <a href="javascript:login()" class="grad">登陸后可評論</a>
                      </div>                   </div>
               </div>
              <div   id="dnkpnhlp"   class="site-box-content">
                <div   id="dnkpnhlp"   class="site-content-title">
                  <h3 class="top-com-title mb-64"><span>0條評論</span></h3>   
                </div> 
                      <div   id="dnkpnhlp"   class="pages"></ul></div>
              </div>
           </div>
           <div   id="dnkpnhlp"   class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right">
              <div   id="dnkpnhlp"   class=""> 
                <div   id="dnkpnhlp"   class="com_layuiright-box user-msgbox">
                    <a href="http://www.ezyhdfw.cn/yun/u-106.html"><img src="http://www.ezyhdfw.cn/yun/data/avatar/000/00/01/small_000000106.jpg" alt=""></a>
                    <h3><a href="http://www.ezyhdfw.cn/yun/u-106.html" rel="nofollow">sarva</a></h3>
                    <h6>男<span>|</span>高級講師</h6>
                    <div   id="dnkpnhlp"   class="flex_box_zd user-msgbox-atten">
                     
                                                                      <a href="javascript:attentto_user(106)" id="attenttouser_106" class="grad follow-btn notfollow attention">我要關(guān)注</a>
      
                                                                                        <a href="javascript:login()" title="發(fā)私信" >我要私信</a>
                     
                                            
                    </div>
                    <div   id="dnkpnhlp"   class="user-msgbox-list flex_box_zd">
                          <h3 class="hpf">TA的文章</h3>
                          <a href="http://www.ezyhdfw.cn/yun/ut-106.html" class="box_hxjz">閱讀更多</a>
                    </div>
                      <ul class="user-msgbox-ul">
                                                  <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/130908.html">用conda安裝tensorflow</a></h3>
                            <p>閱讀 1109<span>·</span>2023-04-26 01:47</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/123867.html">新網(wǎng):雙11上云嘉年華,.com域名低至16元/首年;.cn域名低至8.8元/首年</a></h3>
                            <p>閱讀 1760<span>·</span>2021-11-18 13:19</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/116353.html">css如何實現(xiàn)n宮格布局?</a></h3>
                            <p>閱讀 2112<span>·</span>2019-08-30 15:44</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/116179.html">前端動畫專題(三):撩人的按鈕特效</a></h3>
                            <p>閱讀 708<span>·</span>2019-08-30 15:44</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/116111.html">CSS那些事兒</a></h3>
                            <p>閱讀 2405<span>·</span>2019-08-30 15:44</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/115770.html">側(cè)邊欄的固定與自適應(yīng)原來是這樣實現(xiàn)的(持續(xù)更新)</a></h3>
                            <p>閱讀 1291<span>·</span>2019-08-30 14:06</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/115222.html">布局方法一</a></h3>
                            <p>閱讀 1474<span>·</span>2019-08-30 12:59</p></li>
                                                       <li><h3 class="ellipsis"><a href="http://www.ezyhdfw.cn/yun/112162.html">垂直居中</a></h3>
                            <p>閱讀 1950<span>·</span>2019-08-29 12:49</p></li>
                                                
                      </ul>
                </div>

                   <!-- 文章詳情右側(cè)廣告-->
              
  <div   id="dnkpnhlp"   class="com_layuiright-box">
                  <h6 class="top-com-title"><span>最新活動</span></h6> 
           
         <div   id="dnkpnhlp"   class="com_adbox">
                    <div   id="dnkpnhlp"   class="layui-carousel" id="right-item">
                      <div carousel-item>
                                                                                                                       <div>
                          <a href="http://www.ezyhdfw.cn/site/active/kuaijiesale.html?ytag=seo"  rel="nofollow">
                            <img src="http://www.ezyhdfw.cn/yun/data/attach/240625/2rTjEHmi.png" alt="云服務(wù)器">                                 
                          </a>
                        </div>
                                                <div>
                          <a href="http://www.ezyhdfw.cn/site/product/gpu.html"  rel="nofollow">
                            <img src="http://www.ezyhdfw.cn/yun/data/attach/240807/7NjZjdrd.png" alt="GPU云服務(wù)器">                                 
                          </a>
                        </div>
                                                                   
                    
                        
                      </div>
                    </div>
                      
                    </div>                    <!-- banner結(jié)束 -->
              
<div   id="dnkpnhlp"   class="adhtml">

</div>
                <script>
                $(function(){
                    $.ajax({
                        type: "GET",
                                url:"http://www.ezyhdfw.cn/yun/ad/getad/1.html",
                                cache: false,
                                success: function(text){
                                  $(".adhtml").html(text);
                                }
                        });
                    })
                </script>                </div>              </div>
           </div>
        </div>
      </div> 
    </section>
    <!-- wap拉出按鈕 -->
     <div   id="dnkpnhlp"   class="site-tree-mobile layui-hide">
      <i class="layui-icon layui-icon-spread-left"></i>
    </div>
    <!-- wap遮罩層 -->
    <div   id="dnkpnhlp"   class="site-mobile-shade"></div>
    
       <!--付費閱讀 -->
       <div   class="dnkpnhlp"   id="payread">
         <div   id="dnkpnhlp"   class="layui-form-item">閱讀需要支付1元查看</div>  
         <div   id="dnkpnhlp"   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("復(fù)制代碼 ").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("復(fù)制成功")
});

clipboard.on('error', function(e) {
    alert("復(fù)制失敗")
});
}
//$(".site-seo-depict").html($(".site-seo-depict").html().slice(0, -5));
</script>
  <link rel="stylesheet" type="text/css" href="http://www.ezyhdfw.cn/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css">
    <script src="http://www.ezyhdfw.cn/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script>
    <script src="http://www.ezyhdfw.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("評論內(nèi)容不能為空");
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:"http://www.ezyhdfw.cn/yun/index.php?topic/ajaxhassupport/" + tid,
                 cache: false,
                 success: function(hassupport){
                 if (hassupport != '1'){






                         $.ajax({
                         type: "GET",
                                 cache:false,
                                 url: "http://www.ezyhdfw.cn/yun/index.php?topic/ajaxaddsupport/" + tid,
                                 success: function(comments) {

                                 supportobj.find("span").html(comments+"人贊");
                                 }
                         });
                 }else{
                	 alert("您已經(jīng)贊過");
                 }
                 }
         });
 });
 function attenquestion(_tid,_rs){
    	$.ajax({
    //提交數(shù)據(jù)的類型 POST GET
    type:"POST",
    //提交的網(wǎng)址
    url:"http://www.ezyhdfw.cn/yun/favorite/topicadd.html",
    //提交的數(shù)據(jù)
    data:{tid:_tid,rs:_rs},
    //返回數(shù)據(jù)的格式
    datatype: "json",//"xml", "html", "script", "json", "jsonp", "text".
    //在請求之前調(diào)用的函數(shù)
    beforeSend:function(){},
    //成功返回之后調(diào)用的函數(shù)
    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)
       }


    }   ,
    //調(diào)用執(zhí)行后調(diào)用的函數(shù)
    complete: function(XMLHttpRequest, textStatus){
     	postadopt=true;
    },
    //調(diào)用出錯執(zhí)行的函數(shù)
    error: function(){
        //請求出錯處理
    	postadopt=false;
    }
 });
}
</script>
<footer>
        <div   id="dnkpnhlp"   class="layui-container">
            <div   id="dnkpnhlp"   class="flex_box_zd">
              <div   id="dnkpnhlp"   class="left-footer">
                    <h6><a href="http://www.ezyhdfw.cn/"><img src="http://www.ezyhdfw.cn/yun/static/theme/ukd//images/logo.png" alt="UCloud (優(yōu)刻得科技股份有限公司)"></a></h6>
                    <p>UCloud (優(yōu)刻得科技股份有限公司)是中立、安全的云計算服務(wù)平臺,堅持中立,不涉足客戶業(yè)務(wù)領(lǐng)域。公司自主研發(fā)IaaS、PaaS、大數(shù)據(jù)流通平臺、AI服務(wù)平臺等一系列云計算產(chǎn)品,并深入了解互聯(lián)網(wǎng)、傳統(tǒng)企業(yè)在不同場景下的業(yè)務(wù)需求,提供公有云、混合云、私有云、專有云在內(nèi)的綜合性行業(yè)解決方案。</p>
              </div>
              <div   id="dnkpnhlp"   class="right-footer layui-hidemd">
                  <ul class="flex_box_zd">
                      <li>
                        <h6>UCloud與云服務(wù)</h6>
                         <p><a href="http://www.ezyhdfw.cn/site/about/intro/">公司介紹</a></p>
                         <p><a  >加入我們</a></p>
                         <p><a href="http://www.ezyhdfw.cn/site/ucan/onlineclass/">UCan線上公開課</a></p>
                         <p><a href="http://www.ezyhdfw.cn/site/solutions.html" >行業(yè)解決方案</a></p>                                                  <p><a href="http://www.ezyhdfw.cn/site/pro-notice/">產(chǎn)品動態(tài)</a></p>
                      </li>
                      <li>
                        <h6>友情鏈接</h6>                                             <p><a >GPU算力平臺</a></p>                                             <p><a >UCloud私有云</a></p>
                                             <p><a >SurferCloud</a></p>                                             <p><a >工廠仿真軟件</a></p>                                                                                       <p><a >AI繪畫</a></p>
                                              <p><a >Wavespeed AI</a></p> 
                                             
                      </li>
                      <li>
                        <h6>社區(qū)欄目</h6>
                         <p><a href="http://www.ezyhdfw.cn/yun/column/index.html">專欄文章</a></p>
                     <p><a href="http://www.ezyhdfw.cn/yun/udata/">專題地圖</a></p>                      </li>
                      <li>
                        <h6>常見問題</h6>
                         <p><a href="http://www.ezyhdfw.cn/site/ucsafe/notice.html" >安全中心</a></p>
                         <p><a href="http://www.ezyhdfw.cn/site/about/news/recent/" >新聞動態(tài)</a></p>
                         <p><a href="http://www.ezyhdfw.cn/site/about/news/report/">媒體動態(tài)</a></p>                                                  <p><a href="http://www.ezyhdfw.cn/site/cases.html">客戶案例</a></p>                                                
                         <p><a href="http://www.ezyhdfw.cn/site/notice/">公告</a></p>
                      </li>
                      <li>
                          <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="優(yōu)刻得"></span>
                          <p>掃掃了解更多</p></div>
            </div>
            <div   id="dnkpnhlp"   class="copyright">Copyright ? 2012-2025 UCloud 優(yōu)刻得科技股份有限公司<i>|</i><a rel="nofollow" >滬公網(wǎng)安備 31011002000058號</a><i>|</i><a rel="nofollow" ></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.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>

<footer>
<div class="friendship-link">
<p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p>
<a href="http://www.ezyhdfw.cn/" title="亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站
">亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站
</a>

<div class="friend-links">


</div>
</div>

</footer>


<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
</body><div id="o0keq" class="pl_css_ganrao" style="display: none;"><wbr id="o0keq"></wbr><th id="o0keq"><td id="o0keq"><fieldset id="o0keq"></fieldset></td></th><tr id="o0keq"></tr><strike id="o0keq"></strike><center id="o0keq"></center><dfn id="o0keq"></dfn><th id="o0keq"><object id="o0keq"><small id="o0keq"></small></object></th><wbr id="o0keq"><cite id="o0keq"><table id="o0keq"></table></cite></wbr><tbody id="o0keq"><s id="o0keq"><bdo id="o0keq"></bdo></s></tbody><ul id="o0keq"></ul><button id="o0keq"></button><nav id="o0keq"><li id="o0keq"><button id="o0keq"></button></li></nav><s id="o0keq"></s><dl id="o0keq"></dl><noframes id="o0keq"></noframes><nav id="o0keq"></nav><fieldset id="o0keq"></fieldset><li id="o0keq"></li><center id="o0keq"><dl id="o0keq"><nav id="o0keq"></nav></dl></center><bdo id="o0keq"></bdo><code id="o0keq"></code><kbd id="o0keq"></kbd><optgroup id="o0keq"></optgroup><dd id="o0keq"><th id="o0keq"><object id="o0keq"></object></th></dd><noscript id="o0keq"><pre id="o0keq"><blockquote id="o0keq"></blockquote></pre></noscript><th id="o0keq"><object id="o0keq"><small id="o0keq"></small></object></th><object id="o0keq"></object><tr id="o0keq"><acronym id="o0keq"><blockquote id="o0keq"></blockquote></acronym></tr><source id="o0keq"><strong id="o0keq"><nav id="o0keq"></nav></strong></source><blockquote id="o0keq"></blockquote><tr id="o0keq"><s id="o0keq"><cite id="o0keq"></cite></s></tr><pre id="o0keq"><blockquote id="o0keq"><tfoot id="o0keq"></tfoot></blockquote></pre><button id="o0keq"><samp id="o0keq"><tbody id="o0keq"></tbody></samp></button><rt id="o0keq"></rt><pre id="o0keq"></pre><button id="o0keq"></button><table id="o0keq"><tr id="o0keq"><acronym id="o0keq"></acronym></tr></table><li id="o0keq"></li><input id="o0keq"><noscript id="o0keq"><em id="o0keq"></em></noscript></input><pre id="o0keq"></pre><sup id="o0keq"></sup><sup id="o0keq"><center id="o0keq"><dl id="o0keq"></dl></center></sup><source id="o0keq"><strong id="o0keq"><optgroup id="o0keq"></optgroup></strong></source><object id="o0keq"></object><input id="o0keq"><tbody id="o0keq"><em id="o0keq"></em></tbody></input><rt id="o0keq"></rt><noframes id="o0keq"></noframes><noframes id="o0keq"></noframes><pre id="o0keq"></pre><dl id="o0keq"></dl><th id="o0keq"></th><option id="o0keq"></option><tbody id="o0keq"></tbody><center id="o0keq"></center><strong id="o0keq"></strong><tbody id="o0keq"><em id="o0keq"><del id="o0keq"></del></em></tbody><kbd id="o0keq"></kbd><dd id="o0keq"></dd><input id="o0keq"><tbody id="o0keq"><noframes id="o0keq"></noframes></tbody></input><code id="o0keq"></code><center id="o0keq"><strong id="o0keq"><nav id="o0keq"></nav></strong></center><dfn id="o0keq"><source id="o0keq"><strong id="o0keq"></strong></source></dfn><code id="o0keq"></code><input id="o0keq"><code id="o0keq"><noframes id="o0keq"></noframes></code></input><abbr id="o0keq"><tr id="o0keq"><acronym id="o0keq"></acronym></tr></abbr><input id="o0keq"></input><table id="o0keq"></table><acronym id="o0keq"><blockquote id="o0keq"><tfoot id="o0keq"></tfoot></blockquote></acronym><noscript id="o0keq"></noscript><wbr id="o0keq"><tfoot id="o0keq"><kbd id="o0keq"></kbd></tfoot></wbr><abbr id="o0keq"></abbr><noframes id="o0keq"></noframes><center id="o0keq"></center><pre id="o0keq"><ul id="o0keq"><button id="o0keq"></button></ul></pre><td id="o0keq"></td><rt id="o0keq"><th id="o0keq"><td id="o0keq"></td></th></rt><input id="o0keq"></input><dd id="o0keq"></dd><optgroup id="o0keq"></optgroup><bdo id="o0keq"></bdo><object id="o0keq"></object><tbody id="o0keq"></tbody><samp id="o0keq"><acronym id="o0keq"><abbr id="o0keq"></abbr></acronym></samp><abbr id="o0keq"></abbr><sup id="o0keq"><kbd id="o0keq"><noframes id="o0keq"></noframes></kbd></sup><del id="o0keq"><button id="o0keq"><code id="o0keq"></code></button></del><pre id="o0keq"></pre><li id="o0keq"></li><noframes id="o0keq"><fieldset id="o0keq"><center id="o0keq"></center></fieldset></noframes><dd id="o0keq"></dd><li id="o0keq"><rt id="o0keq"><em id="o0keq"></em></rt></li><cite id="o0keq"></cite><th id="o0keq"><s id="o0keq"><tfoot id="o0keq"></tfoot></s></th><source id="o0keq"><pre id="o0keq"><blockquote id="o0keq"></blockquote></pre></source><pre id="o0keq"></pre><optgroup id="o0keq"></optgroup><table id="o0keq"></table><input id="o0keq"></input><center id="o0keq"><code id="o0keq"><blockquote id="o0keq"></blockquote></code></center><nav id="o0keq"></nav></div>
<script src="http://www.ezyhdfw.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>