import{u as B}from"./index.bbd45d05.js";import{e as y}from"./miniprogram_enter.e4c6411c.js";import{g as h}from"./index.871f24ce.js";import{d as b,b as x,r as w,c as l,e as m,f as F,h as e,i as t,u as a,A as D,g as d,t as V,m as k,E as _,b4 as I,R as S,S as N,_ as U}from"./index.0308b213.js";const L=i=>(S("data-v-f2f08afc"),i=i(),N(),i),P={class:"setting-form"},q={key:0,class:"tn-form-item__tips--green",style:{color:"#67C23A"}},M=L(()=>d("div",{class:"tn-form-item__tips--red"}," \u6CE8\u610F\uFF1A\u6B64\u5904\u7528\u4E8E\u5C0F\u7A0B\u5E8F\u4EE3\u7801\u4E0A\u4F20\u3002\u8BF7\u767B\u5F55\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u540E\u53F0\uFF0C\u5728\u5F00\u53D1\u7BA1\u7406-\u5F00\u53D1\u8BBE\u7F6E-\u5C0F\u7A0B\u5E8F\u4EE3\u7801\u4E0A\u4F20-\u5C0F\u7A0B\u5E8F\u4EE3\u7801\u4E0A\u4F20\u5BC6\u94A5,\u4E0B\u8F7D\u3001\u586B\u5199\u3002 ",-1)),R={class:"operation-btn"},T=k("\u63D0\u4EA4"),j=b({setup(i){const u=x({version:"",desc:"",type:"miniProgram_pay",miniprogram_upload_private_key:""}),c=w(!1);(()=>{h().then(s=>{s.pay_miniProgram_setting.miniprogram_upload_private_key&&(c.value=!0)})})();const f=window.location.protocol+"//"+window.location.host+"/",E=()=>{if(!u.version){_.error("\u8BF7\u8F93\u5165\u7248\u672C\u53F7");return}if(!u.desc){_.error("\u8BF7\u8F93\u5165\u63CF\u8FF0");return}const s=I.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});B(u).then(o=>{console.log("res",o),o.code==1?_.success("\u4E0A\u4F20\u6210\u529F"):_.error("\u4E0A\u4F20\u5931\u8D25"),s.close()}).catch(()=>{s.close()})};return(s,o)=>{const p=l("el-input"),n=l("el-form-item"),g=l("el-image"),A=l("el-form"),v=l("el-button"),C=l("el-card");return m(),F("div",P,[e(C,{shadow:"always",style:{"margin-top":"20px"}},{default:t(()=>[e(A,{"label-width":"200px"},{default:t(()=>[e(n,{label:"\u7248\u672C\u53F7"},{default:t(()=>[e(p,{modelValue:a(u).version,"onUpdate:modelValue":o[0]||(o[0]=r=>a(u).version=r),placeholder:"\u4E0A\u4F20\u7684\u7248\u672C\u53F7"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u63CF\u8FF0"},{default:t(()=>[e(p,{modelValue:a(u).desc,"onUpdate:modelValue":o[1]||(o[1]=r=>a(u).desc=r),placeholder:"\u4E0A\u4F20\u7684\u7248\u672C\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u5C0F\u7A0B\u5E8F\u4EE3\u7801\u4E0A\u4F20\u5BC6\u94A5"},{default:t(()=>[e(p,{modelValue:a(u).miniprogram_upload_private_key,"onUpdate:modelValue":o[2]||(o[2]=r=>a(u).miniprogram_upload_private_key=r),type:"textarea",rows:10},null,8,["modelValue"]),c.value?(m(),F("div",q," \u5DF2\u4E0A\u4F20 ")):D("",!0),M]),_:1}),e(n,{label:"\u670D\u52A1\u5668\u914D\u7F6E"},{default:t(()=>[d("view",{style:{display:"flex","flex-direction":"column"}},[d("view",null," request\u5408\u6CD5\u57DF\u540D: "+V(f))])]),_:1}),e(n,{label:"\u5FEB\u6377\u767B\u5F55"},{default:t(()=>[e(g,{src:a(y),style:{width:"200px",height:"200px"}},null,8,["src"])]),_:1})]),_:1}),d("div",R,[e(v,{type:"primary",onClick:E},{default:t(()=>[T]),_:1})])]),_:1})])}}});const O=U(j,[["__scopeId","data-v-f2f08afc"]]);export{O as default};
