html-webpack-plugin插件生态系统

html-webpack-plugin插件生态系统

【免费下载链接】html-webpack-plugin jantimon/html-webpack-plugin: 是一个用于简化 HTML 文件创建的 Webpack 插件,适合用于 Webpack 开发中的 HTML 文件处理和优化。 【免费下载链接】html-webpack-plugin 项目地址: https://gitcode.com/gh_mirrors/ht/html-webpack-plugin

html-webpack-plugin作为Webpack生态中最重要的HTML处理插件,拥有丰富的官方推荐插件生态系统,覆盖了性能优化、安全加固、功能增强等各个方面。这些插件包括资源完整性校验、内容安全策略、多平台图标生成、资源预加载提示、外部资源包含/排除、磁盘写入、SVG内联处理、模块化脚本支持等,为开发者提供了完整的解决方案和可扩展的架构。

官方推荐插件生态概览

html-webpack-plugin 作为 Webpack 生态系统中最重要的 HTML 处理插件,其强大的扩展性催生了一个丰富的插件生态系统。这些官方推荐的插件覆盖了从性能优化、安全加固到功能增强的各个方面,为开发者提供了完整的解决方案。

安全与完整性插件

在 Web 应用安全领域,html-webpack-plugin 生态系统提供了专业的解决方案:

webpack-subresource-integrity - 资源完整性校验插件

// 配置示例
const SubresourceIntegrityPlugin = require('webpack-subresource-integrity');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new SubresourceIntegrityPlugin({
      hashFuncNames: ['sha256', 'sha384']
    })
  ]
};

csp-html-webpack-plugin - 内容安全策略插件

const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new CspHtmlWebpackPlugin({
      'default-src': "'self'",
      'script-src': ["'self'", "'unsafe-inline'"],
      'style-src': ["'self'", "'unsafe-inline'"]
    })
  ]
};

图标与资源管理插件

favicons-webpack-plugin - 多平台图标生成

const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new FaviconsWebpackPlugin({
      logo: './src/logo.png',
      mode: 'webapp',
      devMode: 'webapp',
      favicons: {
        appName: 'My App',
        appDescription: 'My Awesome App',
        developerName: 'Me',
        developerURL: null,
        background: '#ddd',
        theme_color: '#333'
      }
    })
  ]
};

性能优化插件

resource-hints-webpack-plugin - 资源预加载提示

const ResourceHintsWebpackPlugin = require('resource-hints-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new ResourceHintsWebpackPlugin()
  ]
};

生成的 HTML 将包含预加载提示:

<link rel="preload" href="main.bundle.js" as="script">
<link rel="prefetch" href="lazy-chunk.js" as="script">

html-webpack-inject-preload - 自定义预加载注入

const HtmlWebpackInjectPreload = require('html-webpack-inject-preload');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackInjectPreload({
      files: [
        {
          match: /\.woff2$/,
          attributes: { as: 'font', type: 'font/woff2', crossorigin: true }
        }
      ]
    })
  ]
};

资源控制插件

html-webpack-include-assets-plugin - 外部资源包含

const HtmlWebpackIncludeAssetsPlugin = require('html-webpack-include-assets-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackIncludeAssetsPlugin({
      assets: ['external.js', 'styles.css'],
      append: false
    })
  ]
};

html-webpack-exclude-assets-plugin - 资源排除

const HtmlWebpackExcludeAssetsPlugin = require('html-webpack-exclude-assets-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackExcludeAssetsPlugin({
      excludeAssets: [/\.map$/, /dev\./]
    })
  ]
};

开发体验增强插件

html-webpack-harddisk-plugin - 磁盘写入插件

const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin({
      alwaysWriteToDisk: true
    }),
    new HtmlWebpackHarddiskPlugin()
  ]
};

html-webpack-inline-svg-plugin - SVG 内联处理

const HtmlWebpackInlineSvgPlugin = require('html-webpack-inline-svg-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackInlineSvgPlugin({
      runPreEmit: true
    })
  ]
};

现代浏览器特性支持

webpack-nomodule-plugin - 模块化脚本支持

const WebpackNoModulePlugin = require('webpack-nomodule-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new WebpackNoModulePlugin({
      filePatterns: ['legacy.*.js']
    })
  ]
};

生成的 HTML 将包含 nomodule 属性:

<script src="modern.bundle.js" type="module"></script>
<script src="legacy.bundle.js" nomodule></script>

插件生态系统架构

html-webpack-plugin 的插件系统基于 Webpack 的钩子机制构建,提供了完整的生命周期管理:

