|
|
@@ -4,7 +4,9 @@ const Http = require("../../utils/HttpBasics"); |
|
|
|
const util = require("../../utils/util"); |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
data: {}, |
|
|
|
data: { |
|
|
|
bgColor:"#fff" |
|
|
|
}, |
|
|
|
couponId: null, |
|
|
|
orderId: "", |
|
|
|
day: "", |
|
|
@@ -14,7 +16,7 @@ Page({ |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
let that = this; |
|
|
|
that.topicShow(); |
|
|
|
that.topicShow() |
|
|
|
}, |
|
|
|
topicShow(){ |
|
|
|
let that = this; |
|
|
@@ -29,7 +31,22 @@ Page({ |
|
|
|
that.setData({ |
|
|
|
data: res.data |
|
|
|
}); |
|
|
|
console.log(that.data.data) |
|
|
|
/** |
|
|
|
* 获取屏幕的高度 |
|
|
|
* |
|
|
|
*/ |
|
|
|
let query = wx.createSelectorQuery(); |
|
|
|
query.select('.coupons').boundingClientRect(); |
|
|
|
query.selectViewport().scrollOffset(); |
|
|
|
query.exec((res) => { |
|
|
|
let listHeight = res[0].height; // 获取list高度 |
|
|
|
let windowHeight = wx.getSystemInfoSync().windowHeight; |
|
|
|
if (windowHeight >= listHeight){ |
|
|
|
that.setData({ |
|
|
|
winHeight:'100%' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
wx.showToast({ |
|
|
|