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
ed19259b
Commit
ed19259b
authored
Jun 11, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增商铺图片修改
parent
557006a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
9 deletions
+55
-9
reportList.js
public/resource/js/reportList.js
+6
-1
shop_edit.js
public/resource/js/shop_edit.js
+48
-7
storeList.js
public/resource/js/storeList.js
+1
-1
No files found.
public/resource/js/reportList.js
View file @
ed19259b
...
...
@@ -916,7 +916,12 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'新增成功!'
);
if
(
_tempTableObj
.
attr
(
'data-type'
)
===
'edit'
){
alert
(
'编辑成功!'
);
}
else
{
alert
(
'新增成功!'
);
};
bargain
.
taxShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
...
...
public/resource/js/shop_edit.js
View file @
ed19259b
...
...
@@ -179,8 +179,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//独家合同
var
exclusive_img_str
=
''
;
for
(
var
i
in
_data
[
'exclusive_img'
])
{
exclusive_img_str
+=
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'exclusive_img'
][
i
]
exclusive_img_str
+=
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'exclusive_img'
][
i
][
'img_name'
],
'id'
:
_data
[
'exclusive_img'
][
i
][
'id'
]
});
};
_imgUploadDujia
.
html
(
exclusive_img_str
);
...
...
@@ -299,15 +300,17 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//详情页轮播图
for
(
var
i
in
_data
[
'slide_show'
])
{
_imgUploadLunbo
.
append
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'slide_show'
][
i
]
_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'
]
}));
};
//楼层平面图
for
(
var
i
in
_data
[
'plan'
])
{
_imgUploadLouceng
.
append
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'plan'
][
i
]
_imgUploadLouceng
.
append
(
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'plan'
][
i
][
'img_name'
],
'id'
:
_data
[
'plan'
][
i
][
'id'
]
}));
};
...
...
@@ -377,9 +380,47 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//图片上传删除键事件
_doc
.
on
(
'click'
,
'.delet-pic-btn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
confirm
(
'确定删除该文件吗?'
)
&&
$
(
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'
:
_id
},
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
();
}
};
});
//图片预览点击放大事件
...
...
public/resource/js/storeList.js
View file @
ed19259b
...
...
@@ -362,7 +362,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
var
_html
=
' <option value="" selected="selected">请选择</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
if
(
n
.
district_name
==
name
&&
(
typeof
name
!=
undefined
))
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
_html
+=
'<option
selected="selected"
value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
else
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
...
...
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