Commit bfbe5096 authored by wykolor's avatar wykolor

feat: 处理消息跳转

parent 1007be26
......@@ -87,6 +87,7 @@ import { computed, defineComponent, onMounted, reactive, toRefs } from "vue";
import { bonusModel } from "@/server/api";
import { useStore } from "vuex";
import { useNativeBridge } from "@/util/use-native-bridge";
import { useRoute } from "vue-router";
interface BonusList {
addList: BonusListResponse[];
......@@ -95,6 +96,7 @@ interface BonusList {
const BonusDetail = defineComponent({
setup() {
const store = useStore();
const route = useRoute();
const bonusStoreState = computed(() => store.state.bonus);
const pageAdd = reactive({
pageSize: 10,
......@@ -107,7 +109,7 @@ const BonusDetail = defineComponent({
finished: false
});
const state = reactive({
active: "REDUCE",
active: route.query.active || "REDUCE",
loading: false,
finished: false,
error: false,
......@@ -131,7 +133,7 @@ const BonusDetail = defineComponent({
state.refreshing = false;
}
const params = {
studentId: bonusStoreState.value.studentId,
studentId: route.query.studentId || bonusStoreState.value.studentId,
flowType: state.active === FlowType.ADD ? "ADD" : "REDUCE",
pageSize: state.active === FlowType.ADD ? pageAdd.pageSize : pageReduce.pageSize,
pageNum: state.active === FlowType.ADD ? pageAdd.pageNum : pageReduce.pageNum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment