���Root Mod By V1rus_Alfa
User / IP
:
216.73.216.158
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.2
/
server
/
chunks
/
build
/
Viewing: register-otp-rganpp7S.mjs
import { c as useLocalePath, q as useRoute, j as useToast, b as useI18n, n as navigateTo, a as __nuxt_component_0$3, d as __nuxt_component_2$3, k as __nuxt_component_4$1, s as useRuntimeConfig } from './server.mjs'; import { ref, reactive, mergeProps, unref, withCtx, createTextVNode, toDisplayString, openBlock, createBlock, createCommentVNode, useSSRContext } from 'vue'; import { u as useFetch } from './fetch-5zL7LryB.mjs'; import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrRenderComponent } from 'vue/server-renderer'; import { u as useMainStore } from './index-DviQ8Cgo.mjs'; import '../runtime.mjs'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; import 'unhead'; import '@unhead/shared'; import 'vue-router'; import '@vueuse/core'; import 'tailwind-merge'; import '@iconify/vue'; import '@iconify/utils/lib/css/icon'; import 'js-cookie'; const _sfc_main = { __name: "register-otp", __ssrInlineRender: true, setup(__props) { const MainStore = useMainStore(); const localePath = useLocalePath(); const route = useRoute(); const config = useRuntimeConfig(); ref(""); const loading = ref(false); const toast = useToast(); const { t, locale } = useI18n(); const state = reactive({ code: void 0 }); async function login() { if (!route.query.mobile) { return toast.add({ title: t("validate_mobile"), color: "orange" }); } if (!state.code) { return toast.add({ title: t("validate_code"), color: "orange" }); } loading.value = true; await useFetch(config.public.API_URL + "/auth/login", { method: "POST", body: { mobile: route.query.mobile, code: state.code, lng: locale._value }, onRequest({ request, options }) { options.headers = options.headers || {}; options.headers.Accept = "application/json"; }, onResponse({ request, response, options }) { var _a; console.log("register otp response", response); let responseStatus = response.status; let responseData = response._data; if (responseStatus !== 200) { loading.value = false; return toast.add({ title: (_a = response._data) == null ? void 0 : _a.message, color: "orange" }); } if (responseStatus === 200) { if ((responseData == null ? void 0 : responseData.status) === "error") { loading.value = false; return toast.add({ title: responseData == null ? void 0 : responseData.message, color: "orange" }); } if (responseData == null ? void 0 : responseData.token) { MainStore.SetToken(responseData.token); navigateTo(localePath("/"), { external: true }); } } } }, "$BS38sE1HoP"); } return (_ctx, _push, _parent, _attrs) => { const _component_nuxtLink = __nuxt_component_0$3; const _component_ClientOnly = __nuxt_component_2$3; const _component_UButton = __nuxt_component_4$1; _push(`<section${ssrRenderAttrs(mergeProps({ class: "w-full mx-auto mt-[6.5rem]" }, _attrs))}><div class="min-h-screen flex flex-col justify-between pt-[4rem]"><div><div class="mb-4 relative w-full"><span class="text-base text-center flex justify-center items-center text-gray-600 mb-14 bold"></span><span${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="text-xs text-center flex justify-center items-center text-gray-600 mb-16 md:mb-24">${ssrInterpolate(unref(t)("send_code_1"))} \xA0 <strong class="text-main-700">${ssrInterpolate(unref(route).query.mobile ? unref(route).query.mobile : " ")}</strong> \xA0 ${ssrInterpolate(unref(t)("send_code_2"))}</span></div><div dir="rtl" class="mb-10">`); _push(ssrRenderComponent(_component_nuxtLink, { to: unref(localePath)("/login"), class: "block text-sm bold underline cursor-pointer text-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`${ssrInterpolate(unref(t)("edit_phone"))}`); } else { return [ createTextVNode(toDisplayString(unref(t)("edit_phone")), 1) ]; } }), _: 1 }, _parent)); _push(`</div><div class="py-4 text-center md:mb-10 flex justify-center items-center" dir="ltr">`); _push(ssrRenderComponent(_component_ClientOnly, null, {}, _parent)); _push(`</div><div class="pt-10 w-full text-center">`); _push(ssrRenderComponent(_component_UButton, { loading: unref(loading), square: "", onClick: ($event) => login(), class: "xsm:w-10/12 lg:w-8/12 md:w-9/12 mx-auto block text-center border bold h-10 bg-main-700 text-white text-xs md:text-sm w-full rounded overflow-hidden" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { if (unref(loading) == false) { _push2(`<span class="block px-2 text-xs truncate"${_scopeId}>${ssrInterpolate(unref(t)("Confirm"))}</span>`); } else { _push2(`<!---->`); } } else { return [ unref(loading) == false ? (openBlock(), createBlock("span", { key: 0, class: "block px-2 text-xs truncate" }, toDisplayString(unref(t)("Confirm")), 1)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(`</div></div></div></section>`); }; } }; const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/login/register-otp.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=register-otp-rganpp7S.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa