管理端全部功能跑通
This commit is contained in:
@@ -16,11 +16,14 @@ This example demonstrates:
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Replace the `accountId` and `secretKey` in `lib/main.dart` with your own credentials:
|
||||
1. Replace the SDK init parameters in `lib/main.dart` with your own values:
|
||||
```dart
|
||||
await AliyunHttpdns.init(
|
||||
accountId: YOUR_ACCOUNT_ID, // Replace with your account ID
|
||||
secretKey: 'YOUR_SECRET_KEY', // Replace with your secret key
|
||||
appId: 'YOUR_APP_ID',
|
||||
primaryServiceHost: 'httpdns-a.example.com',
|
||||
backupServiceHost: 'httpdns-b.example.com',
|
||||
servicePort: 443,
|
||||
secretKey: 'YOUR_SIGN_SECRET', // optional if sign is enabled
|
||||
);
|
||||
```
|
||||
|
||||
@@ -48,4 +51,4 @@ The example uses a modern approach with `HttpClient.connectionFactory` to integr
|
||||
|
||||
## Note
|
||||
|
||||
The credentials in this example are placeholders. Please obtain your own credentials from the [Aliyun HTTPDNS Console](https://help.aliyun.com/document_detail/2867674.html).
|
||||
The values in this example are placeholders. Use your own platform app configuration.
|
||||
|
||||
@@ -64,8 +64,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
_httpdnsIniting = true;
|
||||
try {
|
||||
await AliyunHttpdns.init(
|
||||
accountId: 000000, // 请替换为您的 Account ID
|
||||
secretKey: 'your_secret_key_here', // 请替换为您的 Secret Key
|
||||
appId: 'app1f1ndpo9', // 请替换为您的应用 AppId
|
||||
primaryServiceHost: 'httpdns-a.example.com', // 请替换为主服务域名
|
||||
backupServiceHost: 'httpdns-b.example.com', // 可选:备服务域名
|
||||
servicePort: 443,
|
||||
secretKey: 'your_sign_secret_here', // 可选:仅验签开启时需要
|
||||
);
|
||||
await AliyunHttpdns.setHttpsRequestEnabled(true);
|
||||
await AliyunHttpdns.setLogEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user