feat(联调): 前端指向远程API + 启用阿里云SMS
- genex-mobile ApiClient/UpdateService 指向 154.84.135.121:48080 - miniapp dev 环境指向 154.84.135.121:48080 - docker-compose 添加 ALIYUN SMS 环境变量透传 - auth-service 添加 @alicloud/dysmsapi20170525 等 SDK 依赖 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
24400ad663
commit
8ed667bcf4
|
|
@ -512,6 +512,11 @@ services:
|
|||
- SMS_ENABLED=${SMS_ENABLED:-false}
|
||||
- SMS_CODE_EXPIRE_SECONDS=300
|
||||
- SMS_DAILY_LIMIT=10
|
||||
- ALIYUN_ACCESS_KEY_ID=${ALIYUN_ACCESS_KEY_ID:-}
|
||||
- ALIYUN_ACCESS_KEY_SECRET=${ALIYUN_ACCESS_KEY_SECRET:-}
|
||||
- ALIYUN_SMS_SIGN_NAME=${ALIYUN_SMS_SIGN_NAME:-}
|
||||
- ALIYUN_SMS_TEMPLATE_CODE=${ALIYUN_SMS_TEMPLATE_CODE:-}
|
||||
- ALIYUN_SMS_ENDPOINT=${ALIYUN_SMS_ENDPOINT:-dysmsapi.aliyuncs.com}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@
|
|||
"ioredis": "^5.3.2",
|
||||
"kafkajs": "^2.2.4",
|
||||
"reflect-metadata": "^0.2.1",
|
||||
"rxjs": "^7.8.1"
|
||||
"rxjs": "^7.8.1",
|
||||
"@alicloud/dysmsapi20170525": "^3.0.0",
|
||||
"@alicloud/openapi-client": "^0.4.0",
|
||||
"@alicloud/tea-util": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^10.3.0",
|
||||
|
|
|
|||
|
|
@ -19,8 +19,11 @@ class ApiClient {
|
|||
));
|
||||
}
|
||||
|
||||
/// 默认 API 地址;正式上线后切回 https://api.gogenex.cn
|
||||
static const String defaultBaseUrl = 'http://154.84.135.121:48080';
|
||||
|
||||
static ApiClient get instance {
|
||||
_instance ??= ApiClient._(baseUrl: 'https://api.gogenex.cn');
|
||||
_instance ??= ApiClient._(baseUrl: defaultBaseUrl);
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ import 'features/coupons/presentation/pages/wallet_coupons_page.dart';
|
|||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// 初始化升级服务
|
||||
// 初始化升级服务(测试阶段指向内部服务器)
|
||||
UpdateService().initialize(UpdateConfig.selfHosted(
|
||||
apiBaseUrl: 'https://api.gogenex.cn',
|
||||
apiBaseUrl: 'http://154.84.135.121:48080',
|
||||
enabled: true,
|
||||
));
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const envConfig = {
|
||||
development: {
|
||||
API_BASE_URL: 'http://localhost:8080',
|
||||
API_BASE_URL: 'http://154.84.135.121:48080',
|
||||
},
|
||||
production: {
|
||||
API_BASE_URL: 'https://api.gogenex.cn',
|
||||
|
|
|
|||
Loading…
Reference in New Issue