admin首页 表格字段显示

main
yanzai 1 year ago
parent 0658dfdf14
commit 9a7e10064a

@ -5,6 +5,7 @@ namespace App\Http\Controllers\API\Admin;
use App\Http\Controllers\Controller;
use App\Services\Login\LoginService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use Yz;
use App\Lib\HSM;
use App\Lib\XTSign;
@ -17,6 +18,37 @@ class LoginController extends Controller
//$login= new LoginService();
return Yz::echo($login->Login(['username'=>$username,'password'=>$password]));
}
function de_hunxiao($str)
{
$decodedString = base64_decode($str);
// 第二步:移除固定的前缀和后缀
$strippedString = str_replace('a5331_', '', $decodedString);
$strippedString = str_replace('_a454d', '', $strippedString);
// 第三步:反转字符串以恢复原始顺序
$reversedString = strrev($strippedString);
// 第四步:字符替换(包括字母和数字)
$charMap = [
'z' => 'a', 'y' => 'b', 'x' => 'c', 'w' => 'd', 'v' => 'e',
'u' => 'f', 't' => 'g', 's' => 'h', 'r' => 'i', 'q' => 'j',
'p' => 'k', 'o' => 'l', 'n' => 'm', 'm' => 'n', 'l' => 'o',
'k' => 'p', 'j' => 'q', 'i' => 'r', 'h' => 's', 'g' => 't',
'f' => 'u', 'e' => 'v', 'd' => 'w', 'c' => 'x', 'b' => 'y',
'a' => 'z',
'@' => '0', '!' => '1', '#' => '2', '$' => '3', '%' => '4',
'^' => '5', '&' => '6', '*' => '7', '(' => '8', ')' => '9'
];
$originalString = '';
for ($i = 0; $i < strlen($reversedString); $i++) {
$char = $reversedString[$i];
$originalString .= isset($charMap[$char]) ? $charMap[$char] : $char;
}
// 输出解码后的字符串
return $originalString;
}
public function test(){
//加密解密测试
// dd( HSM::HsmDecrypt("9bef05d29d91d1058b742261638b8d1c"));

@ -1,6 +1,6 @@
ENV = 'production'
VITE_APP_API_6666 = 'http://192.168.50.123:33583/common/la/public/api/'
VITE_APP_FILE_6666 = 'http://192.168.50.123:33583/common/la/public'
VITE_APP_API_6666666 = 'http://192.168.50.123:33583/common/la/public/api/'
VITE_APP_FILE_66666666 = 'http://192.168.50.123:33583/common/la/public'
VITE_APP_API = 'http://172.31.68.39:33583/common/la/public/api/'
VITE_APP_FILE = 'http://172.31.68.39:33583/common/la/public'

@ -11,6 +11,7 @@
"@element-plus/icons-vue": "^2.1.0",
"@vueuse/core": "^10.4.1",
"axios": "^1.5.1",
"crypto-js": "^4.2.0",
"echarts": "^5.4.3",
"element-plus": "^2.3.14",
"pinia": "^2.1.6",
@ -1083,6 +1084,11 @@
"node": ">= 8"
}
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"node_modules/cssesc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",

@ -13,6 +13,7 @@
"@element-plus/icons-vue": "^2.1.0",
"@vueuse/core": "^10.4.1",
"axios": "^1.5.1",
"crypto-js": "^4.2.0",
"echarts": "^5.4.3",
"element-plus": "^2.3.14",
"pinia": "^2.1.6",

@ -108,7 +108,7 @@
import {
useDark
} from "@vueuse/core";
import CryptoJS from 'crypto-js';
const erweima_loading=ref(false)
const UseErweima=ref(false) //使
@ -118,12 +118,36 @@
let username = ref('')
let pwd = ref('')
const hunxiao=(str)=>{
let originalString =str
var charMap = {
'a': 'z', 'b': 'y', 'c': 'x', 'd': 'w', 'e': 'v',
'f': 'u', 'g': 't', 'h': 's', 'i': 'r', 'j': 'q',
'k': 'p', 'l': 'o', 'm': 'n', 'n': 'm', 'o': 'l',
'p': 'k', 'q': 'j', 'r': 'i', 's': 'h', 't': 'g',
'u': 'f', 'v': 'e', 'w': 'd', 'x': 'c', 'y': 'b',
'z': 'a',
'0': '@', '1': '!', '2': '#', '3': '$', '4': '%',
'5': '^', '6': '&', '7': '*', '8': '(', '9': ')'
};
var mappedString = originalString.split('').map(char => charMap[char] || char).join('');
//
var reversedString = mappedString.split('').reverse().join('');
//
var prefixedSuffixString = 'a5331_' + reversedString + '_a454d';
// 使 btoa Base64
var encodedString = btoa(prefixedSuffixString);
return encodedString;
}
let login = () => { //
if (username.value == '' || pwd.value == '') return ElMessage.error('用户名和密码不能为空')
let data = { //
username: username.value,
password: pwd.value,
password:pwd.value ,
}
//
Login(data).then(res => {

@ -139,7 +139,13 @@
let month_list=[];
let count_list=[];
resdata.list.forEach((v,i)=>{
month_list.push(v.month.substr(6,8)+'月')
let month = v.month.slice(5); // 5
//
if (month.startsWith('0')) {
month = month.slice(1);
}
month_list.push(month+'月')
count_list.push(v.count)
})
var JiGouCountByMonth = echarts.init(document.getElementById('JiGouCountByMonth'));

Loading…
Cancel
Save