|
@@ -92,7 +92,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, onActivated } from 'vue';
|
|
|
+import { ref, watch, onActivated } from 'vue';
|
|
|
import { PageQueryMyJoinCourseList_Student } from '@/api/table';
|
|
|
import {
|
|
|
GetFinishStatusList_Course,
|
|
@@ -100,6 +100,7 @@ import {
|
|
|
GetStudentCourseBuyStatusList
|
|
|
} from '@/api/select';
|
|
|
import { useList } from '@/utils/list';
|
|
|
+import i18n from '@/locales/i18n';
|
|
|
|
|
|
import MainMenu from '../components/MainMenu.vue';
|
|
|
|
|
@@ -140,14 +141,28 @@ onActivated(() => {
|
|
|
});
|
|
|
|
|
|
let finish_status_list = ref([]); // 完成状态列表
|
|
|
-GetFinishStatusList_Course().then(({ finish_status_list: list }) => {
|
|
|
- finish_status_list.value = list;
|
|
|
-});
|
|
|
+function getFinishStatusList_Course() {
|
|
|
+ GetFinishStatusList_Course().then(({ finish_status_list: list }) => {
|
|
|
+ finish_status_list.value = list;
|
|
|
+ });
|
|
|
+}
|
|
|
+getFinishStatusList_Course();
|
|
|
|
|
|
-let buy_status_list = ref([]); // 购买状态列表
|
|
|
-GetStudentCourseBuyStatusList().then(({ status_list }) => {
|
|
|
- buy_status_list.value = status_list;
|
|
|
-});
|
|
|
+let buy_status_list = ref([]); // 加入状态列表
|
|
|
+function getStudentCourseBuyStatusList() {
|
|
|
+ GetStudentCourseBuyStatusList().then(({ status_list }) => {
|
|
|
+ buy_status_list.value = status_list;
|
|
|
+ });
|
|
|
+}
|
|
|
+getStudentCourseBuyStatusList();
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => i18n.locale,
|
|
|
+ () => {
|
|
|
+ getStudentCourseBuyStatusList();
|
|
|
+ getFinishStatusList_Course();
|
|
|
+ }
|
|
|
+);
|
|
|
|
|
|
let teacher_list = ref([]);
|
|
|
GetMyJoinCourseTeacherList_Student().then(({ teacher_list: list }) => {
|