|
@@ -1,6 +1,7 @@
|
|
|
const app = getApp()
|
|
|
import {
|
|
|
- getActivities
|
|
|
+ getActivities,
|
|
|
+ getActivitiesNew
|
|
|
} from '~/api/global'
|
|
|
import {
|
|
|
storeBindingsBehavior
|
|
@@ -17,7 +18,7 @@ Component({
|
|
|
},
|
|
|
},
|
|
|
properties: {
|
|
|
- //1活动 2排行榜,3:由外部传参
|
|
|
+ //1活动 2排行榜,3:由外部传参,4:只拿邀新活动
|
|
|
classify: {
|
|
|
type: Number,
|
|
|
value: 1
|
|
@@ -25,9 +26,9 @@ Component({
|
|
|
dataList: {
|
|
|
type: Array,
|
|
|
value: [],
|
|
|
- observer(value){
|
|
|
+ observer(value) {
|
|
|
this.setData({
|
|
|
- activityList:value
|
|
|
+ activityList: value
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -60,13 +61,21 @@ Component({
|
|
|
this.data.dsqList.forEach(item => {
|
|
|
clearInterval(item)
|
|
|
})
|
|
|
+ let activityList = []
|
|
|
if (this.properties.classify == '3') {
|
|
|
return
|
|
|
+ } else if (this.properties.classify == '4') {
|
|
|
+ activityList = await getActivitiesNew({
|
|
|
+ type: 9,
|
|
|
+ grade: this.data.userInfo.grade
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ activityList = await getActivities({
|
|
|
+ classify: this.properties.classify,
|
|
|
+ grade: this.data.userInfo.grade
|
|
|
+ })
|
|
|
}
|
|
|
- let activityList = await getActivities({
|
|
|
- classify: this.properties.classify,
|
|
|
- grade: this.data.userInfo.grade
|
|
|
- })
|
|
|
+
|
|
|
this.setData({
|
|
|
activityList,
|
|
|
})
|