全栈小学生 26524c4bf5 update admin
2023-08-12 16:21:13 +08:00

2 lines
3.3 KiB
JavaScript

import{d as D,r as v,R,w as F,e as g,f as I,g as r,B as m,u as n,Q as j,v as H,x as i,y as l,A as M}from"./base-04829be5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{t as a}from"./index-043d021e.js";import{c as w}from"./index-faea7bd5.js";import{w as O}from"./sys-f9859bed.js";import{E as U}from"./index-30df2c14.js";import{u as $}from"./vue-router-fee568b2.js";import{a as h}from"./index-92283b18.js";import{E as A}from"./index-c91f25f0.js";import{a as L,E as Q}from"./index-6bd50bb5.js";import{E as T}from"./index-db9b8d96.js";import{E as z}from"./index-88566e4e.js";import{E as G}from"./index-eb678249.js";import{v as J}from"./directive-013f0a4e.js";import{_ as K}from"./_plugin-vue_export-helper-c27b6911.js";import"./common-111e3797.js";import"./common-2cf17469.js";import"./storage-1a3ddb14.js";import"./index-7e933ae4.js";import"./index-236cb599.js";import"./typescript-defaf979.js";import"./index-a2524300.js";import"./validator-6838b9a3.js";import"./event-9519ab40.js";import"./index-d7f4b4bb.js";import"./index-de053f2e.js";import"./index-4edf2cad.js";import"./error-78e43d3e.js";import"./castArray-11aea762.js";import"./_Uint8Array-99b916e9.js";import"./_initCloneObject-e5a1aa13.js";function P(){return w.get("channel/h5/config")}function W(u){return w.put("channel/h5/config",u,{showSuccessMessage:!0})}const X={class:"main-container"},Y={class:"flex ml-[18px] justify-between items-center mt-[20px]"},Z={class:"text-[20px]"},ee={class:"fixed-footer-wrap"},te={class:"fixed-footer"},oe=D({__name:"config",setup(u){const y=$().meta.title,s=v(!0),e=R({is_open:!1,request_url:""}),_=v();P().then(t=>{Object.assign(e,t.data),e.is_open=Boolean(Number(e.is_open)),s.value=!1}),O().then(t=>{e.request_url=t.data.wap_url+"/"});const{copy:b,isSupported:x,copied:d}=U(),E=t=>{if(!x.value){h({message:a("notSupportCopy"),type:"warning"});return}b(t)};F(d,()=>{d.value&&h({message:a("copySuccess"),type:"success"})});const C=()=>{window.open(e.request_url)},k=async t=>{s.value||!t||await t.validate(async o=>{if(o){s.value=!0;let p={...e};p.is_open=Number(p.is_open),W(p).then(()=>{s.value=!1}).catch(()=>{s.value=!1})}})};return(t,o)=>{const p=A,f=L,B=T,N=z,V=Q,q=G,S=J;return g(),I("div",X,[r("div",Y,[r("span",Z,m(n(y)),1)]),j((g(),H(V,{model:e,"label-width":"150px",ref_key:"formRef",ref:_,class:"page-form"},{default:i(()=>[l(N,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[l(f,{label:n(a)("isOpen")},{default:i(()=>[l(p,{modelValue:e.is_open,"onUpdate:modelValue":o[0]||(o[0]=c=>e.is_open=c)},null,8,["modelValue"])]),_:1},8,["label"]),l(f,{label:n(a)("h5DomainName")},{default:i(()=>[l(B,{"model-value":e.request_url,class:"input-width",readonly:!0},{append:i(()=>[r("div",{class:"cursor-pointer",onClick:o[1]||(o[1]=c=>E(e.request_url))},m(n(a)("copy")),1)]),_:1},8,["model-value"]),r("span",{class:"ml-2 cursor-pointer visit-btn",onClick:C},m(n(a)("clickVisit")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])),[[S,s.value]]),r("div",ee,[r("div",te,[l(q,{type:"primary",loading:s.value,onClick:o[2]||(o[2]=c=>k(_.value))},{default:i(()=>[M(m(n(a)("save")),1)]),_:1},8,["loading"])])])])}}});const $e=K(oe,[["__scopeId","data-v-2bd49fdf"]]);export{$e as default};