Skip to content

Commit

Permalink
修改hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
滕亚庆 committed Aug 13, 2018
1 parent 4bd5e6f commit 341f38d
Show file tree
Hide file tree
Showing 8 changed files with 1,716 additions and 385 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

#Hbuilder
unpackage/debug/
unpackage/release/

/docs/.vuepress/dist
34 changes: 0 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
# hotfix[查看文档](https://tyaqing.github.io/mogo-h5plus/hotfix/introduction.html)
让您的Hbuilder APP应用快速拥有更新能力.

# 接入方式

## 引入方式

可以在`main.js`中添加`checkUpdate(URL);`,打开 app 就会自动检测.还可以放在`检查更新`的按钮上触发.

### ES6 Module 引入

首先在`page.json`把用到`checkUpdate`的页面加上管道`|plusReady`.

然后加载使用.

```js
import { checkUpdate } from "./utils/hotfix";
checkUpdate(URL); // 填入您检查api的url地址
```

### `<script>`方式引入

这种用于没有使用脚手架的开发者

```html
<title>APP</title>
<script src="html5plus://ready"></script> // 这段必须加载title底下
....
<script src="path/hotfix-bs.js"></script>
<script>
checkUpdate('https://api.hotfix.femirror.com/public/app/checkUpdate?bundleId=你的appId'); // 填入您检查api的url地址
</script>
```

如果您没有后端接入,可以使用`FEmirror云更新`

### 如果您有自己的后台版本管理,请按照文档配置使用即可
183 changes: 0 additions & 183 deletions hotfix-bs.js

This file was deleted.

Loading

0 comments on commit 341f38d

Please sign in to comment.