coupon_news.js 777 Bytes
import util from '../../utils/util';
import App from '../../utils/api';
Page({
	onLoad() {
		this.init();
		this.getlist();
	},
	getlist() {
		App.Activity.ActivityListByOpenid().then((json) => {
			console.log(json);
			if (json.ret == 200) {
				this.setData({
					list: json.data.concat(json.data)
				})
			}
		})
	},
	init() {
		let systemInfo = wx.getSystemInfoSync();
		let reg = /ios/i;
		let pt = 20; //导航状态栏上内边距
		let h = 44; //导航状态栏高度
		if (reg.test(systemInfo.system)) {
			pt = systemInfo.statusBarHeight;
			h = 44;
		} else {
			pt = systemInfo.statusBarHeight;
			h = 48;
		}
		this.setData({
			contentHeight: systemInfo.windowHeight - pt - h
		})
	},
	getnext() {

	},
	toused() {
		wx.navigateTo({
			url: './used'
		})
	}
})