import{_ as e,u as t,r as a,ad as s,c as l,d as i,e as o,F as n,l as d,h as r,n as c,am as p,g as u,w as m,j as f,k as v,f as b,m as h,an as g,E as _,p as j,t as w,v as x}from"./index.286e9b79.js";import{v as y}from"./loading.c49775a6.js";import{E as V,a as C}from"./table-column.7b4f59a2.js";import"./checkbox.f06171a4.js";import{E}from"./switch.197584d0.js";/* empty css            */import{E as P}from"./image-viewer.b538fe01.js";import{g as k}from"./http.f588794f.js";import"./_baseIteratee.9ead53a1.js";import"./_initCloneObject.fb8fbaea.js";import"./isEqual.57d72c4a.js";import"./debounce.caafe00b.js";import"./event.776e7e11.js";import"./validator.18338d56.js";import"./index.ed3ed02e.js";import"./position.1bd00850.js";import"./scroll.a50153b5.js";const U=e=>(w("data-v-5bd66f90"),e=e(),x(),e),z={class:"table-box"},A={class:"table-title"},H={class:"tabs-content"},I=U((()=>r("span",{style:{"font-size":"14px","margin-left":"5px"}},"暂无数据",-1))),$={class:"image-slot"},q=U((()=>r("div",{class:"page"},[r("div",{class:"l"}),r("div",{class:"r"})],-1))),F=e({__name:"list",setup(e){t();const w=a([]);let x=a(!1);s((()=>{x.value=!0,k("addons.payment/list").then((e=>{x.value=!1,e.code?w.value=e.data:_.error(e.msg)})).catch((e=>{x.value=!1,_.error(e)}))}));let U=a({1:{title:"微信公众号",ctitle:"在微信公众号H5页面中付款的场景"},2:{title:"微信小程序",ctitle:"在微信小程序中付款的场景"},8:{title:"PC商城",ctitle:"电脑端微信扫码支付"},9:{title:"H5支付",ctitle:"在移动浏览器页面中付款的场景"},10:{title:"APP支付",ctitle:"在APP中付款的场景"}});const F=(e,t,a,s)=>{if("status"==t)k("addons.payment/status",{id:e.id,type:t,value:e[t]}).then((e=>{e.code&&_.success("修改状态成功")}));else{let l=w.value[a];for(let e in l)s!=e&&(l[e].is_default=0);0==l[s].is_default&&(l[s].is_default=1),k("addons.payment/status",{id:e.id,type:t,value:l[s].is_default}).then((e=>{e.code&&_.success("修改状态成功")}))}};return(e,t)=>{const a=l("Warning"),s=j,_=P,k=V,O=E,W=C,B=y;return i(),o("div",null,[(i(!0),o(n,null,d(u(w),((e,t)=>(i(),o("div",{class:"table-wrap",key:t},[r("div",z,[r("div",A,[c(p(u(U)[t].title)+" ",1),r("span",null,p(u(U)[t].ctitle),1)]),r("div",H,[m((i(),f(W,{data:e,size:"large",style:{width:"100%"}},{empty:v((()=>[b(s,{size:"18",style:{position:"relative",top:"4px"}},{default:v((()=>[b(a)])),_:1}),I])),default:v((()=>[b(k,{width:"80","header-align":"center",align:"center"},{default:v((e=>[e.row.photo?(i(),f(_,{key:0,src:e.row.photo,fit:"contain",style:{width:"30px",height:"30px"}},{error:v((()=>[r("div",$,[(i(),f(h("icon-picture")))])])),_:2},1032,["src"])):g("",!0)])),_:1}),b(k,{prop:"name",label:"支付名称","header-align":"center",align:"center"}),b(k,{label:"默认支付","header-align":"center",align:"center",width:"130"},{default:v((e=>[b(O,{modelValue:e.row.is_default,"onUpdate:modelValue":t=>e.row.is_default=t,onChange:a=>F(e.row,"is_default",t,e.$index),"active-value":1,"inactive-value":0,"inline-prompt":"","active-text":"是","inactive-text":"否"},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:2},1024),b(k,{prop:"sort",label:"使用状态","header-align":"center",align:"center",width:"130"},{default:v((e=>[b(O,{modelValue:e.row.status,"onUpdate:modelValue":t=>e.row.status=t,onChange:a=>F(e.row,"status",t,e.$index),"active-value":1,"inactive-value":0,"inline-prompt":"","active-text":"是","inactive-text":"否"},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:2},1024)])),_:2},1032,["data"])),[[B,u(x)]])]),q])])))),128))])}}},[["__scopeId","data-v-5bd66f90"]]);export{F as default};
