mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-15 12:02:48 +00:00
2 lines
9.7 KiB
JavaScript
2 lines
9.7 KiB
JavaScript
import{d as B,r as w,R as b,w as K,e as y,f as I,g as r,u as o,B as s,Q as O,v as D,x as p,y as l,A as f}from"./base-2de02574.js";/* empty css *//* empty css */import{a as j,E as Q}from"./el-form-item-aacba116.js";/* empty css */import{_ as F}from"./index.vue_vue_type_style_index_0_lang-9a3d97c6.js";/* empty css */import{_ as L}from"./index-9e72c628.js";/* empty css */import{t as e}from"./index-a7cd5616.js";import{g as k,d as W}from"./weapp-8d263a2c.js";import{E as z}from"./index-29aaa146.js";import{u as G,a as H}from"./vue-router-834a68c8.js";import{a as x}from"./index-99061637.js";import{E as J}from"./index-f34dc67c.js";import{E as X}from"./index-409cdc90.js";import{E as Y,b as Z}from"./index-8a191767.js";import{E as ee}from"./index-84eb3c18.js";import{v as oe}from"./directive-ce271fd4.js";import"./index-53431221.js";import"./event-30fa88cc.js";/* empty css */import"./common-655c495e.js";import"./index-54d93aac.js";import"./index-a556d0d2.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-11e8968f.js";import"./el-overlay-c29a408e.js";import"./index-fa3f6669.js";import"./focus-trap-852901de.js";import"./index-53f4bde2.js";import"./attachment-98d5a55e.js";/* empty css *//* empty css *//* empty css */import"./index-4ca69875.js";import"./index-e049ae93.js";import"./el-main-e7ca7755.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-907c8fa3.js";/* empty css */import"./index-389593d1.js";import"./index-9c3282b5.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./index-78ade149.js";import"./index-652deeae.js";import"./aria-adfa05c5.js";import"./validator-a9a156f1.js";import"./index-6b1f8a1b.js";import"./index-afc66c39.js";import"./index-17e30841.js";import"./debounce-b627eb85.js";import"./position-a4d7d9b3.js";import"./index-56e41120.js";import"./index-7e51d50f.js";import"./isEqual-aeead489.js";import"./index-f6c4798d.js";import"./index-9868687d.js";import"./index-e3e3f033.js";import"./strings-258503d1.js";import"./index-dfcf0976.js";const le={class:"main-container"},te={class:"detail-head"},ae=r("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),pe={class:"ml-[1px]"},re=r("span",{class:"adorn"},"|",-1),se={class:"right"},ie={class:"panel-title !text-sm"},de={class:"form-tip"},ne={class:"panel-title !text-sm"},ue={class:"form-tip"},me={class:"form-tip"},ce={class:"panel-title !text-sm"},_e={class:"input-width"},fe={class:"form-tip"},ve={class:"form-tip"},ge={class:"panel-title !text-sm"},he={class:"form-tip"},we={class:"form-tip"},be={class:"form-tip"},ye={class:"form-tip"},ke={class:"form-tip"},xe={class:"flex"},Ve={class:"panel-title !text-sm"},Pe={class:"fixed-footer-wrap"},Ee={class:"fixed-footer"},jo=B({__name:"config",setup(Ue){const V=G(),P=H(),E=V.meta.title,m=w(!0),a=b({weapp_name:"",weapp_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"not_encrypt",serve_url:"",request_url:"",socket_url:"",upload_url:"",download_url:"",upload_private_key:""}),g=w(),U=b({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"}]});k().then(u=>{Object.assign(a,u.data),m.value=!1}),k().then(u=>{Object.assign(u.data)});const{copy:q,isSupported:C,copied:h}=z(),c=u=>{if(!C.value){x({message:e("notSupportCopy"),type:"warning"});return}q(u)};K(h,()=>{h.value&&x({message:e("copySuccess"),type:"success"})});const T=async u=>{m.value||!u||await u.validate(async t=>{t&&(m.value=!0,W(a).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(u,t)=>{const n=J,d=j,S=L,_=X,A=F,v=Y,R=Z,$=Q,M=ee,N=oe;return y(),I("div",le,[r("div",te,[r("div",{class:"left",onClick:t[0]||(t[0]=i=>o(P).push({path:"/website/channel/weapp"}))},[ae,r("span",pe,s(o(e)("returnToPreviousPage")),1)]),re,r("span",se,s(o(E)),1)]),O((y(),D($,{model:a,"label-width":"170px",ref_key:"formRef",ref:g,rules:U,class:"page-form"},{default:p(()=>[l(_,{class:"box-card !border-none",shadow:"never"},{default:p(()=>[r("h3",ie,s(o(e)("weappInfo")),1),l(d,{label:o(e)("weappName"),prop:"weapp_name"},{default:p(()=>[l(n,{modelValue:a.weapp_name,"onUpdate:modelValue":t[1]||(t[1]=i=>a.weapp_name=i),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:p(()=>[l(n,{modelValue:a.weapp_original,"onUpdate:modelValue":t[2]||(t[2]=i=>a.weapp_original=i),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:p(()=>[l(S,{modelValue:a.qr_code,"onUpdate:modelValue":t[3]||(t[3]=i=>a.qr_code=i)},null,8,["modelValue"]),r("div",de,s(o(e)("weappQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[r("h3",ne,s(o(e)("weappDevelopInfo")),1),l(d,{label:o(e)("weappAppid"),prop:"app_id"},{default:p(()=>[l(n,{modelValue:a.app_id,"onUpdate:modelValue":t[4]||(t[4]=i=>a.app_id=i),placeholder:o(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",ue,s(o(e)("weappAppidTips")),1)]),_:1},8,["label"]),l(d,{label:o(e)("weappAppsecret"),prop:"app_secret"},{default:p(()=>[l(n,{modelValue:a.app_secret,"onUpdate:modelValue":t[5]||(t[5]=i=>a.app_secret=i),placeholder:o(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",me,s(o(e)("weappAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[r("h3",ce,s(o(e)("weappUpload")),1),l(d,{label:o(e)("uploadKey"),prop:"upload_private_key"},{default:p(()=>[r("div",_e,[l(A,{modelValue:a.upload_private_key,"onUpdate:modelValue":t[6]||(t[6]=i=>a.upload_private_key=i),api:"sys/document/wechat"},null,8,["modelValue"])]),r("div",fe,s(o(e)("uploadKeyTips")),1),r("div",ve,s(o(e)("uploadIpTips"))+s(a.upload_ip),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[r("h3",ge,s(o(e)("theServerSetting")),1),l(d,{label:"URL"},{default:p(()=>[l(n,{"model-value":a.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[r("div",{class:"cursor-pointer",onClick:t[7]||(t[7]=i=>c(a.serve_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),l(d,{label:"Token",prop:"token"},{default:p(()=>[l(n,{modelValue:a.token,"onUpdate:modelValue":t[8]||(t[8]=i=>a.token=i),placeholder:o(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",he,s(o(e)("tokenTips")),1)]),_:1}),l(d,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:p(()=>[l(n,{modelValue:a.encoding_aes_key,"onUpdate:modelValue":t[9]||(t[9]=i=>a.encoding_aes_key=i),placeholder:o(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",we,s(o(e)("encodingAESKeyTips")),1)]),_:1}),l(d,{label:o(e)("encryptionType"),prop:"encryption_type"},{default:p(()=>[l(R,{modelValue:a.encryption_type,"onUpdate:modelValue":t[10]||(t[10]=i=>a.encryption_type=i)},{default:p(()=>[l(v,{label:"not_encrypt"},{default:p(()=>[f(s(o(e)("cleartextMode")),1)]),_:1}),l(v,{label:"compatible"},{default:p(()=>[f(s(o(e)("compatibleMode")),1)]),_:1}),l(v,{label:"safe"},{default:p(()=>[f(s(o(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),r("div",be,s(o(e)("cleartextModeTips")),1),r("div",ye,s(o(e)("compatibleModeTips")),1),r("div",ke,s(o(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),l(_,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[r("div",xe,[r("h3",Ve,s(o(e)("functionSetting")),1)]),l(d,{label:o(e)("requestUrl")},{default:p(()=>[l(n,{"model-value":a.request_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[r("div",{class:"cursor-pointer",onClick:t[11]||(t[11]=i=>c(a.request_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("socketUrl")},{default:p(()=>[l(n,{"model-value":a.socket_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[r("div",{class:"cursor-pointer",onClick:t[12]||(t[12]=i=>c(a.socket_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("uploadUrl")},{default:p(()=>[l(n,{"model-value":a.upload_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[r("div",{class:"cursor-pointer",onClick:t[13]||(t[13]=i=>c(a.upload_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),l(d,{label:o(e)("downloadUrl")},{default:p(()=>[l(n,{"model-value":a.download_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[r("div",{class:"cursor-pointer",onClick:t[14]||(t[14]=i=>c(a.download_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[N,m.value]]),r("div",Pe,[r("div",Ee,[l(M,{type:"primary",loading:m.value,onClick:t[15]||(t[15]=i=>T(g.value))},{default:p(()=>[f(s(o(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{jo as default};
|