import{_ as a,r as e,b as l,d,e as t,f as o,h as s,w as r,g as i,j as p,k as u,i as m,n,an as c,F as f,E as b,q as y,t as v,v as j}from"./index.286e9b79.js";import{v as _}from"./loading.c49775a6.js";import{E as h,a as V}from"./form.ad10dcd5.js";import{E as x,a as A}from"./tab-pane.1cc0f769.js";import{E as g}from"./input.31de1b37.js";import"./form-item.9355e6dc.js";/* empty css            */import{E as k,a as w}from"./select.297a82d5.js";import{_ as q}from"./page-header.29890ed0.js";import{g as C,p as E}from"./http.f588794f.js";import"./_initCloneObject.fb8fbaea.js";import"./strings.8c60bfae.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./isEqual.57d72c4a.js";import"./scroll.a50153b5.js";import"./_baseIteratee.9ead53a1.js";import"./debounce.caafe00b.js";import"./divider.948c4b18.js";const U={class:"editor-card"},K={class:"editor-card-box"},S={key:0,class:"form-item-tips"},I=(a=>(v("data-v-8602536d"),a=a(),j(),a))((()=>s("a",{href:"https://market.aliyun.com/products/56928004/cmapi021863.html",target:"_blank"},"去开通",-1))),F={class:"tool"},O={class:"tool-box"},P=a({__name:"index",setup(a){let v=e(!1),j=e(!1),P=e("0"),R=e(),z=l({data:{type:"aliyun",aliyun:{AppKey:"",AppSecret:"",AppCode:""}}});j.value=!0,C("addons.delivery/index").then((a=>{j.value=!1,a.code&&(z.data=a.data)}));const B=async()=>{R.value&&await R.value.validate(((a,e)=>{j.value=!1,a?(j.value=!0,E("addons.delivery/index",z.data).then((a=>{j.value=!1,a.code?b.success("操作成功"):b.error(a.msg)})).catch((a=>{b.error(a)}))):b.error("请完善内容")}))};return(a,e)=>{const l=q,b=k,C=w,E=h,D=g,G=x,H=A,J=V,L=y,M=_;return d(),t("div",null,[o(l,{title:"物流设置"}),s("div",U,[r((d(),p(J,{model:i(z).data,ref_key:"ruleFormRef",ref:R},{default:u((()=>[s("div",K,[o(H,{modelValue:i(P),"onUpdate:modelValue":e[4]||(e[4]=a=>m(P)?P.value=a:P=a)},{default:u((()=>[o(G,{label:"基本信息",name:"0"},{default:u((()=>[o(E,{label:"物流类型",required:!0,"label-width":"140px"},{default:u((()=>[o(C,{modelValue:i(z).data.type,"onUpdate:modelValue":e[0]||(e[0]=a=>i(z).data.type=a),placeholder:"请选择短信类型",style:{width:"100%"}},{default:u((()=>[o(b,{label:"请选择",value:""}),o(b,{label:"阿里云",value:"aliyun"})])),_:1},8,["modelValue"]),"aliyun"==i(z).data.type?(d(),t("div",S,[n("物流查询使用的是阿里云API服务，可以到官网去注册开通。地址: "),I])):c("",!0)])),_:1}),"aliyun"==i(z).data.type?(d(),t(f,{key:0},[o(E,{label:"AppKey",required:"","label-width":"140px"},{default:u((()=>[o(D,{modelValue:i(z).data.aliyun.AppKey,"onUpdate:modelValue":e[1]||(e[1]=a=>i(z).data.aliyun.AppKey=a)},null,8,["modelValue"])])),_:1}),o(E,{label:"AppSecret",required:"","label-width":"140px"},{default:u((()=>[o(D,{modelValue:i(z).data.aliyun.AppSecret,"onUpdate:modelValue":e[2]||(e[2]=a=>i(z).data.aliyun.AppSecret=a)},null,8,["modelValue"])])),_:1}),o(E,{label:"AppCode",required:"","label-width":"140px"},{default:u((()=>[o(D,{modelValue:i(z).data.aliyun.AppCode,"onUpdate:modelValue":e[3]||(e[3]=a=>i(z).data.aliyun.AppCode=a)},null,8,["modelValue"])])),_:1})],64)):c("",!0)])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["model"])),[[M,i(v)]])]),s("div",F,[s("div",O,[o(L,{type:"primary",loading:i(j),onClick:B},{default:u((()=>[n("保存")])),_:1},8,["loading"])])])])}}},[["__scopeId","data-v-8602536d"]]);export{P as default};
