gameapi-client/dist-API/assets/index.865WemSH.js

2 lines
13 KiB
JavaScript
Raw Normal View History

2025-08-14 10:33:48 +08:00
import{_ as te,k as g,o as i,c as L,m as p,e as l,d as n,t as s,f as e,h as ae,a as Pe,r,C as M,J as Te,G as Y,H as E,I as Z,l as De,q as u,p as S,U as ee,n as f,K as Ee,L as $e,D as F,B as Ue,v as Re,x as Ne}from"./index.R3qQMktZ.js";import{c as xe,u as Fe,d as Ie,e as Ae,s as Ke}from"./tenant.5hwMVhFj.js";import{a as qe}from"./index.BhcO8UcA.js";import Be from"./AddMerchantsDialog.Bi0RXl5j.js";import Le from"./AdjustmentDialog.D2qsaA3H.js";import ze from"./WhitelistDialog.BpbQ6fa7.js";import Je from"./RenewDialog.IHlerXHM.js";import{_ as Oe}from"./index.DHAs7v_T.js";import{C as je}from"./index.DU8FQYf7.js";/* empty css *//* empty css */function Me(b=8){let d="";const $="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",z=$.length;for(let C=0;C<b;C++)d+=$.charAt(Math.floor(Math.random()*z));return d}const Ge=["id"],He={key:1},Qe={__name:"index",props:{text:{type:[String,Number],default:""},btnText:{type:String,default:""},colors:{type:String,default:""}},setup(b){const{proxy:d}=ae(),$=()=>{d.$modal.msgSuccess("复制成功")},z=async C=>navigator.clipboard&&window.isSecureContext?($(),navigator.clipboard.writeText(C)):new Promise((_,k)=>{try{const c=document.createElement("textarea");c.value=C,c.style.position="fixed",c.style.top="-9999px",c.style.left="-9999px",c.setAttribute("readonly",!0),document.body.appendChild(c),c.select();const U=document.execCommand("copy");$(),document.body.removeChild(c),U?_():k(new Error("execCommand copy failed"))}catch(c){k(c)}});return(C,_)=>{const k=g("DocumentCopy"),c=g("el-icon");return i(),L("span",{class:"column-copy",onClick:_[0]||(_[0]=U=>z(b.text)),id:e(Me)(8)},[b.btnText?(i(),L("span",He,s(b.btnText),1)):(i(),p(c,{key:0,color:b.colors,size:"14"},{default:l(()=>[n(k)]),_:1},8,["color"]))],8,Ge)}}},I=te(Qe,[["__scopeId","data-v-0155959a"]]),We=b=>(Re("data-v-7f6120aa"),b=b(),Ne(),b),Xe={class:"app-container"},Ye=We(()=>f("br",null,null,-1)),Ze={key:0},et={class:"label-scoreRatio"},tt={class:"dialog-footer"},at={class:"dialog-header"},lt={class:"dialog-title",style:{width:"100%","text-align":"center"}},nt={style:{width:"300px"}},ot={style:{width:"300px"}},st={style:{width:"300px"}},rt={style:{width:"300px"}},it={style:{width:"300px"}},dt={style:{width:"300px"}},ut={class:"dialog-footer",style:{width:"100%","text-align":"center"}},ct=Ue({name:"Agent"}),pt=Object.assign(ct,{setup(b){Pe();const{proxy:d}=ae(),{ff_tenant_type:$,ff_tenant_status:z}=d.useDict("ff_tenant_type","ff_tenant_status"),C=r([]),_=r(!1),k=r("add"),c=r({}),U=r(!0),le=r(!0);r([]),r(!0),r(!0);const J=r(0),G=r(""),V=r(!1);r(!1),r("");const ne=r([]),oe=r([]),se=r([{label:"正常",value:"1"},{label:"停用",value:"0"}]),re=M({form:{proportion:0},queryParams:{pageNum:1,pageSize:10,tenantKey:""},rules:{account:[{required:!0,message:d.t("商户账号不能为空"),trigger:"blur"}],password:[{required:!0,message:d.t("密码不能为空"),trigger:"blur"}],scoreRatio:[{required:!0,message:d.t("买分比例不能为空"),trigger:"blur"}],tenantType:[{required:!0,message:d.t("商户模式不能为空"),trigger:"change"}],realBalanceNum:[{required:!0,message:d.t("信誉额度不能为空"),trigger:"change"}]}}),{queryParams:h,form:v,rules:ie}=Te(re),O=r(window.location.origin);M({pwd:[{required:!0,message:d.t("密码不能为空"),trigger:"change"}]}),M({pwd:""});const A=r(!1);function P(){U.value=!0,xe(h.value).then(t=>{C.value=t.rows,J.value=t.total,U.value=!1})}const de=async(t,o)=>{const T=t[o]==1?0:1,D={id:t.id};D[o]=T;try{return await Fe(D).then(()=>{d.$modal.msgSuccess(T===1?d.t("开启成功"):d.t("关闭成功")),P()}),!0}catch(y){return console.error(d.t("接口调用失败"),y),!1}};function ue(){_.value=!1,A.value=!1,j()}function j(){v.value={account:"",password:"",scoreRatio:1,tenantType:1,tenantSystemPlatforms:[],realBalance:[]},d.resetForm("agentRef")}function H(){h.value.pageNum=1,P()}const K=r(!1),ce=t=>{K.value=!0,c.value=t},m=r({}),pe=t=>{A.value=!0,m.value=t},me=t=>{d.$modal