2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{d as e,a,h as l,i as t,w as s,j as o,J as r,K as i,m as p,a9 as d,Y as n,bh as u,t as c,M as m,p as x,q as f}from"./index-849cf30e.js";import{_}from"./u-input.46b72faa.js";import{_ as b}from"./u-button.9fa3f2a0.js";import"./u-icon.e3aa4770.js";import"./_plugin-vue_export-helper.1b428a4d.js";import"./u-loading-icon.d012ecbf.js";const g=e({__name:"develop",setup(e){const g=a({siteId:"",baseUrl:`${location.origin}/api/`,imgUrl:""}),h=()=>{if(0==g.siteId.length)return void d({title:n("siteIdPlaceholder"),icon:"none"});if(!/^[0-9]+$/.test(g.siteId))return void d({title:n("pleaseEnterNumber"),icon:"none"});uni.setStorageSync("wap_site_id",g.siteId);let e=uni.getStorageSync("develop_before_path")||"/app/pages/index/index";"/app/pages/index/develop"==e&&(e="/app/pages/index/index"),e=e.replace("/",""),uni.removeStorageSync("develop_before_path"),location.href=`${location.origin}${u.h5.router.base}${e}`};return(e,a)=>{const d=c,u=m,v=x(f("u-input"),_),I=x(f("u-button"),b);return l(),t(d,{class:"mt-[80rpx] px-[60rpx]"},{default:s((()=>[o(d,{class:"font-bold text-xl mb-[80rpx]"},{default:s((()=>[r(i(p(n)("developTitle")),1)])),_:1}),o(d,{class:"mb-[40rpx] flex flex-col"},{default:s((()=>[o(u,{class:"mb-[10rpx]"},{default:s((()=>[r(i(p(n)("baseUrl")),1)])),_:1}),o(u,{class:"text-sm"},{default:s((()=>[r(i(g.baseUrl),1)])),_:1})])),_:1}),o(d,{class:"mb-[40rpx] flex flex-col"},{default:s((()=>[o(u,{class:"mb-[10rpx]"},{default:s((()=>[r(i(p(n)("imgUrl")),1)])),_:1}),o(u,{class:"text-sm"},{default:s((()=>[r(i(g.imgUrl),1)])),_:1})])),_:1}),o(d,{class:"mb-[40rpx] flex flex-col"},{default:s((()=>[o(u,{class:"mb-[20rpx]"},{default:s((()=>[r(i(p(n)("siteId")),1)])),_:1}),o(v,{modelValue:g.siteId,"onUpdate:modelValue":a[0]||(a[0]=e=>g.siteId=e),clearable:"",placeholder:p(n)("siteIdPlaceholder")},null,8,["modelValue","placeholder"])])),_:1}),o(I,{type:"primary",onClick:h,class:"mt-[80rpx]"},{default:s((()=>[r(i(p(n)("confirm")),1)])),_:1})])),_:1})}}});export{g as default};
|