import{_ as e,r as a,b as l,cK as o,d as s,e as t,f as d,h as r,w as i,g as m,j as p,k as u,i as n,n as b,E as c,q as f}from"./index.286e9b79.js";import{v as w}from"./loading.c49775a6.js";import{E as h,a as V}from"./form.ad10dcd5.js";import{E as v,a as _}from"./tab-pane.1cc0f769.js";import"./form-item.9355e6dc.js";import{E as g}from"./input.31de1b37.js";import{_ as j}from"./page-header.29890ed0.js";import{g as x,p as y}from"./http.f588794f.js";import"./_initCloneObject.fb8fbaea.js";import"./strings.8c60bfae.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./divider.948c4b18.js";const U={class:"editor-card"},E={class:"editor-card-box"},k={class:"tool"},C={class:"tool-box"},q=e({__name:"setting",setup(e){let q=a(!1),F=a(!1),I=a("0"),K=a(),O=l({website:{webname:"",username:"",mobile:"",phone:"",address:"",copyright:""}});const R=l({});F.value=!0,x("system.users/setting").then((e=>{F.value=!1,e.code&&!o(e.data)&&(O.website=e.data)}));const z=async()=>{K.value&&await K.value.validate(((e,a)=>{F.value=!1,e?(F.value=!0,y("system.users/setting",O).then((e=>{F.value=!1,e.code?c.success("操作成功"):c.error(e.msg)})).catch((e=>{c.error(e)}))):c.error("请完善内容")}))};return(e,a)=>{const l=j,o=g,c=h,x=v,y=_,A=V,B=f,D=w;return s(),t("div",null,[d(l,{title:"店铺设置"}),r("div",U,[i((s(),p(A,{model:m(O).website,rules:m(R),ref_key:"ruleFormRef",ref:K},{default:u((()=>[r("div",E,[d(y,{modelValue:m(I),"onUpdate:modelValue":a[6]||(a[6]=e=>n(I)?I.value=e:I=e)},{default:u((()=>[d(x,{label:"基本信息",name:"0"},{default:u((()=>[d(c,{label:"网站名称",prop:"webname","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.webname,"onUpdate:modelValue":a[0]||(a[0]=e=>m(O).website.webname=e),placeholder:"请输入网站名称"},null,8,["modelValue"])])),_:1}),d(c,{label:"联系人姓名",prop:"username","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.username,"onUpdate:modelValue":a[1]||(a[1]=e=>m(O).website.username=e),placeholder:"请输入联系人姓名"},null,8,["modelValue"])])),_:1}),d(c,{label:"手机号码",prop:"mobile","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.mobile,"onUpdate:modelValue":a[2]||(a[2]=e=>m(O).website.mobile=e),placeholder:"请输入手机号码"},null,8,["modelValue"])])),_:1}),d(c,{label:"座机电话",prop:"phone","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.phone,"onUpdate:modelValue":a[3]||(a[3]=e=>m(O).website.phone=e),placeholder:"请输入公安链接"},null,8,["modelValue"])])),_:1}),d(c,{label:"完整地址",prop:"address","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.address,"onUpdate:modelValue":a[4]||(a[4]=e=>m(O).website.address=e),placeholder:"请输入监督管理局"},null,8,["modelValue"])])),_:1}),d(c,{label:"版权信息",prop:"copyright","label-width":"100px"},{default:u((()=>[d(o,{modelValue:m(O).website.copyright,"onUpdate:modelValue":a[5]||(a[5]=e=>m(O).website.copyright=e),placeholder:"请输入版权信息"},null,8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["model","rules"])),[[D,m(q)]])]),r("div",k,[r("div",C,[d(B,{type:"primary",loading:m(F),onClick:z},{default:u((()=>[b("保存")])),_:1},8,["loading"])])])])}}},[["__scopeId","data-v-7a24b5ab"]]);export{q as default};
