1234567891011121314151617181920212223 |
- var child_process = require('child_process')
- var url = 'https://www.gin-vue-admin.com'
- var cmd = ''
- console.log(process.platform)
- switch (process.platform) {
- case 'win32':
- cmd = 'start'
- child_process.exec(cmd + ' ' + url)
- break
- case 'darwin':
- cmd = 'open'
- child_process.exec(cmd + ' ' + url)
- break
- }
|