PageSourceSearch

https://detiklife.com/static/js/incomeRatio-BC14rr5n.js

js detiklife.com collected 2026-10-07 08:27:45 UTC 2,824 bytes, 1 lines download raw bytes

1import{A as l,At as c,Ct as k,E as U,L as N,Ot as w,Q as $,Y as B,Yt as F,_n as _,_t as g,it as V,k as f}from"./vue.runtime.esm-bundler-BXOQDxND.js";import{n as O}from"./vue-i18n.runtime-B5CF65Os.js";import{t as v}from"./message-BWqmnC5I.js";import{t as o}from"./appConfig-edDTuM6C.js";F(),N();k();var T={class:"ma-content-block lg:flex justify-between p-4"},D=Object.assign({name:"setting:chainNetwork"},{setup(j){const{t:b}=O(),i=c(0),u=c(0),r=c(0),m=t=>{const e=Number.parseFloat(t?.data?.value);return Number.isFinite(e)?e:0},p=async t=>{let e="income_ratio_agent",n=i.value;t===2&&(e="income_ratio_contract_agent",n=u.value),t===3&&(e="income_ratio_trade_agent",n=r.value);let d=await o.update(e,{value:n});d.success&&v.success(d.message)},y=async(t,e)=>{let n=await o.setAgentIncomeRatio(e,{field:"spot_rate",value:t});n.success&&v.success(n.message)},C=async(t,e)=>{let n=await o.setAgentIncomeRatio(e,{field:"future_rate",value:t});n.success&&v.success(n.message)};B(()=>{I(),h(),x()});const I=async()=>{let t=await o.get("income_ratio_agent");i.value=m(t)},h=async()=>{let t=await o.get("income_ratio_contract_agent");u.value=m(t)},x=async()=>{let t=await o.get("income_ratio_trade_agent");r.value=m(t)},A=w({id:"setting_chain_network",rowSelection:{showCheckedAll:!0},pk:"id",operationColumn:!1,operationWidth:160,formOption:{viewType:"drawer",width:600},api:o.getAgent,edit:{show:!0,api:o.update}}),R=w([{title:"用户id",dataIndex:"user_id"},{title:"邮箱",dataIndex:"email"},{title:b("app.t30"),dataIndex:"phone"},{title:"现货返佣",dataIndex:"spot_rate"},{title:"合约返佣",dataIndex:"future_rate"}]);return(t,e)=>{const n=V("a-input-number"),d=V("ma-crud");return $(),U("div",T,[l(d,{options:A,columns:R,ref:"crudRef"},{tableBeforeButtons:g(()=>[f(_(t.$t("app.t26"))+"(%): ",1),l(n,{style:{width:"120px"},modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),mode:"button",onChange:e[1]||(e[1]=a=>p(1))},null,8,["modelValue"]),f(" "+_(t.$t("app.t27"))+"(%): ",1),l(n,{style:{width:"120px"},modelValue:u.value,"onUpdate:modelValue":e[2]||(e[2]=a=>u.value=a),mode:"button",onChange:e[3]||(e[3]=a=>p(2))},null,8,["modelValue"]),f(" "+_(t.$t("app.t28"))+"(%): ",1),l(n,{style:{width:"120px"},modelValue:r.value,"onUpdate:modelValue":e[4]||(e[4]=a=>r.value=a),mode:"button",onChange:e[5]||(e[5]=a=>p(3))},null,8,["modelValue"])]),spot_rate:g(({record:a})=>[l(n,{style:{width:"120px"},modelValue:a.spot_rate,"onUpdate:modelValue":s=>a.spot_rate=s,onChange:s=>y(s,a.id)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),future_rate:g(({record:a})=>[l(n,{style:{width:"120px"},modelValue:a.future_rate,"onUpdate:modelValue":s=>a.future_rate=s,onChange:s=>C(s,a.id)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["options","columns"])])}}});export{D as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.