diff --git a/app.js b/app.js index 5faae22..01eee9e 100644 --- a/app.js +++ b/app.js @@ -1,47 +1,5 @@ //app.js App({ -<<<<<<< HEAD - onLaunch: function () { - // 展示本地存储能力 - var logs = wx.getStorageSync('logs') || [] - logs.unshift(Date.now()) - wx.setStorageSync('logs', logs) - const systemInfo = wx.getSystemInfoSync(); //获取系统信息 - const menuInfo = wx.getMenuButtonBoundingClientRect(); // 获取胶囊按钮的信息 - this.globalData.menuHeight = menuInfo.height; // 获取胶囊按钮的高 - this.globalData.statusBarHeight = systemInfo.statusBarHeight; // 获取状态栏的高 - this.globalData.menuRight = menuInfo.right; // 获取胶囊按钮的距离屏幕最右边的距离(此处用于设置导航栏左侧距离屏幕的距离) - this.globalData.navBarHeight = (menuInfo.top - systemInfo.statusBarHeight) * 2 + menuInfo.height; // 计算出导航栏的高度 - }, - globalData: { - imageUrl: "https://cdn.sws010.com/wxapp/images", - navBarHeight: 0, // 导航栏高度 - menuHeight: 0, //胶囊按钮 高度 - statusBarHeight: 0, //状态栏高度 - menuRight: 0, //胶囊按钮 距离屏幕右边的距离 - request: function (prarms,url='http://cloud.sws010.com/api/v7.ashx') { - return new Promise((resolve, reject) => { - wx.request({ - url, - data: { - version: "1", - ...prarms - }, - method: 'get', - success: function (res) { - //接口实际返回的内容在res.data中 - if (res.data.Code == 1) { - resolve(res.data.Data); - } else { - reject(res.data) - } - }, - fail: function (err) { - reject(err); - } - }) - }) -======= onLaunch: function () { // 展示本地存储能力 var logs = wx.getStorageSync('logs') || [] @@ -86,6 +44,5 @@ App({ }) }) } ->>>>>>> refs/remotes/origin/dd-7 } }) \ No newline at end of file