youhua
This commit is contained in:
@@ -3,7 +3,7 @@ class ApiEndpoints {
|
|||||||
ApiEndpoints._();
|
ApiEndpoints._();
|
||||||
|
|
||||||
/// 基础URL
|
/// 基础URL
|
||||||
static const String baseUrl = 'http://8.155.172.147:5010';
|
static const String baseUrl = 'http://localhost:5010';
|
||||||
|
|
||||||
// ==================== 用户模块 ====================
|
// ==================== 用户模块 ====================
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class DioClient {
|
|||||||
|
|
||||||
DioClient() {
|
DioClient() {
|
||||||
_dio = Dio(BaseOptions(
|
_dio = Dio(BaseOptions(
|
||||||
baseUrl: 'http://8.155.172.147:5010',
|
baseUrl: 'http://localhost:5010',
|
||||||
connectTimeout: const Duration(seconds: 30),
|
connectTimeout: const Duration(seconds: 30),
|
||||||
receiveTimeout: const Duration(seconds: 30),
|
receiveTimeout: const Duration(seconds: 30),
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:shadcn_ui/shadcn_ui.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../../../providers/auth_provider.dart';
|
import '../../../providers/auth_provider.dart';
|
||||||
|
import 'register_page.dart';
|
||||||
|
|
||||||
class LoginPage extends StatefulWidget {
|
class LoginPage extends StatefulWidget {
|
||||||
const LoginPage({super.key});
|
const LoginPage({super.key});
|
||||||
@@ -148,8 +149,12 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
),
|
),
|
||||||
ShadButton.link(
|
ShadButton.link(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// 跳转到注册页面
|
Navigator.push(
|
||||||
// context.go('/register');
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => RegisterPage(),
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: const Text('立即注册'),
|
child: const Text('立即注册'),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user