var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js"); var e = getApp(), app = e, s = e.globalData.setting, os = s, app_d = e.globalData; var regeneratorRuntime = require('../../../utils/runtime.js'); Page({ /** * 页面的初始数据 */ data: { iurl: s.imghost, user:app_d.userInfo, zl_act:null, //助力活动 }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { this.init(); }, // ----初始化---- init:function() { var user_id = getApp().globalData.user_id; var store_id = os.stoid; var th=this; getApp().request.promiseGet("http://172.20.3.102:8022/api/weshop/zl_act", { data: { user_id: user_id, store_id: store_id } }).then(res => { if(res.data.code==0) th.setData({zl_act:res.data.data}) }) }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })