请求方式
parent
609e5c6318
commit
4fd08fd911
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
// 登陆逻辑
|
||||
form.on('submit(login)', function (data) {
|
||||
okUtils.ajax("../../data/user/login.json", "post", data.field).done(function (response) {
|
||||
okUtils.ajax("../../data/user/login.json", "get", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("登陆成功", function () {
|
||||
window.location = "../../index.html";
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
});
|
||||
|
||||
form.on("submit(add)", function (data) {
|
||||
okUtils.ajax("../../data/user/add.json", "post", data.field).done(function (response) {
|
||||
okUtils.ajax("../../data/user/add.json", "get", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("添加成功", function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
});
|
||||
|
||||
form.on("submit(edit)", function (data) {
|
||||
okUtils.ajax("../../data/user/edit.json", "post", data.field).done(function (response) {
|
||||
okUtils.ajax("../../data/user/edit.json", "get", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("编辑成功", function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
var userTable = table.render({
|
||||
elem: "#tableId",
|
||||
url: "../../data/user/user.json",
|
||||
method: "post",
|
||||
method: "get",
|
||||
limit: 10,
|
||||
page: true,
|
||||
toolbar: true,
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchNormal.json", "post", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax("../../data/user/batchNormal.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量启用成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchStop.json", "post", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax("../../data/user/batchStop.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量停用成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "post", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量删除成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
|
||||
function del (id) {
|
||||
okLayer.confirm("确定要删除吗?", function () {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "post", {idsStr: id}).done(function (response) {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "get", {idsStr: id}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("删除成功");
|
||||
}).fail(function (error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue