加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
app.js 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
unknown 提交于 2020-09-17 13:08 . Initial Commit
//app.js
App({
onLaunch: function () {
var that=this;
wx.getSystemInfo({
success: (res) => {
//console.log('系统信息'+JSON.stringify(res));
that.globalData.systm = JSON.stringify(res);
that.globalData.nav_top = res.statusBarHeight
that.globalData.nav_height = 44 + res.statusBarHeight
}
});
//登录信息
var val = wx.getStorageSync('login_info');
if (val) {
var d = JSON.parse(val);
that.globalData.user_id = d.user_id;
that.globalData.logo = d.logo;
that.globalData.nickname = d.nickname;
that.globalData.session = d.session;
that.globalData.user_info = d;
console.log('登录成功');
}
},
globalData: {
server:'https://www.zjhn.com/shop/dc_ac.php'
},msg:function(t){wx.showToast({ title: t });},
err: function (t) {
wx.showModal({
title: '提示',
content: t,
})
},
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化