photo.html页面add关闭当前layer

This commit is contained in:
mkg
2021-07-22 14:31:41 +08:00
parent ce8adda79d
commit 3f74011c98
+3 -3
View File
@@ -171,7 +171,7 @@
} }
window.add = function () { window.add = function () {
layer.open({ layer.open({
type: 1, type: 1,
maxmin: true, maxmin: true,
title: '新增图片', title: '新增图片',
@@ -305,8 +305,8 @@
, done: function (res) { , done: function (res) {
if (res.success) { if (res.success) {
layer.msg(res.msg, { icon: 1, time: 500 }, function () { layer.msg(res.msg, { icon: 1, time: 500 }, function () {
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页 layer.close(layer.index)//关闭最新的layer
window.parent.location.reload() location.reload()//当前页面刷新
}) })
} else { } else {
layer.msg(res.msg, { icon: 2 }) layer.msg(res.msg, { icon: 2 })