|
|
@@ -4,25 +4,13 @@ import {
|
|
|
const _Http = new ApiModel();
|
|
|
App({
|
|
|
onLaunch() {
|
|
|
-
|
|
|
/* 计算tabbar+iphone安全距离 tabbar页面+100rpx*/
|
|
|
let safeAreaBottom = 0,
|
|
|
capsule = wx.getMenuButtonBoundingClientRect(),
|
|
|
height = 200,
|
|
|
that = this;
|
|
|
-
|
|
|
- //轮播图
|
|
|
- _Http.basic({
|
|
|
- "classname": "publicmethod.bannermag.bannermag",
|
|
|
- "method": "query_bannerlocationlist",
|
|
|
- "content": {
|
|
|
- "siteid": "BWJ",
|
|
|
- "fclienttype": "MOBILE"
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- that.globalData.bannerDataList = res.data;
|
|
|
- })
|
|
|
-
|
|
|
+ //获取轮播图
|
|
|
+ this.getBanner();
|
|
|
wx.getSystemInfo({
|
|
|
success(res) {
|
|
|
//计算底部安全距离高度
|
|
|
@@ -37,6 +25,20 @@ App({
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+ getBanner() {
|
|
|
+ //轮播图
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "publicmethod.bannermag.bannermag",
|
|
|
+ "method": "query_bannerlocationlist",
|
|
|
+ "content": {
|
|
|
+ "siteid": "BWJ",
|
|
|
+ "fclienttype": "MOBILE"
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.msg != '成功') return this.getBanner();
|
|
|
+ this.globalData.bannerDataList = res.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
globalData: {
|
|
|
myNavBorHeight: 0, //自定义头部导航高度
|
|
|
safeAreaBottom: 0, //底部安全距离
|