add point rule sort

This commit is contained in:
Timi
2026-08-19 16:12:12 +08:00
parent 84bc6d137d
commit f4fb604f53
7 changed files with 193 additions and 41 deletions
+10
View File
@@ -73,6 +73,7 @@ import { type DropdownValue, Toast } from "tdesign-mobile-vue";
import EventAPI from "@/api/EventAPI";
import PointAPI from "@/api/PointAPI";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import { useNavBarStore } from "@/store/navBarStore";
import type { EventItem } from "@/types/EventItem";
import type { PointRule, PointRuleStatus } from "@/types/Point";
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
@@ -85,6 +86,7 @@ defineOptions({
});
const router = useRouter();
const navBarStore = useNavBarStore();
const userStore = useUserStore();
const currentStoreStore = useCurrentStoreStore();
@@ -297,12 +299,20 @@ async function preparePage(): Promise<void> {
}
onMounted(async () => {
navBarStore.clearRight();
if (userStore.hasPermissions(permissionCodes.pointRule.update)) {
navBarStore.setRightText("排序", "var(--td-brand-color)", () => {
router.push("/management/points/rules/sort");
});
}
try {
await preparePage();
} catch {
Toast.error("积分规则页面加载失败");
}
});
onUnmounted(() => navBarStore.clearRight());
</script>
<style scoped lang="less">