{"id":31337,"date":"2024-07-05T17:44:48","date_gmt":"2024-07-05T09:44:48","guid":{"rendered":"https:\/\/www.goglobalsafe.com\/?page_id=31337"},"modified":"2024-07-05T18:07:50","modified_gmt":"2024-07-05T10:07:50","slug":"reset-password","status":"publish","type":"page","link":"https:\/\/www.goglobalsafe.com\/zh\/reset-password\/","title":{"rendered":"\u8d26\u6237\u91cd\u7f6e\u5bc6\u7801"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"31337\" class=\"elementor elementor-31337\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0d09e25 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"0d09e25\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8c6663e\" data-id=\"8c6663e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-51df612 elementor-widget elementor-widget-shortcode\" data-id=\"51df612\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><link href=\"\/wp-content\/static\/js\/select2.css\" rel=\"stylesheet\">\n<script src=\"\/wp-content\/static\/js\/select2.js\"><\/script>\n<script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n<script src=\"\/wp-content\/static\/js\/vue.global.js\"><\/script>\n<script src=\"\/wp-content\/static\/js\/axios.min.js\"><\/script>\n<style>\n    @media (max-width: 768px) {\n        .diyform .img1,.diyform .img2{\n            display: none;\n        }\n        .mail_title {\n            display: none;\n        }\n    }\n    .diyform {\n        position: relative;\n    }\n    .diyform .img1 {\n        width: 198px;\n        height: auto;\n        right: 2rem;\n        top: -8rem;\n    }\n    .diyform img{\n        position:absolute;\n    }\n    .mail_name {\n        font-family: \"Archivo Black\", sans-serif;\n        font-style: normal;\n    }\n    .subtitle {\n        font-family: \"PingFang Heavy\", sans-serif;\n        font-style: normal;\n    }\n\n<\/style>\n<div id=\"app\" class=\"app\" data-no-translation=\"\">\n    <!--loading-->\n    <div v-if=\"loading\" class=\"w-full h-full fixed top-0 left-0 bg-white opacity-75 z-50\">\n        <div class=\"flex justify-center items-center mt-[50vh]\">\n            <div class=\"h-8 w-8 bg-black rounded-full animate-bounce mr-2\"><\/div>\n            <div class=\"h-8 w-8 bg-black rounded-full animate-bounce mr-2\" style=\"animation-delay: -0.3s;\"><\/div>\n            <div class=\"h-8 w-8 bg-black rounded-full animate-bounce\"><\/div>\n        <\/div>\n    <\/div>\n    <!-- \u975e\u6cd5\u8bf7\u6c42 -->\n    <div v-if=\"request_status\" class=\"min-h-screen\">\n        <main class=\"grid min-h-full place-items-center px-6 py-24 sm:py-32 lg:px-8\">\n            <div class=\"text-center\">\n                <h1 class=\"mt-4 text-3xl font-bold tracking-tight text-gray-900 sm:text-5xl\">{{request_message}}<\/h1>\n                <p class=\"mt-6 text-base leading-7 text-gray-600\">Sorry, we couldn\u2019t find the page you\u2019re looking for.<\/p>\n                <div class=\"mt-10 flex items-center justify-center gap-x-6\">\n                    <a href=\"\/student-login\" class=\"rounded-md bg-cyan-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm\">Go back home<\/a>\n                <\/div>\n            <\/div>\n        <\/main>\n    <\/div>\n    <!-- \u6ce8\u518c\u8868\u5355 -->\n    <div v-if=\"!request_status\" class=\"items-center  w-auto md:mt-48 mt-36 my-44\">\n        <div class=\"grid sm:grid-cols-2 items-center gap-12 p-4 mx-auto max-w-4xl bg-white shadow-[0_2px_10px_-3px_rgba(6,81,237,0.3)] rounded-md text-[#333] font-[sans-serif]\">\n            <div class=\"md:space-y-12 md:mb-42 mail_title\">\n                <div class=\"relative w-full\">\n                    <div class=\"absolute w-full\">\n                        <img decoding=\"async\" src=\"https:\/\/www.goglobalsafe.com\/zh\/Vector61.svg\" alt=\"Background\" class=\"w-full h-auto\" style=\"position: absolute; top: -4.25rem; left: 0; height: 250px; width: 276px;\">\n                    <\/div>\n                    <div class=\"relative mt-3 text-center\">\n                        <span class=\"text-black mail_name md:text-5xl text-xl font-bold\">{{main_title}}<\/span>\n                    <\/div>\n                    <p class=\"text-lg subtitle text-black text-center mt-3\">{{subtitle}}<\/p>\n                <\/div>\n                <div class=\"mt-12 flex justify-center\">\n                    <img decoding=\"async\" src=\"https:\/\/www.goglobalsafe.com\/zh\/wp-content\/static\/img\/login.svg\" alt=\"Background\" class=\"w-80 h-auto\">\n                <\/div>\n            <\/div>\n            <div class=\"space-y-4 mt-4\">\n                <div class=\"flex justify-center mb-15\">\n                    <img decoding=\"async\" src=\"https:\/\/www.goglobalsafe.com\/zh\/wp-content\/static\/img\/login-2.svg\" alt=\"Logo\" class=\"h-auto w-32\">\n                <\/div>\n                <div v-if=\"reset_success\" class=\"my-40\">\n                    <!-- Main Hero Content -->\n                    <div class=\"mx-auto text-left md:max-w-none md:text-center\">\n                        <h4 class=\"text-5xl font-extrabold leading-10 tracking-tight  text-black text-center sm:leading-none md:text-6xl lg:text-7xl\">\n                            <span class=\"relative mt-2 text-transparent bg-clip-text bg-gradient-to-br from-indigo-600 border-black md:inline-block\">Password reset successfully<\/span>\n                        <\/h4>\n                    <\/div>\n                    <!-- End Main Hero Content -->\n                <\/div>\n                <form v-if=\"!reset_success\" @submit.prevent=\"handleSubmit\" class=\"subtitle p-4 space-y-2\" action=\"\">\n                    <div>\n                        <label for=\"name\" class=\"block text-sm font-medium text-black\">New Password<\/label>\n                        <input type=\"text\" id=\"new_password\" placeholder=\"Name\" v-model=\"formData.new_password\" class=\"w-full rounded-md text-black py-2.5 px-4 border bg-teal-300 text-sm\" style=\"background-color:#E7F0FE;color:black\"\/>\n                    <\/div>\n                    <div>\n                        <span class=\"text-red-500 font-bold text-xs mt-1 subtitle\" v-if=\"errors.passwordMessage\">{{ errors.passwordMessage }}<\/span>\n                        <label for=\"password\" class=\"block text-sm font-medium text-black\">Confirm Password<\/label>\n                        <input type=\"password\" id=\"new_password_confirmation\" required placeholder=\"Password\" v-model=\"formData.new_password_confirmation\" class=\"w-full rounded-md text-black py-2.5 px-4 border bg-teal-300 text-sm\" style=\"background-color:#E7F0FE;color:black\"\/>\n                    <\/div>\n                    <div style=\"padding-top:20px\">\n                        <button type=\"submit\" class=\"text-white bg-[#007bff] hover:bg-blue-600 font-semibold rounded-md text-sm px-4 py-2.5 w-full\" style=\"background-color:#1558DA\">Reset Password<\/button>\n                    <\/div>\n                <input type=\"hidden\" name=\"trp-form-language\" value=\"zh\"\/><\/form>\n\n            <\/div>\n\n        <\/div>\n    <\/div>\n\n<\/div>\n<script>\n    const { createApp,ref,onMounted} = Vue;\n    createApp({\n        setup(){\n            const main_title = ref('Prepare to reset your password')\n            const subtitle = ref('Enter new password to reset')\n            const errors = ref({});\n            const request_status = ref(false)\n            const reset_success = ref(false)\n            const email = ref();\n            const user_token = ref();\n            const request_message = ref();\n            const verify_url = 'https:\/\/agent.goglobalsafe.com\/api\/v1\/student\/email\/verify\/token';\n            const rest_pwd_api = 'https:\/\/agent.goglobalsafe.com\/api\/v1\/student\/email\/reset\/password';\n            const formData = ref({\n                new_password:'',\n                new_password_confirmation:''\n            })\n            const loading = ref(true)\n            const Register_validate=()=>{\n                errors.value.passwordMessage = null;\n                \/\/\u68c0\u6d4b\u65b0\u5bc6\u7801\u662f\u5426\u5c0f\u4e8e6\u4f4d\n                if (formData.value.new_password.length <= 6){\n                    errors.value.passwordMessage = 'Password security is too low. Cannot be less than 6 characters.'\n                    console.log(errors.value.passwordMessage);\n                    return false;\n                }\n                \/\/\u68c0\u6d4b\u65b0\u5bc6\u7801\u662f\u5426\u662f\u4e2d\u6587\u5b57\u7b26\n                const chineseRegex = \/[\\u4e00-\\u9fa5]\/;\n                if (chineseRegex.test(formData.value.new_password)) {\n                    errors.value.passwordMessage = 'Password cannot contain Chinese characters.';\n                    console.log(errors.value.passwordMessage);\n                    return false;\n                }\n                if (formData.value.new_password !== formData.value.new_password_confirmation) {\n                    errors.value.passwordMessage = 'The password you entered is inconsistent'\n                    console.log(errors.value.passwordMessage);\n                    return false;\n                }\n                return true\n            }\n            const handleSubmit = async ()=>{\n                let status = Register_validate()\n                if (status){\n                    loading.value = true;\n                    console.log('\u7ecf\u8fc7\u9a8c\u8bc1')\n                    errors.value.passwordMessage = null\n                    try {\n                        const response = await axios.post(rest_pwd_api,{\n                            token:user_token.value,\n                            email:email.value,\n                            new_password:formData.value.new_password,\n                            new_password_confirmation:formData.value.new_password_confirmation\n                        })\n                        console.log(response);\n                        if (response.status === 200){\n                            reset_success.value = true\n                            setTimeout(function (){\n                                window.location.href = '\/student-login'\n                            },1500)\n                        }\n                    }catch (error){\n                        console.log(error)\n                        errors.value.passwordMessage = error.response.data.message\n                    } finally {\n                        loading.value = false\n                    }\n\n                }\n            }\n            const verify_rest = async ()=>{\n                const token = new URLSearchParams(window.location.search).get('token');\n                user_token.value = token\n                if (!token){\n                    loading.value = false\n                    \/\/\u663e\u793a\u9519\u8bef\u4fe1\u606f\n                    request_status.value = true\n                    request_message.value = 'No Token'\n                    return;\n                }\n                try {\n                    \/\/\u5408\u6cd5\u8bf7\u6c42\n                    const response = await axios.post(verify_url,{\n                        token\n                    });\n                    loading.value = false\n                    console.log(response);\n                    email.value = response.data.data.email\n                }catch (error){\n                    request_status.value = true\n                    loading.value = false\n                    console.log(error)\n                    if (error.response){\n                        request_message.value = error.response.data.message\n                    }else {\n                        request_message.value = 'network anomaly!'\n                    }\n                }\n\n            }\n            onMounted(()=>{\n                \/\/\u9a8c\u8bc1\u5408\u6cd5\u8bf7\u6c42\n                verify_rest()\n            })\n            return {\n                main_title,\n                subtitle,\n                formData,\n                handleSubmit,\n                errors,\n                loading,\n                request_status,\n                request_message,\n                reset_success\n            }\n        }\n    }).mount(\"#app\")\n\n<\/script><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"enabled","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"class_list":["post-31337","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.6 (Yoast SEO v26.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Account-reset-password | GoGlobalsafe-\u7559\u5b66\u751f\u4fdd\u9669\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.goglobalsafe.com\/zh\/reset-password\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Account-reset-password\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.goglobalsafe.com\/zh\/reset-password\/\" \/>\n<meta property=\"og:site_name\" content=\"GoGlobalsafe-\u7559\u5b66\u751f\u4fdd\u9669\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-05T10:07:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.goglobalsafe.com\/reset-password\/\",\"url\":\"https:\/\/www.goglobalsafe.com\/reset-password\/\",\"name\":\"Account-reset-password | GoGlobalsafe-\u7559\u5b66\u751f\u4fdd\u9669\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848\",\"isPartOf\":{\"@id\":\"https:\/\/www.goglobalsafe.com\/#website\"},\"datePublished\":\"2024-07-05T09:44:48+00:00\",\"dateModified\":\"2024-07-05T10:07:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.goglobalsafe.com\/reset-password\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.goglobalsafe.com\/reset-password\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.goglobalsafe.com\/reset-password\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.goglobalsafe.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Account-reset-password\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.goglobalsafe.com\/#website\",\"url\":\"https:\/\/www.goglobalsafe.com\/\",\"name\":\"GoGlobalSafe Student Insurance\",\"description\":\"Your Health, Our Priority\",\"publisher\":{\"@id\":\"https:\/\/www.goglobalsafe.com\/#organization\"},\"alternateName\":\"GoGlobalSafe international student insurance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.goglobalsafe.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.goglobalsafe.com\/#organization\",\"name\":\"Golobal student consulting limited\",\"alternateName\":\"GoGlobalSafe\",\"url\":\"https:\/\/www.goglobalsafe.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.goglobalsafe.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO3.png\",\"contentUrl\":\"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO3.png\",\"width\":500,\"height\":140,\"caption\":\"Golobal student consulting limited\"},\"image\":{\"@id\":\"https:\/\/www.goglobalsafe.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u8d26\u6237-\u91cd\u7f6e-\u5bc6\u7801 | GoGlobalsafe-\u5546\u52a1\u5546\u52a1\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.goglobalsafe.com\/zh\/reset-password\/","og_locale":"zh_CN","og_type":"article","og_title":"Account-reset-password","og_url":"https:\/\/www.goglobalsafe.com\/zh\/reset-password\/","og_site_name":"GoGlobalsafe-\u7559\u5b66\u751f\u4fdd\u9669\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848","article_modified_time":"2024-07-05T10:07:50+00:00","og_image":[{"width":1000,"height":1000,"url":"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.goglobalsafe.com\/reset-password\/","url":"https:\/\/www.goglobalsafe.com\/reset-password\/","name":"\u8d26\u6237-\u91cd\u7f6e-\u5bc6\u7801 | GoGlobalsafe-\u5546\u52a1\u5546\u52a1\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848","isPartOf":{"@id":"https:\/\/www.goglobalsafe.com\/#website"},"datePublished":"2024-07-05T09:44:48+00:00","dateModified":"2024-07-05T10:07:50+00:00","breadcrumb":{"@id":"https:\/\/www.goglobalsafe.com\/reset-password\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.goglobalsafe.com\/reset-password\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.goglobalsafe.com\/reset-password\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.goglobalsafe.com\/"},{"@type":"ListItem","position":2,"name":"Account-reset-password"}]},{"@type":"WebSite","@id":"https:\/\/www.goglobalsafe.com\/#website","url":"https:\/\/www.goglobalsafe.com\/","name":"GoGlobalSafe \u5b66\u751f\u4fdd\u9669","description":"\u60a8\u7684\u5065\u5eb7\uff0c\u6211\u4eec\u7684\u9996\u8981\u4efb\u52a1","publisher":{"@id":"https:\/\/www.goglobalsafe.com\/#organization"},"alternateName":"GoGlobalSafe international student insurance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.goglobalsafe.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.goglobalsafe.com\/#organization","name":"\u73af\u7403\u5b66\u751f\u54a8\u8be2\u6709\u9650\u516c\u53f8","alternateName":"GoGlobalSafe","url":"https:\/\/www.goglobalsafe.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.goglobalsafe.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO3.png","contentUrl":"https:\/\/www.goglobalsafe.com\/wp-content\/uploads\/2023\/04\/LOGO3.png","width":500,"height":140,"caption":"Golobal student consulting limited"},"image":{"@id":"https:\/\/www.goglobalsafe.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/pages\/31337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/comments?post=31337"}],"version-history":[{"count":8,"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/pages\/31337\/revisions"}],"predecessor-version":[{"id":31345,"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/pages\/31337\/revisions\/31345"}],"wp:attachment":[{"href":"https:\/\/www.goglobalsafe.com\/zh\/wp-json\/wp\/v2\/media?parent=31337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}