mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-05 20:48:11 +00:00
2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
/* empty css *//* empty css *//* empty css *//* empty css */import{E as M,b as N}from"./el-radio-c9a1047c.js";/* empty css */import{_ as R}from"./index-82132406.js";/* empty css */import{t as e}from"./index-5f4ce139.js";import{g as w,s as $}from"./weapp-c29978dc.js";import{l as B}from"./index-2083be2e.js";import{a as h}from"./index-be5dc120.js";import{E as D}from"./index-95693143.js";import{a as O,E as I}from"./index-624573cc.js";import{E as K}from"./index-acd12562.js";import{E as L}from"./index-4862d1b3.js";import{v as j}from"./directive-a07a10ed.js";import{d as F,r as y,M as k,w as Q,b as V,e as W,L as G,m as z,p as r,q as l,f as s,x as i,u as o,v as f}from"./runtime-core.esm-bundler-7c3fd514.js";import"./error-492b6a5b.js";import"./plugin-vue_export-helper-edbdb6f8.js";import"./index-f02197a7.js";import"./event-9519ab40.js";import"./index-868cd458.js";import"./index-a3cf5375.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a42d8a18.js";/* empty css */import"./el-overlay-f7f710bd.js";import"./focus-trap-bb1e8c7a.js";import"./index-7b0897f9.js";import"./attachment-51c3470b.js";/* empty css *//* empty css *//* empty css */import"./index-aae906bf.js";import"./vue-router-b5675730.js";import"./el-switch-3d36d31d.js";import"./index-cf47f151.js";import"./index-47617222.js";import"./validator-62f68fe3.js";import"./common-465e36b3.js";import"./index-2f0b1bf3.js";import"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./el-avatar-7d17482e.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-be5868d6.js";import"./sys-aa893c6b.js";import"./index-548a7823.js";import"./index-c656f08b.js";import"./index-9bac81c5.js";import"./index-f97852b4.js";import"./index-381e0c1f.js";import"./index-470ade69.js";import"./isEqual-f40f939e.js";import"./_Uint8Array-de4f83bb.js";import"./flatten-b3585bb8.js";import"./index-800b62de.js";import"./index-9fbce820.js";import"./index-2804b007.js";import"./index-4683bff4.js";import"./common-cc37bda4.js";import"./common-2cf17469.js";import"./_baseClone-cf40e5b2.js";import"./_initCloneObject-bc5ed9bb.js";const H={class:"main-container"},J={class:"panel-title"},X={class:"form-tip"},Y={class:"panel-title"},Z={class:"form-tip"},ee={class:"form-tip"},oe={class:"panel-title"},le={class:"form-tip"},ae={class:"form-tip"},te={class:"form-tip"},re={class:"form-tip"},pe={class:"form-tip"},ie={class:"flex"},se={class:"panel-title"},de={class:"fixed-footer-wrap"},ne={class:"fixed-footer"},qo=F({__name:"config",setup(me){const u=y(!0),a=k({weapp_name:"",weapp_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"0",serve_url:"",request_url:"",socket_url:"",upload_url:"",download_url:""}),g=y(),x=k({weapp_name:[{required:!0,message:e("weappNamePlaceholder"),trigger:"blur"}],weapp_original:[{required:!0,message:e("weappOriginalPlaceholder"),trigger:"blur"}],app_id:[{required:!0,message:e("appidPlaceholder"),trigger:"blur"}],app_secret:[{required:!0,message:e("appSecretPlaceholder"),trigger:"blur"}],token:[{required:!0,message:e("tokenPlaceholder"),trigger:"blur"}],encoding_aes_key:[{required:!0,message:e("encodingAesKeyPlaceholder"),trigger:"blur"}]});w().then(m=>{Object.assign(a,m.data),u.value=!1,console.log("formData",a)}),w().then(m=>{Object.assign(m.data)});const{copy:E,isSupported:P,copied:b}=B(),c=m=>{if(!P.value){h({message:e("notSupportCopy"),type:"warning"});return}E(m)};Q(b,()=>{b.value&&h({message:e("copySuccess"),type:"success"})});const q=async m=>{u.value||!m||await m.validate(async t=>{t&&(u.value=!0,$(a).then(()=>{u.value=!1}).catch(()=>{u.value=!1}))})};return(m,t)=>{const n=D,d=O,C=R,_=K,v=M,U=N,S=I,T=L,A=j;return V(),W("div",H,[G((V(),z(S,{model:a,"label-width":"200px",ref_key:"formRef",ref:g,rules:x,class:"page-form"},{default:r(()=>[l(_,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[s("h3",J,i(o(e)("weappInfo")),1),l(d,{label:o(e)("weappName"),prop:"weapp_name"},{default:r(()=>[l(n,{modelValue:a.weapp_name,"onUpdate:modelValue":t[0]||(t[0]=p=>a.weapp_name=p),placeholder:o(e)("weappNamePlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(d,{label:o(e)("weappOriginal"),prop:"weapp_original"},{default:r(()=>[l(n,{modelValue:a.weapp_original,"onUpdate:modelValue":t[1]||(t[1]=p=>a.weapp_original=p),placeholder:o(e)("weappOriginalPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(d,{label:o(e)("weappQrcode"),prop:"qr_code"},{default:r(()=>[l(C,{modelValue:a.qr_code,"onUpdate:modelValue":t[2]||(t[2]=p=>a.qr_code=p)},null,8,["modelValue"]),s("div",X,i(o(e)("weappQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:r(()=>[s("h3",Y,i(o(e)("weappDevelopInfo")),1),l(d,{label:o(e)("weappAppid"),prop:"app_id"},{default:r(()=>[l(n,{modelValue:a.app_id,"onUpdate:modelValue":t[3]||(t[3]=p=>a.app_id=p),placeholder:o(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",Z,i(o(e)("weappAppidTips")),1)]),_:1},8,["label"]),l(d,{label:o(e)("weappAppsecret"),prop:"app_secret"},{default:r(()=>[l(n,{modelValue:a.app_secret,"onUpdate:modelValue":t[4]||(t[4]=p=>a.app_secret=p),placeholder:o(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",ee,i(o(e)("weappAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:r(()=>[s("h3",oe,i(o(e)("theServerSetting")),1),l(d,{label:"URL"},{default:r(()=>[l(n,{"model-value":a.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:r(()=>[s("div",{class:"cursor-pointer",onClick:t[5]||(t[5]=p=>c(a.serve_url))},i(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),l(d,{label:"Token",prop:"token"},{default:r(()=>[l(n,{modelValue:a.token,"onUpdate:modelValue":t[6]||(t[6]=p=>a.token=p),placeholder:o(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",le,i(o(e)("tokenTips")),1)]),_:1}),l(d,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:r(()=>[l(n,{modelValue:a.encoding_aes_key,"onUpdate:modelValue":t[7]||(t[7]=p=>a.encoding_aes_key=p),placeholder:o(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",ae,i(o(e)("encodingAESKeyTips")),1)]),_:1}),l(d,{label:o(e)("encryptionType"),prop:"encryption_type"},{default:r(()=>[l(U,{modelValue:a.encryption_type,"onUpdate:modelValue":t[8]||(t[8]=p=>a.encryption_type=p)},{default:r(()=>[l(v,{label:"0"},{default:r(()=>[f(i(o(e)("cleartextMode")),1)]),_:1}),l(v,{label:"1"},{default:r(()=>[f(i(o(e)("compatibleMode")),1)]),_:1}),l(v,{label:"2"},{default:r(()=>[f(i(o(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),s("div",te,i(o(e)("cleartextModeTips")),1),s("div",re,i(o(e)("compatibleModeTips")),1),s("div",pe,i(o(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:r(()=>[s("div",ie,[s("h3",se,i(o(e)("functionSetting")),1)]),l(d,{label:o(e)("requestUrl")},{default:r(()=>[l(n,{"model-value":a.request_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:r(()=>[s("div",{class:"cursor-pointer",onClick:t[9]||(t[9]=p=>c(a.request_url))},i(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("socketUrl")},{default:r(()=>[l(n,{"model-value":a.socket_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:r(()=>[s("div",{class:"cursor-pointer",onClick:t[10]||(t[10]=p=>c(a.socket_url))},i(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("uploadUrl")},{default:r(()=>[l(n,{"model-value":a.upload_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:r(()=>[s("div",{class:"cursor-pointer",onClick:t[11]||(t[11]=p=>c(a.upload_url))},i(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("downloadUrl")},{default:r(()=>[l(n,{"model-value":a.download_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:r(()=>[s("div",{class:"cursor-pointer",onClick:t[12]||(t[12]=p=>c(a.download_url))},i(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[A,u.value]]),s("div",de,[s("div",ne,[l(T,{type:"primary",loading:u.value,onClick:t[13]||(t[13]=p=>q(g.value))},{default:r(()=>[f(i(o(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{qo as default};
|