??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲专区在线视频,亚洲日韩在线视频,337p日本欧洲亚洲大胆艺术http://www.tkk7.com/jjshcc/category/54519.html桑巴葡语译工作室是q州市最专业葡萄牙语译机构-www.puyufanyi.com-Ƣ迎LJava,As400,Mainframe的猎头eric_cc#qq.ccom(?换成@)zh-cnWed, 11 Feb 2015 10:21:11 GMTWed, 11 Feb 2015 10:21:11 GMT60用Dojo实现AjaxhQXHR、跨域、及其他http://www.tkk7.com/jjshcc/archive/2015/02/09/422837.htmlEric_jiangEric_jiangMon, 09 Feb 2015 15:09:00 GMThttp://www.tkk7.com/jjshcc/archive/2015/02/09/422837.htmlhttp://www.tkk7.com/jjshcc/comments/422837.htmlhttp://www.tkk7.com/jjshcc/archive/2015/02/09/422837.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/422837.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/422837.html在Q何浏览器上方便地实现Ajaxh是每一个Ajax框架的初街Dojo在这斚w无疑提供了非怸富的支持。除了XMLHttpRequest之外Q动态script、iframe、RPC也应有尽有,q且接口l一Q用方便,大多数情况下都只需要一句话p辑ֈ目的Q从而免除重复造轮子的ȝ。而且QDojo一贯追求的概念完整性也在这里有所体现Q换句话_在用Dojo的Ajax工具的过E中不会感到M的不自然Q相反更Ҏ(gu)有触cL通的感觉Q因为API的模式是l一的,而且q里涉及到的某些概念Q如Deferred对象Q也贯穿在整个Dojo之中?/p>

  Dojo的XHR函数

  Dojo的XMLHttpRequest函数叫dojo.xhrQ除了把自己取名元W号之外Q这好像是最直接的办法了。它定义在Dojo基本库里Q所以不需要额外的requirep使用。它可以实现M同域内的httph。不q更常用的是dojo.xhrGet和dojo.xhrPostQ它们只不过是对dojo.xhr函数的简单封装;当然Ҏ(gu)REST风格Q还有dojo.xhrPut和dojo.xhrDelete?/p>

  q些函数的参数都很统一。除了dojo.xhr的第一个参数是httpҎ(gu)名之外,所有的dojo.xhr*pd函数都接受同一U散列式的参敎ͼ其中包含h的细节,例如url、是否同步、要传给服务器的内容Q可以是普通对象、表单、或者纯文本Q、超时设定、返回结果的cdQ非怸富且可扩展)、以及请求成功和p|时的回调。所有dojo.xhr*函数Q实际上是所有IO函数Q返回g都一P都是一个Deferred对象Q顾名思义Q它能让一些事情gq发生,从而让API用v来更灉|?/p>

  下面的两个例子可能会带来一点直观感受:

