Skip to content

Commit bbed6e5

Browse files
magicmagic
authored andcommitted
fix bug
1 parent 4820b22 commit bbed6e5

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ Bmob.initialize("你的Application ID", "你的REST API Key");
108108

109109
https://bmob.github.io/hydrogen-js-sdk/#/?id=登陆
110110

111+
112+
#### 版本 v2.6.0 2024年09月14日10:42:04
113+
> - 修复vue3的兼容问题
114+
111115
#### 版本 v2.5.30
112116
> - 增加支持微信文字检测违规2.0
113117

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hydrogen-js-sdk",
3-
"version": "2.5.30",
3+
"version": "2.6.0",
44
"description": "本SDK基于es6开发,致力打造基于前端混合开发需求,支持微信小程序、H5、快应用、游戏Cocos、混合App等平台, 整个SDK,就dist目录下Bmob.*.js 这个文件即可使用全部功能,请使用最新版本。",
55
"main": "./index.js",
66
"typings": "./index.d.ts",

src/lib/bmob.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
const utils = require('./utils')
22

3-
if (typeof global==='undefined'){
4-
global=window
3+
let env
4+
if (utils.getAppType() === 'h5') {
5+
env = window
56
}
6-
const Bmob = global.Bmob || {}
7+
if (utils.getAppType() === 'nodejs') {
8+
env = global
9+
}
10+
const Bmob = env.Bmob || {}
711
Bmob.utils = utils
812
Bmob._config = utils.getConfig()
913

0 commit comments

Comments
 (0)