细节完善

This commit is contained in:
kron
2025-07-18 22:17:17 +08:00
parent 115e0cefbb
commit c8728786e6
12 changed files with 41 additions and 51 deletions

View File

@@ -7,6 +7,10 @@ import BowData from "@/components/BowData.vue";
import UserUpgrade from "@/components/UserUpgrade.vue";
import { wxShare } from "@/util";
import { directionAdjusts } from "@/constants";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const props = defineProps({
onClose: {
type: Function,
@@ -42,7 +46,7 @@ const closePanel = () => {
}, 300);
};
onMounted(() => {
if (props.result.lvl) {
if (props.result.lvl > user.value.lvl) {
showUpgrade.value = true;
}
if (props.result.arrows) {

View File

@@ -20,7 +20,9 @@ const props = defineProps({
},
});
onMounted(() => {
updateUser({ ...user.value, lvl: props.lvl });
if (props.lvl > user.value.lvl) {
updateUser({ ...user.value, lvl: props.lvl });
}
});
</script>