新增:隐私政策和用户协议
This commit is contained in:
parent
b464400b6b
commit
5f688352a8
@ -5,6 +5,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import '../../core/api/api_config.dart';
|
||||
import '../../core/api/services/user_api.dart';
|
||||
import '../../core/auth/auth_service.dart';
|
||||
import '../recharge/payment_webview_screen.dart';
|
||||
import '../../core/theme/app_colors.dart';
|
||||
import '../../core/user/user_state.dart';
|
||||
import '../../core/theme/app_spacing.dart';
|
||||
@ -101,14 +102,28 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_MenuSection(
|
||||
items: [
|
||||
_MenuItem(
|
||||
title: 'Credit Store',
|
||||
title: 'Privacy Policy',
|
||||
icon: LucideIcons.chevron_right,
|
||||
onTap: () => Navigator.of(context).pushNamed('/recharge'),
|
||||
onTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => PaymentWebViewScreen(
|
||||
paymentUrl: 'http://www.petsheroai.xyz/privacy.html',
|
||||
title: 'Privacy Policy',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
_MenuItem(
|
||||
title: 'Settings',
|
||||
title: 'User Agreement',
|
||||
icon: LucideIcons.chevron_right,
|
||||
onTap: () {},
|
||||
onTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => PaymentWebViewScreen(
|
||||
paymentUrl: 'http://www.petsheroai.xyz/terms.html',
|
||||
title: 'User Agreement',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -6,11 +6,16 @@ import 'package:webview_flutter_android/webview_flutter_android.dart';
|
||||
import '../../core/theme/app_colors.dart';
|
||||
import '../../shared/widgets/top_nav_bar.dart';
|
||||
|
||||
/// 三方支付成功后在应用内打开 convert 链接的 WebView 页面
|
||||
/// 应用内 WebView 页面(支付、隐私政策、用户协议等)
|
||||
class PaymentWebViewScreen extends StatefulWidget {
|
||||
const PaymentWebViewScreen({super.key, required this.paymentUrl});
|
||||
const PaymentWebViewScreen({
|
||||
super.key,
|
||||
required this.paymentUrl,
|
||||
this.title = 'Payment',
|
||||
});
|
||||
|
||||
final String paymentUrl;
|
||||
final String title;
|
||||
|
||||
@override
|
||||
State<PaymentWebViewScreen> createState() => _PaymentWebViewScreenState();
|
||||
@ -41,7 +46,7 @@ class _PaymentWebViewScreenState extends State<PaymentWebViewScreen> {
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(56),
|
||||
child: TopNavBar(
|
||||
title: 'Payment',
|
||||
title: widget.title,
|
||||
showBackButton: true,
|
||||
onBack: () => Navigator.of(context).pop(),
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user