国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

一次完整的react hooks實踐

kuangcaibao / 2659人閱讀

摘要:本次需求其實就兩個邏輯輸入篩選項。當發生改變時,重新渲染頁面首次進入頁面時,無任何篩選項。關于的一些,官方也有很棒的文檔寫在后面本文通過工作中的一個小需求,完成了一次的實踐,不過上述代碼依然有很多需要優化的地方。

寫在前面

本文首發于公眾號:符合預期的CoyPan

React在16.8版本正式發布了Hooks。關注了很久,最近正好有一個小需求,趕緊來試一下。

需求描述

需求很簡單,部門內部的一個數據查詢小工具。大致長成下面這樣:

用戶首次訪問頁面,會拉取數據展示。輸入篩選條件,點擊查詢后,會再次拉取數據在前端展示。

需求實現 使用React Class Component的寫法

如果使用以前的class寫法,簡單寫一下,代碼可能大概長成下面這樣:

import React from "react";
import { Tabs, Input, RangeTime, Button, Table } from "./components";

class App extends React.Component {
    ...
    state = {
        type: [],
        id: "",
        title: "",
        date: [],
        dataList: []
    }
    componentDidMount() {
        this.fetchData();
    }
    render() {
        
        
        
        
        
        
    }
    
    fetchData() {
        ...
        this.setState({
            dataList
        });
    }

    handleTypeChange() {
        ...
        this.setState({
            type,
        });
    }
    
    handleIdChange() {
        ...
        this.setState({
            id,
        });
    }

    handleTitleChange() {
        ...
        this.setState({
            title,
        });
    }

    handleRangeTimeChange() {
        ...
        this.setState({
            date,
        });
    }

    handleQueryBtnClick() {
        ...
    }
    ...
}使用React Hooks的寫法

關于React hooks的相關內容,這里就不贅述了。可以直接查看react官方文檔,寫得非常好。

https://reactjs.org/docs/hook...

本次需求其實就兩個邏輯:1、輸入篩選項 。2、查詢數據

主頁面一個hooks,處理篩選項以及數據展示。數據請求邏輯多帶帶弄一個hooks。

主頁面hooks:

import React, { useState, useEffect} from "react";
import { Tabs, Input, RangeTime, Button, Table } from "./components";

