<template>
  <div @click.capture="onClick">
    <slot></slot>
  </div>
</template>
<script setup>
import { useQuasar } from "quasar";
import { useSelfStore } from "stores/self";
import { useRouter } from "vue-router";
const store = useSelfStore();
const router = useRouter();
const $q = useQuasar();
function onClick(event) {
  if (store.user?.has_pay_password) {
    return;
  }
  event.preventDefault();
  event.stopPropagation();
  $q.dialog({
    title: "系统提示",
    message: "为了您的资金安全请先设置支付密码",
    cancel: true,
    ok: '去设置'
  }).onOk(() => {
    router.push("/my/change_pay_pwd");
  });
}
</script>
