Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Jul 26, 2024
1 parent 6496453 commit 61b09f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions src/components/ProjectRunner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 61b09f2

Please sign in to comment.