Commit ba3c054f authored by xinyuandu's avatar xinyuandu

商铺图库

parent b59ab82c
...@@ -129,7 +129,9 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -129,7 +129,9 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
//获取列表 //获取列表
getList: function (pageNo) { getList: function (pageNo) {
picture.pageNo = pageNo; picture.pageNo = pageNo;
var params = {}; var params = {
"AuthToken" : JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))).AuthToken,
};
params.pageNo = picture.pageNo; params.pageNo = picture.pageNo;
params.pageSize = picture.pageSize; params.pageSize = picture.pageSize;
params.img_type = $('#p_type option:selected').val() == -1 ? '' : $('#p_type option:selected').val(); params.img_type = $('#p_type option:selected').val() == -1 ? '' : $('#p_type option:selected').val();
...@@ -139,7 +141,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -139,7 +141,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
params.label = $('#yetai_type option:selected').val() ==-1 ? '' : $('#yetai_type option:selected').html(); params.label = $('#yetai_type option:selected').val() ==-1 ? '' : $('#yetai_type option:selected').html();
} }
$.ajax ({ $.ajax ({
url: '/api/getImageDepotList',//获取列表 url: '/index/getImageDepotList',//获取列表
type: 'GET', type: 'GET',
async: true, async: true,
data: params, data: params,
...@@ -158,7 +160,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -158,7 +160,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
//查看功能获取数据 //查看功能获取数据
getDataByParams : function(id){ getDataByParams : function(id){
$.ajax ({ $.ajax ({
url: '/api/getImageDepotById',//获取列表 url: '/index/getImageDepotById',//获取列表
type: 'GET', type: 'GET',
async: true, async: true,
data: {'id' : id }, data: {'id' : id },
...@@ -191,11 +193,12 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -191,11 +193,12 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
//获取业态 //获取业态
getYetai: function($yetai,$pt,isModal) { getYetai: function($yetai,$pt,isModal) {
$.ajax({ $.ajax({
url: '/api/getImageTypeLabel', url: '/index/getImageTypeLabel',
type: 'GET', type: 'GET',
async: true, async: true,
data: { data: {
"pageSize": 1000 "AuthToken" : JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))).AuthToken,
"pageSize": 10
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -252,7 +255,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -252,7 +255,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
}; };
$.ajax({ $.ajax({
url: '/api/addImageDepot', url: '/index/addImageDepot',
type: 'GET', type: 'GET',
async: true, async: true,
data: params, data: params,
...@@ -274,7 +277,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -274,7 +277,7 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
//删除表格的行(单行删除) //删除表格的行(单行删除)
deletePictureById: function(id) { deletePictureById: function(id) {
$.ajax({ $.ajax({
url: '/api/delImageDepot', url: '/index/delImageDepot',
type: 'POST', type: 'POST',
async: true, async: true,
data: { "id": id}, data: { "id": id},
......
...@@ -8,8 +8,19 @@ ...@@ -8,8 +8,19 @@
<img src='[%= it[item]['img_file_path'] %]' > <img src='[%= it[item]['img_file_path'] %]' >
</td> </td>
<td>[%= it[item]['img_type'] %]</td> [% if ( it[item]['img_type'] == 2 ){ %]
<td>[%= it[item]['label'] %] </td> <td>人群图</td>
<td>-</td>
[% } else if ( it[item]['img_type'] == 1 ) { %]
<td>室内图</td>
<td>[%= it[item]['label'] %] </td>
[% } else if ( it[item]['img_type'] == 0) { %]
<td>室外图</td>
<td>[%= it[item]['label'] %] </td>
[% }else { %]
<td>-</td>
<td>-</td>
[% } %]
<td> <td>
<a class="btn1 btn-success is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-target="#modal-show">查看</a> <a class="btn1 btn-success is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-target="#modal-show">查看</a>
<a class="btn1 btn-danger announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a> <a class="btn1 btn-danger announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
......
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