Commit 859dcacc authored by clone's avatar clone

bug

parent 050fbc79
...@@ -35,15 +35,15 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -35,15 +35,15 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
params.cover_image = $ ("#cover_image").val (); params.cover_image = $ ("#cover_image").val ();
params.sort = $ ("#sort").val (); params.sort = $ ("#sort").val ();
var banner_type = $("input[name=banner_type]:checked").val(); var banner_type = $ ("input[name=banner_type]:checked").val ();
var page_type = $("#type").val(); var page_type = $ ("#type").val ();
if(page_type == 0 && banner_type == 0 ){ if (page_type == 0 && banner_type == 0) {
params.type = 0; params.type = 0;
}else if(page_type == 0 && banner_type == 1 ){ } else if (page_type == 0 && banner_type == 1) {
params.type = 2; params.type = 2;
}else if(page_type == 1 && banner_type == 0 ){ } else if (page_type == 1 && banner_type == 0) {
params.type = 1; params.type = 1;
}else if(page_type == 1 && banner_type == 1 ){ } else if (page_type == 1 && banner_type == 1) {
params.type = 3; params.type = 3;
} }
...@@ -84,6 +84,13 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -84,6 +84,13 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
$ ("#editor_modal_title").html ("编辑广告"); $ ("#editor_modal_title").html ("编辑广告");
var item = $ (this).parents ("tr").find ("td"); var item = $ (this).parents ("tr").find ("td");
$ ("#id").val ($ (this).attr ("data-id")); $ ("#id").val ($ (this).attr ("data-id"));
var type = item.eq (2).html ();
if (type.trim() == "用户app") {
$ ("input[name='banner_type']").get (0).checked = true;
} else {
$ ("input[name='banner_type']").get (1).checked = true;
}
$ ("#title").val (item.eq (0).html ()); $ ("#title").val (item.eq (0).html ());
$ ("#url").val (item.eq (3).html ()); $ ("#url").val (item.eq (3).html ());
$ ("#cover_image").val (item.eq (1).find ("input").val ()); $ ("#cover_image").val (item.eq (1).find ("input").val ());
...@@ -103,9 +110,9 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -103,9 +110,9 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
params.pageSize = banner.pageSize; params.pageSize = banner.pageSize;
var url = ''; var url = '';
var requestPath = window.location.pathname; var requestPath = window.location.pathname;
if(requestPath.indexOf("advertising") > 0 ){ if (requestPath.indexOf ("advertising") > 0) {
url = '/admin.php/index/getPopList'; url = '/admin.php/index/getPopList';
}else{ } else {
url = '/admin.php/index/bannerList'; url = '/admin.php/index/bannerList';
} }
$.ajax ({ $.ajax ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment