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
106e5e0b
Commit
106e5e0b
authored
Feb 18, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9e00cc37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
13 deletions
+67
-13
houseList.html
application/index/view/houses/houseList.html
+17
-2
houseList.js
public/resource/js/houseList.js
+50
-9
public.js
public/resource/js/public.js
+0
-2
No files found.
application/index/view/houses/houseList.html
View file @
106e5e0b
...
@@ -211,6 +211,19 @@
...
@@ -211,6 +211,19 @@
margin-left
:
30px
;
margin-left
:
30px
;
font-weight
:
600
;
font-weight
:
600
;
}
}
.upload-image-btn
{
width
:
82px
;
height
:
40px
;
position
:
relative
;
opacity
:
0
;
z-index
:
66
;
}
.btn-default-liu-css
{
position
:
relative
;
left
:
-80px
;
z-index
:
6
;
}
</style>
</style>
<div
id=
"page-content-wrapper"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -466,8 +479,10 @@
...
@@ -466,8 +479,10 @@
<div
class=
"form-group is_dujia"
>
<div
class=
"form-group is_dujia"
>
<label
class=
"col-sm-2 control-label"
>
独家合同上传(小于10张):
</label>
<label
class=
"col-sm-2 control-label"
>
独家合同上传(小于10张):
</label>
<span
id=
"liudan_pic_pre"
></span>
<span
id=
"liudan_pic_pre"
></span>
<input
readonly=
"readonly"
type=
"hidden"
name=
"liudan_pic_pre"
class=
"form-control btn6"
placeholder=
"请选择图片"
>
<!--<input readonly="readonly" type="hidden" name="liudan_pic_pre" class="form-control btn6" placeholder="请选择图片">
<button
class=
"btn btn-default liudan_pic_btn"
id=
"liudan_pic_btn"
type=
"button"
>
选择图片
</button>
<button class="btn btn-default liudan_pic_btn" id="liudan_pic_btn" type="button">选择图片</button>-->
<input
class=
"upload-image-btn"
id=
"xiangqing_pic_btn"
type=
"file"
data-limittop=
"10"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu-css"
>
选择图片
</button>
</div>
</div>
<div
class=
"form-group is_dujia"
>
<div
class=
"form-group is_dujia"
>
...
...
public/resource/js/houseList.js
View file @
106e5e0b
...
@@ -592,15 +592,15 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -592,15 +592,15 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
});
});
});
});
$
(
document
).
delegate
(
"#liudan_pic_btn"
,
"click"
,
function
()
{
//上传图片
//
$(document).delegate("#liudan_pic_btn", "click", function() { //上传图片
var
img_url
=
""
;
//
var img_url = "";
BrowseServer
(
'liudan_pic_btn'
,
function
(
url
)
{
//
BrowseServer('liudan_pic_btn', function(url) {
var
alt_img
=
$
(
"#liudan_pic_btn"
).
val
();
//
var alt_img = $("#liudan_pic_btn").val();
alt_img
=
alt_img
.
replace
(
'images/'
,
''
);
//
alt_img = alt_img.replace('images/', '');
img_url
+=
' <img src="'
+
url
+
'" class="jai_dujia" data-img="'
+
alt_img
+
'">'
;
//
img_url += ' <img src="' + url + '" class="jai_dujia" data-img="' + alt_img + '">';
$
(
"#liudan_pic_pre"
).
append
(
img_url
);
//
$("#liudan_pic_pre").append(img_url);
});
//
});
});
//
});
// 下拉列表
// 下拉列表
var
_ajaxObjTel
=
null
;
var
_ajaxObjTel
=
null
;
_doc
.
on
(
'input'
,
'.phone_jia1'
,
function
()
{
_doc
.
on
(
'input'
,
'.phone_jia1'
,
function
()
{
...
@@ -766,6 +766,47 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -766,6 +766,47 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
return
false
;
return
false
;
};
};
});
});
//独家合同,图片上传
$
(
".upload-image-btn"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_limitTop
=
_this
.
data
(
'limittop'
);
if
(
_limitTop
)
{
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'house_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
_this
.
parent
().
next
().
prepend
(
'<li><img title="点击查看大图" src="{0}" /></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
},
},
// 获取信息 手机号 名字
// 获取信息 手机号 名字
...
...
public/resource/js/public.js
View file @
106e5e0b
...
@@ -366,5 +366,4 @@ function getTimeStamp(date){
...
@@ -366,5 +366,4 @@ 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
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