You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
611 B

  1. /*
  2. 商用代码公司自用产品无需授权
  3. 若作为代码出售的产品任何涉及代码交付第三方作为后续开发必须保留此脚本
  4. 或标注原作者信息
  5. 否则将依法维权
  6. */
  7. var child_process = require('child_process')
  8. var url = 'https://www.gin-vue-admin.com'
  9. var cmd = ''
  10. console.log(process.platform)
  11. switch (process.platform) {
  12. case 'win32':
  13. cmd = 'start'
  14. child_process.exec(cmd + ' ' + url)
  15. break
  16. case 'darwin':
  17. cmd = 'open'
  18. child_process.exec(cmd + ' ' + url)
  19. break
  20. }