| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>定价管理</title>
- <link rel="stylesheet" href="../../css/admin.css">
- </head>
- <body>
- <div class="page-content active">
- <!-- 定价资源网格 -->
- <div class="pricing-grid" id="pricingGrid">
- <div class="loading-text">加载中...</div>
- </div>
- </div>
- <script src="../../js/pricing/pricing.js"></script>
- <script>
- // 初始化定价管理器
- (function() {
- let apiBaseUrl = 'http://localhost:3000';
-
- // 尝试从父窗口获取 API 地址(file:// 协议下会失败,使用默认值)
- try {
- if (window.parent && window.parent.getApiBaseUrl) {
- apiBaseUrl = window.parent.getApiBaseUrl();
- }
- } catch (e) {
- console.log('[PricingManager] 使用默认 API 地址:', apiBaseUrl);
- }
-
- if (!window.pricingManager) {
- window.pricingManager = new PricingManager({
- apiBaseUrl: apiBaseUrl,
- grid: document.getElementById('pricingGrid')
- });
- window.pricingManagerInstance = window.pricingManager;
- }
- })();
- </script>
- </body>
- </html>
|