daShangDao_psiWebApp/dist/assets/config.648ff82b.js
2026-06-03 10:53:47 +08:00

2 lines
23 KiB
JavaScript

import{_ as fe,r as B,Z as ge,au as De,a3 as ve,V as Be,j as _e,aM as Ae,aN as we,b as A,o as y,c as b,e as u,w as n,E as D,C as ye,d,h as I,aO as Z,A as V,F as Y,B as G,y as j,ac as H}from"./index.a99ea9b6.js";import{a as P}from"./axios.e318b91e.js";const Ce=(m,e)=>{const r=new URLSearchParams;return r.append("isbn","0"),r.append("out_id","0"),r.append("quality","0"),r.append("query_index","1"),r.append("user_id","0"),P.post(`http://${m}:${e}/api/goods/query`,r.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:1e4}).then(t=>t.data)},ke=(m,e,r,t,_,h,C)=>{const F=new URLSearchParams;return F.append("new_price",r),F.append("placeholder_down_price",t),F.append("min_shipping_fee",_),F.append("min_price",h),F.append("query_index",C),console.log(F.toString()),P.post(`http://${m}:${e}/api/config/price/set`,F.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:1e4}).then(g=>g.data)},W=(m,e,r,t)=>{const _=new FormData;return _.append("username",m),_.append("password",e),P.post(`http://${r}:${t}/api/kfz/login`,_,{timeout:15e3}).then(h=>h.data)},$=(m,e,r)=>P.post(`http://${e}:${r}/api/token/add`,m,{headers:{"Content-Type":"application/json"},timeout:1e4}).then(t=>t.data),q=(m,e)=>P.post(`http://${m}:${e}/api/token/list`,{},{headers:{"Content-Type":"application/json"},timeout:1e4}).then(r=>r.data),he=(m,e)=>P.post(`http://${m}:${e}/api/config/price/get`,{},{headers:{"Content-Type":"application/json"},timeout:1e4}).then(r=>r.data);const ee="file_dir",ue="test_ip",te="test_port",Q="verify_index",ne="saved_accounts";function J(){try{const m=localStorage.getItem(ne);return m?JSON.parse(m):[]}catch{return[]}}function U(m){localStorage.setItem(ne,JSON.stringify(m))}const Se={name:"Config",setup(){const m=B(localStorage.getItem(ee)||""),e=B(localStorage.getItem(ue)||"127.0.0.1"),r=B(localStorage.getItem(te)||"8080"),t=B(localStorage.getItem(Q)||"3"),_=(o,l)=>{const s=parseFloat(o!=null?o:"");return isNaN(s)?l:s.toFixed(2)},h=B(_(localStorage.getItem("new_price"),"9999.00")),C=B(_(localStorage.getItem("placeholder_down_price"),"0.01")),F=B(_(localStorage.getItem("min_shipping_fee"),"3.00")),g=B(_(localStorage.getItem("min_price"),"1.00")),p=B([{account:"",password:"",token:"",username:""}]),E=B([]),v=B(!1),f=B([{account:"",password:"",token:"",username:""}]),x=B(!1),L=()=>{p.value.push({account:"",password:"",token:"",username:""})},K=o=>{p.value.splice(o,1)},O=()=>{f.value.push({account:"",password:"",token:"",username:""})},T=o=>{f.value.splice(o,1)},M=()=>{v.value=!1,f.value=[{account:"",password:"",token:"",username:""}]},z=()=>{const o=parseFloat(C.value);(isNaN(o)||o<.01)&&(C.value="0.01",D.warning("\u5360\u4F4D\u964D\u4EF7\u4E0D\u80FD\u4F4E\u4E8E 0.01\uFF0C\u5DF2\u81EA\u52A8\u8BBE\u4E3A 0.01"))},c=(o,l)=>{const a=o.replace(/[^\d.]/g,"").replace(/^\./,"0.").replace(/\.{2,}/g,".").replace(/^(\d+\.?\d{0,2}).*$/,"$1"),i={newPrice:h,placeholderDownPrice:C,minShippingFee:F,minPrice:g};i[l].value=a},S=o=>{const l={newPrice:h,placeholderDownPrice:C,minShippingFee:F,minPrice:g},s=l[o].value;s&&/^\d+$/.test(s)?l[o].value=s+".00":s&&/^\d+\.$/.test(s)?l[o].value=s+"00":s&&/^\d+\.\d$/.test(s)&&(l[o].value=s+"0")},w=B(!1),R=B(!1),N=B(null),oe=()=>{if(!m.value){D.warning("\u8BF7\u5148\u8BBE\u7F6E\u7A0B\u5E8F\u6240\u5728\u4F4D\u7F6E");return}try{window.location.href=`kfzgs://launch?dir=${encodeURIComponent(m.value)}`}catch(o){D.error(`\u542F\u52A8\u5931\u8D25: ${o.message}`)}},X=o=>{const l=J(),s=l.findIndex(a=>a.account===o.account);s>=0?l[s]=o:l.push(o),U(l),E.value=l},le=async o=>{try{await ye.confirm(`\u786E\u5B9A\u5220\u9664\u8D26\u53F7\u300C${o.account}\u300D\u7684 Token \u8BB0\u5F55\u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}),await P.get(`http://${e.value}:${r.value}/api/token/delete`,{params:{id:o.id}}),localStorage.removeItem(o.username);const l=J().filter(s=>s.account!==o.account);U(l),E.value=l,D.success("\u5DF2\u5220\u9664")}catch{}},ae=()=>{E.value=J()},se=async()=>{if(!e.value){D.warning("\u8BF7\u8F93\u5165 IP \u5730\u5740");return}if(!r.value){D.warning("\u8BF7\u8F93\u5165\u7AEF\u53E3\u53F7");return}w.value=!0,N.value=null;try{const o=await Ce(e.value,r.value);o.code===200?N.value={success:!0,message:o.message}:N.value={success:!1,message:o.message},console.log("\u6D4B\u8BD5\u7ED3\u679C:",o)}catch(o){let l="\u672A\u77E5\u9519\u8BEF";o.code==="ECONNABORTED"?l="\u8FDE\u63A5\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u5730\u5740\u662F\u5426\u6B63\u786E\u6216\u8054\u7CFB\u670D\u52A1\u4F9B\u5E94\u65B9":o.message&&(l=o.message),N.value={success:!1,message:l},console.log("\u6D4B\u8BD5\u5931\u8D25:",o)}finally{w.value=!1}},ce=async()=>{if(!e.value){D.warning("\u8BF7\u5148\u586B\u5199\u6838\u4EF7\u5668 IP \u5730\u5740");return}if(!r.value){D.warning("\u8BF7\u5148\u586B\u5199\u6838\u4EF7\u5668\u7AEF\u53E3\u53F7");return}R.value=!0;try{const o=[];for(let l=0;l<p.value.length;l++){const s=p.value[l];if(s.account&&s.password)try{const a=await W(s.account,s.password,e.value,r.value);if(console.log("\u6838\u4EF7\u5668\u767B\u5F55\u54CD\u5E94:",a),(a==null?void 0:a.code)===200&&(a==null?void 0:a.data)){const{token:i,nickname:k}=a.data;p.value[l].token=i,p.value[l].username=k,localStorage.setItem(k,i),X({account:s.account,username:k,token:i}),o.push({username:k,token:i}),console.log(`\u8D26\u53F7 ${s.account} \u767B\u5F55\u6210\u529F\uFF0Cusername: ${k}`)}else console.log(`\u8D26\u53F7 ${s.account} \u767B\u5F55\u5931\u8D25:`,a==null?void 0:a.message)}catch(a){console.log(`\u8D26\u53F7 ${s.account} \u767B\u5F55\u5931\u8D25:`,a.message)}}if(o.length>0)try{const l=await $(o,e.value,r.value);console.log("token/add \u54CD\u5E94:",l)}catch{}try{const l=await q(e.value,r.value),s=l==null?void 0:l.data;if(Array.isArray(s)){const a=s.filter(i=>i.IsEnable).map(i=>({id:i.ID,account:i.Username,username:i.Username,token:i.Token}));U(a),E.value=a,a.forEach(i=>localStorage.setItem(i.username,i.token))}}catch{}o.length>0?D.success(`\u6210\u529F\u7ED1\u5B9A ${o.length} \u4E2A\u8D26\u53F7`):D.info("\u6CA1\u6709\u6210\u529F\u7ED1\u5B9A\u7684\u8D26\u53F7\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u5BC6\u7801\u662F\u5426\u6B63\u786E")}finally{R.value=!1}},re=async()=>{if(!e.value){D.warning("\u8BF7\u5148\u586B\u5199\u6838\u4EF7\u5668 IP \u5730\u5740");return}if(!r.value){D.warning("\u8BF7\u5148\u586B\u5199\u6838\u4EF7\u5668\u7AEF\u53E3\u53F7");return}x.value=!0;try{const o=[];for(let l=0;l<f.value.length;l++){const s=f.value[l];if(s.account&&s.password)try{const a=await W(s.account,s.password,e.value,r.value);if((a==null?void 0:a.code)===200&&(a==null?void 0:a.data)){const{token:i,nickname:k}=a.data;f.value[l].token=i,f.value[l].username=k,localStorage.setItem(k,i),X({account:s.account,username:k,token:i}),o.push({username:k,token:i})}}catch(a){console.log(`\u8FFD\u52A0\u8D26\u53F7 ${s.account} \u767B\u5F55\u5931\u8D25:`,a.message)}}if(o.length>0)try{await $(o,e.value,r.value)}catch{}try{const l=await q(e.value,r.value),s=l==null?void 0:l.data;if(Array.isArray(s)){const a=s.filter(i=>i.IsEnable).map(i=>({id:i.ID,account:i.Username,username:i.Username,token:i.Token}));U(a),E.value=a,a.forEach(i=>localStorage.setItem(i.username,i.token))}}catch{}o.length>0?D.success(`\u6210\u529F\u8FFD\u52A0\u7ED1\u5B9A ${o.length} \u4E2A\u8D26\u53F7`):D.info("\u6CA1\u6709\u6210\u529F\u7ED1\u5B9A\u7684\u8D26\u53F7\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u5BC6\u7801\u662F\u5426\u6B63\u786E"),v.value=!1,f.value=[{account:"",password:"",token:"",username:""}]}finally{x.value=!1}},ie=async()=>{if(!e.value){D.warning("\u8BF7\u8F93\u5165 IP \u5730\u5740");return}if(!r.value){D.warning("\u8BF7\u8F93\u5165\u7AEF\u53E3\u53F7");return}localStorage.setItem(ee,m.value),localStorage.setItem(ue,e.value),localStorage.setItem(te,r.value),localStorage.setItem(Q,t.value),localStorage.setItem("new_price",h.value),localStorage.setItem("placeholder_down_price",C.value),localStorage.setItem("min_shipping_fee",F.value),localStorage.setItem("min_price",g.value),console.log("\u6838\u4EF7\u914D\u7F6E\u5DF2\u4FDD\u5B58:",{ip:e.value,port:r.value,verifyIndex:t.value});const o=parseFloat(h.value),l=parseFloat(C.value),s=parseFloat(F.value),a=parseFloat(g.value);if(!isNaN(o)&&o>=0){const i=o,k=!isNaN(l)&&l>=0?l:.01,Fe=!isNaN(s)&&s>=0?s:3,me=!isNaN(a)&&a>=0?a:1;try{await ke(e.value,r.value,i,k,Fe,me,t.value),console.log("\u6838\u4EF7\u4EF7\u683C\u76F8\u5173\u914D\u7F6E\u5DF2\u4FDD\u5B58")}catch(Ee){console.log("\u6838\u4EF7\u4EF7\u683C\u76F8\u5173\u914D\u7F6E\u4FDD\u5B58\u5931\u8D25:",Ee.message)}}D.success(`\u914D\u7F6E\u5DF2\u4FDD\u5B58\uFF1AIP=${e.value}, PORT=${r.value}, \u6838\u4EF7\u4F4D\u7F6E=${t.value}`)},de=async()=>{try{const o=await q(e.value,r.value),l=o==null?void 0:o.data;if(Array.isArray(l)&&l.length>0){const s=l.filter(a=>a.IsEnable).map(a=>({id:a.ID,account:a.Username,username:a.Username,token:a.Token}));U(s),E.value=s,s.forEach(a=>localStorage.setItem(a.username,a.token))}}catch(o){console.log("\u83B7\u53D6\u5DF2\u4FDD\u5B58 Token \u5217\u8868\u5931\u8D25\uFF08\u9996\u6B21\u4F7F\u7528\u53EF\u5FFD\u7565\uFF09:",o)}},pe=async()=>{try{const o=await he(e.value,r.value),l=o==null?void 0:o.data;if(l){const s=[{respKey:"QueryIndex",storeKey:"verify_index"},{respKey:"NewPrice",storeKey:"new_price"},{respKey:"PlaceholderDownPrice",storeKey:"placeholder_down_price"},{respKey:"MinShippingFee",storeKey:"min_shipping_fee"},{respKey:"MinPrice",storeKey:"min_price"}];console.log("\u4ECE\u670D\u52A1\u5668\u83B7\u53D6\u7684\u6838\u4EF7\u914D\u7F6E:",l);for(const a of s){const i=l[a.respKey];i!=null&&(localStorage.setItem(a.storeKey,String(i)),console.log(`loadPriceConfig: \u540C\u6B65 ${a.storeKey} = ${i}`))}t.value=localStorage.getItem(Q)||t.value,h.value=_(localStorage.getItem("new_price"),"0.00"),C.value=_(localStorage.getItem("placeholder_down_price"),"0.01"),F.value=_(localStorage.getItem("min_shipping_fee"),"3.00"),g.value=_(localStorage.getItem("min_price"),"1.00"),!r.value&&l.Port&&(r.value=String(l.Port))}}catch(o){console.log("\u83B7\u53D6\u6838\u4EF7\u5668\u914D\u7F6E\u5931\u8D25\uFF08\u9996\u6B21\u4F7F\u7528\u53EF\u5FFD\u7565\uFF09:",o)}};return ge(()=>{ae(),de(),pe()}),{dir:m,ip:e,port:r,verifyIndex:t,newPrice:h,placeholderDownPrice:C,minShippingFee:F,minPrice:g,accounts:p,addAccount:L,removeAccount:K,showAppendForm:v,appendAccounts:f,appendLoading:x,addAppendAccount:O,removeAppendAccount:T,cancelAppend:M,enforceMinPlaceholderDownPrice:z,onPriceInput:c,onPriceBlur:S,handleAppendBind:re,testLoading:w,bindLoading:R,result:N,savedAccountList:E,deleteSavedAccount:le,handleTest:se,handleBind:ce,handleSave:ie,handleOpenExe:oe,Delete:De,Plus:ve,Setting:Be,User:_e,Link:Ae,VideoPlay:we}}},be={class:"config-page"},Ie={class:"card-header"},Pe={class:"header-left"},Ve={class:"config-row"},xe={class:"label-with-icon"},Te={class:"config-row"},Ne={class:"label-with-icon"},Ue={class:"label-with-icon"},Le={class:"label-with-icon"},Ke={class:"label-with-icon"},Oe={class:"config-row"},Me={class:"label-with-icon"},ze={class:"label-with-icon"},Re={class:"label-with-icon"},Ye={class:"save-bar"},Ge={key:0,class:"result-box"},je={class:"account-section"},qe={class:"section-title"},Qe={class:"token-text"},Je={class:"append-bar"},Xe={key:0,class:"account-form"},Ze={class:"account-label"},He={class:"account-inputs"},We={class:"append-form-actions"},$e={key:1,class:"account-form"},eu={class:"account-label"},uu={class:"account-inputs"},tu={key:2,class:"bind-bar"};function nu(m,e,r,t,_,h){const C=A("Setting"),F=A("el-icon"),g=A("QuestionFilled"),p=A("el-tooltip"),E=A("el-input"),v=A("el-button"),f=A("el-form-item"),x=A("el-alert"),L=A("el-form"),K=A("el-divider"),O=A("User"),T=A("el-table-column"),M=A("el-table"),z=A("el-card");return y(),b("div",be,[u(z,{class:"config-card",shadow:"always"},{header:n(()=>[d("div",Ie,[d("div",Pe,[u(F,{size:20},{default:n(()=>[u(C)]),_:1}),e[18]||(e[18]=d("span",null,"\u6838\u4EF7\u5668\u914D\u7F6E",-1))])])]),default:n(()=>[u(L,{"label-width":"80px","label-position":"top"},{default:n(()=>[d("div",Ve,[u(f,{class:"flex-item"},{label:n(()=>[d("span",xe,[e[19]||(e[19]=d("span",null,"\u7A0B\u5E8F\u6240\u5728\u4F4D\u7F6E",-1)),u(p,{content:"verifyTool\u7684\u4F4D\u7F6E",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.dir,"onUpdate:modelValue":e[0]||(e[0]=c=>t.dir=c),placeholder:"\u5982 C:\\\\verifyTool",clearable:"",onClear:e[1]||(e[1]=c=>t.dir="")},null,8,["modelValue"]),u(p,{content:"\u901A\u8FC7\u81EA\u5B9A\u4E49\u534F\u8BAE\u542F\u52A8\u672C\u673A\u7A0B\u5E8F",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"primary",icon:t.VideoPlay,style:{"margin-left":"10px"},disabled:!t.dir,onClick:t.handleOpenExe},{default:n(()=>[...e[20]||(e[20]=[I(" \u6253\u5F00\u7A0B\u5E8F ",-1)])]),_:1},8,["icon","disabled","onClick"])]),_:1})]),_:1})]),d("div",Te,[u(f,{class:"flex-item"},{label:n(()=>[d("span",Ne,[e[21]||(e[21]=d("span",null,"IP \u5730\u5740",-1)),u(p,{content:"\u4E00\u822C\u90FD\u662F 127.0.0.1 \u5982\u9700\u7279\u6B8A\u914D\u7F6E \u8BF7\u8054\u7CFB\u7F51\u7BA1",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.ip,"onUpdate:modelValue":e[2]||(e[2]=c=>t.ip=c),placeholder:"\u5982 192.168.1.1",clearable:""},null,8,["modelValue"])]),_:1}),u(f,{class:"flex-item"},{label:n(()=>[d("span",Ue,[e[22]||(e[22]=d("span",null,"\u7AEF\u53E3",-1)),u(p,{content:"\u9ED8\u8BA4\u662F8080 \u4F46\u662F\u7531\u4E8E\u6BCF\u53F0\u7535\u8111\u7684\u73AF\u5883\u90FD\u4E0D\u540C \u53EF\u80FD\u4F1A\u51FA\u73B0\u7AEF\u53E3\u51B2\u7A81 \u5728\u51FA\u73B0\u95EE\u9898\u65F6\u5019 \u8BF7\u7B2C\u4E00\u65F6\u95F4\u8054\u7CFB\u7F51\u7BA1",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.port,"onUpdate:modelValue":e[3]||(e[3]=c=>t.port=c),placeholder:"\u5982 8080",clearable:""},null,8,["modelValue"])]),_:1}),u(f,{class:"flex-item"},{label:n(()=>[d("span",Le,[e[23]||(e[23]=d("span",null,"\u6838\u4EF7\u4F4D\u7F6E",-1)),u(p,{content:"\u9ED8\u8BA4 1 \u6839\u636E\u5B9E\u9645\u60C5\u51B5\u81EA\u884C\u586B\u5199",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.verifyIndex,"onUpdate:modelValue":e[4]||(e[4]=c=>t.verifyIndex=c),placeholder:"\u8BF7\u8F93\u5165\u6838\u4EF7\u4F4D\u7F6E",clearable:""},null,8,["modelValue"])]),_:1}),u(f,{class:"flex-item"},{label:n(()=>[d("span",Ke,[e[24]||(e[24]=d("span",null,"\u6838\u4EF7\u5931\u8D25\u7EDF\u4E00\u9ED8\u8BA4\u4EF7\u683C\uFF08\u5143\uFF09",-1)),u(p,{content:"\u4F8B\uFF1A88888 \u4FBF\u4E8E\u518D\u5E97\u94FA\u4E2D\u5FEB\u901F\u641C\u7D22\u5230\u8FD9\u4E9B\u5546\u54C1 \u5546\u54C1\u4FEE\u6539\u4EF7\u683C",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.newPrice,"onUpdate:modelValue":e[5]||(e[5]=c=>t.newPrice=c),placeholder:"\u8BF7\u8F93\u5165\u6838\u4EF7\u5931\u8D25\u65F6\u7684\u9ED8\u8BA4\u4EF7\u683C",clearable:"",onInput:e[6]||(e[6]=c=>t.onPriceInput(c,"newPrice")),onBlur:e[7]||(e[7]=c=>t.onPriceBlur("newPrice"))},null,8,["modelValue"])]),_:1})]),d("div",Oe,[u(f,{class:"flex-item"},{label:n(()=>[d("span",Me,[e[25]||(e[25]=d("span",null,"\u5360\u4F4D\u964D\u4EF7\uFF08\u5143\uFF09",-1)),u(p,{content:"\u5360\u4F4D\u964D\u4EF7\u91D1\u989D",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.placeholderDownPrice,"onUpdate:modelValue":e[8]||(e[8]=c=>t.placeholderDownPrice=c),placeholder:"\u8BF7\u8F93\u5165\u5360\u4F4D\u964D\u4EF7",clearable:"",onInput:e[9]||(e[9]=c=>t.onPriceInput(c,"placeholderDownPrice")),onBlur:e[10]||(e[10]=c=>{t.enforceMinPlaceholderDownPrice(),t.onPriceBlur("placeholderDownPrice")})},null,8,["modelValue"])]),_:1}),u(f,{class:"flex-item"},{label:n(()=>[d("span",ze,[e[26]||(e[26]=d("span",null,"\u6700\u4F4E\u8FD0\u8D39\uFF08\u5143\uFF09",-1)),u(p,{content:"\u8BA2\u5355\u6700\u4F4E\u8FD0\u8D39\u91D1\u989D",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.minShippingFee,"onUpdate:modelValue":e[11]||(e[11]=c=>t.minShippingFee=c),placeholder:"\u8BF7\u8F93\u5165\u6700\u4F4E\u8FD0\u8D39",clearable:"",onInput:e[12]||(e[12]=c=>t.onPriceInput(c,"minShippingFee")),onBlur:e[13]||(e[13]=c=>t.onPriceBlur("minShippingFee"))},null,8,["modelValue"])]),_:1}),u(f,{class:"flex-item"},{label:n(()=>[d("span",Re,[e[27]||(e[27]=d("span",null,"\u6700\u4F4E\u4E66\u4EF7\uFF08\u5143\uFF09",-1)),u(p,{content:"\u5355\u672C\u4E66\u7C4D\u6700\u4F4E\u552E\u4EF7",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer"}},{default:n(()=>[u(g)]),_:1})]),_:1})])]),default:n(()=>[u(E,{modelValue:t.minPrice,"onUpdate:modelValue":e[14]||(e[14]=c=>t.minPrice=c),placeholder:"\u8BF7\u8F93\u5165\u6700\u4F4E\u4E66\u4EF7",clearable:"",onInput:e[15]||(e[15]=c=>t.onPriceInput(c,"minPrice")),onBlur:e[16]||(e[16]=c=>t.onPriceBlur("minPrice"))},null,8,["modelValue"])]),_:1})]),d("div",Ye,[u(p,{content:"\u6D4B\u8BD5\u6838\u4EF7\u5668\u670D\u52A1\u8FDE\u63A5\u72B6\u6001",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"primary",loading:t.testLoading,onClick:t.handleTest,size:"small"},{default:n(()=>[...e[28]||(e[28]=[I("\u6D4B\u8BD5\u8FDE\u63A5",-1)])]),_:1},8,["loading","onClick"])]),_:1}),u(p,{content:"\u4FDD\u5B58\u5F53\u524D\u6838\u4EF7\u5668\u914D\u7F6E",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"success",onClick:t.handleSave},{default:n(()=>[...e[29]||(e[29]=[I("\u4FDD\u5B58\u914D\u7F6E",-1)])]),_:1},8,["onClick"])]),_:1})]),u(Z,{name:"fade"},{default:n(()=>[t.result?(y(),b("div",Ge,[u(x,{title:t.result.success?"\u2705 \u8FDE\u63A5\u6210\u529F":"\u274C \u8FDE\u63A5\u5931\u8D25",type:t.result.success?"success":"error",description:t.result.message,"show-icon":"",closable:!1},null,8,["title","type","description"])])):V("",!0)]),_:1})]),_:1}),u(K),d("div",je,[d("div",qe,[u(F,{size:18},{default:n(()=>[u(O)]),_:1}),e[30]||(e[30]=d("span",null,"\u7ED1\u5B9A\u5B54\u592B\u5B50\u65E7\u4E66\u7F51\u8D26\u53F7",-1)),u(p,{content:"\u8FD9\u91CC\u662F\u4E3A\u4E86\u6CE2\u6B21\u63D0\u4EA4\u4E4B\u540E\u5E97\u94FA\u540C\u6B65\u5546\u54C1\u65F6\u5019\u6709\u4E00\u4E2A\u76F8\u5BF9\u51C6\u786E\u5E02\u573A\u4EF7\u683C(\u5982\u679C\u6CA1\u6709\u4EF7\u683C\u6211\u4EEC\u5C06\u8D70\u8BBE\u7F6E\u7684\u7EDF\u4E00\u9ED8\u8BA4\u4EF7\u683C)",placement:"top",trigger:"click"},{default:n(()=>[u(F,{style:{cursor:"pointer","margin-left":"8px"}},{default:n(()=>[u(g)]),_:1})]),_:1})]),t.savedAccountList.length>0?(y(),b(Y,{key:0},[u(M,{data:t.savedAccountList,border:"",stripe:"",size:"small",style:{width:"100%"}},{default:n(()=>[u(T,{prop:"username",label:"\u7528\u6237\u540D","min-width":"140",align:"center"}),u(T,{prop:"token",label:"Token","min-width":"260","show-overflow-tooltip":"",align:"center"},{default:n(({row:c})=>[d("span",Qe,G(c.token),1)]),_:1}),u(T,{label:"\u64CD\u4F5C",width:"80",align:"center"},{default:n(({row:c})=>[u(p,{content:"\u5220\u9664\u8BE5\u8D26\u53F7\u7ED1\u5B9A",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"danger",link:"",icon:t.Delete,onClick:S=>t.deleteSavedAccount(c)},{default:n(()=>[...e[31]||(e[31]=[I("\u5220\u9664",-1)])]),_:1},8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"]),d("div",Je,[t.showAppendForm?V("",!0):(y(),j(v,{key:0,type:"primary",plain:"",icon:t.Plus,onClick:e[17]||(e[17]=c=>t.showAppendForm=!0)},{default:n(()=>[...e[32]||(e[32]=[I(" \u8FFD\u52A0\u8D26\u53F7 ",-1)])]),_:1},8,["icon"]))]),u(Z,{name:"fade"},{default:n(()=>[t.showAppendForm?(y(),b("div",Xe,[(y(!0),b(Y,null,H(t.appendAccounts,(c,S)=>(y(),b("div",{key:S,class:"account-row"},[d("div",Ze," \u8FFD\u52A0\u8D26\u53F7"+G(["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341"][S]||S+1),1),d("div",He,[u(f,{"label-width":"0",style:{"margin-bottom":"0"}},{label:n(()=>[...e[33]||(e[33]=[d("span",{class:"label-with-icon",style:{display:"none"}},null,-1)])]),default:n(()=>[u(E,{modelValue:c.account,"onUpdate:modelValue":w=>c.account=w,placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",clearable:"",autocomplete:"off"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),u(f,{"label-width":"0",style:{"margin-bottom":"0"}},{default:n(()=>[u(E,{modelValue:c.password,"onUpdate:modelValue":w=>c.password=w,type:"password",placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",clearable:"","show-password":"",autocomplete:"new-password"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t.appendAccounts.length>1?(y(),j(p,{key:0,content:"\u5220\u9664\u6B64\u6761\u8D26\u53F7\u8F93\u5165",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"danger",icon:t.Delete,circle:"",onClick:w=>t.removeAppendAccount(S)},null,8,["icon","onClick"])]),_:2},1024)):V("",!0)])]))),128)),d("div",We,[u(p,{content:"\u518D\u589E\u52A0\u4E00\u7EC4\u8D26\u53F7\u5BC6\u7801\u8F93\u5165",placement:"top",trigger:"click"},{default:n(()=>[u(v,{plain:"",icon:t.Plus,onClick:t.addAppendAccount},{default:n(()=>[...e[34]||(e[34]=[I("\u6DFB\u52A0\u66F4\u591A",-1)])]),_:1},8,["icon","onClick"])]),_:1}),u(p,{content:"\u7ED1\u5B9A\u5F53\u524D\u586B\u5199\u7684\u6240\u6709\u8FFD\u52A0\u8D26\u53F7",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"primary",loading:t.appendLoading,icon:t.Link,onClick:t.handleAppendBind},{default:n(()=>[...e[35]||(e[35]=[I("\u7ED1\u5B9A\u8FFD\u52A0\u8D26\u53F7",-1)])]),_:1},8,["loading","icon","onClick"])]),_:1}),u(v,{onClick:t.cancelAppend},{default:n(()=>[...e[36]||(e[36]=[I("\u53D6\u6D88",-1)])]),_:1},8,["onClick"])])])):V("",!0)]),_:1})],64)):(y(),b("div",$e,[(y(!0),b(Y,null,H(t.accounts,(c,S)=>(y(),b("div",{key:S,class:"account-row"},[d("div",eu,"\u8D26\u53F7"+G(["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341"][S]),1),d("div",uu,[u(E,{modelValue:c.account,"onUpdate:modelValue":w=>c.account=w,placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",clearable:"",autocomplete:"off"},null,8,["modelValue","onUpdate:modelValue"]),u(E,{modelValue:c.password,"onUpdate:modelValue":w=>c.password=w,type:"password",placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",clearable:"","show-password":"",autocomplete:"new-password"},null,8,["modelValue","onUpdate:modelValue"]),t.accounts.length>1?(y(),j(p,{key:0,content:"\u5220\u9664\u6B64\u6761\u8D26\u53F7\u8F93\u5165",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"danger",icon:t.Delete,circle:"",onClick:w=>t.removeAccount(S)},null,8,["icon","onClick"])]),_:2},1024)):V("",!0)])]))),128)),u(p,{content:"\u518D\u589E\u52A0\u4E00\u7EC4\u8D26\u53F7\u5BC6\u7801\u8F93\u5165",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"primary",plain:"",icon:t.Plus,onClick:t.addAccount,class:"add-btn"},{default:n(()=>[...e[37]||(e[37]=[I("\u6DFB\u52A0\u66F4\u591A\u8D26\u53F7",-1)])]),_:1},8,["icon","onClick"])]),_:1})])),t.savedAccountList.length===0?(y(),b("div",tu,[u(p,{content:"\u7ED1\u5B9A\u65B0\u7684\u6838\u4EF7\u5668\u8D26\u53F7",placement:"top",trigger:"click"},{default:n(()=>[u(v,{type:"primary",loading:t.bindLoading,icon:t.Link,onClick:t.handleBind},{default:n(()=>[...e[38]||(e[38]=[I("\u7ED1\u5B9A\u8D26\u53F7",-1)])]),_:1},8,["loading","icon","onClick"])]),_:1})])):V("",!0)])]),_:1})])}var au=fe(Se,[["render",nu],["__scopeId","data-v-8f6b30a0"]]);export{au as default};