diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index a746e10..680f64c 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -31,6 +31,8 @@ jobs: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} + env: + VITE_APP_BASE_API: 'https://zerocat.houlangs.com' uses: actions/setup-node@v3 with: node-version: '20.x' diff --git a/src/components/ProjectRunner.vue b/src/components/ProjectRunner.vue index 6f9242b..a1dc556 100644 --- a/src/components/ProjectRunner.vue +++ b/src/components/ProjectRunner.vue @@ -33,20 +33,20 @@ export default { }, created() { if (this.type === 'scratch') { - this.embedurl = import.meta.env.VITE_APP_SCRATCH_EDITOR + '#' + this.id + this.embedurl = '/scratch/embed.html#' + this.id } if (this.type === 'python') { - this.pythonplayer = import.meta.env.VITE_APP_PYTHON_PLAYER + '?id=' + this.id + this.pythonplayer = import.meta.env.VITE_APP_BASE_API + '/python/next?id=' + this.id } }, watch : { type: function (newType) { if (newType === 'scratch') { - this.embedurl = import.meta.env.VITE_APP_SCRATCH_EDITOR + '#' + this.id + this.embedurl = '/scratch/embed.html#' + this.id } if (newType === 'python') { - this.pythonplayer = import.meta.env.VITE_APP_PYTHON_PLAYER + '?id=' + this.id + this.pythonplayer = import.meta.env.VITE_APP_BASE_API + '/python/next?id=' + this.id } }, id: function (newType) {