1 Star 0 Fork 0

蚂蚁会花呗/ants-boot-wx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
app.js 826 Bytes
一键复制 编辑 原始数据 按行查看 历史
蚂蚁会花呗 提交于 2022-04-28 17:55 . first commit
var util = require('./utils/util.js');
var api = require('./config/api.js');
var user = require('./utils/user.js');
App({
onLaunch: function() {
const updateManager = wx.getUpdateManager();
wx.getUpdateManager().onUpdateReady(function() {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function(res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
},
onShow: function(options) {
user.checkLogin().then(res => {
this.globalData.hasLogin = true;
}).catch(() => {
this.globalData.hasLogin = false;
});
},
globalData: {
hasLogin: false
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/LYL-Y/ants-boot-wx.git
git@gitee.com:LYL-Y/ants-boot-wx.git
LYL-Y
ants-boot-wx
ants-boot-wx
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385