goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 2.12 kB
JavaScript
import{S as a}from"./ServiceInstaller-353ade02.js";import{a as l}from"./service-e8be9e71.js";import{b as h}from"./service.space-55b6348e.js";import{_ as p,m as u,A as v,r as m,D as f,o as s,c as i,G as _,h as d,j}from"./index-20f43531.js";import"./PluginSelector-dde8297a.js";import"./QueryModelView-c4a51a76.js";import"./InnerRouterViewWindow-ee1eceb1.js";import"./service.version-970fc42f.js";import"./wechat-ae447c56.js";const g={components:{ServiceInstaller:a},data(){return{loading:!0,route:{space:null,service:null,majorVersion:null},space:null,service:null,project:null}},computed:{...u(["currentProject"])},methods:{fetchSpace(){h(this.route.space).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){if(e==null||e===""){this.project=null;return}v(e).then(r=>{this.project=r}).catch(r=>{this.$tip.apiFailed(r)})}},created(){this.route.space=this.$route.query.s,this.route.service=this.$route.query.n,this.route.majorVersion=this.$route.query.major,this.fetchSpace(),this.fetchService(),this.currentProject!=null&&this.handleProjectChange(this.currentProject)}},S={class:"page"},y={class:"wrap"};function P(e,r,C,V,t,o){const c=m("ServiceInstaller"),n=f("loading");return s(),i("div",S,[_((s(),i("div",y,[t.space!=null&&t.service!=null?(s(),d(c,{key:0,space:t.space.name,service:t.service.name,"service-price":t.service.price.price,"service-lease":t.service.latestLease,version:t.service.defaultMajorVersion.version,versions:t.service.defaultMajorVersion.versions,"project-config":t.project,"with-title":!0,"with-install-button":!0,onChangeProject:o.handleProjectChange,onInstalled:r[0]||(r[0]=k=>e.$router.push({name:"Workbench"}))},null,8,["space","service","service-price","service-lease","version","versions","project-config","onChangeProject"])):j("",!0)])),[[n,t.loading]])])}const N=p(g,[["render",P],["__scopeId","data-v-5df54917"]]);export{N as default};