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
3f8a8dae
Commit
3f8a8dae
authored
Jun 28, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款记录收款图片修改
parent
eb13437a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
7 deletions
+81
-7
getCollection.html
application/index/view/collection/getCollection.html
+1
-1
getCollection.js
public/resource/js/getCollection.js
+80
-6
No files found.
application/index/view/collection/getCollection.html
View file @
3f8a8dae
...
...
@@ -272,7 +272,7 @@
<div
class=
"modal-footer"
>
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>-->
<button
type=
"button"
class=
"btn btn-primary
submit_edit"
id=
"
"
data-dismiss=
"modal"
>
<button
type=
"button"
class=
"btn btn-primary
"
id=
"saveBtn
"
data-dismiss=
"modal"
>
保存
</button>
</div>
...
...
public/resource/js/getCollection.js
View file @
3f8a8dae
...
...
@@ -21,7 +21,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
event
:
function
()
{
var
_doc
=
$
(
document
);
var
_imgMaskObj
=
$
(
'#img_mask_area'
);
//预览大图的mask
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
_doc
.
on
(
'click'
,
'a[href="#modal-time"]'
,
function
(
e
){
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
e
.
preventDefault
();
...
...
@@ -32,6 +32,14 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$
(
"#search"
).
click
(
function
()
{
follow
.
getList
(
1
);
});
//点击收款图片 2.2版本
// $(".add-pic").click(function() {
// follow.getaddPicList();
// });
_doc
.
on
(
'click'
,
'.add-pic'
,
function
(){
follow
.
getaddPicList
();
});
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
});
...
...
@@ -109,7 +117,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
url
:
'/index/delHouseFile'
,
data
:
{
'id'
:
_imgId
,
'house_id'
:
_id
'house_id'
:
3104
,
},
timeout
:
30000
,
dataType
:
'json'
,
...
...
@@ -140,17 +148,55 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
};
});
//图片预览点击放大事件
_doc
.
on
(
'click'
,
'.img-pre-ul>li>img'
,
function
(
e
)
{
_imgMaskObj
.
show
().
find
(
'img'
).
attr
(
'src'
,
this
.
src
);
});
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
});
//图片上传 2.2版本
});
//保存上传的图片
_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
=
location
.
origin
+
'/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版本
},
addphone2
:
function
(
obj
){
...
...
@@ -202,6 +248,34 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
},
//点击收款图片 调用的接口
getaddPicList
:
function
()
{
//提交
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
_imgUploadLunbo
.
empty
();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/houseEdit'
,
data
:
{
"id"
:
3104
,
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
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
{
}
}
});
},
// 导出列表
exportList
:
function
(
pageNo
)
{
console
.
log
(
2
);
...
...
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