main
parent
ffaf379ab3
commit
7ced139ed2
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CheckSignXMl
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$Authorization= $_SERVER['HTTP_AUTHORIZATION'];
|
||||
if($Authorization=="hR9pQFeD3cGqbXW4rvE2LNJUi57DyFZ0"){
|
||||
return $next($request);
|
||||
}else{
|
||||
return response(['code'=>'-1','msg'=>"验证token失败"]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,161 @@
|
||||
/* ------------------------------------------------------------------------
|
||||
Class: freezeHeader
|
||||
Use:freeze header row in html table
|
||||
Example 1: $('#tableid').freezeHeader();
|
||||
Example 2: $("#tableid").freezeHeader({ 'height': '300px' });
|
||||
Example 3: $("table").freezeHeader();
|
||||
Example 4: $(".table2").freezeHeader();
|
||||
Example 5: $("#tableid").freezeHeader({ 'offset': '50px' });
|
||||
Author(s): Laerte Mercier Junior, Larry A. Hendrix
|
||||
Version: 1.0.8
|
||||
-------------------------------------------------------------------------*/
|
||||
(function ($) {
|
||||
var TABLE_ID = 0;
|
||||
$.fn.freezeHeader = function (params) {
|
||||
|
||||
var copiedHeader = false;
|
||||
|
||||
function freezeHeader(elem) {
|
||||
var idObj = elem.attr('id') || ('tbl-' + (++TABLE_ID));
|
||||
if (elem.length > 0 && elem[0].tagName.toLowerCase() == "table") {
|
||||
|
||||
var obj = {
|
||||
id: idObj,
|
||||
grid: elem,
|
||||
container: null,
|
||||
header: null,
|
||||
divScroll: null,
|
||||
openDivScroll: null,
|
||||
closeDivScroll: null,
|
||||
scroller: null
|
||||
};
|
||||
|
||||
if (params && params.height !== undefined) {
|
||||
obj.divScroll = '<div id="hdScroll' + obj.id + '" style="height: ' + params.height + '; overflow-y: scroll">';
|
||||
obj.closeDivScroll = '</div>';
|
||||
}
|
||||
|
||||
obj.header = obj.grid.find('thead');
|
||||
|
||||
if (params && params.height !== undefined) {
|
||||
if ($('#hdScroll' + obj.id).length == 0) {
|
||||
obj.grid.wrapAll(obj.divScroll);
|
||||
}
|
||||
}
|
||||
|
||||
obj.scroller = params && params.height !== undefined
|
||||
? $('#hdScroll' + obj.id)
|
||||
: $(window);
|
||||
|
||||
if (params && params.scrollListenerEl !== undefined) {
|
||||
obj.scroller = params.scrollListenerEl;
|
||||
}
|
||||
obj.scroller.on('scroll', function () {
|
||||
if ($('#hd' + obj.id).length == 0) {
|
||||
obj.grid.before('<div id="hd' + obj.id + '"></div>');
|
||||
}
|
||||
|
||||
obj.container = $('#hd' + obj.id);
|
||||
|
||||
if (obj.header.offset() != null) {
|
||||
if (limiteAlcancado(obj, params)) {
|
||||
elem.trigger("freeze:on");
|
||||
if (!copiedHeader) {
|
||||
cloneHeaderRow(obj);
|
||||
copiedHeader = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (($(document).scrollTop() > obj.header.offset().top)) {
|
||||
obj.container.css("position", "absolute");
|
||||
obj.container.css("top", (obj.grid.find("tr:last").offset().top - obj.header.height()) + "px");
|
||||
}
|
||||
else {
|
||||
elem.trigger("freeze:off");
|
||||
obj.container.css("visibility", "hidden");
|
||||
obj.container.css("top", "0px");
|
||||
obj.container.width(0);
|
||||
}
|
||||
copiedHeader = false;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function limiteAlcancado(obj, params) {
|
||||
if (params && (params.height !== undefined || params.scrollListenerEl !== undefined)) {
|
||||
return (obj.header.offset().top <= obj.scroller.offset().top);
|
||||
}
|
||||
else {
|
||||
var top = obj.header.offset().top;
|
||||
if (params) {
|
||||
if (params.offset !== undefined) {
|
||||
top -= parseInt(params.offset.replace('px',''),10);
|
||||
}
|
||||
}
|
||||
|
||||
var gridHeight = (obj.grid.height() - obj.header.height() - obj.grid.find("tr:last").height()) + obj.header.offset().top;
|
||||
return ($(document).scrollTop() > top && $(document).scrollTop() < gridHeight);
|
||||
}
|
||||
}
|
||||
|
||||
function cloneHeaderRow(obj) {
|
||||
obj.container.html('');
|
||||
obj.container.val('');
|
||||
var tabela = $('<table style="margin: 0 0;"></table>');
|
||||
var atributos = obj.grid.prop("attributes");
|
||||
|
||||
$.each(atributos, function () {
|
||||
if (this.name != "id") {
|
||||
tabela.attr(this.name, this.value);
|
||||
}
|
||||
});
|
||||
|
||||
var clone = obj.header.clone(true);
|
||||
|
||||
clone.appendTo(tabela);
|
||||
|
||||
obj.container.append(tabela);
|
||||
obj.container.width(obj.header.width());
|
||||
obj.container.height(obj.header.height);
|
||||
obj.container.find('th').each(function (index) {
|
||||
var cellWidth = obj.grid.find('th').eq(index).width();
|
||||
$(this).css('width', cellWidth);
|
||||
});
|
||||
|
||||
obj.container.css("visibility", "visible");
|
||||
|
||||
if (params && params.height !== undefined) {
|
||||
|
||||
if(params.offset !== undefined){
|
||||
obj.container.css("top", obj.scroller.offset().top + (params.offset.replace("px","") * 1) + "px");
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.container.css("top", obj.scroller.offset().top + "px");
|
||||
}
|
||||
|
||||
obj.container.css("position", "absolute");
|
||||
|
||||
} else if (params && params.scrollListenerEl!== undefined) {
|
||||
obj.container.css("top", obj.scroller.find("thead > tr").innerHeight() + "px");
|
||||
obj.container.css("position", "absolute");
|
||||
obj.container.css("z-index", "2");
|
||||
} else if (params && params.offset !== undefined) {
|
||||
obj.container.css("top", params.offset);
|
||||
obj.container.css("position", "fixed");
|
||||
} else {
|
||||
obj.container.css("top", "0px");
|
||||
obj.container.css("position", "fixed");
|
||||
}
|
||||
}
|
||||
|
||||
return this.each(function (i, e) {
|
||||
freezeHeader($(e));
|
||||
});
|
||||
|
||||
};
|
||||
})(jQuery);
|
||||
@ -0,0 +1,75 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// Eros Fratini - eros@recoding.it
|
||||
// jqprint 0.3
|
||||
//
|
||||
// - 19/06/2009 - some new implementations, added Opera support
|
||||
// - 11/05/2009 - first sketch
|
||||
//
|
||||
// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
|
||||
// requires jQuery 1.3.x
|
||||
//
|
||||
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
(function($) {
|
||||
var opt;
|
||||
|
||||
$.fn.jqprint = function (options) {
|
||||
opt = $.extend({}, $.fn.jqprint.defaults, options);
|
||||
|
||||
var $element = (this instanceof jQuery) ? this : $(this);
|
||||
|
||||
if (opt.operaSupport && $.browser.opera)
|
||||
{
|
||||
var tab = window.open("","jqPrint-preview");
|
||||
tab.document.open();
|
||||
|
||||
var doc = tab.document;
|
||||
}
|
||||
else
|
||||
{
|
||||
var $iframe = $("<iframe />");
|
||||
|
||||
if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
|
||||
|
||||
$iframe.appendTo("body");
|
||||
var doc = $iframe[0].contentWindow.document;
|
||||
}
|
||||
|
||||
if (opt.importCSS)
|
||||
{
|
||||
if ($("link[media=print]").length > 0)
|
||||
{
|
||||
$("link[media=print]").each( function() {
|
||||
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("link").each( function() {
|
||||
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.printContainer) { doc.write($element.outer()); }
|
||||
else { $element.each( function() { doc.write($(this).html()); }); }
|
||||
|
||||
doc.close();
|
||||
|
||||
(opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
|
||||
setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
|
||||
}
|
||||
|
||||
$.fn.jqprint.defaults = {
|
||||
debug: false,
|
||||
importCSS: true,
|
||||
printContainer: true,
|
||||
operaSupport: true
|
||||
};
|
||||
|
||||
// Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
|
||||
jQuery.fn.outer = function() {
|
||||
return $($('<div></div>').html(this.clone())).html();
|
||||
}
|
||||
})(jQuery);
|
||||
@ -1,3 +1,6 @@
|
||||
ENV = 'production'
|
||||
VITE_APP_API = 'http://10.50.120.166/YiJiYuYue/Laravel/public/api/'
|
||||
VITE_APP_FILE = 'http://10.50.120.166/YiJiYuYue/Laravel/public/'
|
||||
|
||||
VITE_APP_API_111111111111111111111 = 'https://yiji.yuluo.online/Laravel/public/api/'
|
||||
VITE_APP_FILE_11111111111111111111 = 'https://yiji.yuluo.online/Laravel/public/'
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container class="common-layout">
|
||||
|
||||
<el-row style="width: 100%; display: flex; justify-content: center;">
|
||||
<el-col :span="9" class="left">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="15" class="right" v-loading="loading">
|
||||
<div class="right_top">
|
||||
<div>
|
||||
<el-switch v-model="isDark" inline-prompt active-color="var(--el-fill-color-dark)"
|
||||
inactive-color="var(--el-color-primary)" active-action-icon="Moon"
|
||||
inactive-action-icon="Sunny" @change="toggleDark" />
|
||||
</div>
|
||||
</div>
|
||||
<el-form style="width: 400px;" ref="ruleFormRef" status-icon class="demo-ruleForm">
|
||||
<el-form-item>
|
||||
<span style="font-size: 22px;">登录您的账户</span>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model.number="username" ref="usernameRef" @keyup.enter="focusNextTo()" :prefix-icon="User" placeholder="用户名" size="large" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="pwd" type="password" ref="passwordRef" @keyup.enter="login()" autocomplete="off" placeholder="密码" size="large"
|
||||
:prefix-icon="Lock" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button style="width: 100%;" type="primary" @click="login(ruleFormRef)"
|
||||
size="large">登录</el-button>
|
||||
</el-form-item>
|
||||
<div style="height: 160px;"></div>
|
||||
</el-form>
|
||||
<div class="right_bottom"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Login
|
||||
} from "@/api/api.js";
|
||||
import {
|
||||
ElMessage
|
||||
} from 'element-plus'
|
||||
import {
|
||||
ref,nextTick,onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
Lock,
|
||||
User,
|
||||
Iphone,RefreshRight,Key
|
||||
} from '@element-plus/icons-vue'
|
||||
import {
|
||||
useToggle
|
||||
} from '@vueuse/shared'
|
||||
import {
|
||||
useDark
|
||||
} from "@vueuse/core";
|
||||
import {
|
||||
useRoute,
|
||||
useRouter
|
||||
} from "vue-router"
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
const isDark = useDark()
|
||||
const toggleDark = () => useToggle(isDark)
|
||||
let loading=ref(false);
|
||||
let username = ref('')
|
||||
let pwd = ref('')
|
||||
|
||||
let login = () => { //登录
|
||||
if (username.value == '' || pwd.value == '') return ElMessage.error('用户名和密码不能为空')
|
||||
let data = { //传参
|
||||
username: username.value,
|
||||
password: pwd.value,
|
||||
}
|
||||
loading.value=true
|
||||
//调用登录接口
|
||||
Login(data).then(res => {
|
||||
loading.value=false
|
||||
if (res.data.status == 'ok') {
|
||||
sessionStorage.setItem('token', res.data.token);
|
||||
sessionStorage.setItem('refreshToken', res.data.refresh_token);
|
||||
// sessionStorage.setItem('tk', JSON.stringify(res.data.tk));
|
||||
var token = sessionStorage.getItem('token');
|
||||
if (token == res.data.token) {
|
||||
window.location.href = "./#/yewu/mainList"
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(res.data.msg)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
let usernameRef=ref(null);
|
||||
let passwordRef=ref(null);
|
||||
const focusNextTo=()=>{
|
||||
passwordRef.value.focus()
|
||||
}
|
||||
onMounted(()=>{
|
||||
console.log(route.query)
|
||||
let p=route.query
|
||||
username.value=p.u
|
||||
pwd.value=p.p
|
||||
login()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.common-layout {
|
||||
/* border: 10px solid red; */
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.common-layout .el-main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
background-color: var(--color-table-th-background);
|
||||
background-image: url('../assets/loginBackg.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-position: center center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.right_top {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
padding-right: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue