From bccdb8f81c07c8a9cdcd6838173dfd1c73c98d90 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 26 二月 2026 16:05:30 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index f015b1e..87363d1 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -314,7 +314,7 @@
this.showAuth = false
this.loadSettings()
} else {
- this.$refs.uToast.show({
+ this.$showToast({
type: 'error',
message: this.$t('settings.authError') || '瀵嗙爜閿欒'
})
@@ -327,7 +327,7 @@
settings = {
ip: '127.0.0.1',
port: '8080',
- project: 'jshdasrs'
+ project: 'wms'
}
}
this.settings = settings
@@ -336,14 +336,16 @@
uni.setStorageSync('app_settings', this.settings)
console.log(this.settings)
this.showSettings = false
- this.$refs.uToast.show({
+ this.$showToast({
type: 'success',
+ position: 'top',
+ duration: '1000',
message: this.$t('settings.saved') || '璁剧疆宸蹭繚瀛�'
})
},
async onLogin() {
try {
- const res = await login(
+ const { data } = await login(
{
username: this.user.userName,
password: md5.hex_md5(this.user.password)
@@ -353,8 +355,8 @@
this.loading = true
this.loginButton = 'login.loging'
- uni.setStorageSync('token', res.data.accessToken)
- uni.setStorageSync('userData', res.data.username)
+ uni.setStorageSync('token', data.token)
+ uni.setStorageSync('userData', data.username)
if (this.remberPassword) {
uni.setStorageSync('user', this.user)
} else {
@@ -367,7 +369,7 @@
},
goHome() {
setTimeout(() => {
- this.$refs.uToast.show({
+ this.$showToast({
type: 'success',
message: '鐧诲綍鎴愬姛',
position: 'top'
--
Gitblit v1.9.1