import{$ as a,o as s,a as t,g as o,j as e,C as l,y as d,a2 as i,a3 as r}from"./vendor-edc0678f.js";import{_ as p,a8 as n,a_ as m}from"./index-4c745ab9.js";const c=a=>(i("data-v-2c485f4e"),a=a(),r(),a),u={class:"platform"},v=c(()=>o("div",{class:"title"},"平台切换",-1)),f={class:"form"},y=c(()=>o("div",{class:"tit"},"平台key",-1)),_=c(()=>o("div",{class:"tit"},"平台域名",-1)),T=c(()=>o("div",{class:"tit"},"密码",-1)),w=p({__name:"platform",setup(i){const r=a({}),p=()=>{r.platform&&!r.domain&&(r.domain="")},c=()=>{localStorage.removeItem(n.TEST_PLATFORM),d("操作成功")},w=()=>{let a=!1;r.platform?r.password?"8888"!=r.password&&(a="密码不正确"):a="请输入 密码":a="请输入 平台key",a?d(a):(delete r.password,localStorage.setItem(n.TEST_PLATFORM,JSON.stringify(r)),d("操作成功"),m(),setTimeout(()=>{location.reload()},800))};return(a,d)=>(s(),t("div",u,[v,o("div",f,[y,e(o("input",{type:"text",class:"input","onUpdate:modelValue":d[0]||(d[0]=a=>r.platform=a),placeholder:"请输入 平台key",onBlur:p},null,544),[[l,r.platform,void 0,{trim:!0}]]),_,e(o("input",{type:"text",class:"input","onUpdate:modelValue":d[1]||(d[1]=a=>r.domain=a),placeholder:"请输入 平台域名"},null,512),[[l,r.domain,void 0,{trim:!0}]]),T,e(o("input",{type:"password",class:"input","onUpdate:modelValue":d[2]||(d[2]=a=>r.password=a),placeholder:"请输入 密码"},null,512),[[l,r.password,void 0,{trim:!0}]]),o("div",{class:"btn",onClick:w},"立即切换"),o("div",{class:"btn clear",onClick:c},"清除")])]))}},[["__scopeId","data-v-2c485f4e"]]);export{w as default};