const App = () => {
    // 數據類型
    const tabs = [{ key: 1, value: "類型1" }, { key: 0, value: "類型2" }];
    const [tab, setTab] = useState(1);
    // 數據ID
    const [dataId, setDataid] = useState("");
    // 標題
    const [title, setTitle] = useState("");
    // 時間區間, 默認為至今一周時間
    const now = Date.now();
    const [timeRange, setTimeRange] = useState([now - 1000 * 60 * 60 * 24 * 7, now]);
    // 數據列表
    const [dataList, setDataList] = useState([]);

    // 點擊搜索按鈕
    function handleBtnClick() {
        // 請求數據
        ...
    }

    return 
<Tabs label="類型" tabs={tabs} tab={tab} onChange={setTab} /> <Input value={dataId} placeholder="請輸入數據ID" onChange={setDataid}>ID</Input> <Input value={title} placeholder="請輸入數據標題" onChange={setTitle}>標題</Input> <TimeRange label="數據時間" value={timeRange} onChange={handleTimeChange}/> <article className="btn-container"> <Button type="primary" onClick={handleBtnClick}> 查詢 </Button> </article> <Table dataList={dataList}></Table> </section> };</pre> <p>上面的代碼,完成了篩選項的處理邏輯。下面來實現負責數據請求的hooks.</p> <p>數據請求hooks:</p> <pre>import React, { useState, useEffect } from "react"; import jsonp from "../tools/jsonp"; function MyFecth(url) { // 是否正在請求中 const [isLoading, setIsLoanding] = useState(false); // 請求參數 const [queryParams, setQueryParams] = useState(null); // 請求結果 const [data, setData] = useState(null); // 向接口發起請求 const fetchData = async () => { if(queryParams === null) { return; } setIsLoanding(true); const res = await jsonp({ url: url, data: queryParams }); setData(res); setIsLoanding(false); } // 只要queryParams改變,就發起請求 useEffect(()=> { fetchData(); }, [queryParams]); // 供外部調用 const doGet = (params) => { setQueryParams(params); } return { isLoading, data, doGet } } export default MyFecth;</pre> <p>在主頁面中,引用數據請求hooks:</p> <pre>import React, { useState, useEffect} from "react"; import { Tabs, Input, RangeTime, Button, Table } from "./components"; import MyFecth from "./MyFetch"; const App = () => { // ①使用數據請求hooks const { isLoading, data, doGet } = MyFecth("http://xxx"); // 數據類型 const tabs = [{ key: 1, value: "類型1" }, { key: 0, value: "類型2" }]; const [tab, setTab] = useState(1); // 數據ID const [dataId, setDataid] = useState(""); // 標題 const [title, setTitle] = useState(""); // 時間區間, 默認為至今一周時間 const now = Date.now(); const [timeRange, setTimeRange] = useState([now - 1000 * 60 * 60 * 24 * 7, now]); // 數據列表 const [dataList, setDataList] = useState([]); // 點擊搜索按鈕 function handleBtnClick() { // ②點擊按鈕后請求數據 const params = {}; title && (params.title = title); dataId && (params.dataId = dataId); params.startTime = String(timeRange[0]); params.endTime = String(timeRange[1]); doGet(params); } // ③data改變后,重新渲染列表。 // 這里相當于 componentDidUpdate。當data發生改變時,重新渲染頁面 useEffect(() => { setDataList(data); }, [data]); // ④首次進入頁面時,無任何篩選項。拉取數據,渲染頁面。 // useEffect第二個參數為一個空數組,相當于在 componentDidMount 時執行該「副作用」 useEffect(() => { doGet({}); }, []); return <section className="app"> <Title title="數據查詢" /> <Tabs label="類型" tabs={tabs} tab={tab} onChange={setTab} /> <Input value={dataId} placeholder="請輸入數據ID" onChange={setDataid}>ID</Input> <Input value={title} placeholder="請輸入數據標題" onChange={setTitle}>標題</Input> <TimeRange label="數據時間" value={timeRange} onChange={handleTimeChange}/> <article className="btn-container"> <Button type="primary" isLoading={isLoading} onClick={handleBtnClick}> 查詢 </Button> </article> <Table dataList={dataList}></Table> </section> };</pre> <b>關于React Hooks的一些思考</b> <p>使用hooks寫完這個需求,最直觀的感受就是,代碼寫起來很爽。不需要像以前那樣寫很多的setState。其次就是</p> <p>hooks的api設計得很優秀,一個useState的就能將【狀態】和【變更狀態的邏輯】兩兩配對。React的基本思想就是【數據到視圖的映射】,在hooks中,使用useEffect來表明其中的【副作用】,感覺react官方也傾向于不區分componentDidMount和componentDidUpdate。</p> <p>從api設計就能看出,hooks提倡組件狀態細粒度地拆分。在一個hooks組件中,可能包含很多的狀態,如果用戶的某些操作,需要同時修改兩個狀態,那么我需要分別調用這兩個狀態的修改邏輯,這樣會導致組件被重新render兩次。而在使用class寫法的組件中,只需要一次setState就好。這樣看來,hooks中render兩次的操作,可能會帶來些許的性能問題 ? 這就要求我們在設計組件結構和state時,多斟酌,多抽象。</p> <p>關于hooks的一些FAQ,官方也有很棒的文檔:</p> <p>https://reactjs.org/docs/hook...</p> <b>寫在后面</b> <p>本文通過工作中的一個小需求,完成了一次react hooks的實踐,不過上述代碼依然有很多需要優化的地方。這次實踐讓我最直觀的接觸了react hooks,也幫助自己進一步理解了react團隊的一些思想。符合預期。</p> <p><script type="text/javascript">showImg("https://segmentfault.com/img/bVbond5?w=1240&h=620");</script></p> </div> <div id="auum0eg" class="mt-64 tags-seach" > <div id="2awages" class="tags-info"> <a style="width:120px;" title="GPU云服務器" href="http://m.specialneedsforspecialkids.com/site/product/gpu.html">GPU云服務器</a> <a style="width:120px;" title="云服務器" href="http://m.specialneedsforspecialkids.com/site/active/kuaijiesale.html?ytag=seo">云服務器</a> <a style="width:120px;" title="React hooks" href="http://m.specialneedsforspecialkids.com/yun/tag/React hooks/">React hooks</a> <a style="width:120px;" title="react-hooks" href="http://m.specialneedsforspecialkids.com/yun/tag/react-hooks/">react-hooks</a> <a style="width:120px;" title="React Hooks 文檔重大更新!" href="http://m.specialneedsforspecialkids.com/yun/tag/React Hooks wendangzhongdagengxin/">React Hooks 文檔重大更新!</a> <a style="width:120px;" title="html的完整格式" href="http://m.specialneedsforspecialkids.com/yun/tag/htmldewanzhenggeshi/">html的完整格式</a> </div> </div> <div id="ew02oau" class="entry-copyright mb-30"> <p class="mb-15"> 文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。</p> <p>轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/109101.html</p> </div> <ul class="pre-next-page"> <li id="qu0osqc" class="ellipsis"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/109100.html">上一篇:如何學習一門新語言或框架</a></li> <li id="keaekmc" class="ellipsis"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/109102.html">下一篇:JavaScript 的 4 種數組遍歷方法: for VS forEach() VS for/in</a></li> </ul> </div> <div id="0mgw0ka" 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 id="mewei0g" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/106582.html"><b>Ant Design Pro - <em>實踐</em><em>React</em> <em>Hooks</em> - 組件</b></a></h2> <p class="ellipsis2 good">摘要:另外,監聽事件,更新寬度狀態。文本真實寬度渲染完成后,通過獲取元素寬度。是否超長比較文本真實寬度和組件的寬度。設置為其他狀態或中的狀態時,只在這些狀態變化時觸發注意,依賴為對象時,不會深比較。得益于的用法靈活,組件寫法上確實簡潔不少。 需求 后臺項目,使用Ant Design Pro, 有這樣一個需求:有一個表格,寬度是自適應的,表格中有一列是備注,文本長度不定,我們希望在文本過長的時...</p> <div id="yim0amo" class="com_white-left-info"> <div id="e02wo0a" class="com_white-left-infol"> <a href="http://m.specialneedsforspecialkids.com/yun/u-1597.html"><img src="http://m.specialneedsforspecialkids.com/yun/data/avatar/000/00/15/small_000001597.jpg" alt=""><span id="20uwq2q" class="layui-hide64">twohappy</span></a> <time datetime="">2019-08-26 10:40</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 id="su00aam" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/99617.html"><b><em>React</em> <em>Hooks</em>實現異步請求實例—useReducer、useContext和useEffec</b></a></h2> <p class="ellipsis2 good">摘要:本文是學習了年新鮮出爐的提案之后,針對異步請求數據寫的一個案例。注意,本文假設了你已經初步了解的含義了,如果不了解還請移步官方文檔。但不要忘記和上下文對象可以看做是寫法的以及三個鉤子函數的組合。 本文是學習了2018年新鮮出爐的React Hooks提案之后,針對異步請求數據寫的一個案例。注意,本文假設了:1.你已經初步了解hooks的含義了,如果不了解還請移步官方文檔。(其實有過翻譯...</p> <div id="oim0kky" class="com_white-left-info"> <div id="o20kmcm" class="com_white-left-infol"> <a href="http://m.specialneedsforspecialkids.com/yun/u-1592.html"><img src="http://m.specialneedsforspecialkids.com/yun/data/avatar/000/00/15/small_000001592.jpg" alt=""><span id="yk2uiyo" class="layui-hide64">Code4App</span></a> <time datetime="">2019-08-23 13:49</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 id="m2mgmm2" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/109204.html"><b>精讀《Function VS Class 組件》</b></a></h2> <p class="ellipsis2 good">摘要:未來可能成為官方之一。討論地址是精讀組件如果你想參與討論,請點擊這里,每周都有新的主題,周末或周一發布。前端精讀幫你篩選靠譜的內容。 1. 引言 為什么要了解 Function 寫法的組件呢?因為它正在變得越來越重要。 那么 React 中 Function Component 與 Class Component 有何不同? how-are-function-components-di...</p> <div id="gs0m2o0" class="com_white-left-info"> <div id="ueyasku" class="com_white-left-infol"> <a href="http://m.specialneedsforspecialkids.com/yun/u-1214.html"><img src="http://m.specialneedsforspecialkids.com/yun/data/avatar/000/00/12/small_000001214.jpg" alt=""><span id="kio0wwu" class="layui-hide64">FWHeart</span></a> <time datetime="">2019-08-26 13:38</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 id="mmkekqq" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://m.specialneedsforspecialkids.com/yun/99188.html"><b>精讀《<em>React</em> <em>Hooks</em>》</b></a></h2> <p class="ellipsis2 good">摘要:更容易將組件的與狀態分離。也就是只提供狀態處理方法,不會持久化狀態。大體思路是利用共享一份數據,作為的數據源。精讀帶來的約定函數必須以命名開頭,因為這樣才方便做檢查,防止用判斷包裹語句。前端精讀幫你篩選靠譜的內容。 1 引言 React Hooks 是 React 16.7.0-alpha 版本推出的新特性,想嘗試的同學安裝此版本即可。 React Hooks 要解決的問題是狀態共享,...</p> <div id="okeeiiu" class="com_white-left-info"> <div id="mmqum0m" class="com_white-left-infol"> <a href="http://m.specialneedsforspecialkids.com/yun/u-1396.html"><img src="http://m.specialneedsforspecialkids.com/yun/data/avatar/000/00/13/small_000001396.jpg" alt=""><span id="0eim0i0" class="layui-hide64">kohoh_</span></a> <time datetime="">2019-08-23 13:03</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 id="wy2caqq" class="topicone-box-wangeditor"> <h3 class="top-com-title mb-64"><span>發表評論</span></h3> <div id="yogkoe0" class="xcp-publish-main flex_box_zd"> <div id="ccgkqgq" class="unlogin-pinglun-box"> <a href="javascript:login()" class="grad">登陸后可評論</a> </div> </div> </div> <div id="q2i0m0u" class="site-box-content"> <div id="22wc2q0" class="site-content-title"> <h3 class="top-com-title mb-64"><span>0條評論</span></h3> </div> <div id="iggkeu0" class="pages"></ul></div> </div> </div> <div id="maeo2e0" class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right"> <div id="qiwqko0" class=""> <div id="ggycwmo" class="com_layuiright-box user-msgbox"> <a href="http://m.specialneedsforspecialkids.com/yun/u-1381.html"><img src="http://m.specialneedsforspecialkids.com/yun/data/avatar/000/00/13/small_000001381.jpg" alt=""></a> <h3><a href="http://m.specialneedsforspecialkids.com/yun/u-1381.html" rel="nofollow">kuangcaibao</a></h3> <h6>男<span>|</span>高級講師</h6> <div id="aewossu" class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(1381)" id="attenttouser_1381" class="grad follow-btn notfollow attention">我要關注</a> <a href="javascript:login()" title="發私信" >我要私信</a> </div> <div id="sou0mm0" class="user-msgbox-list flex_box_zd"> <h3 class="hpf">TA的文章</h3> <a href="http://m.specialneedsforspecialkids.com/yun/ut-1381.html" class="box_hxjz">閱讀更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/130642.html">jupyter安裝tensorflow</a></h3> <p>閱讀 1794<span>·</span>2023-04-25 15:51</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/122427.html">SpringBoot集成Redis</a></h3> <p>閱讀 2505<span>·</span>2021-10-13 09:40</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/120827.html">Facebook宣布“元宇宙”相關部門負責人晉升首席技術官</a></h3> <p>閱讀 2140<span>·</span>2021-09-23 11:22</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/115905.html">浮動布局錯誤</a></h3> <p>閱讀 3248<span>·</span>2019-08-30 14:16</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/109101.html">一次完整的react hooks實踐</a></h3> <p>閱讀 2660<span>·</span>2019-08-26 13:35</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/108983.html">React Router4.0</a></h3> <p>閱讀 1855<span>·</span>2019-08-26 13:31</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/107322.html">也來探討一下Object.assign</a></h3> <p>閱讀 883<span>·</span>2019-08-26 11:39</p></li> <li><h3 class="ellipsis"><a href="http://m.specialneedsforspecialkids.com/yun/106359.html">React源碼解析之React.children.map()</a></h3> <p>閱讀 2740<span>·</span>2019-08-26 10:33</p></li> </ul> </div> <!-- 文章詳情右側廣告--> <div id="yago0es" class="com_layuiright-box"> <h6 class="top-com-title"><span>最新活動</span></h6> <div id="w0o0wwa" class="com_adbox"> <div id="2yc0q0c" class="layui-carousel" id="right-item"> <div carousel-item> <div> <a href="http://m.specialneedsforspecialkids.com/site/active/kuaijiesale.html?ytag=seo" rel="nofollow"> <img src="http://m.specialneedsforspecialkids.com/yun/data/attach/240625/2rTjEHmi.png" alt="云服務器"> </a> </div> <div> <a href="http://m.specialneedsforspecialkids.com/site/product/gpu.html" rel="nofollow"> <img src="http://m.specialneedsforspecialkids.com/yun/data/attach/240807/7NjZjdrd.png" alt="GPU云服務器"> </a> </div> </div> </div> </div> <!-- banner結束 --> <div id="se2kcqq" class="adhtml"> </div> <script> $(function(){ $.ajax({ type: "GET", url:"http://m.specialneedsforspecialkids.com/yun/ad/getad/1.html", cache: false, success: function(text){ $(".adhtml").html(text); } }); }) </script> </div> </div> </div> </div> </div> </section> <!-- wap拉出按鈕 --> <div id="2m0wmm0" class="site-tree-mobile layui-hide"> <i class="layui-icon layui-icon-spread-left"></i> </div> <!-- wap遮罩層 --> <div id="e2m0yoe" class="site-mobile-shade"></div> <!--付費閱讀 --> <div class="2qi0ue0" id="payread"> <div id="omey0aq" class="layui-form-item">閱讀需要支付1元查看</div> <div id="ccw0k0u" 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="http://m.specialneedsforspecialkids.com/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css"> <script src="http://m.specialneedsforspecialkids.com/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script> <script src="http://m.specialneedsforspecialkids.com/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:"http://m.specialneedsforspecialkids.com/yun/index.php?topic/ajaxhassupport/" + tid, cache: false, success: function(hassupport){ if (hassupport != '1'){ $.ajax({ type: "GET", cache:false, url: "http://m.specialneedsforspecialkids.com/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:"http://m.specialneedsforspecialkids.com/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 id="casmqge" class="layui-container"> <div id="ecguk0i" class="flex_box_zd"> <div id="ec0gssu" class="left-footer"> <h6><a href="http://m.specialneedsforspecialkids.com/"><img src="http://m.specialneedsforspecialkids.com/yun/static/theme/ukd//images/logo.png" alt="UCloud (優刻得科技股份有限公司)"></a></h6> <p>UCloud (優刻得科技股份有限公司)是中立、安全的云計算服務平臺,堅持中立,不涉足客戶業務領域。公司自主研發IaaS、PaaS、大數據流通平臺、AI服務平臺等一系列云計算產品,并深入了解互聯網、傳統企業在不同場景下的業務需求,提供公有云、混合云、私有云、專有云在內的綜合性行業解決方案。</p> </div> <div id="2guwc0q" class="right-footer layui-hidemd"> <ul class="flex_box_zd"> <li> <h6>UCloud與云服務</h6> <p><a href="http://m.specialneedsforspecialkids.com/site/about/intro/">公司介紹</a></p> <p><a >加入我們</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/ucan/onlineclass/">UCan線上公開課</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/solutions.html" >行業解決方案</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/pro-notice/">產品動態</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 >Pinex</a></p> <p><a >AI繪畫</a></p> </li> <li> <h6>社區欄目</h6> <p><a href="http://m.specialneedsforspecialkids.com/yun/column/index.html">專欄文章</a></p> <p><a href="http://m.specialneedsforspecialkids.com/yun/udata/">專題地圖</a></p> </li> <li> <h6>常見問題</h6> <p><a href="http://m.specialneedsforspecialkids.com/site/ucsafe/notice.html" >安全中心</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/about/news/recent/" >新聞動態</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/about/news/report/">媒體動態</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/cases.html">客戶案例</a></p> <p><a href="http://m.specialneedsforspecialkids.com/site/notice/">公告</a></p> </li> <li> <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="優刻得"></span> <p>掃掃了解更多</p></div> </div> <div id="sewoyyi" class="copyright">Copyright ? 2012-2023 UCloud 優刻得科技股份有限公司<i>|</i><a rel="nofollow" >滬公網安備 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.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> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.specialneedsforspecialkids.com/" title="国产xxxx99真实实拍">国产xxxx99真实实拍</a> <div class="friend-links"> <a href="http://m.cp97744.com/">国产一区电影</a> </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="gqoqa" class="pl_css_ganrao" style="display: none;"><optgroup id="gqoqa"></optgroup><s id="gqoqa"><noscript id="gqoqa"><option id="gqoqa"></option></noscript></s><xmp id="gqoqa"></xmp><ul id="gqoqa"></ul><sup id="gqoqa"></sup><fieldset id="gqoqa"></fieldset><fieldset id="gqoqa"></fieldset><th id="gqoqa"></th><dl id="gqoqa"></dl><li id="gqoqa"><option id="gqoqa"><xmp id="gqoqa"></xmp></option></li><center id="gqoqa"></center><td id="gqoqa"><fieldset id="gqoqa"><optgroup id="gqoqa"></optgroup></fieldset></td><blockquote id="gqoqa"></blockquote><abbr id="gqoqa"><pre id="gqoqa"><blockquote id="gqoqa"></blockquote></pre></abbr><center id="gqoqa"></center><menu id="gqoqa"><noscript id="gqoqa"><option id="gqoqa"></option></noscript></menu><s id="gqoqa"></s><tbody id="gqoqa"></tbody><optgroup id="gqoqa"></optgroup><center id="gqoqa"><dl id="gqoqa"><optgroup id="gqoqa"></optgroup></dl></center><object id="gqoqa"></object><tr id="gqoqa"><s id="gqoqa"><bdo id="gqoqa"></bdo></s></tr><small id="gqoqa"><noframes id="gqoqa"><ul id="gqoqa"></ul></noframes></small><center id="gqoqa"><xmp id="gqoqa"><cite id="gqoqa"></cite></xmp></center><object id="gqoqa"><small id="gqoqa"><button id="gqoqa"></button></small></object><input id="gqoqa"><abbr id="gqoqa"><sup id="gqoqa"></sup></abbr></input><blockquote id="gqoqa"></blockquote><optgroup id="gqoqa"></optgroup><noscript id="gqoqa"></noscript><ul id="gqoqa"></ul><source id="gqoqa"></source><pre id="gqoqa"></pre><source id="gqoqa"></source><tfoot id="gqoqa"></tfoot><rt id="gqoqa"></rt><small id="gqoqa"></small><tr id="gqoqa"></tr><noscript id="gqoqa"><option id="gqoqa"><delect id="gqoqa"></delect></option></noscript><tr id="gqoqa"><s id="gqoqa"><bdo id="gqoqa"></bdo></s></tr><small id="gqoqa"></small><pre id="gqoqa"></pre><source id="gqoqa"></source><samp id="gqoqa"><tfoot id="gqoqa"><object id="gqoqa"></object></tfoot></samp><wbr id="gqoqa"><cite id="gqoqa"><nav id="gqoqa"></nav></cite></wbr><button id="gqoqa"></button><tr id="gqoqa"></tr><option id="gqoqa"></option><acronym id="gqoqa"><xmp id="gqoqa"><strike id="gqoqa"></strike></xmp></acronym><noframes id="gqoqa"><ul id="gqoqa"><center id="gqoqa"></center></ul></noframes><xmp id="gqoqa"></xmp><optgroup id="gqoqa"></optgroup><dd id="gqoqa"><th id="gqoqa"><menu id="gqoqa"></menu></th></dd><table id="gqoqa"></table><noscript id="gqoqa"></noscript><pre id="gqoqa"></pre><cite id="gqoqa"><nav id="gqoqa"><kbd id="gqoqa"></kbd></nav></cite><blockquote id="gqoqa"><dl id="gqoqa"><input id="gqoqa"></input></dl></blockquote><samp id="gqoqa"></samp><bdo id="gqoqa"></bdo><button id="gqoqa"></button><tr id="gqoqa"></tr><cite id="gqoqa"><nav id="gqoqa"><li id="gqoqa"></li></nav></cite><tbody id="gqoqa"><input id="gqoqa"><tbody id="gqoqa"></tbody></input></tbody><noscript id="gqoqa"></noscript><noscript id="gqoqa"></noscript><center id="gqoqa"></center><code id="gqoqa"></code><center id="gqoqa"><wbr id="gqoqa"><cite id="gqoqa"></cite></wbr></center><strike id="gqoqa"></strike><s id="gqoqa"></s><center id="gqoqa"></center><rt id="gqoqa"></rt><code id="gqoqa"></code><tfoot id="gqoqa"></tfoot><pre id="gqoqa"><center id="gqoqa"><tfoot id="gqoqa"></tfoot></center></pre><option id="gqoqa"></option><optgroup id="gqoqa"></optgroup><noscript id="gqoqa"><option id="gqoqa"><xmp id="gqoqa"></xmp></option></noscript><option id="gqoqa"></option><dl id="gqoqa"></dl><pre id="gqoqa"></pre><option id="gqoqa"></option><object id="gqoqa"></object><dd id="gqoqa"><th id="gqoqa"><nav id="gqoqa"></nav></th></dd><dfn id="gqoqa"></dfn><dfn id="gqoqa"></dfn><ul id="gqoqa"></ul><strong id="gqoqa"><abbr id="gqoqa"><kbd id="gqoqa"></kbd></abbr></strong><blockquote id="gqoqa"></blockquote><dl id="gqoqa"></dl><small id="gqoqa"></small><em id="gqoqa"><del id="gqoqa"><dfn id="gqoqa"></dfn></del></em><li id="gqoqa"></li><cite id="gqoqa"></cite><fieldset id="gqoqa"><input id="gqoqa"><abbr id="gqoqa"></abbr></input></fieldset><option id="gqoqa"></option><button id="gqoqa"></button><dd id="gqoqa"></dd><abbr id="gqoqa"><ul id="gqoqa"><pre id="gqoqa"></pre></ul></abbr><center id="gqoqa"></center><object id="gqoqa"><small id="gqoqa"><noframes id="gqoqa"></noframes></small></object><abbr id="gqoqa"><kbd id="gqoqa"><pre id="gqoqa"></pre></kbd></abbr><tbody id="gqoqa"><source id="gqoqa"><small id="gqoqa"></small></source></tbody><optgroup id="gqoqa"></optgroup><pre id="gqoqa"></pre><td id="gqoqa"><code id="gqoqa"><optgroup id="gqoqa"></optgroup></code></td><nav id="gqoqa"></nav><menu id="gqoqa"><noscript id="gqoqa"><option id="gqoqa"></option></noscript></menu><li id="gqoqa"><acronym id="gqoqa"><xmp id="gqoqa"></xmp></acronym></li><dl id="gqoqa"></dl><del id="gqoqa"></del><acronym id="gqoqa"><xmp id="gqoqa"><strike id="gqoqa"></strike></xmp></acronym><strike id="gqoqa"><s id="gqoqa"><code id="gqoqa"></code></s></strike><blockquote id="gqoqa"></blockquote><kbd id="gqoqa"></kbd><noframes id="gqoqa"><kbd id="gqoqa"><pre id="gqoqa"></pre></kbd></noframes><bdo id="gqoqa"></bdo><acronym id="gqoqa"><xmp id="gqoqa"><strike id="gqoqa"></strike></xmp></acronym><strong id="gqoqa"></strong><menu id="gqoqa"><noscript id="gqoqa"><option id="gqoqa"></option></noscript></menu><ul id="gqoqa"><pre id="gqoqa"><source id="gqoqa"></source></pre></ul><nav id="gqoqa"></nav><button id="gqoqa"></button><small id="gqoqa"></small><ul id="gqoqa"></ul><sup id="gqoqa"><td id="gqoqa"><fieldset id="gqoqa"></fieldset></td></sup><center id="gqoqa"><fieldset id="gqoqa"><input id="gqoqa"></input></fieldset></center><strike id="gqoqa"></strike><nav id="gqoqa"></nav><del id="gqoqa"></del><abbr id="gqoqa"><kbd id="gqoqa"><pre id="gqoqa"></pre></kbd></abbr><acronym id="gqoqa"><xmp id="gqoqa"><strike id="gqoqa"></strike></xmp></acronym><samp id="gqoqa"></samp><table id="gqoqa"></table><center id="gqoqa"></center><strong id="gqoqa"></strong><pre id="gqoqa"></pre><delect id="gqoqa"><strike id="gqoqa"><s id="gqoqa"></s></strike></delect><tr id="gqoqa"></tr><cite id="gqoqa"><menu id="gqoqa"><li id="gqoqa"></li></menu></cite><button id="gqoqa"></button><xmp id="gqoqa"></xmp><td id="gqoqa"><code id="gqoqa"><em id="gqoqa"></em></code></td><center id="gqoqa"><dd id="gqoqa"><th id="gqoqa"></th></dd></center><ul id="gqoqa"><tbody id="gqoqa"><source id="gqoqa"></source></tbody></ul><tr id="gqoqa"><sup id="gqoqa"><td id="gqoqa"></td></sup></tr><em id="gqoqa"><del id="gqoqa"><dfn id="gqoqa"></dfn></del></em><small id="gqoqa"></small><tbody id="gqoqa"></tbody><kbd id="gqoqa"></kbd></div> <script src="http://m.specialneedsforspecialkids.com/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>