niucloud/niucloud/public/admin/assets/config-0d421202.js
2025-11-13 09:54:45 +08:00

2 lines
4.1 KiB
JavaScript

import{d as M,y as B,f as N,r as v,n as U,l as R,h as b,c as T,e as a,w as s,u as t,Z as D,s as $,a as n,t as d,q as l,i as m,b4 as L,a9 as P,L as F,E as K,M as O,N as S,a3 as j}from"./index-6fd8f478.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{g as q,s as H}from"./app-c876f7a6.js";const Z={class:"main-container"},z={class:"panel-title !text-sm"},G={class:"form-tip flex items-center"},J={class:"form-tip"},Q={class:"form-tip"},W={class:"panel-title !text-sm"},X={class:"form-tip"},Y={class:"fixed-footer-wrap"},ee={class:"fixed-footer"},ce=M({__name:"config",setup(ae){const V=B(),y=N(),g=V.meta.title,r=v(!0),o=U({uni_app_id:"",app_name:"",android_app_key:"",application_id:"",wechat_app_id:"",wechat_app_secret:""}),f=v(),k=R(()=>({}));q().then(i=>{Object.assign(o,i.data),r.value=!1});const x=async i=>{r.value||!i||await i.validate(async e=>{e&&(r.value=!0,H(o).then(()=>{r.value=!1}).catch(()=>{r.value=!1}))})},h=i=>{window.open(i)},A=()=>{y.push("/channel/app")};return(i,e)=>{const C=L,_=P,c=F,w=K,u=O,I=S,E=j;return b(),T("div",Z,[a(_,{class:"card !border-none",shadow:"never"},{default:s(()=>[a(C,{content:t(g),icon:i.ArrowLeft,onBack:e[0]||(e[0]=p=>A())},null,8,["content","icon"])]),_:1}),D((b(),$(I,{class:"page-form mt-[15px]",model:o,"label-width":"170px",ref_key:"formRef",ref:f,rules:t(k)},{default:s(()=>[a(_,{class:"box-card !border-none mt-[15px]",shadow:"never"},{default:s(()=>[n("h3",z,d(t(l)("appInfo")),1),a(u,{label:t(l)("uniAppId"),prop:"uni_app_id"},{default:s(()=>[a(c,{modelValue:o.uni_app_id,"onUpdate:modelValue":e[1]||(e[1]=p=>o.uni_app_id=p),modelModifiers:{trim:!0},placeholder:"",class:"input-width",clearable:""},null,8,["modelValue"]),n("div",G,[m(d(t(l)("uniAppIdTips"))+" ",1),a(w,{link:"",type:"primary",onClick:e[2]||(e[2]=p=>h("https://www.dcloud.io/"))},{default:s(()=>[m(d(t(l)("toCreate")),1)]),_:1})])]),_:1},8,["label"]),a(u,{label:t(l)("appName"),prop:"app_name"},{default:s(()=>[a(c,{modelValue:o.app_name,"onUpdate:modelValue":e[3]||(e[3]=p=>o.app_name=p),modelModifiers:{trim:!0},placeholder:"",class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),a(u,{label:t(l)("androidAppKey"),prop:"android_app_key"},{default:s(()=>[a(c,{modelValue:o.android_app_key,"onUpdate:modelValue":e[4]||(e[4]=p=>o.android_app_key=p),modelModifiers:{trim:!0},placeholder:"",class:"input-width",clearable:""},null,8,["modelValue"]),n("div",J,[m(d(t(l)("androidAppKeyTips"))+" ",1),n("span",{class:"text-primary cursor-pointer",onClick:e[5]||(e[5]=p=>h("https://nativesupport.dcloud.net.cn/AppDocs/usesdk/appkey.html"))},"查看详情")])]),_:1},8,["label"]),a(u,{label:t(l)("applicationId"),prop:"application_id"},{default:s(()=>[a(c,{modelValue:o.application_id,"onUpdate:modelValue":e[6]||(e[6]=p=>o.application_id=p),modelModifiers:{trim:!0},placeholder:"",class:"input-width",clearable:""},null,8,["modelValue"]),n("div",Q,d(t(l)("applicationIdTips")),1)]),_:1},8,["label"])]),_:1}),a(_,{class:"box-card !border-none mt-[15px]",shadow:"never"},{default:s(()=>[n("h3",W,d(t(l)("wechatAppInfo")),1),a(u,{label:t(l)("wechatAppid"),prop:"app_id"},{default:s(()=>[a(c,{modelValue:o.wechat_app_id,"onUpdate:modelValue":e[7]||(e[7]=p=>o.wechat_app_id=p),modelModifiers:{trim:!0},placeholder:t(l)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),n("div",X,d(t(l)("wechatAppidTips")),1)]),_:1},8,["label"]),a(u,{label:t(l)("wechatAppsecret"),prop:"app_secret"},{default:s(()=>[a(c,{modelValue:o.wechat_app_secret,"onUpdate:modelValue":e[8]||(e[8]=p=>o.wechat_app_secret=p),modelModifiers:{trim:!0},placeholder:t(l)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[E,r.value]]),n("div",Y,[n("div",ee,[a(w,{type:"primary",loading:r.value,onClick:e[9]||(e[9]=p=>x(f.value))},{default:s(()=>[m(d(t(l)("save")),1)]),_:1},8,["loading"])])])])}}});export{ce as default};