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
896454da
Commit
896454da
authored
Feb 15, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表 换插件
parent
1bf53c5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
27 deletions
+66
-27
edit.html
application/index/view/houses/edit.html
+23
-6
public.js
public/resource/js/public.js
+3
-0
shop_edit.js
public/resource/js/shop_edit.js
+40
-21
No files found.
application/index/view/houses/edit.html
View file @
896454da
...
@@ -7,8 +7,18 @@
...
@@ -7,8 +7,18 @@
.p-t-10
{
.p-t-10
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
#xiangqing_pic_btn
{
.upload-image-btn
{
margin-right
:
141px
;
width
:
82px
;
height
:
40px
;
position
:
relative
;
opacity
:
0
;
z-index
:
66
;
}
.btn-default-liu
{
position
:
relative
;
left
:
-80px
;
z-index
:
6
;
}
}
</style>
</style>
<!--默认#page-content-wrapper是隐藏的-->
<!--默认#page-content-wrapper是隐藏的-->
...
@@ -544,7 +554,8 @@
...
@@ -544,7 +554,8 @@
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
详情页轮播图(至少2张)
</label>
<label
for=
""
>
详情页轮播图(至少2张)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"xiangqing_pic_input"
class=
"form-control"
style=
"display: none"
id=
"xiangqing_pic_input"
placeholder=
"请选择图片"
>
<input
readonly=
"readonly"
type=
"text"
name=
"xiangqing_pic_input"
class=
"form-control"
style=
"display: none"
id=
"xiangqing_pic_input"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default upload-image-btn"
id=
"xiangqing_pic_btn"
type=
"button"
data-limittop=
"20"
>
选择图片
</button>
<input
class=
"upload-image-btn"
id=
"xiangqing_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
<span
class=
"tip"
></span>
<label
for=
"isShowShopDetail"
>
是否对客户展示对内详情图
</label>
<label
for=
"isShowShopDetail"
>
是否对客户展示对内详情图
</label>
<select
class=
"form-control"
name=
"isShowShopDetail"
id=
"isShowShopDetail"
data-alert=
"请选择是否对客户展示对内详情图"
>
<select
class=
"form-control"
name=
"isShowShopDetail"
id=
"isShowShopDetail"
data-alert=
"请选择是否对客户展示对内详情图"
>
...
@@ -559,7 +570,9 @@
...
@@ -559,7 +570,9 @@
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
楼层平面图(选填)
</label>
<label
for=
""
>
楼层平面图(选填)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"louceng_pic_input"
class=
"form-control"
style=
"display: none"
id=
"louceng_pic_input"
placeholder=
"请选择图片"
>
<input
readonly=
"readonly"
type=
"text"
name=
"louceng_pic_input"
class=
"form-control"
style=
"display: none"
id=
"louceng_pic_input"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default upload-image-btn"
id=
"louceng_pic_btn"
type=
"button"
data-limittop=
"20"
>
选择图片
</button>
<input
readonly=
"readonly"
class=
"upload-image-btn"
id=
"louceng_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
<span
class=
"tip"
></span>
</div>
</div>
<ul
class=
"img-pre-ul"
id=
"louceng_pic_ul"
></ul>
<ul
class=
"img-pre-ul"
id=
"louceng_pic_ul"
></ul>
...
@@ -568,7 +581,9 @@
...
@@ -568,7 +581,9 @@
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
附件上传(pdf格式,选填,1个)
</label>
<label
for=
""
>
附件上传(pdf格式,选填,1个)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"fujian_pre"
class=
"form-control"
style=
"display: none"
id=
"fujian_pre"
placeholder=
"请选择图片"
>
<input
readonly=
"readonly"
type=
"text"
name=
"fujian_pre"
class=
"form-control"
style=
"display: none"
id=
"fujian_pre"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default upload-image-btn"
id=
"fujian_btn"
type=
"button"
data-limittop=
"1"
data-spfile=
"pdf"
>
选择文件
</button>
<input
class=
"upload-image-btn"
id=
"fujian_btn"
type=
"file"
data-limittop=
"1"
data-spfile=
"pdf"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择附件
</button>
<span
class=
"tip"
></span>
<span
class=
"tip"
></span>
</div>
</div>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
...
@@ -613,7 +628,9 @@
...
@@ -613,7 +628,9 @@
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
独家合同上传
</label>
<label
for=
""
>
独家合同上传
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"dujia_pic_input"
class=
"form-control"
style=
"display: none"
id=
"dujia_pic_input"
placeholder=
"请选择图片"
>
<input
readonly=
"readonly"
type=
"text"
name=
"dujia_pic_input"
class=
"form-control"
style=
"display: none"
id=
"dujia_pic_input"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default upload-image-btn"
id=
"dujia_pic_btn"
type=
"button"
data-limittop=
"20"
>
选择图片
</button>
<input
class=
"upload-image-btn"
id=
"dujia_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
<span
class=
"tip"
></span>
</div>
</div>
<ul
class=
"img-pre-ul"
id=
"dujia_pic_ul"
></ul>
<ul
class=
"img-pre-ul"
id=
"dujia_pic_ul"
></ul>
...
...
public/resource/js/public.js
View file @
896454da
...
@@ -366,3 +366,5 @@ function getTimeStamp(date){
...
@@ -366,3 +366,5 @@ function getTimeStamp(date){
if
(
location
.
origin
===
'https://api.tonglianjituan.com'
)
{
if
(
location
.
origin
===
'https://api.tonglianjituan.com'
)
{
ServerHostImageLiu
=
'http://images.tonglianjituan.com'
;
//正式用正式域名
ServerHostImageLiu
=
'http://images.tonglianjituan.com'
;
//正式用正式域名
};
};
//共用新增商铺 全局上传图片
\ No newline at end of file
public/resource/js/shop_edit.js
View file @
896454da
...
@@ -19,7 +19,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
...
@@ -19,7 +19,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_sublet_id
=
getUrlParam
(
'sublet_id'
),
_sublet_id
=
getUrlParam
(
'sublet_id'
),
_doc
=
$
(
document
),
_doc
=
$
(
document
),
_tpl_landlord_phone1
=
$
(
'#my_tpl_landlord_phone1'
).
html
(),
//手机号码添加的位置模板
_tpl_landlord_phone1
=
$
(
'#my_tpl_landlord_phone1'
).
html
(),
//手机号码添加的位置模板
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
,
//要截取的部分url
_urlCut
=
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
,
//要截取的部分url
_loadMainItem
=
$
(
'#main_loading_pic'
),
//整个页面的加载图标
_loadMainItem
=
$
(
'#main_loading_pic'
),
//整个页面的加载图标
_shangpuTypeObj
=
$
(
'#shangpuType'
),
//商铺类型
_shangpuTypeObj
=
$
(
'#shangpuType'
),
//商铺类型
_showCdObj
=
$
(
'#showCd'
),
//显示给C端用户看
_showCdObj
=
$
(
'#showCd'
),
//显示给C端用户看
...
@@ -466,36 +466,55 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
...
@@ -466,36 +466,55 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
});
});
//图片上传,附件上传处理事件
//图片上传,附件上传处理事件
$
(
".upload-image-btn"
).
c
lick
(
function
()
{
$
(
".upload-image-btn"
).
c
hange
(
function
()
{
var
_this
=
$
(
this
),
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
BrowseServer
(
_this
.
prev
().
attr
(
'id'
),
function
(
url
)
{
//区分图片 轮播图 平面图 pdf 独家合同
console
.
log
(
url
);
var
formData
=
new
FormData
();
if
(
_spFile
==
'pdf'
)
{
formData
.
append
(
'type'
,
'house_img'
);
if
(
/
(\.
pdf
)
$/i
.
test
(
url
))
{
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
_this
.
parent
().
next
().
prepend
(
'<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
$
.
ajax
({
'0'
:
url
,
type
:
'post'
,
'1'
:
dealFileName
(
decodeURI
(
url
.
slice
(
url
.
lastIndexOf
(
'/'
)
+
1
)))
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
if
(
_spFile
==
'pdf'
){
_this
.
parent
().
next
().
prepend
(
'<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
,
'1'
:
_data
.
data
.
imgformer_name
}));
}));
}
else
{
}
else
{
alert
(
'所选择的格式不是pdf,请重新选择'
);
_this
.
parent
().
next
().
prepend
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
return
false
;
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
}
}
else
{
if
(
/
(\.
jpg|
\.
jpeg|
\.
png|
\.
gif|
\.
bmp
)
$/i
.
test
(
url
))
{
_this
.
parent
().
next
().
prepend
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
url
}));
}));
}
}
else
{
}
else
{
alert
(
'所选择的格式不正确,请重新选择'
);
alert
(
_data
.
msg
);
return
false
;
};
}
},
};
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
}
else
{
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
return
false
;
...
...
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