|
|
@ -31,12 +31,16 @@ |
|
|
|
mapActions |
|
|
|
mapActions |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
import useQuestionStore from '@/jtools/store/question' //引入store |
|
|
|
import useQuestionStore from '@/jtools/store/question' //引入store |
|
|
|
|
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import { |
|
|
|
import { |
|
|
|
querySysConfigList, |
|
|
|
querySysConfigList, |
|
|
|
} from '@/jtools/api/question'; |
|
|
|
} from '@/jtools/api/question'; |
|
|
|
import Subject1 from "./components/Subject1"; |
|
|
|
import Subject1 from "./components/Subject1"; |
|
|
|
import Subject2 from "./components/Subject2"; |
|
|
|
import Subject2 from "./components/Subject2"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
queryActivityList, |
|
|
|
|
|
|
|
} from '@/jtools/api/activity'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
Subject1, |
|
|
|
Subject1, |
|
|
@ -52,7 +56,7 @@ |
|
|
|
categoryList: [], |
|
|
|
categoryList: [], |
|
|
|
rightList: storage.get(`rightList_subject${this.subject}`) || [], |
|
|
|
rightList: storage.get(`rightList_subject${this.subject}`) || [], |
|
|
|
wrongList: storage.get(`wrongList_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() { |
|
|
|
onShow() { |
|
|
@ -65,6 +69,7 @@ |
|
|
|
if(this.subject=='2'||this.subject=='3'){ |
|
|
|
if(this.subject=='2'||this.subject=='3'){ |
|
|
|
this.$refs.subjectRef.getDiverType() |
|
|
|
this.$refs.subjectRef.getDiverType() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.queryActivityList(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onHide(){ |
|
|
|
onHide(){ |
|
|
|
this.show=false |
|
|
|
this.show=false |
|
|
@ -119,10 +124,40 @@ |
|
|
|
}, 100) |
|
|
|
}, 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) { |
|
|
|
handleToActivity(index) { |
|
|
|
|
|
|
|
let detailId; |
|
|
|
|
|
|
|
this.activityList.find((item, index1) => { |
|
|
|
|
|
|
|
if(index === index1){ |
|
|
|
|
|
|
|
detailId = item.detailId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/activity' |
|
|
|
url: '/pages/index/activity?detailId='+detailId, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|