1 Star 0 Fork 140

cctv1 / 微信小程序社交电商

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
app.js 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
刘航军 提交于 2018-09-09 00:10 . 初始化提交
//app.js
const wxUtils = require("/utils/wxUtils.js")
App({
onLaunch: function () {
let that = this
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
confirmColor: "#fe5a5d",
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
})
wx.getSystemInfo({
success: function(res) {
that.globalData.windowHeight = res.windowHeight
that.globalData.windowWidth = res.windowWidth
//second_height: res.windowHeight - res.windowWidth / 750 * 300
},
})
// wxUtils.initQQMapSDK()
// 展示本地存储能力
// logs.unshift(Date.now())
// wx.setStorageSync('logs', logs)
},
globalData: {
userInfo: null,
shopInfo:null,
shopId:null, //需要跳转的店铺Id
addressInfo:null,
checkSelf:true,
authorizing:false,
cartNum:0,
refreshShopPage:false,
windowHeight:0,
windowWidth:0
}
})
微信
1
https://gitee.com/8684/mina_social_business.git
git@gitee.com:8684/mina_social_business.git
8684
mina_social_business
微信小程序社交电商
master

搜索帮助