2-后台

后台

目前為 2023-06-21 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/469149/1208623/2-%E5%90%8E%E5%8F%B0.js

//已经显示后台后执行
function sgt_login_bg(){
	console.log($('#A1', window.parent.document).text())
	console.log($('#A1', window).text())
	return
	if($('#A1', window.parent.document).text()==="员工自助 1"){
		return false
	}
	$('#A1').text('员工自助 1')
	if($('#curname', window.parent.document).text()===user){
		$('#curname').parent().prepend('<span>切换至<a href="#" id="luru" onclick="return false">录入</a></span>&nbsp;&nbsp;')
	}else if($('#curname', window.parent.document).text()==="录入"){
		$('#curname').parent().prepend('<span>切换至<a href="#" id="luru" onclick="return false">'+user+'</a></span>&nbsp;&nbsp;')
	}
	gongneng()
	//setInterval(function(){kehu_shenhe()},60*1000) 
	//点击 切换账户
	$('#luru').click(function(){
		//退出账户
		$.get("/ajax/loginout.ashx",
			function (data,status) {
				if($('#curname', window.parent.document).text()===user){
					//post请求 POST登录
					$.post("/ajax/login.ashx",
						{u:'录入',IA_id:'2c7e53fbfc2e82a6d413095dd95bf6fe',p:'123456',c:"38",orgcode:'睿博兴科'},
						function (data) {
							//刷新本页面
							location.reload();
						});
				}else if($('#curname', window.parent.document).text()==="录入"){
					//post请求 POST登录
					$.post("/ajax/login.ashx",
						{u:user,IA_id:'2c7e53fbfc2e82a6d413095dd95bf6fe',p:pass,c:"38",orgcode:'睿博兴科'},
						function (data) {
							//刷新本页面
							location.reload();
						});
				}
			})
	})
}