dojo.xhrGet({
url:
"something.html",
load: function(response, ioArgs){
//用responseq一些事
console.log("xhr get success:", response)
return response //必须q回response
},
error: function(response, ioArgs){
console.log(
"xhr get failed:", response)
return response //必须q回response
}
})
//Deferred对象允许用同步调用的写法写异步调?/span>
var deferredResult = dojo.xhrPost({
url:
"something.html",
form: formNode,
//Dojo会自动将form转成object
timeout: 3000, //Dojo会保证超时设定的有效?/span>
handleAs: "json" //得到的response被认ؓ是JSONQƈ自动转ؓobject
})
//当响应结果可用时再调用回调函?/span>
deferredResult.then(function(response){
console.log(
"xhr get success:", response)
return response //必须q回response
})

  首先解释一下timeout。除了IE8之外Q目前大多数XMLHttpRequest对象都没有内|的timeout功能Q因此必ȝ setTimeout。当同时存在大量hӞ需要ؓ每一个请求设|单独的定时器,q在某些览器(主要是IEQ会造成严重的性能问题。dojo的做法是只用一个单独的setIntervalQ定时轮询(间隔50msQ所有还未结束的h的状态,q样高效地解决了一切远E请求(包括JSONP?iframeQ的时问题?/p>

  值得一提的q有handleAs参数Q通过讄q个参数Q可以自动识别服务器的响应内Ҏ(gu)式ƈ转换成对象或文本{方便用的形式。根据文档,它接受如下|text (默认), json, json-comment-optional, json-comment-filtered, javascript, xml?/p>

  而且它还是可扩展的。其实handleAs只是告诉xhr函数去调用哪个格式{换插Ӟ即dojo.contentHandlers对象里的一个方法。例?dojo.contentHandlers.json是处理JSON格式的插件。你可以方便地定制自己所需要的格式转换插gQ当Ӟ你也可修改现有插件的行ؓQ?/p>

dojo.contentHandlers.json = (function(old){
return function(xhr){
var json
= old(xhr)
if(json.someSignalFormServer){
doSomthing(json)
delete json.someSignalFormServer
}
return json
}
})(dojo.contentHandlers.json)
//一个小技巧,利用传参得到原方?/span>

  如果要了解每个参数的l节Q可以参?a style="margin: 0px; padding: 0px; color: #1a64a2; text-decoration: none;">Dojo的文?/a>?/p>

  虚拟的参数类

  q里特别提一下Dojo在API设计上的两个特点。其一是虚拟的参数cL念:通过利用javascript对象可以灉|扩展的特点,规定一个散列参数属于某个类。例如dojo.xhr*pd函数所接受的参数就UCؓdojo.__XhrArgs。这个类q不存在于实际代码中Q不要试囄 instanceof验证它)Q只停留在概念上Q比抽象c还抽象Q因此给它加上双下划U前~QDojo习惯为抽象类加单下划U前~Q?/p>

  q样做看h没什么意思,但实际上化了APIQ因为它使API之间产生了联p,更容易记忆也更易于使用。这一点在对这U类做承时更明显。例?dojo.__XhrArgsl承自dojo.__IoArgsQ这是所有IO函数所必须支持的参数集合,同样l承自dojo.__IoArgs的还?dojo.io.script.__ioArgs和dojo.io.iframe.__ioArgsQ分别用于动态脚本请求和iframeh。子cd向父cL加少量的属性,q样J多的参数就h了树形类l构。原本散列式参数是用_的参数名代替了固定的参数序Q在增加灉|性和可扩展性的同时Q实际上增加了记忆量Q毕竟参数名不能拼错Q,使得API都不像看h那么好用Q有了参数类的设计就~解了这个问题?/p>

  q种参数cȝ做法在Dojo里随处可见,L码的话就会发现它们都是被正儿八经C正常代码形式声明在一U特D注释格式里的,像这P

/*=====
dojo.declare("dojo.__XhrArgs", dojo.__IoArgs, {
constructor: function(){
//summary:
//...
//handleAs:
//...
//......
}
})
=====
*/

  q种格式可以被jsDoc工具自动提取成文档,在文档里q些虚拟出来的类像真的cM样五脏俱全了?/p>

  Deferred对象

  另一个API设计特点是Deferred对象的广泛用。Dojo里的Deferred是基于MochiKit实现E加改进而成的,而后者则是受?python的事仉动网l工具包Twisted里同名概늚启发。概括来说的话,q个对象的作用就是将异步IO中回调函数的声明位置与调用位|分,q样在一个异步IO最l完成的地方Q开发h员可以简单地说货已经CQ想用的可以来拿了,而不用具体地指出到底该调用哪些回调函数。这样做的好处是让异步IO的写法和同步IO一PҎ(gu)据的处理L在取数据函数的外面,而不是里面)Q从而简化异步编E?/p>

  具体做法是,异步函数L同步地返回一个代理对象(q就是Deferred对象Q,可以它看做你想要的数据的代表,它提供一些方法以d回调函数Q当数据可用Ӟq些回调函数(可以由很多个)便会按照d序依次执行。如果在取数据过E中出现错误Q就会调用所提供的错误处理函?也可以有很多?Q如果想要取消这个异步请求,也可通过Deferred对象的cancelҎ(gu)完成?/p>

dojo.Deferred的核心方法如下:

then(callback, errback)
//d回调函数
callback(result) //表示异步调用成功完成Q触发回调函?/span>
errback(error) //表示异步调用中生错误,触发错误处理函数
cancel() //取消异步调用

  Dojoq提供了一个whenҎ(gu)Q同步的值和异步的Deferred对象在用时写法一栗例如:

//某个工具函数的实?/span>
var obj = {
getItem: function(){
if(this.item){
return this.item //q里同步地返回数?/span>
}else{
return dojo.xhrGet({ //q里q回的是Deferred对象
url: "toGetItem.html",
load: dojo.hitch(
this, function(response){
this.item = response
return response
})
})
}
}
}
//用户代码
dojo.when(obj.getItem(), function(item){
//无论同步异步Q用工具函数getItem的方式都一?/span>
})

  在函数闭包的帮助下,Deferred对象的创建和使用变得更ؓ单,你可以轻易写Z个创建Deferred对象的函敎ͼ以同步的写法做异步的事。例如写一个用store获取数据的函敎ͼ

var store = new dojo.data.QueryReadStore({...})
function getData(start, count){
var d
= new dojo.Deferred() //初始化一个Deferred对象
store.fetch({
start: start,
count: count,
onComplete: function(items){
//直接取用上层闭包里的Deferred对象
d.callback(items)
}
})
return d //把它当做l果q回
}

  用dojo.io.script跨域

  dojo.xhr* 只是XmlHttpRequest对象的封装,׃同源{略限制Q它不能发跨域请求,要跨域还是需要动态创建script标签。Dojo 没有像JQuery一h所有东襉K装在一PJQuery的ajax()Ҏ(gu)可以跨域Q当然用的是JSONPQ所以它不敢把自q为xhrQ,而是坚持一个API只干一件事情。毕竟在大部分应用中Q同域请求比跨域h多得多,如果一个应用不需要跨域,没必要加蝲相关代码。因此与xhr不同Qdojo 的跨域请求组件不在基本库Q而在核心库,需要require一下才能用:

dojo.require("dojo.io.script")

  q个包里面基本上只需要用C个函敎ͼdojo.io.script.get()。它也返回Deferred对象Qƈ接受cd?dojo.io.script.__ioArgs的散列参数。受益于虚拟参数c,我们不用从头开始学习这个参敎ͼ它承了dojo.__IoArgsQ因此和dojo.xhr*pd的参数大同小异。唯一需要注意的是handleAs在这里无效了Q代之以jsonp或者checkString?/p>

  前者用于实现JSONP协议Q其值由服务器端指定Q当script标签加蝲后就按照JSONP协议执行q个函数Q然后Dojo会自动介入,负责把真正的数据传给load函数。需要指出的是在Dojo1.4以前Q这个参数叫callbackParamNameQ冗长但意义明确。毕竟Dojo太早了,它成型的时候(2005QJSONPq个词才刚出C久。现在callbackParamNameq是可用的(Z向后兼容Q,不过处于deprecated状态?/p>

  下面的例子从flickr获取feed数据Q?/p>

dojo.io.script.get({
url:
"http://www.flickr.com/services/feeds/photos_public.gne",
jsonp:
"jsoncallback", //由flickr指定
content: {format: "json"},
load: function(response){
console.log(response)
return response
},
error: function(response){
console.log(response)
return response
}
})

  与jsonp不同QcheckString参数专门用于跨域获取javascript代码Q它其实是那D跨域脚本里的一个有定义的变量的名字QDojo会用它来判断跨域代码是否加蝲完毕Q配合前面提到的timeout机制p实现有效的超时处理?/p>

dojo.io.script.get({
url:
"http://......", //某个提供脚本的URL
checkString: "obj",
load: function(response){
//脚本加蝲完毕Q可以直接用其中的对象了,如obj?/span>
Return response
}
})

  用dojo.io.iframe传数?/h2>

  dojo.io 包里q有一个工具就是iframeQ常用于以不h面的方式上传或下蝲文g。这个很l典的Ajax技巧在Dojo里就是一?dojo.io.iframe.send({...})。这个函数接受dojo.io.iframe.__ioArgsQ相?dojo.__IoArgsQ它只多了一个method参数Q用于指定是用GETq是POSTQ默认)Ҏ(gu)发送请求。下面的例子实C通过无刷新提交表单来上传文gQ?/p>

dojo.io.iframe.send({
form:
"formNodeId", //某个form元素包含本地文g路径
handleAs: "html", //服务器将q回html面
load: onSubmitted, //提交成功
error: onSubmitError //提交p|
})

  目前send函数的handleAs参数支持html, xml, text, json, 和javascript五种响应格式。除了html和xml之外Q用其他格式有一个比较特别的要求Q就是服务端q回的响应必d有以下格式: 

html
head/head
body
textarea真正的响应内?/span>/textarea
/body
/html

  q是因ؓ服务器返回的东西是加载在iframe里的Q而只有html面才能在Q何浏览器里保证成功加载(有个DOM在,以后取数据也方便Q。加一个textarea则可以尽量忠实于原始文本数据的格式,而不会受到html的媄响?/p>

  试试RPC(q程q程调用)

  如果dojo.xhr*函数以及Deferred机制仍然无法避免代码的؜乱,那RPC可能是唯一的选择了。dojo.rpc包提供了Z单方法描q语a(SMD)的RPC实现。SMD的原理类gWSDLQWeb服务描述语言Q,不过是基于JSON的,它定义了q程Ҏ(gu)的名U、参数等属性,?Dojo能创建出代理Ҏ(gu)以供调用?/p>

  Dojo提供了两U方式实现rpcQXHR和JSONPQ分别对应dojo.rpc.JsonServicecddojo.rpc.JsonpServicec,用户可以Ҏ(gu)是否需要跨域各取所需?/p>

一个简单的例子Q?/p>

var smdObj = {
serviceType:
"JSON-RPC",
serviceURL:
"http://...."
methods: [
{name:
"myFunc", parameters: []}
]
}
var rpc
= new dojo.rpc.JsonpService(smdObj) //传入SMD
var result = rpc.myFunc() //直接调用q程Ҏ(gu)Q返回Deferred对象
dojo.when(result, function(result){
//得到l果
})

  SMDq没有一个被q泛认可的官Ҏ(gu)准,一直以来都是DojoC֌领导着它的发展Q以后这个模块也有可能发生改变,但整个RPC基本的框架会保持E_?/p>

  l语

  Ajaxhq个主题太大Q本文只能挂一漏万Cl一点dojo在这斚w设计和实现的皮毛Q包括基本XHRh、动态script、iframeh、以及RPCQƈ特别了几个有Dojo特色的设计,如timeout机制、虚拟参数类、Deferred对象{?/p>

  Dojo由Ajax领域的先׃写就Q相信从它的代码中我们一定能学到更多的东ѝ?/p>

Eric_jiang 2015-02-09 23:09 发表评论
]]>
Dojo ?build 工具?/title><link>http://www.tkk7.com/jjshcc/archive/2015/01/29/422538.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Thu, 29 Jan 2015 07:20:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2015/01/29/422538.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/422538.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2015/01/29/422538.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/422538.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/422538.html</trackback:ping><description><![CDATA[<h2 id="major2">何时我们需?Dojo ?build 工具</h2> <p>Dojo 作ؓ一个非常实用的 Ajax 实现框架已经被许?web2.0 开发h员广泛用,但?Dojo 会导致客L览器需要加载大量的 Dojo 文gQ导致应用程序性能下降。解?Dojo 性能问题的方法之一是?Dojo 文gq行定制打包和压~?( 提高 Dojo 性能的具体方案请参看“<a cmimpressionsent="1">提高Z Dojo ?Web 2.0 应用E序的性能</a>”。Dojo 本n已经提供了一套对 Dojo 库文?( 自己~写?Javascript 文g只要W合 Dojo 的规范同样可以进行打?) q行 build 的工P通过定制库文件和压羃文g的方法来减少览器加载文件的旉?/p> <p>Dojo 的主要库文g (dojo ?) 大小?1M 左右Qdijit 包和 dojox 包大都?4M-5MQ但我们q不L需要所有的q些库文Ӟ可以Ҏ(gu)开发者自w的需要定制一?Dojo 库,实际使用的库文g大小往往能大大降低;以笔者目前的开发项目ؓ例,l过定制后实际用的 Dojo 库文件大只?300K 左右?/p> <p>另外 Dojo ?build 工具也通过压羃 Javascript 文g的手D|降低览器加载文件的旉Q该q程中需要?ShrinkSafeQ有兛_详细介绍请参?#8220;<a cmimpressionsent="1">http://dojotoolkit.org/docs/shrinksafe</a>”Q,具体的方法如下:</p> <ol type="1"><li>压羃 Javascript 文gQ包括: <ol class="ibm-alpha-list" type="a"><li>删除所有的I格和空?/li><li>删除所有的注释</li><li>定义变量名用更短的字符代替</li></ol></li><li>所有打包的?Javascript 文g的内容合qؓ一个文?/li></ol> <p>l过压羃处理QJavascript 文g的大M可减?30%-50%Q同时将所有的 Javascript 文g打包成一个文件也减少了浏览器加蝲时多ơ开闭文件的负担Q从而降低了加蝲旉?/p> <div id="vfnhdfd" class="ibm-alternate-rule"> <hr /> </div> <p class="ibm-ind-link ibm-back-to-top"><a class="ibm-anchor-up-link" cmimpressionsent="1"> </a></p> <h2 id="major3">准备工作</h2> <ul class="ibm-bullet-list"><li>?#8220;<a cmimpressionsent="1">dojo 下蝲|站</a>”下蝲 Dojo 源代码,下蝲后直接解压即可,?Dojo 的解压目录ؓ \dojoQ?strong>下文中皆?#8220;\dojo”指代 Dojo 文g的解压目?/strong>Q;</li><li>下蝲q安?JDK( 量使用 1.5 以上的版?)Q设|?JAVA_HOME 环境变量Q?/li></ul> <p>jdk 下蝲地址Q?a cmimpressionsent="1">http://java.sun.com/javase/downloads/index.jsp</a></p> <div id="tpvpldf" class="ibm-alternate-rule"> <hr /> </div> <p class="ibm-ind-link ibm-back-to-top"><a class="ibm-anchor-up-link" cmimpressionsent="1"> </a></p> <h2 id="major4">使用 Dojo ?build 工具</h2> <p>Dojo 提供?build 工具位于 \dojo\util\buildsrcipts 下,?windows 下调用该目录内的 build.batQlinux 下?build.shQ文件既可执?build 工作?/p> <p>下面是在一个在 windows 下调?build.bat 的例子:</p> <p>build profile=base action=release releaseName=myDojo optimize=shrinksafe</p> <p>该命令中包括了几个最常用的参敎ͼ其意义如下:</p> <ul class="ibm-bullet-list"><li>action: 指定本次命o的类型,提供的三个值是Qclean, release, helpQ?/li><li>releaseNameQ本?release 的名字,默认?dojoQ?/li><li>optimizeQ本?build 中进行优化的方式Q一般?shrinksafe 既可Q?/li><li>profileQ指?build 使用?profile 文gQprofile 文g中提供了 build 相关的配|信息,?\dojo\util\buildsrcipts\profiles 目录下有很多 *.profile.js 文gQ我们自定义?profile 文g也放在这个目录下Q例子中“profile=base”表示指定 base.profile.js 作ؓ build 的参数?/li></ul> <p>实际上在使用 Dojo ?build 工具Ӟ关键在于提供?profile 文g里的内容Q在下面的例子中会详l说?profile 文g的配|方法?/p> <h3 id="minor4.1">定制 Dojo 文g</h3> <p>Dojo 库中提供了大量的文g供用者调用,但有的时候我们ƈ不是需要所有的q些文gQ此时我们可以?Dojo ?build 工具定制一份个性化?Dojo 库文Ӟ首先我们需要编写一?profile 文g来描q我们的需求:</p> <h5 id="listing1">清单 1. profile 文g配置CZ 1</h5> <div id="xxtfphz" class="codesection"><pre class="displaycode"> /* example.profile.js */ dependencies = { layers: [ // 可以Ҏ(gu)需要制定多个不同的 layer { name: "example.js", // 打包生成?js 文g的名 dependencies: [ // 需要打包的 js 文g列表 "dojo.date", "dojox.uuid" ] } ], prefixes: [ // 讄路径 [ "dijit", "../dijit" ], [ "dojox", "../dojox" ] ] }</pre></div> <p><strong><em>注意Q?/em></strong></p> <ol type="1"><li><em>dojo.js 是默认被打包的,不需要在 dependencies</em><em>中声?/em></li><li><em>?prefixes 讄路径应该是相?dojo\dojo\dojo.js 的\径,../dijit 实际上是 dojo\dijit</em></li></ol> <p>该文g (example.profile.js) 攑֜ \dojo\util\buildsrcipts\profiles 目录下,执行Q?/p> <div id="jvpzpjz" class="codesection"><pre class="displaycode"> build profile=example action=release releaseName=myDojo optimize=shrinksafe</pre></div> <p>build 完成后,会在 \dojo 下生成一?release 文g夹,如下图所C:</p> <h5 id="fig1">囄 1. build 后释攄文gC意Q?/h5><img alt="囄 1. build 后释攄文gC意Q? src="http://www.ibm.com/developerworks/cn/web/0912_shenjc_dojobuild/image002.jpg" width="301" /> <p>因ؓ我们讄?build 的参?releaseName=myDojo, 因此 release 下会生成一?myDojo 文g夹,本次 build 产生的文仉|于该文件夹下。在 \dojo\release\myDojo\dojo\ 目录下,我们可以扑ֈ两个文gQexample.js ?example.uncompressed.jsQ这是我们需要的打包后的文gQexample.uncompressed.js 只是包含了我们指定的所?dojo 文gQexample.js 则在 example.uncompressed.js 基础上又q行了压~处理?/p> <h3 id="minor4.2">build 我们自己?Javascript 文g</h3> <p>对于我们自己~写?Javascript 文gQ我们同样可是借助 Dojo 提供?build 工具q行压羃和打包,前提是这?js 文g需要按?Dojo 相关的的规范~写。打包我们自q Javascript 文g与打?Dojo 文gq没有太大的差别Q假设我们有两个 Javascript 文g如下Q?/p> <h5 id="listing2">清单 2. 假设需要打包的 2 ?Javascript 文g</h5> <div id="jzvtdvl" class="codesection"><pre class="displaycode"> /* my.example1 */ dojo.provide("my.example1"); dojo.require("my.example2"); // 声明了对 my.example2 的依? /* * this is a js file witch named example1.js */ /* my.example2 */ dojo.provide("my.example2"); /* * this is a js file witch named example2.js */</pre></div> <p>?\dojo 下新Z个文件夹“my”, 上面的两个文g攑֜该文件夹下,profile 文g配置如下Q?/p> <h5 id="listing3">清单 3. profile 文g配置CZ 2</h5> <div id="prxjvhz" class="codesection"><pre class="displaycode"> /* example.profile.js */ dependencies = { layers: [ { name: "example.js", dependencies: [ "dojo.date", "dojox.uuid", "my.example1" // 注意q里我们只声明了 my.example1 ] } ], prefixes: [ [ "dijit", "../dijit" ], [ "dojox", "../dojox" ], [ "my", "../my"] // 刚才新徏?my 文g多w要在此声明\? ] }</pre></div> <p>执行Q?/p> <div id="xhtnpfv" class="codesection"><pre class="displaycode"> build.bat profile=example action=release releaseName=myDojo optimize=shrinksafe</pre></div> <p>h意,?profile 文g中,只声明了?my.example1 q行打包Q但?build 生成?example.js 中我们会发现 my.example2 中的内容也已l被dq来了。这是因为在 build q程中,build E序在分?js 文g内容旉过识别一些关键字 ( 例如 dojo.require) 来判断当前文件是否依赖其他的文gQƈ这些依赖的文g一同进行打包。因此当 build E序?my.example1 中读?dojo.require("my.example2"); Ӟ判断文g需要依赖另一个文?my.example2"Q根?prefixes 提供的\?build E序扑ֈ?my.example2.js 文gQƈ该文g的内Ҏ(gu)加进来?/p> <p>按照上面的例?build 后,我们自己~写?Javascript 文g会和我们定制 Dojo 的文件合q在一个文件中Q我们可能需要独立用这些自q写的 Javascript 文gQ那么我们修改一?profile 文g既可Q?/p> <h5 id="listing4">清单 4. profile 文g配置CZ 3</h5> <div id="rrnprrr" class="codesection"><pre class="displaycode"> /* example.profile.js */ dependencies = { layers: [ { // q个 layer 用来打包我们定制?dojo 文g name: "mydojo.js", dependencies: [ "dojo.date", "dojox.uuid" ] }, { // q个 layer 用于打包我们自己?js 文g name: "example.js", dependencies: [ "my.example1" ] } ], prefixes: [ [ "dijit", "../dijit" ], [ "dojox", "../dojox" ], [ "my", "../my"] ] }</pre></div> <p>执行Q?/p> <div id="dtfztbf" class="codesection"><pre class="displaycode"> build.bat profile=example action=release releaseName=myDojo optimize=shrinksafe</pre></div> <p>q样 build 后在 \dojo\release\myDojo\dojo\ 我们会分别得?mydojo ?example 两个 layer 的打包文Ӟ</p> <ul class="ibm-bullet-list"><li>mydojo.js ?mydojo.uncompressed.jsQ打包的是我们定制的 Dojo 文g</li><li>example.js ?example.uncompressed.jsQ打包了我们自己~写 Javascript 文gQ我们可以根据需要独立用他?/li></ul> <div id="nhznhxn" class="ibm-alternate-rule"> <hr /> </div> <p class="ibm-ind-link ibm-back-to-top"><a class="ibm-anchor-up-link" cmimpressionsent="1"> </a></p> <h2 id="major5">需要注意的问题</h2> <ol type="1"><li>在上面我们已l讲C build E序会按?dojo.require {关键字依赖文件添加进来,因此在每?layer ?dependencies 中我们不必列出所有我们需要打包的文gQ只需要将一些根文g列出既可 ( 如清?3 所C?)Q另外我们也应该保q些需要打包的文g以及他们所依赖的其他文件所在的路径都在 prefixes 声明注册q,否则 build E序会因为找不到所需要的文g而失败?/li><li>上面提到?build q程中,会调?shrinksafe ?js 文gq行压羃Q压~策略包括将定义的变量名用更为简z的字符串替代,例如我们定义 <code>”var identifier”</code>Q经q压~处理可能就变成?<code>”var _v01”</code>Q。如果我们的 Javascript 代码中用了 <code>eval</code>语句Qƈ?<code>eval</code>的内定w包含了一些我们定义的变量名,׃D打包后的文g出现错误而无法用。例如下面的 Javascript 代码Q?/li></ol> <div id="llhjvlz" class="codesection"><pre class="displaycode"> var identifier = “”; eval(“alert(identifier)”);</pre></div> <p>因ؓl过压羃后变量名 identifier ?build E序以其他的名字替代Q因此在执行 eval Ҏ(gu) , 也就是调?alert(identifier) Ӟ会因为无法识?identifier 而报?undefined 的错误?/p> <div id="vvzbdtl" class="ibm-alternate-rule"> <hr /> </div> <p class="ibm-ind-link ibm-back-to-top"><a class="ibm-anchor-up-link" cmimpressionsent="1"> </a></p> <h2 id="major6">结</h2> <p>本文站在一个初学者的角度单地介绍?Dojo ?build 工具的用方法(关键在于 profile 文g的配|)Q通过以上内容读者应该能够用该工具q行基本的定制和打包处理Q有兴趣的读者可以通过提供的参考资料进行进一步的学习?/p><img src ="http://www.tkk7.com/jjshcc/aggbug/422538.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2015-01-29 15:20 <a href="http://www.tkk7.com/jjshcc/archive/2015/01/29/422538.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dojo 的扩?自定义组?/title><link>http://www.tkk7.com/jjshcc/archive/2014/12/05/421099.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Fri, 05 Dec 2014 09:06:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2014/12/05/421099.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/421099.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2014/12/05/421099.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/421099.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/421099.html</trackback:ping><description><![CDATA[<h3>Dijit 的类文g</h3><p style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; margin-top: -2px !important; font-size: 1.166em !important; background-color: #ffffff;">Dijit 的类也是一?Dojo c,所?Dijit cȝ声明和定义也是用 dojo.declare 函数Q如清单 10 和清?13 所C。Dijit cL然是 Dojo c,自然也可以承其它类或被其它cLl承。实际上Q一?Dijit cd别于其它 Dojo cL重要的一Ҏ(gu)QDijit c都直接或间接地l承于类 dijit._WidgetQ大部分?Dijit c通过 mixin 的方式承类 dijit._TemplatedQ如清单 13 中的 [dijit._Widget,dijit._Templated]?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">让我们回q头来看看清?13Q清?13 中,有一个属性叫 templatePathQ从名字可以看出来Q这个属性指定了 template 文g的\径。除了指?template 文g的\径外Q也可以直接?template 变成一个字W串攑ֈcd义文件中Q这U情况下Q要用到的属性就?templateString 了?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">除了 templatePath ?templateString 以外Q还有很多扩展点可以Ҏ(gu)实际需要重载,q些扩展点覆盖了 dijit 的整个生命周期,具体列D如下Q?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">constructorQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">constructor 会在讄参数之前被调用,可以在这里进行一些初始化的工作。Constructor l束后,便会开始设|?Dijit 实例的属性|x dijit 标签中定义的属性Dl?dijit 实例?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">postMixInPropertiesQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">如果你在你的 dijit 中重载这个函敎ͼ它会?dijit 展现之前Qƈ且在 dom 节点生成之前被调用。如果你需要在 dijit 展现之前Q修改实例的属性,可以在这里实现?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">buildRenderingQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">通常情况下这个函C不需要去重蝲Q因?_Templated 为在q里Z做好所有的事情Q包?dom 节点的创建,事情的连接,attach point 的设|。除非你要开发一套完全不一L模板pȝQ否则徏议你不要重蝲q个函数?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">postCreateQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">q个函数会在 dijit 创徏之后Q子 dijit 创徏之前被调用?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">startupQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">当你需要确保所有的?dijit 都被创徏出来了,你可以调用这个函数?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">destroyQ?/p><p style="margin: 0px; padding: 6px 0px; border: 0px; outline: 0px; vertical-align: baseline; font-family: Arial, sans-serif; color: #222222; line-height: 1.5em; font-size: 1.166em !important; background-color: #ffffff;">会在 dijit 被销毁时被调用,你可以在q里q行一些资源回收的工作</p><img src ="http://www.tkk7.com/jjshcc/aggbug/421099.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2014-12-05 17:06 <a href="http://www.tkk7.com/jjshcc/archive/2014/12/05/421099.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>深入了解 Dojo 的核心接?/title><link>http://www.tkk7.com/jjshcc/archive/2014/09/01/417570.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Mon, 01 Sep 2014 09:20:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2014/09/01/417570.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/417570.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2014/09/01/417570.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/417570.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/417570.html</trackback:ping><description><![CDATA[     摘要: Dojo 的这些接口大大简化了我们?Web 前端开发的复杂度,使得我们能够在更短的旉内实现功能更Z富的应用。这文章将重点介绍 Dojo 的核心接口所带给 Web 开发工E师们的各种便利以及它的一些用技巧。Dojo 核心接口介Dojo 的核心接口主要位?Dojo 的三大库Q?#8220;dojo”Q?#8220;dijit”?#8220;dojox”...  <a href='http://www.tkk7.com/jjshcc/archive/2014/09/01/417570.html'>阅读全文</a><img src ="http://www.tkk7.com/jjshcc/aggbug/417570.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2014-09-01 17:20 <a href="http://www.tkk7.com/jjshcc/archive/2014/09/01/417570.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dojo define 和declare的区?/title><link>http://www.tkk7.com/jjshcc/archive/2014/09/01/417569.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Mon, 01 Sep 2014 08:48:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2014/09/01/417569.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/417569.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2014/09/01/417569.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/417569.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/417569.html</trackback:ping><description><![CDATA[<h1>Define<br /></h1><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">先看<a target="_blank" style="color: #336699; text-decoration: none;">define</a>。作用是定义一个模块(moduleQ。这个模块可以被require引用Q引用了之后可以用define里面的东ѝ一个模块想当然Q里面干什么事情,不一定全部自己实现。就像h要codingQ除了脑子,也不能没有电(sh)脑、键盘。因此,define的第一个参数就是将要用到的其他模块引进来。第二个参数描述q个模块具体q什么,q且l第一个参C的模块分别v一个朗朗上口的名字。就像下面这D代码描q的样子?/p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">util.js</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"></p><div bg_javascript"="" style="width: 700.90625px; color: #333333; line-height: 26px;"><div><strong>[javascript] </strong><div style="position: absolute; left: 551px; top: 860px; width: 18px; height: 18px; z-index: 99;"></div></div><ol start="1"><li style="line-height: 18px;">define([ "dojo/dom"], function(dom) {  </li><li style="line-height: 18px;">    return {  </li><li style="line-height: 18px;">        setRed: function(id){  </li><li style="line-height: 18px;">            dom.byId(id).style.color = "red";  </li><li style="line-height: 18px;">        }  </li><li style="line-height: 18px;">    };  </li><li style="line-height: 18px;">});  </li></ol></div><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;" /><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">q是一个工h块,其中一个功能就是把|页上id对应的DOM节点变成U色。当我们要用它的时候,可以用require了?/p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">test.jsp</p><div bg_html"="" style="width: 700.90625px; color: #333333; line-height: 26px;"><div><strong>[html]</strong> <u> </u><div style="position: absolute; left: 514px; top: 1227px; width: 18px; height: 18px; z-index: 99;"></div></div><ol start="1"><li style="line-height: 18px;"><span style="color: #993300; font-weight: bold;"><</span><span style="color: #993300; font-weight: bold;">script</span><span style="color: #993300; font-weight: bold;">></span>  </li><li style="line-height: 18px;">    require(  </li><li style="line-height: 18px;">        [ "dojo/ready", "test/util" ],  </li><li style="line-height: 18px;">        function(ready, util) {  </li><li style="line-height: 18px;">            ready(function() {  </li><li style="line-height: 18px;">                var <span style="color: red;">id</span> = <span style="color: blue;">"selected_text"</span>;  </li><li style="line-height: 18px;">                util.setRed(id);  </li><li style="line-height: 18px;">            });  </li><li style="line-height: 18px;">        });  </li><li style="line-height: 18px;"><span style="color: #993300; font-weight: bold;"></</span><span style="color: #993300; font-weight: bold;">script</span><span style="color: #993300; font-weight: bold;">></span>  </li></ol></div><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;" /><h1>Declare<br /></h1><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">可以看到Q上面的模块util作ؓ工具模块Q可以在被引用后L调用其功能。这是无状态的Q就好象是一个singleton的对象。但如果我们惛_?#8220;c?#8221;一L东西Q有状态,可以创徏多个对象Q就需要在define里用<a target="_blank" style="color: #336699; text-decoration: none;">declare</a>。最典型的例子就是dijit下面的诸多UI控件?/p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">举个很简单的例子Q我希望Zdijit.DialogQ创Z个有Ҏ(gu)功能的dialogQ每ơ打开后能把上面的一Dtext标记为红艌Ӏ?/p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">RedTextDialog.js</p><div bg_javascript"="" style="width: 700.90625px; color: #333333; line-height: 26px;"><div><strong>[javascript]</strong> <a title="view plain" style="padding: 1px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); background-position: 0% 0%; background-repeat: no-repeat;">view plain</a><a title="copy" style="padding: 1px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_copy.gif); background-position: 0% 0%; background-repeat: no-repeat;">copy</a><a target="_blank" title="在CODE上查看代码片" style="padding: 1px; display: inline-block; width: 16px; height: 16px; background-position: 0% 0%; background-repeat: no-repeat;"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border: none; max-width: 100%; position: relative; top: 1px; left: 2px;" /></a><a target="_blank" title="z到我的代码片" style="padding: 1px; display: inline-block; width: 16px; height: 16px; background-position: 0% 0%; background-repeat: no-repeat;"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="z到我的代码片" style="border: none; max-width: 100%; position: relative; top: 2px; left: 2px;" /></a><div style="position: absolute; left: 551px; top: 1766px; width: 18px; height: 18px; z-index: 99;"></div></div><ol start="1"><li style="line-height: 18px;">define([ "dojo/_base/declare", "dijit/Dialog", "dijit/_WidgetBase",  </li><li style="line-height: 18px;">        "dijit/_TemplatedMixin", "test/util" ], function(declare,  </li><li style="line-height: 18px;">        Dialog, _WidgetBase, _TemplatedMixin, util) {  </li><li style="line-height: 18px;">    return declare("test.RedTextDialog", [ Dialog, _WidgetBase, _TemplatedMixin ], {  </li><li style="line-height: 18px;">        title: "Dialog with Red Text",  </li><li style="line-height: 18px;">          </li><li style="line-height: 18px;">        onDownloadEnd : function() {  </li><li style="line-height: 18px;">            var id = "selected_text";  </li><li style="line-height: 18px;">            util.setRed(id);  </li><li style="line-height: 18px;">        }  </li><li style="line-height: 18px;">    });  </li><li style="line-height: 18px;">});  </li></ol></div><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;" /><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">RedTextDialog可以重写dijit.Dialog所有的Ҏ(gu)Q也可以自创Ҏ(gu)、变量,实现自己惌的Q意功能。接下来可以用require使用它?/p><div bg_html"="" style="width: 700.90625px; color: #333333; line-height: 26px;"><div><strong>[html]</strong> <div style="position: absolute; left: 514px; top: 2143px; width: 18px; height: 18px; z-index: 99;"></div></div><ol start="1"><li style="line-height: 18px;"><span style="color: #993300; font-weight: bold;"><</span><span style="color: #993300; font-weight: bold;">script</span><span style="color: #993300; font-weight: bold;">></span>  </li><li style="line-height: 18px;">    require(  </li><li style="line-height: 18px;">        [ "dojo/ready", "test/RedTextDialog" ],  </li><li style="line-height: 18px;">        function(ready, RedTextDialog) {  </li><li style="line-height: 18px;">            ready(function() {  </li><li style="line-height: 18px;">                var <span style="color: red;">dialog</span> = <span style="color: blue;">new</span> RedTextDialog();  </li><li style="line-height: 18px;">                dialog.show();  </li><li style="line-height: 18px;">            });  </li><li style="line-height: 18px;">        });  </li><li style="line-height: 18px;"><span style="color: #993300; font-weight: bold;"></</span><span style="color: #993300; font-weight: bold;">script</span><span style="color: #993300; font-weight: bold;">></span>  </li></ol></div><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;" /><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">可以看到Q每ơ用RedTextDialogӞ都可以创Z个新的对象实例,因此可以做到互相之间没有关系?/p><h1>目录l构</h1><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"><img src="http://img.blog.csdn.net/20140103092742203?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZWVuZ2Vs/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border: none; max-width: 100%;" /><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">Z在test.jsp中调用上qjs文gQ需要在test.jsp声明js文g的位|?/p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"></p><div bg_javascript"="" style="width: 700.90625px; color: #333333; line-height: 26px;"><div><strong>[javascript]</strong> <div style="position: absolute; left: 551px; top: 2775px; width: 18px; height: 18px; z-index: 99;"></div></div><ol start="1"><li style="line-height: 18px;"><script>  </li><li style="line-height: 18px;">    dojoConfig = {  </li><li style="line-height: 18px;">        isDebug : false,  </li><li style="line-height: 18px;">        parseOnLoad : true,  </li><li style="line-height: 18px;">        async : true,  </li><li style="line-height: 18px;">        packages : [   </li><li style="line-height: 18px;">            {  </li><li style="line-height: 18px;">                name : "test",  </li><li style="line-height: 18px;">                location : "../../js/test"  </li><li style="line-height: 18px;">            }  </li><li style="line-height: 18px;">        ]  </li><li style="line-height: 18px;">    };  </li><li style="line-height: 18px;"></script>  </li></ol></div><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">最后,U定俗成圎ͼ一般definecMutil的singleton模块Qjs文g的名字第一个字母小写;而类似RedTextDialog的类模块Q第一个字母大写?/p><img src ="http://www.tkk7.com/jjshcc/aggbug/417569.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2014-09-01 16:48 <a href="http://www.tkk7.com/jjshcc/archive/2014/09/01/417569.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://wwwyy763.com" target="_blank">߿һ</a>| <a href="http://5s6b.com" target="_blank">˳վ߸</a>| <a href="http://295301.com" target="_blank">޹Ʒһ</a>| <a href="http://jinguwj.com" target="_blank">Ļѿ</a>| <a href="http://777cc55.com" target="_blank">þ޹ӰԺվ</a>| <a href="http://jldledu.com" target="_blank">պëƬѹۿ</a>| <a href="http://mtsp2.com" target="_blank">޹91Ʒר</a>| <a href="http://jiezinet.com" target="_blank">ѲŮһëƬ</a>| <a href="http://kencery.com" target="_blank">һ߹ۿ</a>| <a href="http://dukane1688.com" target="_blank">޹ľƷ</a>| <a href="http://6878vip.com" target="_blank">ƷѲ</a>| <a href="http://www999973.com" target="_blank">޹˾þۺ</a>| <a href="http://xabcjzx.com" target="_blank">69˾ƷƵ</a>| <a href="http://www621f.com" target="_blank">л</a>| <a href="http://wxxwy.com" target="_blank">ԸŮƵ߹ۿѾƷ </a>| <a href="http://kmyake.com" target="_blank">Ļþи </a>| <a href="http://www42iii.com" target="_blank">˳ɾƷƵ</a>| <a href="http://imfever.com" target="_blank">޹ۺ˳ۺվ00</a>| <a href="http://cc8n.com" target="_blank">߹ۿվ</a>| <a href="http://manghuo365.com" target="_blank">ۺһƷ</a>| <a href="http://gzweida88.com" target="_blank">޸ƵһƵƵ</a>| <a href="http://tskes.com" target="_blank">Ƶ߹ۿѲ</a>| <a href="http://czdlglass.com" target="_blank">AVþþƷݺݰ˳</a>| <a href="http://selaohu.com" target="_blank">3344ѲŹۿƵ</a>| <a href="http://www-64000.com" target="_blank">ɫվwww</a>| <a href="http://wwwav888.com" target="_blank">޹Ʒ</a>| <a href="http://glhrsydc.com" target="_blank">ѹƵ</a>| <a href="http://www79909c.com" target="_blank">һƵ</a>| <a href="http://qq367.com" target="_blank">һĻ</a>| <a href="http://dxj588.com" target="_blank">**һһëƬѹۿ</a>| <a href="http://yu388.com" target="_blank">ŷa߹ۿ</a>| <a href="http://513109.com" target="_blank">þþƷƷ</a>| <a href="http://8654123.com" target="_blank">þþþþþƷο</a>| <a href="http://6266tv.com" target="_blank">޹˱ɫ</a>| <a href="http://1992zyzp.com" target="_blank">ҹþþӰԺ</a>| <a href="http://xianfeng-motor.com" target="_blank">ѹվ߹ۿ</a>| <a href="http://lhtjdj.com" target="_blank">޹߾Ʒһ </a>| <a href="http://www026qqcom.com" target="_blank">һ߲ѹۿİƵ </a>| <a href="http://sitefmns.com" target="_blank">Ļ벻Ӱ</a>| <a href="http://youyou8tv.com" target="_blank">99reƵ</a>| <a href="http://www-83118.com" target="_blank">Ůbbbbxxxx</a>| <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>