|
|
@@ -17,7 +17,8 @@ $(function () {
|
|
|
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
success: function (data) {
|
|
|
//请求成功时处理
|
|
|
- if (data != null && $.trim(data) != "") {
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
+ data = data.data;
|
|
|
if (data.videoCastList.length > 0) {
|
|
|
var videoCastList = data.videoCastList;
|
|
|
var str = "";
|
|
|
@@ -89,6 +90,8 @@ $(function () {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ } else {
|
|
|
+ alert(data.message);
|
|
|
}
|
|
|
},
|
|
|
beforeSend: function () {
|
|
|
@@ -99,16 +102,16 @@ $(function () {
|
|
|
//请求完成的处理
|
|
|
$("#cover").css('display', 'none');
|
|
|
},
|
|
|
- error: function (errorData) {
|
|
|
+ error: function (data) {
|
|
|
//请求出错处理
|
|
|
- alert('error:' + errorData);
|
|
|
+ alert('error:' + data);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$("#searchbutton").click(function () {
|
|
|
search(1);
|
|
|
});
|
|
|
- $("#shaixuan").click(function (){
|
|
|
+ $("#shaixuan").click(function () {
|
|
|
$("#wd").val("");
|
|
|
|
|
|
search(1);
|
|
|
@@ -118,14 +121,14 @@ $(function () {
|
|
|
search(1);
|
|
|
}
|
|
|
});
|
|
|
- $(".dropdown-box").find("li").click(function (){
|
|
|
+ $(".dropdown-box").find("li").click(function () {
|
|
|
$("#bigType").text($(this).text());
|
|
|
$(".dropdown-box").attr("style", "display: none;");
|
|
|
});
|
|
|
- $(".dropdown-hover").mouseover(function(){
|
|
|
+ $(".dropdown-hover").mouseover(function () {
|
|
|
$(".dropdown-box").attr("style", "display: block;");
|
|
|
});
|
|
|
- $(".dropdown-hover").mouseout(function(){
|
|
|
+ $(".dropdown-hover").mouseout(function () {
|
|
|
$(".dropdown-box").attr("style", "display: none;");
|
|
|
});
|
|
|
});
|
|
|
@@ -153,7 +156,8 @@ function search(pageNo) {
|
|
|
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
success: function (data) {
|
|
|
//请求成功时处理
|
|
|
- if (data != null && $.trim(data) != "") {
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
+ data = data.data;
|
|
|
var videoInfoList = data.list;
|
|
|
var str = "";
|
|
|
for (var i = 0; i < videoInfoList.length; i++) {
|
|
|
@@ -199,19 +203,21 @@ function search(pageNo) {
|
|
|
search(pageNo);
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+ alert(data.message);
|
|
|
}
|
|
|
},
|
|
|
beforeSend: function () {
|
|
|
//请求前的处理
|
|
|
- $(".loading").css("display","block");
|
|
|
+ $(".loading").css("display", "block");
|
|
|
},
|
|
|
complete: function () {
|
|
|
//请求完成的处理
|
|
|
- $(".loading").css("display","none");
|
|
|
+ $(".loading").css("display", "none");
|
|
|
},
|
|
|
- error: function (errorData) {
|
|
|
+ error: function (data) {
|
|
|
//请求出错处理
|
|
|
- alert('error:' + errorData);
|
|
|
+ alert('error:' + data);
|
|
|
}
|
|
|
});
|
|
|
}
|