-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
滕亚庆
committed
Aug 13, 2018
1 parent
4bd5e6f
commit 341f38d
Showing
8 changed files
with
1,716 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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云更新` | ||
|
||
### 如果您有自己的后台版本管理,请按照文档配置使用即可 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.