|
- let config = require("../../config/config.js");
- let app = getApp();
- const Http = require("../../utils/HttpBasics");
- const util = require("../../utils/util");
- Page({
- data: {
- data: {
- bgColor:"#fff"
- },
- couponId: null,
- orderId: "",
- day: "",
- hour: "",
- minute: "",
- nodes: ''
- },
- onShow() {
- let that = this;
- that.topicShow()
- },
- topicShow(){
- let that = this;
- Http.get({
- url: config.api.topicShow,
- data: {
- token: app.globalData.token
- }
- }).then(res => {
- console.log(res)
- if (res&&res.data) {
- that.setData({
- data: res.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({
- title: err.errMsg,
- icon: 'none',
- duration: 2000,
- mask: false
- });
- })
- },
- gotoactdetail:function(){
- let that = this;
- console.log(that.data.data.detail)
- wx.navigateTo({
- url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`,
- })
- }
- });
|