import{_ as N}from"./index-BwK8zDrs.js";import{G as R,H as I,I as S,J as U,C as q,B as F,h as G,D as T}from"./element-plus-z3MwpXC9.js";import{r as V}from"./index-DXEGVToZ.js";import{d as C,Z as A,an as w,o as i,c as J,V as o,M as e,u as l,a as m,S as r,L as u,R as L,T as M,O as b}from"./@vue-TMcuEboY.js";import"./lodash-es-R-kYiKr_.js";import"./async-validator-DKvM95Vc.js";import"./@element-plus-DRBc1Xzw.js";import"./dayjs-CMfar2R3.js";import"./balanced-match-mNcR6oh4.js";import"./@ctrl-r5W6hzzQ.js";import"./normalize-wheel-es-B6fDCfyv.js";import"./@popperjs-D9SI2xQl.js";import"./nprogress-Cgf5DU8x.js";import"./vue-router-D4MxfuQi.js";import"./pinia-ebUeA1L2.js";import"./axios-C-n2IhIP.js";import"./lodash-BtPWuHkK.js";import"./@vueuse-BQYVjZ5N.js";import"./css-color-function-rJvg8h-6.js";import"./color-B0v57BL7.js";import"./clone-CuIhj1wH.js";import"./color-convert-BGgJB5UM.js";import"./color-name-BQ5IbGbl.js";import"./color-string-BhgG7-8u.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-8CNoFg4V.js";import"./clipboard-Dch_ozqB.js";import"./echarts-BR_QmBtV.js";import"./tslib-BDyQ-Jie.js";import"./zrender-B-CeXLwU.js";import"./highlight.js-D5uP1KGk.js";import"./@highlightjs-KJi31KWJ.js";function O(d){return V.post({url:"/channel.web_page_setting/setConfig",params:d})}function Z(){return V.get({url:"/channel.web_page_setting/getConfig"})}const j={class:"w-80"},z={class:"flex-1 min-w-0 break-words"},K=C({name:"h5Config"}),xt=C({...K,setup(d){const a=A({status:0,page_status:0,page_url:"",url:""}),_=async()=>{const f=await Z();for(const t in a)a[t]=f[t]},y=async()=>{await O(a),_()};return _(),(f,t)=>{const E=R,g=I,s=S,c=U,p=q,k=F,v=G,x=T,B=N,D=w("copy"),H=w("perms");return i(),J("div",null,[o(g,{class:"!border-none",shadow:"never"},{default:e(()=>[o(E,{type:"warning",title:"温馨提示：H5设置",closable:!1,"show-icon":""})]),_:1}),o(g,{class:"!border-none mt-4",shadow:"never"},{default:e(()=>[o(x,{ref:"formRef",model:l(a),"label-width":"120px"},{default:e(()=>[o(p,{label:"渠道状态",required:"",prop:"status"},{default:e(()=>[m("div",null,[o(c,{modelValue:l(a).status,"onUpdate:modelValue":t[0]||(t[0]=n=>l(a).status=n)},{default:e(()=>[o(s,{value:1},{default:e(()=>t[3]||(t[3]=[r("开启")])),_:1}),o(s,{value:0},{default:e(()=>t[4]||(t[4]=[r("关闭")])),_:1})]),_:1},8,["modelValue"]),t[5]||(t[5]=m("div",{class:"form-tips"},"状态为关闭时，将不对外提供服务，请谨慎操作",-1))])]),_:1}),o(p,{label:"关闭后访问页面",prop:"page_status"},{default:e(()=>[o(c,{modelValue:l(a).page_status,"onUpdate:modelValue":t[1]||(t[1]=n=>l(a).page_status=n)},{default:e(()=>[o(s,{value:0},{default:e(()=>t[6]||(t[6]=[r("空页面")])),_:1}),o(s,{value:1},{default:e(()=>t[7]||(t[7]=[r("自定义链接")])),_:1})]),_:1},8,["modelValue"])]),_:1}),l(a).page_status==1?(i(),u(p,{key:0,label:"",prop:"page_url"},{default:e(()=>[m("div",j,[o(k,{modelValue:l(a).page_url,"onUpdate:modelValue":t[2]||(t[2]=n=>l(a).page_url=n),placeholder:"请输入完整的url"},null,8,["modelValue"])])]),_:1})):L("",!0),o(p,{label:"访问链接"},{default:e(()=>[m("div",z,[r(M(l(a).url)+" ",1),b((i(),u(v,null,{default:e(()=>t[8]||(t[8]=[r("复制")])),_:1})),[[D,l(a).url]])])]),_:1})]),_:1},8,["model"])]),_:1}),b((i(),u(B,null,{default:e(()=>[o(v,{type:"primary",onClick:y},{default:e(()=>t[9]||(t[9]=[r("保存")])),_:1})]),_:1})),[[H,["channel.web_page_setting/setConfig"]]])])}}});export{xt as default};
