gameapi-client/dist-API/assets/index.D4ReqGBJ.js

2 lines
9.1 KiB
JavaScript
Raw Permalink Normal View History

2025-08-14 10:33:48 +08:00
import{_ as le,a as te,r as d,C as ae,J as oe,k as c,G as ne,o as V,c as h,H as P,I,f as e,d as l,e as n,l as q,m as A,p as re,q as u,t as p,U as ue,n as v,K as j,L as E,D as G,B as se,h as de}from"./index.R3qQMktZ.js";import{c as pe}from"./index.BhcO8UcA.js";import{b as ie,s as me}from"./tenant.5hwMVhFj.js";import{C as ce}from"./index.DU8FQYf7.js";/* empty css *//* empty css */const fe={class:"app-container"},be={class:"label-scoreRatio"},ge={class:"dialog-footer"},ye={class:"label-scoreRatio"},ve={class:"dialog-footer"},Ve=se({name:"Agent"}),_e=Object.assign(Ve,{setup(Ce){te();const{proxy:f}=de(),{ff_tenant_type:N,ff_tenant_status:we}=f.useDict("ff_tenant_type","ff_tenant_status"),B=d([]),_=d(!1),R=d(!0),H=d(!0);d([]),d(!0),d(!0);const U=d(0),J=d(""),b=d(!1);d(!1),d("");const M=d([]),O=ae({form:{},queryParams:{pageNum:1,pageSize:10,orderByColumn:"create_time",isAsc:"desc",memberAccount:"",gameAccount:""},rules:{account:[{required:!0,message:f.t("商户账号不能为空"),trigger:"blur"}],password:[{required:!0,message:f.t("密码不能为空"),trigger:"blur"}],scoreRatio:[{required:!0,message:f.t("买分比例不能为空"),trigger:"blur"}],tenantType:[{required:!0,message:f.t("商户模式不能为空"),trigger:"change"}]}}),{queryParams:s,form:r,rules:K}=oe(O);function C(){R.value=!0,ie(s.value).then(a=>{B.value=a.rows,U.value=a.total,R.value=!1})}function Q(){_.value=!1,W()}function W(){r.value={account:"",password:"",scoreRatio:1,tenantType:1,tenantAgentPlatforms:[]},f.resetForm("agentRef")}function w(){s.value.pageNum=1,C()}const L=d([]),T=d(!0),X=async()=>{T.value=!1,me().then(a=>{L.value=a.data.map(o=>({label:o.currencyCode,value:o.currencyCode})),T.value=!0})};function D(a){r.value.tenantAgentPlatforms=r.value.tenantAgentPlatforms.map((o,g)=>(a==="del"&&o.cost>M.value[g].cost?(o.cost-=.5,o.useCost-=.5):a==="add"&&(o.cost+=.5,o.useCost+=.5),o))}function Y(){f.$refs.agentRef.validate(a=>{a&&pe(r.value).then(o=>{f.$modal.msgSuccess(f.t("新增成功")),_.value=!1,C()})})}return C(),X(),(a,o)=>{const g=c("el-input"),m=c("el-form-item"),y=c("el-button"),k=c("el-form"),i=c("el-table-column"),S=c("el-table"),Z=c("pagination"),$=c("el-radio-button"),z=c("el-radio-group"),x=c("el-input-number"),F=c("el-dialog"),ee=ne("loading");return V(),h("div",fe,[P(l(k,{model:e(s),ref:"queryRef",inline:!0},{default:n(()=>[l(m,{label:a.t("商户账号"),prop:"memberAccount"},{default:n(()=>[l(g,{modelValue:e(s).memberAccount,"onUpdate:modelValue":o[0]||(o[0]=t=>e(s).memberAccount=t),placeholder:a.t("请输入商户账号"),clearable:"",style:{width:"200px"},onKeyup:q(w,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(m,{label:a.t("玩家账号"),prop:"memberAccount"},{default:n(()=>[l(g,{modelValue:e(s).memberAccount,"onUpdate:modelValue":o[1]||(o[1]=t=>e(s).memberAccount=t),placeholder:a.t("请输入玩家账号"),clearable:"",style:{width:"200px"},onKeyup:q(w,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(m,{label:a.t("三方玩家账号"),prop:"gameAccount"},{default:n(()=>[l(g,{modelValue:e(s).gameAccount,"onUpdate:modelValue":o[2]||(o[2]=t=>e(s).gameAccount=t),placeholder:a.t("请输入三方玩家账号"),clearable:"",style:{width:"200px"},onKeyup:q(w,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(m,{label:a.t("币种"),prop:"currencyCode"},{default:n(()=>[e(T)?(V(),A(e(ce),{key:0,modelValue:e(s).currencyCode,"onUpdate:modelValue":o[3]||(o[3]=t=>e(s).currencyCode=t),options:e(L),placeholder:"请选择币种",style:{width:"200px"}},null,8,["modelValue","options"])):re("",!0)]),_:1},8,["label"]),l(m,null,{default:n(()=>[l(y,{type:"primary",icon:"Search",onClick:w},{default:n(()=>[u(p(a.t("搜索")),1)]),_:1})]),_:1})]),_:1},8,["model"]),[[I,e(H)]]),P((V(),A(S,{data:e(B),class:"c-table-main",border:""},{default:n(()=>[l(i,{label:a.t("商户账号"),align:"center",prop:"tenantKey"},null,8,["label"]),l(i,{label:a.t("玩家账号"),align:"cent