test_lgq/niucloud/public/admin/assets/config-1b72a630.js
2024-01-24 17:36:08 +08:00

2 lines
8.7 KiB
JavaScript

import{d as I,O as K,f as O,r as w,n as b,N as e,aL as B,s as D,a4 as y,h as k,c as j,a as s,u as l,t as r,y as L,I as W,w as p,e as o,i as f,W as z,X as F,$ as Q,az as G,aA as X,Y,E as H,a0 as J}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as Z}from"./index.vue_vue_type_style_index_0_lang-cd8f78e9.js";/* empty css */import{_ as ee}from"./index-742b412a.js";import"./el-form-item-4ed993c7.js";/* empty css */import{g as x,d as le}from"./weapp-4d690662.js";/* empty css *//* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";/* empty css */import"./attachment-c69dd9fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */import"./sys-8ead7f22.js";const oe={class:"main-container"},ae={class:"detail-head"},te=s("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),pe={class:"ml-[1px]"},se=s("span",{class:"adorn"},"|",-1),re={class:"right"},de={class:"panel-title !text-sm"},ne={class:"form-tip"},ie={class:"panel-title !text-sm"},ue={class:"form-tip"},ce={class:"form-tip"},_e={class:"panel-title !text-sm"},me={class:"input-width"},fe={class:"form-tip"},ve={class:"form-tip"},he={class:"panel-title !text-sm"},ge={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"},Ue={class:"fixed-footer"},sl=I({__name:"config",setup(qe){const V=K(),P=O(),U=V.meta.title,c=w(!0),t=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:""}),h=w(),q=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"}]});x().then(u=>{Object.assign(t,u.data),c.value=!1}),x().then(u=>{Object.assign(u.data)});const{copy:C,isSupported:T,copied:g}=B(),_=u=>{if(!T.value){y({message:e("notSupportCopy"),type:"warning"});return}C(u)};D(g,()=>{g.value&&y({message:e("copySuccess"),type:"success"})});const E=async u=>{c.value||!u||await u.validate(async a=>{a&&(c.value=!0,le(t).then(()=>{c.value=!1}).catch(()=>{c.value=!1}))})};return(u,a)=>{const i=z,n=F,S=ee,m=Q,A=Z,v=G,$=X,N=Y,R=H,M=J;return k(),j("div",oe,[s("div",ae,[s("div",{class:"left",onClick:a[0]||(a[0]=d=>l(P).push({path:"/channel/weapp"}))},[te,s("span",pe,r(l(e)("returnToPreviousPage")),1)]),se,s("span",re,r(l(U)),1)]),L((k(),W(N,{model:t,"label-width":"170px",ref_key:"formRef",ref:h,rules:q,class:"page-form"},{default:p(()=>[o(m,{class:"box-card !border-none",shadow:"never"},{default:p(()=>[s("h3",de,r(l(e)("weappInfo")),1),o(n,{label:l(e)("weappName"),prop:"weapp_name"},{default:p(()=>[o(i,{modelValue:t.weapp_name,"onUpdate:modelValue":a[1]||(a[1]=d=>t.weapp_name=d),placeholder:l(e)("weappNamePlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:l(e)("weappOriginal"),prop:"weapp_original"},{default:p(()=>[o(i,{modelValue:t.weapp_original,"onUpdate:modelValue":a[2]||(a[2]=d=>t.weapp_original=d),placeholder:l(e)("weappOriginalPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(n,{label:l(e)("weappQrcode"),prop:"qr_code"},{default:p(()=>[o(S,{modelValue:t.qr_code,"onUpdate:modelValue":a[3]||(a[3]=d=>t.qr_code=d)},null,8,["modelValue"]),s("div",ne,r(l(e)("weappQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),o(m,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[s("h3",ie,r(l(e)("weappDevelopInfo")),1),o(n,{label:l(e)("weappAppid"),prop:"app_id"},{default:p(()=>[o(i,{modelValue:t.app_id,"onUpdate:modelValue":a[4]||(a[4]=d=>t.app_id=d),placeholder:l(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",ue,r(l(e)("weappAppidTips")),1)]),_:1},8,["label"]),o(n,{label:l(e)("weappAppsecret"),prop:"app_secret"},{default:p(()=>[o(i,{modelValue:t.app_secret,"onUpdate:modelValue":a[5]||(a[5]=d=>t.app_secret=d),placeholder:l(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",ce,r(l(e)("weappAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),o(m,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[s("h3",_e,r(l(e)("weappUpload")),1),o(n,{label:l(e)("uploadKey"),prop:"upload_private_key"},{default:p(()=>[s("div",me,[o(A,{modelValue:t.upload_private_key,"onUpdate:modelValue":a[6]||(a[6]=d=>t.upload_private_key=d),api:"sys/document/wechat"},null,8,["modelValue"])]),s("div",fe,r(l(e)("uploadKeyTips")),1),s("div",ve,r(l(e)("uploadIpTips"))+r(t.upload_ip),1)]),_:1},8,["label"])]),_:1}),o(m,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[s("h3",he,r(l(e)("theServerSetting")),1),o(n,{label:"URL"},{default:p(()=>[o(i,{"model-value":t.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[s("div",{class:"cursor-pointer",onClick:a[7]||(a[7]=d=>_(t.serve_url))},r(l(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),o(n,{label:"Token",prop:"token"},{default:p(()=>[o(i,{modelValue:t.token,"onUpdate:modelValue":a[8]||(a[8]=d=>t.token=d),placeholder:l(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",ge,r(l(e)("tokenTips")),1)]),_:1}),o(n,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:p(()=>[o(i,{modelValue:t.encoding_aes_key,"onUpdate:modelValue":a[9]||(a[9]=d=>t.encoding_aes_key=d),placeholder:l(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",we,r(l(e)("encodingAESKeyTips")),1)]),_:1}),o(n,{label:l(e)("encryptionType"),prop:"encryption_type"},{default:p(()=>[o($,{modelValue:t.encryption_type,"onUpdate:modelValue":a[10]||(a[10]=d=>t.encryption_type=d)},{default:p(()=>[o(v,{label:"not_encrypt"},{default:p(()=>[f(r(l(e)("cleartextMode")),1)]),_:1}),o(v,{label:"compatible"},{default:p(()=>[f(r(l(e)("compatibleMode")),1)]),_:1}),o(v,{label:"safe"},{default:p(()=>[f(r(l(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),s("div",be,r(l(e)("cleartextModeTips")),1),s("div",ye,r(l(e)("compatibleModeTips")),1),s("div",ke,r(l(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),o(m,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:p(()=>[s("div",xe,[s("h3",Ve,r(l(e)("functionSetting")),1)]),o(n,{label:l(e)("requestUrl")},{default:p(()=>[o(i,{"model-value":t.request_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[s("div",{class:"cursor-pointer",onClick:a[11]||(a[11]=d=>_(t.request_url))},r(l(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),o(n,{label:l(e)("socketUrl")},{default:p(()=>[o(i,{"model-value":t.socket_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[s("div",{class:"cursor-pointer",onClick:a[12]||(a[12]=d=>_(t.socket_url))},r(l(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),o(n,{label:l(e)("uploadUrl")},{default:p(()=>[o(i,{"model-value":t.upload_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[s("div",{class:"cursor-pointer",onClick:a[13]||(a[13]=d=>_(t.upload_url))},r(l(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),o(n,{label:l(e)("downloadUrl")},{default:p(()=>[o(i,{"model-value":t.download_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:p(()=>[s("div",{class:"cursor-pointer",onClick:a[14]||(a[14]=d=>_(t.download_url))},r(l(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[M,c.value]]),s("div",Pe,[s("div",Ue,[o(R,{type:"primary",loading:c.value,onClick:a[15]||(a[15]=d=>E(h.value))},{default:p(()=>[f(r(l(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{sl as default};