mermaid

插件分类统计表

插件类型数量主要功能典型插件
安全增强3SRI、CSP、安全策略webpack-subresource-integrity, csp-html-webpack-plugin
性能优化4预加载、资源提示、缓存resource-hints-webpack-plugin, html-webpack-inject-preload
资源管理5图标生成、资源包含/排除favicons-webpack-plugin, html-webpack-include-assets-plugin
开发体验3磁盘写入、热重载、调试html-webpack-harddisk-plugin, html-webpack-inline-svg-plugin
浏览器兼容2模块化支持、传统浏览器webpack-nomodule-plugin, appcache-webpack-plugin

插件集成最佳实践

在实际项目中,合理的插件组合可以显著提升开发效率和产品质量:

// 完整的插件配置示例
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const ResourceHintsWebpackPlugin = require('resource-hints-webpack-plugin');
const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin({
      template: 'src/index.html',
      minify: true
    }),
    new FaviconsWebpackPlugin({
      logo: './src/assets/logo.png'
    }),
    new ResourceHintsWebpackPlugin(),
    new CspHtmlWebpackPlugin({
      'default-src': "'self'",
      'script-src': ["'self'", "'unsafe-inline'"],
      'style-src': ["'self'", "'unsafe-inline'"]
    })
  ]
};

这种插件组合提供了从图标生成、资源优化到安全策略的完整解决方案,确保了 Web 应用的高质量和安全性。

html-webpack-plugin 的插件生态系统不仅丰富了核心功能,更重要的是为开发者提供了可扩展的架构,使得每个项目都能根据具体需求定制最适合的 HTML 处理方案。

favicon-webpack-plugin集成使用

在现代Web开发中,favicon已经不再仅仅是一个简单的网站图标,而是涵盖了多种设备平台和浏览器需求的完整图标生态系统。favicon-webpack-plugin作为html-webpack-plugin生态系统中的重要组成部分,为开发者提供了自动化生成和管理favicon的完整解决方案。

插件核心功能概述

favicon-webpack-plugin基于强大的favicons库构建,能够从单个源图像自动生成完整的favicon套件,包括:

  • 传统favicon.ico格式的经典网站图标
  • 现代设备图标:iOS、Android、Windows等平台的多种尺寸图标
  • Web应用清单:PWA所需的manifest文件
  • 元数据标签:各种浏览器特定的meta标签

基础配置与集成

安装依赖

首先需要安装favicon-webpack-plugin及其核心依赖:

npm install --save-dev favicons-webpack-plugin favicons
基本配置示例

以下是一个基本的webpack配置示例,展示如何将favicon-webpack-plugin与html-webpack-plugin集成:

const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: 'My Application',
      template: './src/index.html'
    }),
    new FaviconsWebpackPlugin('./src/logo.png')
  ]
};

高级配置选项

favicon-webpack-plugin提供了丰富的配置选项来满足不同需求:

完整配置示例
new FaviconsWebpackPlugin({
  // 源logo文件路径(必需)
  logo: './src/assets/logo.png',
  
  // 可选的maskable图标源
  logoMaskable: './src/assets/logo-maskable.png',
  
  // 缓存配置
  cache: true,
  
  // 输出路径配置
  prefix: 'icons/',
  outputPath: 'assets/icons',
  
  // HTML注入控制
  inject: true,
  
  // favicons生成选项
  favicons: {
    appName: '我的应用',
    appDescription: '这是一个优秀的Web应用',
    developerName: '开发团队',
    developerURL: null,
    background: '#ffffff',
    theme_color: '#3498db',
    icons: {
      coast: false,
      yandex: false,
      windows: true
    }
  }
})

多页面应用配置

对于多页面应用,可以精确控制哪些HTML文件接收favicon注入:

const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const path = require('path');

module.exports = {
  // ...其他配置
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/home.html',
      filename: 'home.html'
    }),
    new HtmlWebpackPlugin({
      template: './src/admin.html',
      filename: 'admin.html'
    }),
    new FaviconsWebpackPlugin({
      logo: './src/logo.png',
      inject: (htmlPlugin) => {
        // 只为home.html注入favicon
        return path.basename(htmlPlugin.options.filename) === 'home.html';
      }
    })
  ]
};

开发与生产环境优化

favicon-webpack-plugin支持根据webpack模式自动优化构建:

mermaid

