超管单点

2021/7/12下午8:37:13

目前為 2021-08-11 提交的版本,檢視 最新版本

// ==UserScript==
// @name        超管单点
// @namespace   lihuozi
// @match       *://*/admin/org/index
// @grant       none
// @version     1.0
// @author      李豁子
// @description 2021/7/12下午8:37:13
// ==/UserScript==
myFuncs = {};

myFuncs.init = function () {
    $(".datagrid-btable tr").each((i, el) => {
        console.log(el);
        var text = $(el).find('td:eq(2) div').html().split('(')[1];
        var account = text.substring(0, text.length - 1);
        $(el).find('td:eq(2)').dblclick(function () {
            myFuncs.toPage(account);
        });
    });
};

myFuncs.toPage = function (account) {
    var settings = {
        "url": "/api/services/Org/UserLoginIntegrationByUserLoginName",
        "method": "POST",
        "timeout": 0,
        "headers": {
            "Content-Type": "application/json"
        },
        "data": JSON.stringify({
            "LoginName": account,
            "IPAddress": "127.0.0.1",
            "IntegrationKey": "46aa92ec-66af-4818-b7c1-8495a9bd7f17"
        }),
    };
    $.ajax(settings).done(function (res) {
        console.log(res);
        var url = location.origin + '/index.html?token=' + res.data;
        window.open(url);
    });
};
(function () {
    'use strict';
    try {
        window.myFuncs = myFuncs;
        setTimeout("window.myFuncs.init()", 3000);
    } catch (err) {
        console.log(err);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址