|
|
|
@ -31,12 +31,16 @@ |
|
|
|
|
mapActions |
|
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
|
import useQuestionStore from '@/jtools/store/question' //引入store |
|
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
|
import { |
|
|
|
|
querySysConfigList, |
|
|
|
|
} from '@/jtools/api/question'; |
|
|
|
|
import Subject1 from "./components/Subject1"; |
|
|
|
|
import Subject2 from "./components/Subject2"; |
|
|
|
|
import { |
|
|
|
|
queryActivityList, |
|
|
|
|
} from '@/jtools/api/activity'; |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
Subject1, |
|
|
|
@ -52,7 +56,7 @@ |
|
|
|
|
categoryList: [], |
|
|
|
|
rightList: storage.get(`rightList_subject${this.subject}`) || [], |
|
|
|
|
wrongList: storage.get(`wrongList_subject${this.subject}`) || [], |
|
|
|
|
activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'] |
|
|
|
|
activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
@ -65,6 +69,7 @@ |
|
|
|
|
if(this.subject=='2'||this.subject=='3'){ |
|
|
|
|
this.$refs.subjectRef.getDiverType() |
|
|
|
|
} |
|
|
|
|
this.queryActivityList(); |
|
|
|
|
}, |
|
|
|
|
onHide(){ |
|
|
|
|
this.show=false |
|
|
|
@ -119,10 +124,40 @@ |
|
|
|
|
}, 100) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//查询活动列表 |
|
|
|
|
queryActivityList(){ |
|
|
|
|
// console.log(this.user) |
|
|
|
|
// console.log(useUserStore().userInfo) |
|
|
|
|
// this.activityList = null; |
|
|
|
|
// uni.request({ |
|
|
|
|
// url: 'http://localhost:8089/applet/activity/list', |
|
|
|
|
// method: 'get', |
|
|
|
|
// data: {'schoolId': useUserStore().userInfo.schoolId} |
|
|
|
|
// }).then(resp => { |
|
|
|
|
// console.log(".....") |
|
|
|
|
// console.log(resp) |
|
|
|
|
// if(resp.data.code == 200) { |
|
|
|
|
// this.activityList = resp.data.data |
|
|
|
|
// console.log("*****") |
|
|
|
|
// console.log(resp.data) |
|
|
|
|
// console.log(resp.data.data) |
|
|
|
|
// console.log(this.activityList) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
queryActivityList({schoolId: this.user.schoolId}).then(resp => { |
|
|
|
|
this.activityList = resp.data; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 去活动 |
|
|
|
|
handleToActivity(index) { |
|
|
|
|
let detailId; |
|
|
|
|
this.activityList.find((item, index1) => { |
|
|
|
|
if(index === index1){ |
|
|
|
|
detailId = item.detailId; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/index/activity' |
|
|
|
|
url: '/pages/index/activity?detailId='+detailId, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|