修改DEMO

This commit is contained in:
iFish 2014-08-21 14:15:52 +08:00
parent 06a22c3017
commit 5ef29d16a7
3 changed files with 2 additions and 31 deletions

View File

@ -80,7 +80,6 @@
<Content Include="login.html" />
<Content Include="query.html" />
<Content Include="route.html" />
<Content Include="Web.config" />
<Content Include="xhrdemo.html" />
</ItemGroup>
<ItemGroup />

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings></connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/" />
</authentication>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
</assemblyBinding>
</runtime>
</configuration>

View File

@ -60,7 +60,6 @@
}
delete queue[obj.id];
alert(obj.success);
if (obj.success) {
def.resolve(obj.result, {
headers: obj.headers,
@ -120,7 +119,7 @@
return ajax.apply(this, arr);
},
getImage: function(url, refer) {
return return ajax("GET", url, "image", null, refer);
return ajax("GET", url, "image", null, refer);
}
}
})();
@ -136,6 +135,7 @@
$("#loadImage").click(function () {
lbAjax.getImage("https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=login&rand=sjrand", "https://kyfw.12306.cn/otn/login/init")
.done(function (data) {
alert(data);
$("#result").html("加载成功!<img src='data:image/png;base64," + data + "' />");
}).fail(function (data) {
$("#result").html("加载失败!" + data);