空运人工价锁舱现拉补全舱位并拦清缺参;成交/报价填表与工单陆运费率展示同步收紧。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
/**
|
||||
* 询价后台登录页:视觉 1:1 对齐 admin/LoginView(居中白卡片 + 品牌区,无验证码)。
|
||||
* 鉴权走 Jeecg loginApi;主账 inquiry 配置关闭图形验证码(jeecg.loginCaptchaEnabled=false)。
|
||||
*
|
||||
* 禁止写死 admin/123456:退出后再进登录页会误显示测试账号。
|
||||
* 仅记住上次成功登录的账号(不存密码),方便换人登录时改账号。
|
||||
*/
|
||||
import { reactive, ref, toRaw } from 'vue';
|
||||
import { ConfigProvider, message } from 'ant-design-vue';
|
||||
@@ -10,11 +13,29 @@
|
||||
import '/@/views/inquiry/styles/admin-prototype.css';
|
||||
import '/@/views/inquiry/styles/admin-fidelity.css';
|
||||
|
||||
const LAST_USERNAME_KEY = 'inquiry_admin_last_username';
|
||||
|
||||
function readLastUsername(): string {
|
||||
try {
|
||||
return String(localStorage.getItem(LAST_USERNAME_KEY) || '').trim();
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function rememberUsername(username: string) {
|
||||
try {
|
||||
localStorage.setItem(LAST_USERNAME_KEY, username);
|
||||
} catch {
|
||||
/* 隐私模式等写失败时忽略 */
|
||||
}
|
||||
}
|
||||
|
||||
const userStore = useUserStore();
|
||||
const loading = ref(false);
|
||||
const form = reactive({
|
||||
username: 'admin',
|
||||
password: '123456',
|
||||
username: readLastUsername(),
|
||||
password: '',
|
||||
});
|
||||
|
||||
const themeToken = {
|
||||
@@ -36,9 +57,10 @@
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const username = form.username.trim();
|
||||
const { userInfo } = await userStore.login(
|
||||
toRaw({
|
||||
username: form.username.trim(),
|
||||
username,
|
||||
password: form.password,
|
||||
// 主账已关验证码;仍传空字段以兼容 LoginParams 类型
|
||||
captcha: '',
|
||||
@@ -48,6 +70,9 @@
|
||||
})
|
||||
);
|
||||
if (userInfo) {
|
||||
rememberUsername(username);
|
||||
// 成功后清空密码,避免浏览器后退/再进登录页时残留明文
|
||||
form.password = '';
|
||||
message.success(`登录成功,欢迎 ${userInfo.realname || userInfo.username}`);
|
||||
}
|
||||
} catch (e: any) {
|
||||
|
||||
Reference in New Issue
Block a user