1 Star 0 Fork 11

zan / wechat-mini-init

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app.js 696 Bytes
一键复制 编辑 原始数据 按行查看 历史
//app.js
import './utils/native-extension';
import listener from './utils/listener.js';
import './listener/index.js';
App({
onLaunch: function (options) {
options.app = this;
listener.fire('app.init', options);
},
onUnlaunch: function (options) {
options.app = this;
listener.fire('app.exit', options);
},
onShow: function (options) {
options.app = this;
listener.fire('app.show', options);
},
onHide: function () {
listener.fire('app.hide', {app: this});
},
onError: function (msg) {
listener.fire('app.error', {app: this, msg: msg});
},
onPageNotFound: function (options) {
options.app = this;
listener.fire('app.page.notfound', options);
},
globalData: {}
});
JavaScript
1
https://gitee.com/wubu/wechat-mini-init.git
git@gitee.com:wubu/wechat-mini-init.git
wubu
wechat-mini-init
wechat-mini-init
master

搜索帮助