qb-pc-sdk 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -309,7 +309,8 @@ if (isBrowser) {
309
309
  } catch (err) {
310
310
  // 这里不抛出,保持封装层逻辑可继续运行并给出错误回调
311
311
  // 在 Vue/React 等环境中,用户可能需要手动引入并挂载
312
- if (process.env.NODE_ENV !== 'production') {
312
+ const isDev = typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production';
313
+ if (isDev) {
313
314
  console.warn('[AdSDK] 底层 SDK 自动加载失败,若在模块化环境中,请手动引入:',
314
315
  'import \'qb-pc-ad-sdk-origin/dist/qb-pc-ad-sdk.v1.0.0.js\';', err);
315
316
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qb-pc-sdk",
3
- "version": "1.1.1",
4
- "description": "趣变广告 SDK 封装器 - 修复广告自适应问题",
3
+ "version": "1.1.2",
4
+ "description": "趣变广告 SDK 封装器 - 修复广告自适应问题,添加关闭按钮",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js",
@@ -575,7 +575,8 @@
575
575
  `;
576
576
 
577
577
  // 输出广告尺寸信息(调试用)
578
- if (process.env.NODE_ENV !== 'production') {
578
+ const isDev = typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production';
579
+ if (isDev) {
579
580
  console.log('[AdSDK] 广告尺寸信息:', {
580
581
  '广告图片尺寸': `${adImageWidth}x${adImageHeight}`,
581
582
  '容器尺寸': `${containerWidth}x${containerHeight}`,