细节完善
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user