模式配置示例
new FaviconsWebpackPlugin({
  logo: './src/logo.png',
  // 开发模式使用轻量级生成
  devMode: 'light',
  // 生产模式使用完整生成
  mode: 'webapp',
  favicons: {
    // 开发环境下禁用某些耗时的图标生成
    icons: {
      android: process.env.NODE_ENV === 'production',
      appleIcon: process.env.NODE_ENV === 'production',
      windows: process.env.NODE_ENV === 'production'
    }
  }
})

自定义清单文件

可以覆盖自动生成的manifest文件内容:

new FaviconsWebpackPlugin({
  logo: './src/logo.png',
  manifest: './src/custom-manifest.json'
})

自定义manifest文件示例:

{
  "name": "自定义应用名称",
  "short_name": "短名称",
  "description": "应用描述",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#3498db",
  "orientation": "portrait-primary"
}

处理SVG源文件

favicon-webpack-plugin完全支持SVG格式的源文件:

new FaviconsWebpackPlugin({
  logo: './src/logo.svg', // SVG文件
  favicons: {
    // SVG特有配置
    svg: true,
    scalingAlgorithm: 'lanczos',
    pixelArt: false
  }
})

缓存策略与性能优化

为了提高构建性能,favicon-webpack-plugin提供了灵活的缓存策略:

new FaviconsWebpackPlugin({
  logo: './src/logo.png',
  cache: {
    // 基于文件内容的缓存
    type: 'filesystem',
    // 缓存有效期(毫秒)
    maxAge: 86400000,
    // 缓存目录
    cacheDirectory: path.resolve(__dirname, '.favicon-cache')
  }
})

故障排除与常见问题

路径解析问题

确保logo路径正确解析:

new FaviconsWebpackPlugin({
  // 绝对路径
  logo: path.resolve(__dirname, 'src/logo.png'),
  // 或者使用相对于webpack上下文的路径
  logo: './src/logo.png'
})
HTML注入失败

检查html-webpack-plugin的配置顺序:

plugins: [
  // html-webpack-plugin必须在favicon插件之前
  new HtmlWebpackPlugin({/* 配置 */}),
  new FaviconsWebpackPlugin({/* 配置 */})
]

版本兼容性

确保使用兼容的版本组合:

favicon-webpack-pluginhtml-webpack-pluginWebpack版本
2.x3.x4.x
3.x-4.x4.x4.x-5.x
5.x-6.x5.x5.x

通过合理的配置和优化,favicon-webpack-plugin能够为现代Web应用提供完整的图标解决方案,显著提升开发效率和用户体验。其与html-webpack-plugin的无缝集成使得图标管理变得简单而高效,是现代化前端工具链中不可或缺的重要组成部分。

资源预加载与安全策略插件

在现代Web应用开发中,性能优化和安全防护是两个至关重要的方面。html-webpack-plugin作为Webpack生态中的核心HTML处理插件,通过其丰富的插件生态系统提供了强大的资源预加载和安全策略支持。这些插件能够显著提升应用的加载性能并增强安全性。

资源预加载插件

资源预加载是现代Web性能优化的关键技术,通过在页面加载初期提前获取关键资源,可以有效减少用户感知的加载时间。html-webpack-plugin生态中提供了多个专门的预加载插件:

resource-hints-webpack-plugin

该插件是资源预加载领域的核心工具,能够自动为生成的HTML文件添加资源提示标签:

const ResourceHintsWebpackPlugin = require('resource-hints-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new ResourceHintsWebpackPlugin({
      preload: {
        test: /\.(woff2|png|jpg|svg)$/,
        include: 'asyncChunks'
      },
      prefetch: {
        test: /\.js$/,
        include: 'allAssets'
      }
    })
  ]
};

配置选项详解:

选项类型默认值描述
preloadObject-配置preload资源提示
prefetchObject-配置prefetch资源提示
dns-prefetchObject-配置DNS预解析
preconnectObject-配置预连接
prerenderObject-配置预渲染
html-webpack-inject-preload

另一个强大的预加载插件,提供更细粒度的控制:

const HtmlWebpackInjectPreload = require('html-webpack-inject-preload');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackInjectPreload({
      files: [
        {
          match: /\.woff2$/,
          attributes: { rel: 'preload', as: 'font', type: 'font/woff2', crossorigin: true }
        },
        {
          match: /\.css$/,
          attributes: { rel: 'preload', as: 'style' }
        }
      ]
    })
  ]
};

安全策略插件

内容安全策略(CSP)是保护Web应用免受XSS攻击的重要机制,html-webpack-plugin生态提供了多个CSP相关插件:

csp-html-webpack-plugin

该插件自动为生成的HTML添加Content-Security-Policy元标签:

