📝 docs: Add documentation
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
<div v-pre>
|
||||
|
||||
# Ads Management
|
||||
|
||||
Create and manage platform advertisements with multiple ad types and validity period control.
|
||||
|
||||
## Table Column Description
|
||||
|
||||
### Status
|
||||
Switch button to control whether ad is displayed.
|
||||
|
||||
### Title
|
||||
Ad title.
|
||||
|
||||
### Type
|
||||
Ad type (displayed as Badge):
|
||||
- Banner
|
||||
- Popup
|
||||
- Sidebar
|
||||
- Notice
|
||||
|
||||
### Target URL
|
||||
Link to redirect when ad is clicked.
|
||||
|
||||
### Description
|
||||
Ad description text.
|
||||
|
||||
### Validity Period
|
||||
Ad display time range:
|
||||
- Start time
|
||||
- End time
|
||||
|
||||
## Table Operations
|
||||
|
||||
### Edit
|
||||
Opens side drawer to modify ad.
|
||||
|
||||
### Delete
|
||||
Deletes ad (requires confirmation), cannot be recovered.
|
||||
|
||||
### Create Ad
|
||||
Adds new advertisement.
|
||||
|
||||
## Ad Form
|
||||
|
||||
### Title (Required)
|
||||
Ad title displayed to users.
|
||||
|
||||
### Type (Required)
|
||||
Select ad type:
|
||||
- **Banner**: Top or bottom banner ad
|
||||
- **Popup**: Page popup ad
|
||||
- **Sidebar**: Fixed sidebar ad
|
||||
- **Notice**: Scrolling notice bar ad
|
||||
|
||||
### Target URL (Optional)
|
||||
URL to redirect when ad is clicked:
|
||||
- External link: https://example.com
|
||||
- Internal page: /pricing
|
||||
- Leave empty for non-clickable
|
||||
|
||||
### Description (Optional)
|
||||
Ad description or detailed content.
|
||||
|
||||
### Image URL (Optional, required for some types)
|
||||
Ad image address:
|
||||
- Banner and Popup usually need images
|
||||
- Use external image links
|
||||
- Recommended sizes: Banner 1920x200, Popup 800x600
|
||||
|
||||
### Validity Period (Required)
|
||||
Set ad display time range:
|
||||
- Start Time: When ad starts displaying
|
||||
- End Time: When ad stops displaying
|
||||
- Can create scheduled ads in advance
|
||||
|
||||
### Status (Default disabled)
|
||||
Control whether ad displays immediately:
|
||||
- Disabled by default when created
|
||||
- Displays during validity period when enabled
|
||||
|
||||
## Filter Functions
|
||||
|
||||
### Status Filter
|
||||
Select "Enabled" or "Disabled" to view corresponding ads.
|
||||
|
||||
### Keyword Search
|
||||
Search ad titles.
|
||||
|
||||
## Usage Scenarios
|
||||
|
||||
### Scenario 1: Create Promotional Banner
|
||||
|
||||
**Form Config**:
|
||||
- Title: Double 11 Special Sale
|
||||
- Type: Banner
|
||||
- Target URL: /pricing
|
||||
- Description: 20% off all plans
|
||||
- Image URL: https://cdn.example.com/banner-1111.jpg
|
||||
- Validity Period:
|
||||
- Start: 2024-11-11 00:00
|
||||
- End: 2024-11-11 23:59
|
||||
- Status: Enabled
|
||||
|
||||
### Scenario 2: Create Popup Announcement
|
||||
|
||||
**Form Config**:
|
||||
- Title: Important System Upgrade Notice
|
||||
- Type: Popup
|
||||
- Target URL: /announcement/123
|
||||
- Description: System maintenance tonight 22:00-23:00...
|
||||
- Image URL: https://cdn.example.com/popup-upgrade.jpg
|
||||
- Validity Period:
|
||||
- Start: 2024-01-15 08:00
|
||||
- End: 2024-01-15 23:00
|
||||
- Status: Enabled
|
||||
|
||||
### Scenario 3: Create Sidebar Promotion
|
||||
|
||||
**Form Config**:
|
||||
- Title: Refer Friends for Commission
|
||||
- Type: Sidebar
|
||||
- Target URL: /invite
|
||||
- Description: Invite friends to register, get 10% commission
|
||||
- Image URL: https://cdn.example.com/sidebar-invite.jpg
|
||||
- Validity Period:
|
||||
- Start: 2024-01-01 00:00
|
||||
- End: 2024-12-31 23:59
|
||||
- Status: Enabled
|
||||
|
||||
### Scenario 4: Create Notice Ticker
|
||||
|
||||
**Form Config**:
|
||||
- Title: New Node Online
|
||||
- Type: Notice
|
||||
- Target URL: /nodes
|
||||
- Description: New Los Angeles high-speed node, try it now!
|
||||
- Validity Period:
|
||||
- Start: 2024-01-20 00:00
|
||||
- End: 2024-01-27 23:59
|
||||
- Status: Enabled
|
||||
|
||||
## Ad Display Rules
|
||||
|
||||
### Display Conditions
|
||||
Ad must satisfy all:
|
||||
1. Status is "Enabled"
|
||||
2. Current time within validity period
|
||||
3. Corresponding page supports the type
|
||||
|
||||
### Display Position
|
||||
- **Banner**: Top or bottom of page
|
||||
- **Popup**: Pops up on page load
|
||||
- **Sidebar**: Fixed on right side of page
|
||||
- **Notice**: Scrolling bar at top of page
|
||||
|
||||
### Display Frequency
|
||||
- Popup type: Once per user per day
|
||||
- Other types: Continuous display
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **Validity Period**: Expired ads auto-hide, no manual disabling needed
|
||||
2. **External Images**: Use CDN links for fast loading
|
||||
3. **Link Testing**: Test target link before creation
|
||||
4. **Size Standards**: Different ad types need different image sizes
|
||||
5. **Content Compliance**: Ad content must comply with laws
|
||||
6. **Create in Advance**: Can create scheduled ads ahead of time
|
||||
7. **Popup Frequency**: Don't show popups too frequently
|
||||
8. **Mobile Adaptation**: Ensure images display properly on mobile
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,114 @@
|
||||
# Auth Control
|
||||
|
||||
>`System → Auth Control` focuses on **how** users log in and verify their identity. Configure email, SMS, social sign-in, and device authentication in one place, with built-in testing tools so every change can be validated instantly.
|
||||
|
||||
## Module Overview
|
||||
|
||||
- **Communication methods**: Email + SMS login, complete with verification flows, whitelists, and message templates.
|
||||
- **Social accounts**: Apple, Google, Facebook, GitHub, and Telegram can be toggled independently.
|
||||
- **Device authentication**: Hardens device-based login with VM detection and communication keys.
|
||||
|
||||
The following sections mirror the cards you see in the admin panel—work through them in order, test, then save.
|
||||
|
||||
## Communication Methods
|
||||
|
||||
### Email authentication
|
||||
|
||||
1. **Basic switches**
|
||||
- `Enable email sign-in`: Controls whether the login form shows the email path.
|
||||
- `Email verification`: Forces new users or sensitive actions to complete email OTP first.
|
||||
- `Domain whitelist`: Only allow addresses from specific domains (one suffix per line, e.g. `gmail.com`).
|
||||
|
||||
2. **SMTP platform**
|
||||
- `Server` & `Port`: SMTP host/port (most providers use 25/465/587).
|
||||
- `SSL/TLS`: Match the encryption required by your provider.
|
||||
- `Account / Password`: SMTP credentials (app passwords recommended).
|
||||
- `From address`: What recipients see in their inbox; must match an allowed sender.
|
||||
- `Send test email`: Enter any inbox and send immediately to confirm deliverability.
|
||||
|
||||
3. **Template tabs** (`Verify / Expiration / Maintenance / Traffic`)
|
||||
- Templates are HTML-capable and support variables:
|
||||
- `{{.Type}}`: Email type (1 register, 2 reset password); combine with `{{if eq .Type 1}}` for conditions.
|
||||
- `{{.SiteLogo}}` / `{{.SiteName}}`: Branding assets.
|
||||
- `{{.Expire}}`: OTP expiration; `{{.ExpireDate}}`: Subscription expiration.
|
||||
- `{{.Code}}`: Verification code.
|
||||
- `{{.MaintenanceDate}}`, `{{.MaintenanceTime}}`: Maintenance notice specifics.
|
||||
- The embedded editor is WYSIWYG—save to apply instantly to new outbound mail.
|
||||
|
||||
### SMS authentication
|
||||
|
||||
1. **Login policy**
|
||||
- `Enable SMS sign-in`: Turns the phone-number OTP entry on/off.
|
||||
- `Whitelist area codes`: When enabled, only listed codes (e.g. `1, 852, 886`) are accepted.
|
||||
|
||||
2. **Platform & dynamic fields**
|
||||
- Select an SMS provider; the form reveals the exact fields that provider requires and offers a shortcut link to apply for service.
|
||||
- Common fields include `Access Key`, `Secret Key`, `Endpoint`, `Template Code`, `Sign Name`, and dedicated sender numbers.
|
||||
- If the provider expects custom templates, paste the body that contains `{{code}}` (or its vendor-specific variable).
|
||||
|
||||
3. **Test SMS**
|
||||
- Choose an area code, enter a number, and click “Test SMS” to call the gateway immediately.
|
||||
- Most failures trace back to invalid credentials, pending template review, or a mismatched signature—verify inside the vendor console.
|
||||
|
||||
## Social Authentication
|
||||
|
||||
All social options share the same drawer layout: toggle the method, fill in the credentials, then save to expose the login button to end users.
|
||||
|
||||
### Apple Sign-In
|
||||
- **Team ID / Key ID**: From Apple Developer.
|
||||
- **Service ID (Client ID)**: Created under Apple Developer → Identifiers.
|
||||
- **Private Key**: Contents of the `.p8` key file (keep the `BEGIN/END` markers).
|
||||
- **Redirect URL**: API endpoint the user returns to after Apple auth; omit trailing `/`.
|
||||
|
||||
### Google Sign-In
|
||||
- **Client ID / Client Secret**: OAuth credentials created in Google Cloud Console (Web application type).
|
||||
- Add your site’s callback—for example `/api/auth/google/callback`—to the authorized redirect URIs.
|
||||
|
||||
### Facebook Login
|
||||
- **App ID / App Secret**: From the Facebook Developer portal. Make sure your domain is listed under “Valid OAuth Redirect URIs”.
|
||||
|
||||
### GitHub Login
|
||||
- **Client ID / Client Secret**: From GitHub Developer Settings → OAuth Apps.
|
||||
- Set the callback to something like `https://your-domain.com/api/auth/github/callback` and require HTTPS.
|
||||
|
||||
### Telegram Login
|
||||
- **Bot ID / Bot Token**: Generated via @BotFather (enable the Login Widget permission).
|
||||
- Users authorize by interacting with your bot; once configured the official Telegram dialog will pop up automatically.
|
||||
|
||||
## Device Authentication
|
||||
|
||||
Best for client/TV apps that exchange a one-time device code.
|
||||
|
||||
- `Enable device sign-in`: Allows devices to authenticate via code or QR pairing.
|
||||
- `Show ads`: Toggles advertising surfaces on the device experience.
|
||||
- `Block virtual machine`: Rejects requests coming from emulators/VMs.
|
||||
- `Enable security`: Forces every device request to include a shared communication key.
|
||||
- `Communication key`: Paste your own or click the dice icon to auto-generate a 32-character GUID; create one per channel and keep it secret.
|
||||
|
||||
## Operational Tips
|
||||
|
||||
- Snapshot SMTP/SMS credentials before switching providers so you can roll back quickly.
|
||||
- Always use “Send test email” or “Test SMS” after editing settings—production users should never be the first to try a new config.
|
||||
- Provider-specific SMS fields change dynamically; if a required field is missing, define it in the vendor console via template variables.
|
||||
- For OAuth flows (Apple/Google/etc.), rehearse the entire login in a sandbox account to confirm the redirect URI and scopes are correct.
|
||||
- Treat the communication key as a secret—share it only with trusted client apps and never commit it to version control.
|
||||
|
||||
## FAQs
|
||||
|
||||
### Email sends but users still see “verification failed”
|
||||
- Confirm the domain whitelist includes the user’s email suffix.
|
||||
- Some enterprise SMTP vendors require the From address to exactly match the authenticated account—otherwise the message is dropped.
|
||||
|
||||
### SMS keeps failing
|
||||
- Ensure the template is approved and that the placeholder name (e.g., `{{code}}`) matches what the vendor expects.
|
||||
- Verify the destination area code is whitelisted.
|
||||
- Still failing? Inspect the API error code in DevTools and cross reference it with the SMS provider documentation.
|
||||
|
||||
### OAuth redirect mismatch errors
|
||||
- Facebook, Google, and GitHub demand an exact match on the redirect URI, including protocol and trailing path—copy the admin value verbatim into the vendor console.
|
||||
|
||||
## Related Docs
|
||||
|
||||
- [System Config](/admin/system/config): Branding, SMTP defaults, and other site-wide settings.
|
||||
- [Payment Config](/admin/system/payment): Configure gateways after your login flows are working.
|
||||
- [Ads Config](/admin/system/ads): Pairs with the “Show ads” option in device authentication.
|
||||
@@ -0,0 +1,556 @@
|
||||
# System Configuration
|
||||
|
||||
The System Configuration module manages global settings and parameters, controlling overall system behavior.
|
||||
|
||||
## Overview
|
||||
|
||||
### Basic Settings
|
||||
|
||||
System basic configuration:
|
||||
|
||||
- **Site Name**: System display name
|
||||
- **Site Logo**: Website logo image
|
||||
- **Site Icon**: Browser tab icon (Favicon)
|
||||
- **Site Description**: Site intro and SEO description
|
||||
- **Keywords**: SEO keywords
|
||||
- **Contact Info**: Customer service contact
|
||||
|
||||
### System Info
|
||||
|
||||
View system runtime information:
|
||||
|
||||
- **System Version**: Current version number
|
||||
- **Environment**: Server environment info
|
||||
- **Uptime**: System uptime
|
||||
- **Status**: Current running status
|
||||
- **Database**: Database configuration
|
||||
- **Cache**: Cache configuration and status
|
||||
|
||||
## Site Configuration
|
||||
|
||||
### Site Information
|
||||
|
||||
Configure site basics:
|
||||
|
||||
- **Site Name**: Display name on pages
|
||||
- **Tagline**: Subtitle or slogan
|
||||
- **Logo**: Upload website logo
|
||||
- **Favicon**: Upload favicon
|
||||
- **Copyright**: Footer copyright info
|
||||
- **ICP Registration**: Site registration number
|
||||
|
||||
### SEO Settings
|
||||
|
||||
Search engine optimization:
|
||||
|
||||
- **Page Title**: Default page title
|
||||
- **Keywords**: SEO keyword settings
|
||||
- **Description**: Site description
|
||||
- **robots.txt**: Search crawler rules
|
||||
- **sitemap**: Sitemap configuration
|
||||
|
||||
### Contact Information
|
||||
|
||||
Set contact methods:
|
||||
|
||||
- **Support Email**: Customer service email
|
||||
- **Phone**: Customer service phone
|
||||
- **Live Chat**: Live chat link
|
||||
- **Ticket System**: Ticket submission URL
|
||||
- **Social Media**: Social media links
|
||||
|
||||
## Email Configuration
|
||||
|
||||
### SMTP Settings
|
||||
|
||||
Configure email service:
|
||||
|
||||
- **SMTP Server**: Mail server address
|
||||
- **SMTP Port**: Server port (25/465/587)
|
||||
- **From Address**: Sender email address
|
||||
- **From Name**: Display sender name
|
||||
- **SMTP Username**: SMTP auth username
|
||||
- **SMTP Password**: SMTP auth password
|
||||
- **Encryption**: SSL/TLS encryption
|
||||
|
||||
### Email Templates
|
||||
|
||||
Configure email content:
|
||||
|
||||
- **Registration Email**: Registration verification
|
||||
- **Password Reset**: Password reset email
|
||||
- **Order Notification**: Order-related notices
|
||||
- **System Notification**: System messages
|
||||
- **Marketing Email**: Marketing campaigns
|
||||
|
||||
### Email Testing
|
||||
|
||||
Test email configuration:
|
||||
|
||||
- Send test email
|
||||
- Verify configuration
|
||||
- Check delivery rate
|
||||
- View send logs
|
||||
|
||||
## SMS Configuration
|
||||
|
||||
### SMS Provider
|
||||
|
||||
Configure SMS service:
|
||||
|
||||
- **Provider**: Alibaba Cloud/Tencent Cloud/Other
|
||||
- **AccessKey**: API access key
|
||||
- **AccessSecret**: API secret
|
||||
- **SMS Signature**: SMS sender signature
|
||||
- **SMS Template**: SMS content template
|
||||
|
||||
### SMS Templates
|
||||
|
||||
Configure SMS content:
|
||||
|
||||
- **Verification Code**: Login/register verification
|
||||
- **Notification SMS**: Order, renewal notices
|
||||
- **Marketing SMS**: Campaign promotions
|
||||
|
||||
### SMS Testing
|
||||
|
||||
Test SMS functionality:
|
||||
|
||||
- Send test SMS
|
||||
- Verify configuration
|
||||
- View send records
|
||||
|
||||
## Storage Configuration
|
||||
|
||||
### Local Storage
|
||||
|
||||
Local file storage:
|
||||
|
||||
- **Storage Path**: File storage directory
|
||||
- **Access URL**: File access address
|
||||
- **Max Size**: Single file size limit
|
||||
- **Allowed Types**: Allowed file types
|
||||
|
||||
### Cloud Storage
|
||||
|
||||
Object storage service:
|
||||
|
||||
**Alibaba Cloud OSS**:
|
||||
- Endpoint
|
||||
- AccessKey ID
|
||||
- AccessKey Secret
|
||||
- Bucket name
|
||||
- CDN domain
|
||||
|
||||
**Tencent Cloud COS**:
|
||||
- SecretId
|
||||
- SecretKey
|
||||
- Bucket
|
||||
- Region
|
||||
- CDN domain
|
||||
|
||||
**AWS S3**:
|
||||
- Access Key
|
||||
- Secret Key
|
||||
- Bucket
|
||||
- Region
|
||||
- CDN
|
||||
|
||||
### CDN Configuration
|
||||
|
||||
CDN acceleration:
|
||||
|
||||
- **CDN Domain**: Acceleration domain
|
||||
- **Cache Rules**: Cache policy
|
||||
- **Hotlink Protection**: Anti-hotlinking
|
||||
- **HTTPS**: HTTPS configuration
|
||||
|
||||
## Security Configuration
|
||||
|
||||
### Access Control
|
||||
|
||||
Control system access:
|
||||
|
||||
- **Maintenance Mode**: Enable maintenance
|
||||
- **IP Whitelist**: Allowed IPs
|
||||
- **IP Blacklist**: Blocked IPs
|
||||
- **Rate Limiting**: API rate limits
|
||||
- **Login Limits**: Failed login attempts
|
||||
|
||||
### Password Policy
|
||||
|
||||
Set password security policy:
|
||||
|
||||
- **Min Length**: Minimum password length
|
||||
- **Complexity**: Must include letters/numbers/symbols
|
||||
- **Expiration**: Password validity period
|
||||
- **History**: Cannot reuse old passwords
|
||||
- **Initial Password**: Default password rules
|
||||
|
||||
### Two-Factor Authentication
|
||||
|
||||
Two-step verification:
|
||||
|
||||
- **Enable 2FA**: Mandatory or optional
|
||||
- **Auth Method**: SMS/Email/TOTP
|
||||
- **Valid Time**: Verification code validity
|
||||
- **Backup Method**: Alternative verification
|
||||
|
||||
### SSL/TLS
|
||||
|
||||
HTTPS security:
|
||||
|
||||
- **Force HTTPS**: Enforce HTTPS
|
||||
- **SSL Certificate**: Upload SSL certificate
|
||||
- **HSTS**: HTTP Strict Transport Security
|
||||
- **Certificate Renewal**: Auto-renewal
|
||||
|
||||
## Cache Configuration
|
||||
|
||||
### Cache Type
|
||||
|
||||
Select cache method:
|
||||
|
||||
- **File Cache**: Use file system
|
||||
- **Redis Cache**: Use Redis
|
||||
- **Memcached**: Use Memcached
|
||||
|
||||
### Redis Settings
|
||||
|
||||
Redis cache configuration:
|
||||
|
||||
- **Redis Host**: Redis server address
|
||||
- **Redis Port**: Default 6379
|
||||
- **Redis Password**: Auth password
|
||||
- **Database**: Redis database number
|
||||
- **Prefix**: Cache key prefix
|
||||
|
||||
### Cache Management
|
||||
|
||||
Manage system cache:
|
||||
|
||||
- **Clear Cache**: Clear all cache
|
||||
- **Refresh Cache**: Refresh specific cache
|
||||
- **Cache Stats**: View cache usage
|
||||
- **Warm Cache**: Preload common data
|
||||
|
||||
## Queue Configuration
|
||||
|
||||
### Queue Driver
|
||||
|
||||
Configure task queue:
|
||||
|
||||
- **Sync**: Synchronous execution
|
||||
- **Database**: Use database queue
|
||||
- **Redis**: Use Redis queue
|
||||
- **Other**: RabbitMQ etc.
|
||||
|
||||
### Queue Settings
|
||||
|
||||
Queue configuration:
|
||||
|
||||
- **Queue Name**: Queue identifier
|
||||
- **Retry**: Retry attempts on failure
|
||||
- **Timeout**: Task execution timeout
|
||||
- **Concurrency**: Concurrent execution count
|
||||
|
||||
### Queue Monitoring
|
||||
|
||||
Monitor queue status:
|
||||
|
||||
- **Queue Length**: Pending tasks
|
||||
- **Running**: Tasks in progress
|
||||
- **Failed**: Failed tasks
|
||||
- **History**: Execution history
|
||||
|
||||
## Log Configuration
|
||||
|
||||
### Log Settings
|
||||
|
||||
Configure system logs:
|
||||
|
||||
- **Log Level**: DEBUG/INFO/WARNING/ERROR
|
||||
- **Log Channel**: File/Database/Cloud
|
||||
- **Retention**: Log retention days
|
||||
- **Rotation**: Log file rotation policy
|
||||
|
||||
### Log Types
|
||||
|
||||
Different log types:
|
||||
|
||||
- **System Logs**: System runtime logs
|
||||
- **Error Logs**: Errors and exceptions
|
||||
- **Access Logs**: HTTP access logs
|
||||
- **Operation Logs**: User operation logs
|
||||
- **Security Logs**: Security-related logs
|
||||
|
||||
### Log Viewing
|
||||
|
||||
View and analyze logs:
|
||||
|
||||
- **Real-time Logs**: Live log viewing
|
||||
- **Log Search**: Search log content
|
||||
- **Log Filtering**: Filter by conditions
|
||||
- **Log Export**: Export log files
|
||||
|
||||
## Scheduled Tasks
|
||||
|
||||
### Task Configuration
|
||||
|
||||
Configure scheduled tasks:
|
||||
|
||||
- **Task Name**: Task identifier
|
||||
- **Schedule**: Cron expression
|
||||
- **Task Type**: Task execution type
|
||||
- **Parameters**: Task parameters
|
||||
- **Status**: Enable or disable
|
||||
|
||||
### Task Management
|
||||
|
||||
Manage scheduled tasks:
|
||||
|
||||
- **Enable/Disable**: Control execution
|
||||
- **Run Now**: Manual trigger
|
||||
- **History**: View execution records
|
||||
- **Task Logs**: View execution logs
|
||||
|
||||
### Common Tasks
|
||||
|
||||
System preset tasks:
|
||||
|
||||
- **Data Statistics**: Daily statistics
|
||||
- **Data Cleanup**: Clean expired data
|
||||
- **Email Sending**: Batch email sending
|
||||
- **Order Check**: Check order status
|
||||
- **Auto Renewal**: Automatic renewal
|
||||
- **Backup**: Data backup tasks
|
||||
|
||||
## Notification Configuration
|
||||
|
||||
### Notification Channels
|
||||
|
||||
Configure notification methods:
|
||||
|
||||
- **In-app**: System messages
|
||||
- **Email**: Email push
|
||||
- **SMS**: SMS push
|
||||
- **Webhook**: HTTP callbacks
|
||||
- **Push Service**: App push
|
||||
|
||||
### Notification Events
|
||||
|
||||
Configure notification events:
|
||||
|
||||
- **User Registration**: New user registration
|
||||
- **Order Payment**: Order payment notice
|
||||
- **Subscription Expiry**: Expiry reminder
|
||||
- **Ticket Created**: New ticket notice
|
||||
- **System Alert**: System anomalies
|
||||
|
||||
### Notification Templates
|
||||
|
||||
Configure notification content:
|
||||
|
||||
- **Template Management**: Manage templates
|
||||
- **Variable Substitution**: Dynamic variables
|
||||
- **Multi-language**: Multi-language templates
|
||||
- **Template Testing**: Test templates
|
||||
|
||||
## API Configuration
|
||||
|
||||
### API Settings
|
||||
|
||||
API interface configuration:
|
||||
|
||||
- **API Toggle**: Enable or disable API
|
||||
- **API Keys**: Generate API keys
|
||||
- **API Domain**: API access domain
|
||||
- **Version Control**: API versioning
|
||||
- **Documentation**: API docs link
|
||||
|
||||
### API Restrictions
|
||||
|
||||
API access control:
|
||||
|
||||
- **Rate Limiting**: Requests per minute
|
||||
- **Concurrency**: Concurrent requests
|
||||
- **IP Restrictions**: IP access control
|
||||
- **Signature Verification**: API signatures
|
||||
|
||||
### Webhook
|
||||
|
||||
Webhook configuration:
|
||||
|
||||
- **Callback URL**: Webhook URL
|
||||
- **Event Subscription**: Subscribed events
|
||||
- **Secret Key**: Signature verification
|
||||
- **Retry Policy**: Retry on failure
|
||||
|
||||
## Third-party Integration
|
||||
|
||||
### Payment Integration
|
||||
|
||||
Integrate payment services:
|
||||
|
||||
- Alipay
|
||||
- WeChat Pay
|
||||
- PayPal
|
||||
- Stripe
|
||||
- Cryptocurrency
|
||||
|
||||
### Analytics Integration
|
||||
|
||||
Integrate analytics tools:
|
||||
|
||||
- Google Analytics
|
||||
- Baidu Analytics
|
||||
- Umeng Analytics
|
||||
- Custom tracking code
|
||||
|
||||
### Support Integration
|
||||
|
||||
Integrate support systems:
|
||||
|
||||
- Live chat
|
||||
- Zendesk
|
||||
- Intercom
|
||||
- Custom support system
|
||||
|
||||
## Maintenance Mode
|
||||
|
||||
### Enable Maintenance
|
||||
|
||||
System maintenance mode:
|
||||
|
||||
- **Maintenance Toggle**: Enable maintenance
|
||||
- **Maintenance Message**: Display message
|
||||
- **Whitelist**: Accessible IPs during maintenance
|
||||
- **Estimated Time**: Completion time
|
||||
|
||||
### Maintenance Settings
|
||||
|
||||
Maintenance configuration:
|
||||
|
||||
- **Maintenance Page**: Custom maintenance page
|
||||
- **Allow Access**: Accessible paths
|
||||
- **Redirect**: Redirect during maintenance
|
||||
- **Scheduled**: Schedule maintenance
|
||||
|
||||
## System Optimization
|
||||
|
||||
### Performance Optimization
|
||||
|
||||
Optimize system performance:
|
||||
|
||||
- **Enable Cache**: Enable various caches
|
||||
- **Static Assets**: CDN acceleration
|
||||
- **Database**: Database optimization
|
||||
- **Image Optimization**: Compression and lazy loading
|
||||
- **Code Optimization**: Minification and bundling
|
||||
|
||||
### Database Optimization
|
||||
|
||||
Database performance:
|
||||
|
||||
- **Index Optimization**: Add appropriate indexes
|
||||
- **Query Optimization**: Optimize slow queries
|
||||
- **Data Archiving**: Archive historical data
|
||||
- **Data Cleanup**: Clean unused data
|
||||
|
||||
## Backup & Recovery
|
||||
|
||||
### Data Backup
|
||||
|
||||
Data backup configuration:
|
||||
|
||||
- **Auto Backup**: Scheduled automatic backup
|
||||
- **Backup Content**: Database/Files
|
||||
- **Backup Location**: Local/Cloud storage
|
||||
- **Retention**: Retention count and time
|
||||
- **Notification**: Backup completion notice
|
||||
|
||||
### Data Recovery
|
||||
|
||||
Data recovery operations:
|
||||
|
||||
- **Select Backup**: Choose backup file
|
||||
- **Confirm Recovery**: Confirm operation
|
||||
- **Execute Recovery**: Perform recovery
|
||||
- **Verify**: Verify data integrity
|
||||
|
||||
## System Monitoring
|
||||
|
||||
### Server Monitoring
|
||||
|
||||
Monitor server status:
|
||||
|
||||
- **CPU Usage**: CPU utilization
|
||||
- **Memory Usage**: Memory utilization
|
||||
- **Disk Space**: Disk usage
|
||||
- **Network Traffic**: Network usage
|
||||
- **Process Status**: Process status
|
||||
|
||||
### Application Monitoring
|
||||
|
||||
Monitor application status:
|
||||
|
||||
- **Online Users**: Current online users
|
||||
- **Request Rate**: Requests per second
|
||||
- **Response Time**: Average response time
|
||||
- **Error Rate**: Error occurrence rate
|
||||
- **Queue Status**: Queue task status
|
||||
|
||||
### Alert Settings
|
||||
|
||||
Configure monitoring alerts:
|
||||
|
||||
- **Alert Rules**: Set alert conditions
|
||||
- **Alert Methods**: Email/SMS/Webhook
|
||||
- **Alert Levels**: Warning/Error/Critical
|
||||
- **Recipients**: Alert recipients
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Regular data backups
|
||||
- Timely system updates
|
||||
- Reasonable cache strategy
|
||||
- Monitor system status
|
||||
- Regular data cleanup
|
||||
- Database optimization
|
||||
- Security measures
|
||||
- Log important operations
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Email Send Failure
|
||||
|
||||
Check:
|
||||
|
||||
1. Is SMTP config correct
|
||||
2. Is email service enabled
|
||||
3. Is network connection ok
|
||||
4. Marked as spam
|
||||
|
||||
### Cache Not Working
|
||||
|
||||
Possible causes:
|
||||
|
||||
1. Cache config error
|
||||
2. Redis connection failed
|
||||
3. Cache key issues
|
||||
4. Cache cleared
|
||||
|
||||
### Scheduled Task Not Running
|
||||
|
||||
Check:
|
||||
|
||||
1. Is task enabled
|
||||
2. Is cron expression correct
|
||||
3. Is server time accurate
|
||||
4. Is queue service running
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Auth Control](/admin/system/auth-control) - Configure permissions
|
||||
- [Payment Config](/admin/system/payment) - Configure payments
|
||||
- [Log Management](/admin/logs/login-logs) - View system logs
|
||||
@@ -0,0 +1,180 @@
|
||||
<div v-pre>
|
||||
|
||||
# Payment Management
|
||||
|
||||
Manage platform supported payment methods and view payment channel statistics.
|
||||
|
||||
## Payment Method Table
|
||||
|
||||
### Table Column Description
|
||||
|
||||
#### Status
|
||||
Switch button to control whether payment method is enabled.
|
||||
|
||||
#### Name
|
||||
Payment method name.
|
||||
|
||||
#### Type
|
||||
Payment channel type:
|
||||
- Alipay
|
||||
- WeChat Pay
|
||||
- PayPal
|
||||
- Stripe
|
||||
- Cryptocurrency
|
||||
|
||||
#### Configuration
|
||||
View payment method configuration status.
|
||||
|
||||
#### Updated At
|
||||
Last update time.
|
||||
|
||||
### Table Operations
|
||||
|
||||
#### Edit
|
||||
Opens side drawer to modify payment config:
|
||||
- API keys
|
||||
- Merchant ID
|
||||
- Callback URL
|
||||
- Transaction fee rate
|
||||
- Min/Max amount
|
||||
|
||||
#### Delete
|
||||
Deletes payment method (requires confirmation).
|
||||
|
||||
#### Create Payment Method
|
||||
Adds new payment channel.
|
||||
|
||||
## Payment Statistics Panel
|
||||
|
||||
Displays statistics for each payment method:
|
||||
|
||||
### Total Transaction Amount
|
||||
Cumulative transaction amount for each method.
|
||||
|
||||
### Transaction Count
|
||||
Number of transactions per method.
|
||||
|
||||
### Success Rate
|
||||
Payment success rate statistics.
|
||||
|
||||
### Transaction Fees
|
||||
Fees generated by each method.
|
||||
|
||||
## Payment Configuration Form
|
||||
|
||||
### Basic Information
|
||||
- Payment method name
|
||||
- Payment type
|
||||
- Display icon
|
||||
- Display order
|
||||
|
||||
### API Configuration
|
||||
Different payment methods require different configs:
|
||||
|
||||
**Alipay**:
|
||||
- App ID
|
||||
- Merchant Private Key
|
||||
- Alipay Public Key
|
||||
- Callback URL
|
||||
|
||||
**WeChat Pay**:
|
||||
- Merchant ID
|
||||
- API Key
|
||||
- App ID
|
||||
- App Secret
|
||||
- Certificate files
|
||||
|
||||
**PayPal**:
|
||||
- Client ID
|
||||
- Client Secret
|
||||
- Sandbox mode
|
||||
|
||||
**Stripe**:
|
||||
- Publishable Key
|
||||
- Secret Key
|
||||
- Webhook Secret
|
||||
|
||||
**Cryptocurrency**:
|
||||
- Wallet address
|
||||
- API key
|
||||
- Confirmation blocks
|
||||
|
||||
### Transaction Settings
|
||||
- Minimum payment amount
|
||||
- Maximum payment amount
|
||||
- Transaction fee rate
|
||||
- Payment timeout
|
||||
|
||||
## Usage Scenarios
|
||||
|
||||
### Scenario 1: Configure Alipay
|
||||
|
||||
**Create Payment Method**:
|
||||
- Name: Alipay
|
||||
- Type: Alipay
|
||||
- App ID: 2021xxx
|
||||
- Merchant Private Key: [key content]
|
||||
- Alipay Public Key: [key content]
|
||||
- Callback URL: https://myvpn.com/callback/alipay
|
||||
- Min Amount: ¥1
|
||||
- Max Amount: ¥10000
|
||||
- Fee Rate: 0.6%
|
||||
- Status: Enabled
|
||||
|
||||
### Scenario 2: Configure Stripe
|
||||
|
||||
**Create Payment Method**:
|
||||
- Name: Credit Card Payment
|
||||
- Type: Stripe
|
||||
- Publishable Key: pk_live_xxx
|
||||
- Secret Key: sk_live_xxx
|
||||
- Webhook Secret: whsec_xxx
|
||||
- Callback URL: https://myvpn.com/callback/stripe
|
||||
- Min Amount: $1
|
||||
- Max Amount: $1000
|
||||
- Fee Rate: 2.9% + $0.30
|
||||
- Status: Enabled
|
||||
|
||||
### Scenario 3: Configure Cryptocurrency
|
||||
|
||||
**Create Payment Method**:
|
||||
- Name: USDT Payment
|
||||
- Type: Crypto
|
||||
- Currency: USDT (TRC-20)
|
||||
- Wallet Address: TXxx...
|
||||
- API Key: [optional]
|
||||
- Confirmation Blocks: 1
|
||||
- Min Amount: 10 USDT
|
||||
- Exchange Rate API: Real-time fetch
|
||||
- Status: Enabled
|
||||
|
||||
## Payment Callback
|
||||
|
||||
### Callback Handling
|
||||
Platform auto-handles payment callbacks:
|
||||
1. Verify callback signature
|
||||
2. Update order status
|
||||
3. Credit user balance
|
||||
4. Send notification email
|
||||
|
||||
### Callback Logs
|
||||
View payment callback logs:
|
||||
- Callback time
|
||||
- Payment status
|
||||
- Order information
|
||||
- Error messages (if any)
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **Key Security**: Protect API keys and certificates
|
||||
2. **Callback Verification**: Must verify callback signature to prevent forgery
|
||||
3. **Test Environment**: Validate config in test environment first
|
||||
4. **HTTPS Required**: Callback URLs must use HTTPS
|
||||
5. **Transaction Fees**: Calculate fees properly to avoid losses
|
||||
6. **Amount Limits**: Set reasonable min/max payment amounts
|
||||
7. **Timeout Handling**: Set reasonable payment timeout
|
||||
8. **Exchange Rates**: Crypto requires real-time rates
|
||||
9. **Certificate Updates**: Regularly update payment certificates
|
||||
10. **Backup Channels**: Configure multiple payment methods for availability
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user