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
fa4679cc
Commit
fa4679cc
authored
Apr 03, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开盘修改
parent
05684fc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
42 deletions
+49
-42
opensquareLogList.html
application/index/view/opensquare/opensquareLogList.html
+4
-8
opensquareList.js
public/resource/js/opensquareList.js
+43
-32
opensquareList_template_tpl.html
public/resource/template/opensquareList_template_tpl.html
+2
-2
No files found.
application/index/view/opensquare/opensquareLogList.html
View file @
fa4679cc
...
...
@@ -263,7 +263,7 @@
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
class=
"btn btn-default"
href=
"#add_modal"
data-toggle=
"modal"
data-id=
"[%= it[item]['id'] %]"
><i
class=
"icon-plus"
></i>
发布开盘
</a>
<a
class=
"btn btn-default
new-pan
"
href=
"#add_modal"
data-toggle=
"modal"
data-id=
"[%= it[item]['id'] %]"
><i
class=
"icon-plus"
></i>
发布开盘
</a>
</li>
</ul>
...
...
@@ -283,13 +283,12 @@
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<!--下拉列表-->
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"city_id"
title=
" "
>
<option
value=
""
>
请选择城市
</option>
<option
value=
"10001"
>
上海市
</option>
<option
value=
"10002"
>
杭州市
</option>
<option
value=
"10003"
>
深圳市
</option>
<option
value=
"10006"
>
广州市
</option>
</select>
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id"
title=
" "
>
<option
value=
""
>
部门标签
</option>
</select>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"文章标题"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"search"
>
搜索
</span>
...
...
@@ -394,7 +393,7 @@
×
</button>
<h4
class=
"modal-title"
>
发布开盘
<span
class=
"is-add"
>
发布开盘
</span>
</h4>
</div>
<div
class=
"modal-body"
>
...
...
@@ -416,11 +415,10 @@
<label
class=
"col-sm-2 control-label"
>
城市标签:
</label>
<div
class=
"col-sm-9"
>
<select
class=
"form-control btn5 input"
name=
""
id=
"add_city_id"
title=
" "
>
<option
value=
""
>
请选择
标签
</option>
<option
value=
""
>
请选择
城市
</option>
<option
value=
"10001"
>
上海市
</option>
<option
value=
"10002"
>
杭州市
</option>
<option
value=
"10003"
>
深圳市
</option>
<option
value=
"10006"
>
广州市
</option>
</select>
</div>
</div>
...
...
@@ -429,8 +427,6 @@
<label
class=
"col-sm-2 control-label"
>
部门标签:
</label>
<div
class=
"col-sm-9"
>
<select
class=
"form-control btn5 input"
name=
""
id=
"add_district_id"
title=
" "
>
<option
value=
""
>
请选择标签
</option>
<option
value=
"7"
>
四部林时达区域
</option>
</select>
</div>
</div>
...
...
public/resource/js/opensquareList.js
View file @
fa4679cc
...
...
@@ -17,6 +17,8 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
agent_id2
:
0
,
modal_btn_id
:
''
,
announcementdel_id
:
''
,
//文章id
is_add
:
1
,
//是否新增
switchUrl
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
...
...
@@ -30,7 +32,7 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
//获取学院标签
user
.
getDistrict
(
function
(){
_doc
.
on
(
'input'
,
'#district_id
, #district_id2
'
,
function
(){
_doc
.
on
(
'input'
,
'#district_id'
,
function
(){
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
...
...
@@ -45,6 +47,22 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
_doc
.
on
(
'click'
,
'.add-pic'
,
function
(){
follow
.
getaddPicList
();
});
//新增开盘 编辑开盘
_doc
.
on
(
'click'
,
'.new-pan'
,
function
(){
//置空内容
$
(
'#announcement_title_add'
).
val
(
''
);
$
(
'#add_city_id'
).
val
(
''
);
$
(
'#add_city_id'
).
val
(
''
);
$
(
'#fujian_ul_add'
).
html
(
''
);
var
ue
=
UE
.
getEditor
(
'myEditor'
);
ue
.
ready
(
function
()
{
//编辑器初始化完成再赋值
ue
.
setContent
(
''
);
//赋值给UEditor
});
user
.
is_add
=
1
;
$
(
'.is-add'
).
html
(
'发布开盘'
)
user
.
getDistrict
();
user
.
switchUrl
=
'/index/addSquare'
;
});
_doc
.
on
(
'click'
,
'.pdf-pre-a'
,
function
()
{
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
var
_url
=
ServerHostImageLiu
+
'/index/downloadFile'
;
...
...
@@ -73,16 +91,6 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_news
();
});
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
$
(
'.notice-title'
).
html
(
$
(
this
).
attr
(
"data-title"
));
$
(
'.notice-time'
).
html
(
$
(
this
).
attr
(
"data-createTime"
));
$
(
'.notice-text'
).
html
(
$
(
this
).
attr
(
"data-content"
));
user
.
news_id
=
$
(
this
).
attr
(
"data-id"
);
console
.
log
(
user
.
news_id
);
user
.
announcement_details
();
});
_doc
.
on
(
'click'
,
'.jian_class>ul>li'
,
function
(){
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
...
...
@@ -171,8 +179,8 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
});
_doc
.
on
(
'click'
,
'.edit_modal_btn'
,
function
(
e
){
//点击编辑
user
.
announcementdel_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
is_add
=
0
;
user
.
text_details
();
});
...
...
@@ -180,6 +188,9 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
//点击编辑 调用的接口
text_details
:
function
()
{
$
(
'.is-add'
).
html
(
'编辑开盘'
)
user
.
switchUrl
=
'/index/editSquare'
;
user
.
getDistrict
();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getSquareInfo'
,
...
...
@@ -190,17 +201,19 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
'#announcement_title_add'
).
val
(
data
.
data
.
data
.
title
);
$
(
"#add_city_id"
).
val
(
data
.
data
.
data
.
title
);
$
(
"#add_district_id"
).
val
(
data
.
data
.
data
.
title
);
$
(
"#add_city_id"
).
val
(
data
.
data
.
data
.
site_id
);
$
(
"#add_district_id"
).
val
(
data
.
data
.
data
.
district_lable_id
);
var
ue
=
UE
.
getEditor
(
'myEditor'
);
ue
.
ready
(
function
()
{
//编辑器初始化完成再赋值
ue
.
setContent
(
data
.
data
.
data
.
content
);
//赋值给UEditor
});
var
_data
=
data
[
'data'
][
'data'
];
if
(
_data
[
'cover_plan'
])
{
$
(
'#fujian_ul'
).
html
(
'<li><img title="点击查看大图" src="{0}" /></li>'
.
stringFormatObj
({
'0'
:
_data
[
'cover_plan'
]
if
(
_data
[
'cover_img'
])
{
$
(
'#fujian_ul_add'
).
html
(
'<li><img title="点击查看大图" src="{0}" data-name="{1}" class="titleImg"/></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
"/resource/lib/Attachments/images/"
+
_data
[
'cover_img'
],
'1'
:
_data
[
'cover_img'
]
}));
};
}
else
{}
...
...
@@ -234,7 +247,7 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
params
.
end_date
=
$
(
"#end_date"
).
val
();
params
.
title
=
$
(
"#release_title"
).
val
();
params
.
site_id
=
$
(
"#city_id"
).
val
();
// params.district_id = $("#city
_id").val();
params
.
district_id
=
$
(
"#district
_id"
).
val
();
params
.
page_no
=
user
.
pageNo
;
params
.
page_size
=
user
.
pageSize
;
...
...
@@ -245,7 +258,6 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
'公告'
);
var
temp
=
document
.
getElementById
(
'opensquare_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#users_list"
).
html
(
doTtmpl
(
data
.
data
.
data
));
...
...
@@ -255,21 +267,24 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
}
});
},
getDistrict
:
function
(
fn
)
{
getDistrict
:
function
()
{
$
(
"#district_id"
).
html
(
''
);
$
(
"#add_district_id"
).
html
(
''
);
$
.
ajax
({
url
:
'/index/get
NewsLabel
'
,
url
:
'/index/get
DistrictLable
'
,
type
:
'GET'
,
async
:
true
,
data
:
{},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
var
str
=
'
<option value="">部门标签</option>
'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
label_
name
+
'</option>'
;
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
name
+
'</option>'
;
});
$
(
"#district_id"
).
append
(
str
);
fn
&&
fn
();
$
(
"#add_district_id"
).
append
(
str
);
}
}
});
...
...
@@ -295,21 +310,17 @@ define (['doT', 'text!temp/opensquareList_template_tpl.html','ckfinder','ckfinde
if
(
$
(
'.titleImg'
))
{
var
pic
=
$
(
'.titleImg'
).
attr
(
"data-name"
);
}
var
_imgUploadLiebiao
=
$
(
'#fujian_ul'
);
//列表页封面图ul
var
_liebiaoPicObj
=
$
(
'.titleImg'
);
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
if
(
_liebiaoPicObj
.
length
<
1
)
{
alert
(
'列表页封面图需要上传'
);
return
false
;
};
var
_data
=
{};
if
(
user
.
is_add
*
1
==
0
){
//编辑 传id
_data
.
id
=
user
.
announcementdel_id
;
}
_data
.
title
=
$
(
"#announcement_title_add"
).
val
();
_data
.
site_id
=
$
(
"#add_city_id"
).
val
();
//商学院标签id
_data
.
district_id
=
$
(
"#add_district_id"
).
val
();
//商学院标签id
_data
.
cover_img
=
pic
;
//封面图 剪切后的字符串
_data
.
content
=
UE
.
getEditor
(
'myEditor'
).
getContent
();
$
.
ajax
({
url
:
'/index/addSquare'
,
//发布开盘
url
:
user
.
switchUrl
,
type
:
'POST'
,
async
:
true
,
data
:
_data
,
...
...
public/resource/template/opensquareList_template_tpl.html
View file @
fa4679cc
...
...
@@ -12,8 +12,8 @@
[
%=
it
[
item
][
"site_name"
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"district_name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
>
[
%=
'部门标签'
%
]
<
/td
>
<
td
>
[
%=
'评论数'
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success show_modal_btn"
href
=
"#show_modal"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
>
查看
<
/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