From 4b8fa1a1f6698fb2759c294d8b39d40bc14a31f5 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 10 Feb 2017 01:52:15 -0500 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=93=E6=9E=9C=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/admin/plugs.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/static/admin/plugs.js b/public/static/admin/plugs.js index 61d6d7359..0b080cd10 100644 --- a/public/static/admin/plugs.js +++ b/public/static/admin/plugs.js @@ -127,22 +127,22 @@ define(['zeroclipboard', 'jquery', 'layui'], function (ZeroClipboard) { */ msg.prototype.auto = function (data, time) { var self = this; - if (data.code === 'SUCCESS') { - self.success(data.info, time, function () { - if (data.referer === 'back') { + if (data.code === 0) { + self.success(data.msg, time, function () { + if (data.url === 'back') { window.history.back(); - } else if (data.referer === 'reload') { + } else if (data.url === 'reload') { $.form.reload(); - } else if (data.referer) { - window.location.href = data.referer; + } else if (data.url) { + window.location.href = data.url; } else { $.form.reload(); } }); } else { - self.error(data.info, 3, function () { - if (data.referer) { - window.location.href = data.referer; + self.error(data.msg, 3000, function () { + if (data.url) { + window.location.href = data.url; } }); }