Commit de216fd3 authored by agping's avatar agping

商学院

parent 7dd1154c
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
<div class="pull-right"> <div class="pull-right">
<ul class="bread_btn"> <ul class="bread_btn">
<li> <li>
<a href="new_text.html" class="btn btn-default add_alert"><i class="icon-plus"></i> 新增文章 <a href="new_text.html" class="btn btn-default add_alert" target="_blank"><i class="icon-plus"></i> 新增文章
</a> </a>
</li> </li>
</ul> </ul>
......
...@@ -10,6 +10,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -10,6 +10,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
//初始化dot //初始化dot
$ ("body").append (template); $ ("body").append (template);
user.getList (); user.getList ();
user.event (); user.event ();
//时间控件初始化 //时间控件初始化
/* $('#datetimepicker').datetimepicker({ /* $('#datetimepicker').datetimepicker({
...@@ -89,6 +90,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -89,6 +90,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$('.notice-title').html($ (this).attr ("data-title")); $('.notice-title').html($ (this).attr ("data-title"));
$('.notice-time').html($ (this).attr ("data-createTime")); $('.notice-time').html($ (this).attr ("data-createTime"));
$('.notice-text').html($ (this).attr ("data-content")); $('.notice-text').html($ (this).attr ("data-content"));
user.news_id = $ (this).attr ("data-id");
console.log(user.news_id);
user.announcement_details();
}); });
$ (document).on ("input","#set_father_id3", function () {//手机号搜索客方 $ (document).on ("input","#set_father_id3", function () {//手机号搜索客方
if($("#set_father_id3").val()==''){ if($("#set_father_id3").val()==''){
...@@ -458,38 +463,35 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -458,38 +463,35 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
} }
}); });
}, },
//点击收款图片 调用的接口 //点击编辑 调用的接口
getaddPicList: function() { //提交 announcement_details: function() { //提交
var news_id = getUrlParam('id');//地址栏获取的商铺或者街铺id
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _imgUploadLiebiao = $('#liebiao_pic_ul');//列表页封面图ul var _imgUploadLiebiao = $('#liebiao_pic_ul');//列表页封面图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
_imgUploadLunbo.empty(); var _dajiangtangObj = $('#dajiangtang'); //大讲堂
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url': '/index/houseEdit', 'url': '/index/getNewsInfo',
data: { data: {
"id": 3104, 'id':news_id,
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
//获取标签 id
$("#announcement_title").val(data.data.title);
$("#district_id2").val(data.data.s_label_id*1);//商学院标签id
// 获取封面图
var _data = data['data'];
// 封面图一张 // 封面图一张
if(_data['cover']){ if(_data['cover_plan']){
_imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({ _imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['cover'] '0': _urlCut + _data['cover_plan']
})); }));
}; };
// 封面图一张 // 封面图一张
_dajiangtangObj.find('iframe').contents().find('body').html(_data['content']); //大讲堂
var _data = data['data'];
for(var i in _data['slide_show']) {
_imgUploadLunbo.append('<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['slide_show'][i]['img_name'],
'id': _data['slide_show'][i]['id']
}));
};
// follow.getList(0);
} else { } else {
} }
} }
...@@ -510,6 +512,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -510,6 +512,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}); });
$("#district_id").append(str); $("#district_id").append(str);
$("#district_id2").append(str); $("#district_id2").append(str);
user.announcement_details();
fn && fn(); fn && fn();
} }
} }
...@@ -529,15 +532,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -529,15 +532,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var _data = {}; var _data = {};
//字符串形式 传过去 //字符串形式 传过去
// $.each(_liebiaoPicObj, function(i, item) { $.each(_liebiaoPicObj, function(i, item) {
//// _data['cover[' + i + ']'] = item.src.replace(_urlCut, ''); _data['file_img[' + i + ']'] = item.src.replace(_urlCut, '');
// _data['file_img[' + i + ']'] = item.src; // _data['file_img[' + i + ']'] = item.src;
//
// }); });
_data.title = $("#announcement_title").val(); _data.title = $("#announcement_title").val();
_data.title2 = $("#district_id2").val();//商学院标签id _data.title2 = $("#district_id2").val();//商学院标签id
_data.file_img = _liebiaoPicObj[0].src;//封面图 // _data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, '');//封面图 剪切后的字符串
_data.content = _dajiangtangVal; _data.content = _dajiangtangVal;
// if (params.title == '') { // if (params.title == '') {
// alert('标题不能为空'); // alert('标题不能为空');
...@@ -576,6 +579,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -576,6 +579,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框 $ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框
user.getList(1); user.getList(1);
alert('提交成功') alert('提交成功')
// window.open('/index/business_school.html');
window.location.href='/index/business_school';
console.log(66);
} else { } else {
alert(data.msg); alert(data.msg);
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<td>[%= it[item]["create_time"] %]</td> <td>[%= it[item]["create_time"] %]</td>
<td> <td>
<a class="btn1 btn-success announcement-details" href="#modal-record" data-toggle="modal" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-content='[%= it[item]["content"] %]'> <a class="btn1 btn-success" href="new_text.html?id=[%= it[item]["id"] %]" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-id='[%= it[item]["id"] %]' data-content='[%= it[item]["content"] %]' target="_blank">
编辑 编辑
</a> </a>
[% if(check_auth('index/delNews')) { %] [% if(check_auth('index/delNews')) { %]
......
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