fix:对齐金值,主要注销,一键登录等方面修改

This commit is contained in:
jingyun committed 2026-09-08 17:42:17 +08:00
1 parent e29ed0a2c8
commit 6997a65c96
37 files changed
+3442 -514

No files matched your search

+1
View File
@@ -5,6 +5,7 @@ class AppConfig {
const url = String.fromEnvironment(
'JINZHI_API_BASE_URL',
// defaultValue: 'http://localhost:8088',
// defaultValue: 'https://jince.api.xianlin88.top',
defaultValue: 'https://jinzhi.api.yqzhice.top',
// defaultValue: 'http://8.153.17.57',可测试ip
+1 -1
View File
@@ -3,7 +3,7 @@ class AppH5Urls {
static const baseUrl = String.fromEnvironment(
'JINZHI_H5_BASE_URL',
defaultValue: 'https://yanting.h5.hnsiderui.cn',
defaultValue: 'https://jinzhi.h5.yqzhice.top',
);
static String get privacyUrl => '$baseUrl/beginner/privacyPolicy.html';
+6 -3
View File
@@ -6,9 +6,12 @@ class UmengConfig {
static String _androidAppKey =
'6a27b1f46f259537c7b616be'; // Default placeholder
static String _iosAppKey = '6a27b24e6f259537c7b617a8'; // Default placeholder
static String _androidPushSecret = 'xxx'; // Default placeholder
static String _androidLoginSecret = '';
static String _iosLoginSecret = '';
static String _androidPushSecret =
'261fc7656f0c34f4cf122a3c2c81f704'; // Default placeholder
static String _androidLoginSecret =
'oNaEhNEwZGQHvngXI4kyxR90tavJRDHMyDDQhkQouty+SAUb66szdNQivqE99ZIQO+QyNabsyyTJ7CN8iA3vb8EgPwLF/iSUHMWpGVacHpukG1sqySo1cwbRmDpOFcdNzaO8PavGfqkkCse/oRPNFBW40LhCjSJaI/roAEVNGpepMXvufJtjnyB4OX6sav+isHU/Lsz84bcdwnzD6fFyDSyE+YqN9gjUoUOv8Ghcy3H1FXUMvw4iD9nD+tE4jODLXvvzlpVbHYknn6Y2UAj5dvGvNUszocXqGAr4j3z8naKPBhz7Liofog==';
static String _iosLoginSecret =
'vcutZmDFJ2HBdFk7herCz2M9dPHuoa303NPGrm8c9gkzu/Lr5njFa85y33w7htgp0cx9JCMbsk3ecrREhVd8yeq73kFFiVqgkk/BMzCQ6VG55gSATEoiRaLnqXkKvuv6X4kcnSqANMI07up5rTPdAtVQ5JGPh9ts7LUBzRZWQRnDvdX8pjPy8LKxXJKoNagz4sHd5m9MbX0o0uep2OaFFFBTOyI+g4vjK1oZkpaUnIKGU8cTH+wvL8qwp5BLtkc6XCXe5PXqClU=';
static Future<void> load() async {
await dotenv.load(
@@ -1,8 +1,27 @@
import 'package:dio/dio.dart';
import '../../models/pb/errors/errors.pb.dart' as kerrors;
class KratosErrorInterceptor extends Interceptor {
@override
void onError(DioException err, ErrorInterceptorHandler handler) {
final response = err.response;
final raw = response?.data;
if (response != null && raw is List<int> && raw.isNotEmpty) {
try {
final status = kerrors.Status.fromBuffer(raw);
if (status.code != 0 || status.reason.isNotEmpty) {
response.data = <String, dynamic>{
'code': status.code,
'reason': status.reason,
'message': status.message,
'metadata': status.metadata,
};
}
} catch (_) {
// A non-Kratos error body keeps its original representation.
}
}
handler.next(err);
}
}
+3 -1
View File
@@ -6,7 +6,9 @@ const storageJinzhiAmountHidden = 'jinzhi_amount_hidden';
const storageJinzhiRecycleDiscounts = 'jinzhi_recycle_discounts';
const storageJinzhiPurityPresets = 'jinzhi_purity_presets';
const storageJinzhiPriceColorMode = 'jinzhi_price_color_mode';
const storageJinzhiMockLoggedIn = 'jinzhi_mock_logged_in';
const storageUserId = 'jinzhi_user_id';
const storageUserPhone = 'jinzhi_user_phone';
const storageUserCreatedAt = 'jinzhi_user_created_at';
const storagePushPermissionPrompted = 'push_permission_prompted';
const storageMallEntryPromoOpened = 'jinzhi_mall_entry_promo_opened';
const storageMallHomeBadgeSeen = 'jinzhi_mall_home_badge_seen';
+1 -1
View File
@@ -32,7 +32,7 @@ abstract final class UmengService {
// Keep the carrier-login launch path independent of UMeng Common's
// network initialization. Waiting for this future is what left the login
// overlay spinning forever in the base project; U-Verify is configured
// immediately below by initOneKeyLoginIfAllowed, as in Yanting.
// immediately below by initOneKeyLoginIfAllowed.
unawaited(
UmengCommonSdk.initCommon(
UmengConfig.androidAppKey,