const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new CspHtmlWebpackPlugin({
      'default-src': "'self'",
      'script-src': ["'self'", "'unsafe-inline'"],
      'style-src': ["'self'", "'unsafe-inline'"],
      'img-src': ["'self'", "data:", "https:"]
    })
  ]
};
strict-csp-html-webpack-plugin

提供更严格的安全策略实现:

const StrictCspHtmlWebpackPlugin = require('strict-csp-html-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlWebpackPlugin(),
    new StrictCspHtmlWebpackPlugin({
      enabled: process.env.NODE_ENV === 'production'
    })
  ]
};

集成配置示例

下面是一个完整的配置示例,展示了如何同时使用资源预加载和安全策略插件:

const HtmlWebpackPlugin = require('html-webpack-plugin');
const ResourceHintsWebpackPlugin = require('resource-hints-webpack-plugin');
const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');

module.exports = {
  entry: './src/index.js',
  output: {
    filename: '[name].[contenthash].js',
    path: path.resolve(__dirname, 'dist')
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/index.html',
      minify: true
    }),
    new ResourceHintsWebpackPlugin({
      preload: {
        test: /\.(woff2|ttf|eot|svg)$/,
        as: 'font',
        crossorigin: true
      },
      prefetch: {
        test: /\.js$/,
        include: 'asyncChunks'
      }
    }),
    new CspHtmlWebpackPlugin({
      'default-src': "'self'",
      'script-src': ["'self'", "'unsafe-eval'"],
      'style-src': ["'self'", "'unsafe-inline'"],
      'img-src': ["'self'", "data:", "https:"],
      'font-src': ["'self'", "https:"]
    })
  ],
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader']
      },
      {
        test: /\.(woff2|ttf|eot|svg)$/,
        type: 'asset/resource'
      }
    ]
  }
};

性能优化策略

通过合理的资源预加载配置,可以显著提升应用性能:

mermaid

安全策略最佳实践

实施内容安全策略时应注意以下最佳实践:

策略类型推荐配置说明
default-src'self'默认只允许同源资源
script-src'self' 'unsafe-inline'允许内联脚本(谨慎使用)
style-src'self' 'unsafe-inline'允许内联样式
img-src'self' data: https:允许数据URL和HTTPS图片
connect-src'self'限制连接源

插件协同工作机制

html-webpack-plugin通过hooks系统实现插件间的协同工作:

mermaid

通过合理配置资源预加载和安全策略插件,开发者可以在不牺牲用户体验的前提下,显著提升Web应用的安全性和性能表现。这些插件与html-webpack-plugin的无缝集成,使得复杂的优化和安全策略变得简单易用。

第三方插件开发与钩子机制

html-webpack-plugin 的强大之处在于其完善的钩子机制,这使得开发者能够创建丰富的第三方插件来扩展其功能。通过精心设计的生命周期钩子,开发者可以在 HTML 生成的不同阶段介入处理,实现各种定制化需求。

钩子机制概述

html-webpack-plugin 提供了六个核心的异步串行瀑布钩子,这些钩子贯穿了 HTML 文件生成的整个生命周期:

mermaid

核心钩子详解

每个钩子都有特定的用途和执行时机,下面是详细的钩子说明:

钩子名称执行时机参数结构主要用途
beforeAssetTagGeneration资源标签生成前{ assets, outputName, plugin }修改资源文件列表
alterAssetTags资源标签生成后{ assetTags, publicPath, outputName, plugin }修改单个资源标签
alterAssetTagGroups资源标签分组后{ headTags, bodyTags, publicPath, outputName, plugin }修改分组后的标签
afterTemplateExecution模板执行完成后{ html, headTags, bodyTags, outputName, plugin }修改最终HTML内容
beforeEmit文件输出到磁盘前{ html, outputName, plugin }最后修改HTML内容
afterEmit文件输出完成后{ outputName, plugin }执行后处理操作

插件开发基础

要开发一个 html-webpack-plugin 的第三方插件,需要遵循 webpack 插件的基本结构,并在适当的时机注册钩子处理器:

class MyHtmlWebpackPlugin {
  apply(compiler) {
    compiler.hooks.compilation.tap('MyHtmlWebpackPlugin', (compilation) => {
      // 获取 html-webpack-plugin 的钩子
      const hooks = require('html-webpack-plugin').getCompilationHooks(compilation);
      
      // 注册到 alterAssetTags 钩子
      hooks.alterAssetTags.tapAsync('MyHtmlWebpackPlugin', (data, callback) => {
        // 处理逻辑
        data.assetTags.scripts = data.assetTags.scripts.map(tag => {
          // 修改脚本标签
          if (tag.attributes.src.includes('chunk')) {
            return {
              ...tag,
              attributes: {
                ...tag.attributes,
                'data-custom': 'modified'
              }
            };
          }
          return tag;
        });
        
        callback(null, data);
      });
    });
  }
}

