Commit 605764cc authored by agping's avatar agping

商铺列表 是否独家 上传附件

parent b930de1c
......@@ -554,19 +554,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
};
});
//附件上传删除键事件
_doc.on('click', '.delet-pic-btn', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确定删除该文件吗?')) {
var _imgId = _this.parent().attr('data-imgid');
var file_id = $(this).parent('li').attr('id') - 0 ;
_this.parent().remove();
business.addDeleteNewsEvent(file_id);
};
});
},
// 获取信息 手机号 名字
Anch: function() { //获取手机号名字的
......@@ -638,7 +625,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
};
var _data={};
//获取附件 对接口
var file_paths = _data['file'];
var file_paths = _data['exclusive_file'];
if(file_paths){
for ( var i = 0 ; i < file_paths.length ; i++ ){
console.log(file_paths[i]['file_name'])
......@@ -676,15 +663,18 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
for(var j = 0; j < imgs.length; j++) {
images.push(imgs[j].getAttribute("data-img"))
};
//附件相关
var _data = {};
//附件相关 2.9版本
var _data = [];
var _fujianObj = $('#fujian_ul').find('li>a.pdf-pre-a'); //附件看的是删除按钮的个数
if ( _fujianObj.length > 0 ){ //判断附件存在,同时,附件可能存在0到5个
for ( var i= 0 ; i < _fujianObj.length ; i++ ){
var one_name = _fujianObj[i].getAttribute('data-filename'); //附件取得是data-filename
_data['annex_file_name['+i+']'] = one_name;
_data[i] = one_name;
}
}
var exclusive_file_str= _data.join(',');
console.log($("#sel_dujia").val());
if($("#sel_dujia").val() == null) {
alert("请选择是否独家");
......@@ -730,8 +720,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
"exclusive_id": business.exclusive_id, //经纪人id
"agent_start_time": $("#start_date_dujia").val(), //开始时间
"agent_end_time": $("#end_date_dujia").val(), //结束时间
"exclusive_img": images ,//图片
"exclusive_file": _data //附件
"exclusive_img": images ,//独家图片
"exclusive_file": exclusive_file_str //独家附件
},
dataType: "json",
......
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