{"id":52882,"date":"2024-12-03T17:32:13","date_gmt":"2024-12-03T09:32:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52882\/"},"modified":"2024-12-03T17:32:13","modified_gmt":"2024-12-03T09:32:13","slug":"%e8%af%b7%e6%b1%82%e4%b8%ad%e6%ad%a2-ns_binding_abort-%e5%9c%a8-firefox-%e4%b8%ad%ef%bc%8c%e4%bd%86%e5%9c%a8%e5%85%b6%e4%bd%99%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%ad%e5%b7%a5%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52882\/","title":{"rendered":"\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span>    <\/p>\n<p>\u4ece\u73b0\u5728\u5f00\u59cb\uff0c\u6211\u4eec\u8981\u52aa\u529b\u5b66\u4e60\u5566\uff01\u4eca\u5929\u6211\u7ed9\u5927\u5bb6\u5e26\u6765<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c\u300b<\/span>\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8bf7\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427\uff01\u4e0b\u6587\u4e2d\u7684\u5185\u5bb9\u6211\u4eec\u4e3b\u8981\u4f1a\u6d89\u53ca\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u5728\u9605\u8bfb\u672c\u6587\u8fc7\u7a0b\u4e2d\u6709\u9047\u5230\u4e0d\u6e05\u695a\u7684\u5730\u65b9\uff0c\u6b22\u8fce\u7559\u8a00\u5440\uff01\u6211\u4eec\u4e00\u8d77\u8ba8\u8bba\uff0c\u4e00\u8d77\u5b66\u4e60\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241124\/17324258866742b89e3329c.jpg\" class=\"aligncenter\" title=\"\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c\u63d2\u56fe\" alt=\"\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c\u63d2\u56fe\" \/><\/p>\n<p>const \u767b\u5f55 = () =&gt; {<\/p>\n<p>&nbsp; const { isAuthenticated } = useSelector(<\/p>\n<p>&nbsp; &nbsp; (rootState: RootState) =&gt; rootState.auth<\/p>\n<p>&nbsp; );<\/p>\n<p>&nbsp; const router = useRouter();<\/p>\n<p>&nbsp; constdispatch = useDispatch();<\/p>\n<p>&nbsp; const searchParams = useSearchParams();<\/p>\n<p>&nbsp; const [isLoading, setIsLoading] = useState(false);<\/p>\n<p>&nbsp; const [passwordVisible, setPasswordVisible] = useState(false);<\/p>\n<p>&nbsp; consttogglePasswordVisibility = () =&gt; {<\/p>\n<p>&nbsp; &nbsp; setPasswordVisible(!passwordVisible);<\/p>\n<p>&nbsp; };<\/p>\n<p>&nbsp; const ValidationSchema = z.object({<\/p>\n<p>&nbsp; &nbsp; email: z.string().email(&#8220;\u8bf7\u8f93\u5165\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740&#8221;),<\/p>\n<p>&nbsp; &nbsp; \u5bc6\u7801\uff1az<\/p>\n<p>&nbsp; &nbsp; &nbsp; .string()<\/p>\n<p>&nbsp; &nbsp; &nbsp; .min(8, &#8220;\u5bc6\u7801\u5fc5\u987b\u81f3\u5c11\u4e3a 8 \u4e2a\u5b57\u7b26&#8221;)<\/p>\n<p>&nbsp; &nbsp; &nbsp; .max(20, &#8220;\u5bc6\u7801\u4e0d\u80fd\u8d85\u8fc720\u4e2a\u5b57\u7b26&#8221;),<\/p>\n<p>&nbsp; &nbsp;remember_me: z.boolean().\u53ef\u9009().default(false),<\/p>\n<p>&nbsp; });<\/p>\n<p>&nbsp; const [isPending, setIsPending] = useState(false);<\/p>\n<p>&nbsp; type ValidationSchemaType = z.infer;<\/p>\n<p>&nbsp; useEffect(() =&gt; {<\/p>\n<p>&nbsp; &nbsp; if (isAuthenticated) {<\/p>\n<p>&nbsp; &nbsp; &nbsp; router.push(&#8220;\/app&#8221;);<\/p>\n<p>&nbsp; &nbsp; }<\/p>\n<p>&nbsp; }, [\u5df2\u9a8c\u8bc1]);<\/p>\n<p>&nbsp; const {<\/p>\n<p>&nbsp; &nbsp;\u89c2\u770b\uff0c<\/p>\n<p>&nbsp; &nbsp; setValue,<\/p>\n<p>&nbsp; &nbsp; \u6ce8\u518c\uff0c<\/p>\n<p>&nbsp; &nbsp; \u5904\u7406\u63d0\u4ea4\uff0c<\/p>\n<p>&nbsp; &nbsp; formState: { \u9519\u8bef },<\/p>\n<p>&nbsp; } = useForm({<\/p>\n<p>&nbsp; &nbsp; \u89e3\u6790\u5668\uff1azodResolver(ValidationSchema),<\/p>\n<p>&nbsp; });<\/p>\n<p>&nbsp; const handleGetProfileData = async () =&gt; {<\/p>\n<p>&nbsp;&nbsp;\u5c1d\u8bd5{<\/p>\n<p>&nbsp; &nbsp; &nbsp; const response = wait axios.get(${API_URL}\/users\/api\/v1);<\/p>\n<p>&nbsp; &nbsp; &nbsp; const userData = \u54cd\u5e94?.data?.data;<\/p>\n<p>&nbsp; &nbsp; &nbsp; \u8fd4\u56de\u7528\u6237\u6570\u636e\uff1b<\/p>\n<p>&nbsp; &nbsp; } catch\uff08\u9519\u8bef\uff09{<\/p>\n<p>&nbsp; &nbsp; &nbsp; console.log(\u9519\u8bef);<\/p>\n<p>&nbsp; &nbsp; }<\/p>\n<p>&nbsp; };<\/p>\n<p>&nbsp; const onSubmit: SubmitHandler = \u5f02\u6b65\u6570\u636e =&gt; {<\/p>\n<p>&nbsp; &nbsp; setIsPending(true);<\/p>\n<p>&nbsp;&nbsp;\u5c1d\u8bd5{<\/p>\n<p>&nbsp; &nbsp; &nbsp; const validatedData = ValidationSchema.parse(data);<\/p>\n<p>&nbsp; &nbsp; &nbsp; const response = wait axios.post(<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; API_URL + &#8220;\/users\/api\/v1\/auth\/login&#8221;,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u5df2\u9a8c\u8bc1\u6570\u636e<\/p>\n<p>&nbsp; &nbsp; &nbsp; );<\/p>\n<p>&nbsp; &nbsp; &nbsp; const expiryTime = watch(&#8220;remember_me&#8221;)<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; ? 30*24*60*60*1000<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; : 7 * 24 * 60 * 60 * 1000;<\/p>\n<p>&nbsp; &nbsp; &nbsp; setCookie(&#8220;token&#8221;, response.data.data.token, {<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u5b89\u5168\uff1a\u6b63\u786e\uff0c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u540c\u4e00\u7ad9\u70b9\uff1a\u201c\u65e0\u201d\uff0c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u8fc7\u671f\uff1anew Date(Date.now() + expiryTime),<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u57df\u540d\uff1aprocess.env.NEXT_PUBLIC_APP_BASE_URL,<\/p>\n<p>&nbsp; &nbsp; &nbsp; });<\/p>\n<p>&nbsp; &nbsp; &nbsp; const userData =\u7b49\u5f85handleGetProfileData();<\/p>\n<p>&nbsp; &nbsp; &nbsp; \u8c03\u5ea6(login(userData));<\/p>\n<p>&nbsp; &nbsp; &nbsp; router.push(&#8220;\/app&#8221;);<\/p>\n<p>&nbsp; &nbsp; &nbsp; toast.success(response.data.message);<\/p>\n<p>&nbsp; &nbsp; } catch\uff08\u9519\u8bef\uff1a\u4efb\u610f\uff09{<\/p>\n<p>&nbsp; &nbsp; &nbsp; if (error.response) {<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; toast.error(error.response.data.message);<\/p>\n<p>&nbsp; &nbsp; &nbsp; } \u5176\u4ed6 {<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; toast.error(error.message);<\/p>\n<p>&nbsp; &nbsp; &nbsp; }<\/p>\n<p>&nbsp; &nbsp; &nbsp; console.error(&#8220;\u767b\u5f55\u5931\u8d25\uff1a&#8221;, error);<\/p>\n<p>&nbsp; &nbsp; } \u7ec8\u4e8e{<\/p>\n<p>&nbsp; &nbsp; &nbsp; setIsPending(false);<\/p>\n<p>&nbsp; &nbsp; }<\/p>\n<p>&nbsp; };<\/p>\n<p>\u8fd4\u56de(<br \/> \/\/\u5176\u4f59\u4ee3\u7801<br \/> );<br \/> };<\/p>\n<p>\u6211\u8fd9\u6837\u5199\u662f\u4e3a\u4e86\u7528\u6237\u8eab\u4efd\u9a8c\u8bc1\u3002\u4f46\u6211\u6536\u5230\u9519\u8bef\u8bf7\u6c42\u4e2d\u6b62\u3002 <br \/> -&gt; \u6211\u5df2\u8f93\u5165\u51ed\u636e\u5e76\u53d1\u9001\u5230\u540e\u7aef\u3002 <br \/> -&gt; \u4ee4\u724c\u6b63\u5728\u751f\u6210\u5e76\u83b7\u53d6\u6210\u529f\u6d88\u606f\u3002<br \/> -&gt; \u4e4b\u540e\u6211\u5fc5\u987b\u91cd\u5b9a\u5411\u5230\u5e94\u7528\u7a0b\u5e8f\u9875\u9762\u3002\u4f46\u5728\u91cd\u5b9a\u5411\u65f6\uff0c\u8bf7\u6c42\u6b63\u5728\u4e2d\u6b62\u3002 <\/p>\n<p>\u8c01\u80fd\u5e2e\u6211\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898<\/p>\n<p>\u7ec8\u4e8e\u4ecb\u7ecd\u5b8c\u5566\uff01\u5c0f\u4f19\u4f34\u4eec\uff0c\u8fd9\u7bc7\u5173\u4e8e\u300a\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c\u300b\u7684\u4ecb\u7ecd\u5e94\u8be5\u8ba9\u4f60\u6536\u83b7\u591a\u591a\u4e86\u5427\uff01\u6b22\u8fce\u5927\u5bb6\u6536\u85cf\u6216\u5206\u4eab\u7ed9\u66f4\u591a\u9700\u8981\u5b66\u4e60\u7684\u670b\u53cb\u5427~\u7c73\u4e91\u516c\u4f17\u53f7\u4e5f\u4f1a\u53d1\u5e03\u6587\u7ae0\u76f8\u5173\u77e5\u8bc6\uff0c\u5feb\u6765\u5173\u6ce8\u5427\uff01<\/p>\n<p>      \u7248\u672c\u58f0\u660e \u672c\u6587\u8f6c\u8f7d\u4e8e\uff1adev.to \u5982\u6709\u4fb5\u72af\uff0c\u8bf7\u8054\u7cfb\u5220\u9664    <\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   wifi\u5f53\u70ed\u70b9\u600e\u4e48\u7528\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c \u6536\u85cf \u4ece\u73b0\u5728\u5f00\u59cb\uff0c\u6211\u4eec\u8981\u52aa\u529b\u5b66\u4e60\u5566\uff01\u4eca\u5929\u6211\u7ed9\u5927\u5bb6\u5e26\u6765\u300a\u8bf7\u6c42\u4e2d\u6b62 (NS_BINDING_ABORT) \u5728 Firefox \u4e2d\uff0c\u4f46\u5728\u5176\u4f59\u6d4f\u89c8\u5668\u4e2d\u5de5\u4f5c\u300b\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8bf7\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427\uff01\u4e0b\u6587\u4e2d\u7684\u5185\u5bb9\u6211\u4eec\u4e3b\u8981\u4f1a\u6d89\u53ca\u5230\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u5728\u9605\u8bfb\u672c\u6587\u8fc7\u7a0b\u4e2d\u6709\u9047\u5230\u4e0d\u6e05\u695a\u7684\u5730\u65b9\uff0c\u6b22\u8fce\u7559\u8a00\u5440\uff01\u6211\u4eec\u4e00\u8d77\u8ba8\u8bba\uff0c\u4e00\u8d77\u5b66\u4e60\uff01 const \u767b\u5f55 = () =&gt; { &nbsp; const { isAuthenticated } = useSelector( &nbsp; &nbsp; (rootState: RootState) =&gt; rootState.auth &nbsp; ); &nbsp; const router = useRouter(); &nbsp; constdispatch = useDispatch(); &nbsp; const searchParams = useSearchParams(); &nbsp; const [isLoading, setIsLoading] = useState(false); &nbsp; const [passwordVisible, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-52882","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52882"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52882\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}