66 lines
1.2 KiB
JavaScript
66 lines
1.2 KiB
JavaScript
let App = getApp();
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
list: [],
|
|
signCount:0
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
// 获取帮助列表
|
|
this.getImageData();
|
|
this.getMedal();
|
|
this.getSingCount();
|
|
},
|
|
/**
|
|
* 获取图片设置数据
|
|
*/
|
|
getImageData: function() {
|
|
let _this = this;
|
|
App._get('wxapp/imageSet', {}, function(result) {
|
|
console.log(result.data);
|
|
_this.setData({imageSet:result.data.new_values});
|
|
});
|
|
},
|
|
//打卡次数统计
|
|
getSingCount: function() {
|
|
let _this = this;
|
|
App._post_form('footchina/getSignCount', {
|
|
topic_id:10003,
|
|
user_id: wx.getStorageSync('user_id')
|
|
}, result => {
|
|
console.log(result.data.data);
|
|
_this.setData({
|
|
signCount: result.data.data
|
|
});
|
|
console.log('signCount',_this.data.signCount);
|
|
|
|
});
|
|
|
|
},
|
|
//获取勋章等级
|
|
getMedal: function() {
|
|
let _this = this;
|
|
App._post_form('footchina/getMedal', {}, result => {
|
|
this.setData({
|
|
list: result.data.data
|
|
});
|
|
});
|
|
|
|
},
|
|
|
|
}) |