Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
ce9449d2
Commit
ce9449d2
authored
Jul 05, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台修改
parent
dbf5c1de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
117 deletions
+16
-117
getCollection.js
public/resource/js/getCollection.js
+11
-3
schoolBusiness.js
public/resource/js/schoolBusiness.js
+5
-113
schoolBusiness_template_tpl.html
public/resource/template/schoolBusiness_template_tpl.html
+0
-1
No files found.
public/resource/js/getCollection.js
View file @
ce9449d2
...
...
@@ -131,8 +131,15 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
imgname
[
i
]
=
$
(
'.result>img'
).
get
(
i
).
getAttribute
(
"class"
);
}
console
.
log
(
imgname
.
join
(
','
));
var
id_pic
;
if
(
follow
.
house_fatherid
>
0
){
id_pic
=
follow
.
house_fatherid
;
}
else
{
id_pic
=
follow
.
house_id
;
}
var
_data
=
{
img_id
:
follow
.
house_id
,
img_id
:
id_pic
,
img_name
:
imgname
.
join
(
','
)
};
...
...
@@ -230,14 +237,15 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
getaddPicList
:
function
()
{
//获取收款图片
// container_body
$
(
'.result2,.result'
).
remove
();
var
id_pic
;
var
id_pic
;
if
(
follow
.
house_fatherid
>
0
){
id_pic
=
follow
.
house_fatherid
;
}
else
{
id_pic
=
follow
.
house_id
;
}
$
(
'.result2,.result'
).
remove
();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/receiptImgList'
,
...
...
public/resource/js/schoolBusiness.js
View file @
ce9449d2
...
...
@@ -225,43 +225,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
_this
.
parent
().
remove
();
if
(
confirm
(
'确定删除该文件吗?'
)){
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
if
(
_imgId
){
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/delHouseFile'
,
data
:
{
'id'
:
_imgId
,
'house_id'
:
3104
,
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
_this
.
parent
().
remove
();
}
else
{
alert
(
_data
[
'msg'
]);
}
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
_this
.
parent
().
remove
();
}
};
});
//图片预览点击放大事件
...
...
@@ -271,48 +238,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
});
//保存上传的图片 详情页多张
_doc
.
on
(
'click'
,
'#saveBtn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
var
_data
=
{
id
:
3104
,
};
e
.
preventDefault
();
e
.
stopPropagation
();
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_xiangqingPicObj
=
_imgUploadLunbo
.
find
(
'li>img'
);
var
_urlCut
=
'/resource/lib/Attachments/images/'
;
//要截取的部分url
$
.
each
(
_xiangqingPicObj
,
function
(
i
,
item
)
{
_data
[
'slide_show['
+
i
+
']'
]
=
item
.
src
.
replace
(
_urlCut
,
''
);
});
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/houseEdit'
,
data
:
_data
,
// timeout: 30000,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//图片上传 2.2版本
},
addphone
:
function
(
obj
){
var
user_ht
=
$
(
obj
).
html
();
...
...
@@ -468,7 +393,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var
news_id
=
getUrlParam
(
'id'
);
//地址栏获取的商铺或者街铺id
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_imgUploadLiebiao
=
$
(
'#liebiao_pic_ul'
);
//列表页封面图ul
var
_urlCut
=
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
$
.
ajax
({
'type'
:
'GET'
,
...
...
@@ -521,7 +446,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
add_news
:
function
()
{
//新增文章 编辑文章
var
_imgUploadLiebiao
=
$
(
'#liebiao_pic_ul'
);
//列表页封面图ul
var
_liebiaoPicObj
=
_imgUploadLiebiao
.
find
(
'li>img'
);
var
_urlCut
=
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
var
_dajiangtangVal
=
_dajiangtangObj
.
find
(
'iframe'
).
contents
().
find
(
'body'
).
html
();
...
...
@@ -529,15 +454,8 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
alert
(
'列表页封面图需要上传'
);
return
false
;
};
var
_data
=
{};
//字符串形式 传过去
// $.each(_liebiaoPicObj, function(i, item) {
// _data['file_img'] = item.src.replace(_urlCut, '');
//// _data['file_img[' + i + ']'] = item.src;
//
// });
console
.
log
(
55
);
if
(
getUrlParam
(
'id'
)){
_data
.
id
=
getUrlParam
(
'id'
);
...
...
@@ -546,32 +464,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
_data
.
s_label_id
=
$
(
"#district_id2"
).
val
();
//商学院标签id
_data
.
file_img
=
_liebiaoPicObj
[
0
].
src
.
replace
(
_urlCut
,
''
);
//封面图 剪切后的字符串
_data
.
content
=
_dajiangtangVal
;
// if (params.title == '') {
// alert('标题不能为空');
// $("#announcement_title").focus();
// return ;
// }
// if (params.title.length > 20) {
// alert('标题字数20以内');
// $("#announcement_title").focus();
// return ;
// }
// if (params.content == '') {
// alert('内容不能为空');
// $("#announcement_content").focus();
// return ;
// }
// if (params.content.length > 250) {
// alert('公告内容字数250以内');
// $("#announcement_content").focus();
// return ;
// }
//判断有没有图片
// if(_liebiaoPicObj.length < 1) {
// alert('列表页封面图需要上传');
// return false;
// };
$
.
ajax
({
url
:
'/index/addNews'
,
type
:
'POST'
,
...
...
public/resource/template/schoolBusiness_template_tpl.html
View file @
ce9449d2
...
...
@@ -18,7 +18,6 @@
<
td
>
[
%=
it
[
item
][
"comment_number"
]
%
]
<
/td
>
<
td
>
_data
.
title
=
$
(
"#announcement_title"
).
val
();
<
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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment