|
@@ -1,4 +1,6 @@
|
|
|
// nova-werun/pages/activity/index.js
|
|
|
+const Parse = getApp().Parse;
|
|
|
+const company = getApp().globalData.company;
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -12,6 +14,8 @@ Page({
|
|
|
contentHeight: 0, // 可用内容高度
|
|
|
contentHeight2: 0,
|
|
|
contentpadding: 0, //顶部padding高度
|
|
|
+
|
|
|
+ ActivityList:[],
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -36,6 +40,8 @@ Page({
|
|
|
contentpadding,
|
|
|
contentHeight
|
|
|
});
|
|
|
+
|
|
|
+ this.getact()
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -85,5 +91,22 @@ Page({
|
|
|
*/
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ //活动列表
|
|
|
+ async getact() {
|
|
|
+ let Activityquery = new Parse.Query('Activity');
|
|
|
+ Activityquery.equalTo('company', company);
|
|
|
+ Activityquery.notEqualTo('isDeleted', true);
|
|
|
+ Activityquery.equalTo('isEnabled', true);
|
|
|
+ Activityquery.ascending('index'); // 按index升序排序
|
|
|
+
|
|
|
+ let P = await Activityquery.find();
|
|
|
+ let ActivityList = P.map(item => item.toJSON());
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ ActivityList,
|
|
|
+ });
|
|
|
+
|
|
|
+ console.log(ActivityList);
|
|
|
+ },
|
|
|
})
|