goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 2.13 kB
JavaScript
import{S as n}from"./ServiceInstaller-8d2432a8.js";import{a as l}from"./service-55b5980f.js";import{a as p}from"./service.space-e6e48f9b.js";import{_ as h,m as u,G as v,r as m,A as f,o as s,c as i,B as _,h as d,j}from"./index-f4458ed0.js";import"./ServiceCodeErrorWindow-f52270fe.js";import"./QueryModelView-63c9424b.js";import"./InnerRouterViewWindow-b083c67a.js";import"./service.version-3e274eac.js";import"./wechat-ae447c56.js";const g={components:{ServiceInstaller:n},data(){return{loading:!0,route:{space:null,service:null,majorVersion:null},space:null,service:null,project:null}},computed:{...u(["currentProject"])},methods:{fetchSpace(){p(this.$route.params.spaceName).then(e=>{this.space=e}).catch(e=>{this.$tip.apiFailed(e)})},fetchService(){this.loading=!0,l({space:this.route.space,service:this.route.service,majorVersion:this.route.majorVersion}).then(e=>{this.service=e}).catch(e=>{this.$tip.apiFailed(e)}).finally(()=>{this.loading=!1})},handleProjectChange(e){e==null||e===""||v(e).then(t=>{this.project=t}).catch(t=>{this.$tip.apiFailed(t)})}},created(){this.route.space=this.$route.params.spaceName,this.route.service=this.$route.params.serviceName,this.route.majorVersion=this.$route.query.major,this.fetchSpace(),this.fetchService(),this.currentProject!=null&&this.handleProjectChange(this.currentProject)}},S={class:"page"},P={class:"wrap"};function y(e,t,C,V,r,c){const o=m("ServiceInstaller"),a=f("loading");return s(),i("div",S,[_((s(),i("div",P,[r.space!=null&&r.service!=null?(s(),d(o,{key:0,space:r.space.name,service:r.service.name,"service-price":r.service.price.price,"service-lease":r.service.latestLease,version:r.service.defaultMajorVersion.version,versions:r.service.defaultMajorVersion.versions,"project-config":r.project,"with-title":!0,"with-install-button":!0,onChangeProject:c.handleProjectChange,onInstalled:t[0]||(t[0]=B=>e.$router.push({name:"Workbench"}))},null,8,["space","service","service-price","service-lease","version","versions","project-config","onChangeProject"])):j("",!0)])),[[a,r.loading]])])}const $=h(g,[["render",y],["__scopeId","data-v-ac21af28"]]);export{$ as default};