module.exports = MyHtmlWebpackPlugin;

实战:开发一个资源预加载插件

让我们通过一个实际的例子来演示如何开发一个功能完整的第三方插件。这个插件会自动为关键资源添加预加载标签:

const { AsyncSeriesWaterfallHook } = require('tapable');

class PreloadResourcesPlugin {
  constructor(options = {}) {
    this.options = {
      preloadType: 'script',
      resourceTest: /\.js$/,
      ...options
    };
  }

  apply(compiler) {
    compiler.hooks.compilation.tap('PreloadResourcesPlugin', (compilation) => {
      const hooks = require('html-webpack-plugin').getCompilationHooks(compilation);
      
      // 在资源标签生成后介入
      hooks.alterAssetTags.tapPromise('PreloadResourcesPlugin', async (data) => {
        const { assetTags, publicPath } = data;
        
        // 筛选需要预加载的资源
        const resourcesToPreload = assetTags.scripts.filter(tag =>
          this.options.resourceTest.test(tag.attributes.src)
        );

        // 创建预加载标签
        const preloadTags = resourcesToPreload.map(tag => ({
          tagName: 'link',
          voidTag: true,
          attributes: {
            rel: 'preload',
            as: this.options.preloadType,
            href: publicPath + tag.attributes.src,
            crossorigin: tag.attributes.crossorigin || ''
          },
          meta: { plugin: 'preload-resources-plugin' }
        }));

        // 将预加载标签插入到head标签最前面
        assetTags.meta = [...preloadTags, ...assetTags.meta];
        
        return data;
      });
    });
  }
}

钩子执行流程详解

理解钩子的执行流程对于开发高质量的插件至关重要。下面是完整的执行序列:

mermaid

最佳实践与注意事项

开发第三方插件时,需要遵循一些最佳实践:

  1. 错误处理:确保所有的异步操作都有适当的错误处理
  2. 性能考虑:避免在钩子中执行耗时的同步操作
  3. 兼容性:考虑不同版本 webpack 和 html-webpack-plugin 的兼容性
  4. 文档完善:为插件提供清晰的使用文档和示例
// 良好的错误处理示例
hooks.alterAssetTags.tapPromise('MyPlugin', async (data) => {
  try {
    // 异步操作
    const processedData = await someAsyncOperation(data);
    return processedData;
  } catch (error) {
    // 记录错误但不中断流程
    console.error('Plugin error:', error);
    return data; // 返回原始数据继续流程
  }
});

调试与测试

开发过程中,合理的调试和测试策略非常重要:

// 调试插件
class DebuggablePlugin {
  apply(compiler) {
    compiler.hooks.compilation.tap('DebuggablePlugin', (compilation) => {
      const hooks = require('html-webpack-plugin').getCompilationHooks(compilation);
      
      Object.keys(hooks).forEach(hookName => {
        hooks[hookName].tap('Debug', (data) => {
          console.log(`[${hookName}]`, JSON.stringify(data, null, 2));
          return data;
        });
      });
    });
  }
}

通过深入了解 html-webpack-plugin 的钩子机制,开发者可以创建出功能强大、稳定性高的第三方插件,极大地扩展 webpack 的 HTML 处理能力。无论是资源优化、安全增强还是特殊功能需求,都可以通过恰当的钩子介入来实现。

总结

html-webpack-plugin通过其完善的钩子机制和丰富的插件生态系统,为现代Web开发提供了强大的HTML处理能力。从安全策略到性能优化,从资源管理到开发体验增强,各类插件覆盖了开发过程中的各种需求。通过深入了解其六个核心生命周期钩子,开发者可以创建功能强大的第三方插件,极大地扩展Webpack的HTML处理能力。无论是资源预加载、安全防护还是特殊功能需求,都可以通过恰当的钩子介入来实现,这使得html-webpack-plugin成为现代化前端工具链中不可或缺的重要组成部分。

【免费下载链接】html-webpack-plugin jantimon/html-webpack-plugin: 是一个用于简化 HTML 文件创建的 Webpack 插件,适合用于 Webpack 开发中的 HTML 文件处理和优化。 【免费下载链接】html-webpack-plugin 项目地址: https://gitcode.com/gh_mirrors/ht/html-webpack-plugin

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值