|
@@ -20,8 +20,9 @@
|
|
import topInfo from '@/layout/common/topInfo.vue';
|
|
import topInfo from '@/layout/common/topInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
import mainData from '@/layout/index/mainData.vue';
|
|
import mainData from '@/layout/index/mainData.vue';
|
|
-import { createNamespacedHelpers } from 'vuex';
|
|
|
|
const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
|
+const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
@@ -38,11 +39,17 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.getDate();
|
|
this.getDate();
|
|
this.searchInfo();
|
|
this.searchInfo();
|
|
|
|
+ this.searchSite();
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
mounted() {},
|
|
mounted() {},
|
|
methods: {
|
|
methods: {
|
|
...lesson({ lessionInfo: 'fetch', lessionlist: 'query' }),
|
|
...lesson({ lessionInfo: 'fetch', lessionlist: 'query' }),
|
|
|
|
+ ...mapStudent(['fetch']),
|
|
|
|
+ async searchSite() {
|
|
|
|
+ const res = await this.fetch('5e4f3d096a90e861b0f30871');
|
|
|
|
+ sessionStorage.setItem('site', JSON.stringify(res.data));
|
|
|
|
+ },
|
|
async searchInfo({ ...info } = {}) {
|
|
async searchInfo({ ...info } = {}) {
|
|
const res = await this.lessionlist({ ...info });
|
|
const res = await this.lessionlist({ ...info });
|
|
for (const val of res.data) {
|
|
for (const val of res.data) {
|