全栈小学生 98b1289ede up
2026-01-13 09:17:40 +08:00

2 lines
4.1 KiB
JavaScript

import{d as M,v as B,f as U,r as v,l as D,X as N,h as b,c as R,e as a,w as s,u as t,J as T,m as $,a as n,t as d,k as l,i as m,aA as L,L as P,D as F,E as H,G as K,H as O,M as S}from"./index-3f969305.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{g as j,s as G}from"./app-cd4d74d8.js";const J={class:"main-container"},X={class:"panel-title !text-sm"},q={class:"form-tip flex items-center"},z={class:"form-tip"},Q={class:"form-tip"},W={class:"panel-title !text-sm"},Y={class:"form-tip"},Z={class:"fixed-footer-wrap"},ee={class:"fixed-footer"},ce=M({__name:"config",setup(ae){const V=B(),k=U(),g=V.meta.title,r=v(!0),o=D({uni_app_id:"",app_name:"",android_app_key:"",application_id:"",wechat_app_id:"",wechat_app_secret:""}),f=v(),y=N(()=>({}));j().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,G(o).then(()=>{r.value=!1}).catch(()=>{r.value=!1}))})},h=i=>{window.open(i)},A=()=>{k.push("/channel/app")};return(i,e)=>{const C=L,_=P,c=F,w=H,u=K,I=O,E=S;return b(),R("div",J,[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}),T((b(),$(I,{class:"page-form mt-[15px]",model:o,"label-width":"170px",ref_key:"formRef",ref:f,rules:t(y)},{default:s(()=>[a(_,{class:"box-card !border-none mt-[15px]",shadow:"never"},{default:s(()=>[n("h3",X,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",q,[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",z,[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",Y,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",Z,[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};