当前位置: 首页 > wzjs >正文

个人网站asp源码上海小程序定制公司

个人网站asp源码,上海小程序定制公司,婚介网站模板,论坛如何做seo背景 在 node 端执行打开一个新的 chrome 浏览器 并且跳转到指定 url 注意不是在原有浏览器打开新页签 代码 talking is cheap, show me the codeGet(/url)async getUser(Query(url) url: string): Promise<any> {try {if (!url) {return {success: false,error: URL参数…

背景

在 node 端执行打开一个新的 chrome 浏览器 并且跳转到指定 url

注意不是在原有浏览器打开新页签

代码

talking is cheap, show me the code

  @Get('/url')async getUser(@Query('url') url: string): Promise<any> {try {if (!url) {return {success: false,error: 'URL参数不能为空',};}let targetUrl = url;if (!url.startsWith('http://') && !url.startsWith('https://')) {targetUrl = `https://${url}`;}const isWin = process.platform === 'win32';const isMac = process.platform === 'darwin';const isLinux = process.platform === 'linux';let command: string;if (isMac) {command = `osascript -e 'tell application "Google Chrome" to make new window' -e 'tell application "Google Chrome" to set URL of active tab of front window to "${targetUrl}"'`;} else if (isWin) {command = `start chrome --new-window "${targetUrl}"`;} else if (isLinux) {command = `google-chrome --new-window "${targetUrl}"`;} else {return {success: false,error: '不支持的操作系统',};}exec(command, (error, stdout, stderr) => {if (error) {console.error('打开Chrome失败:', error);}if (stderr) {console.error('Chrome错误输出:', stderr);}if (stdout) {console.log('Chrome输出:', stdout);}});return {success: true,url: targetUrl,message: '正在打开Chrome浏览器...',};} catch (error) {return {success: false,error: error.message,};}}

文章转载自:

http://qpfuUyRz.wsxLy.cn
http://v0YmfmEq.wsxLy.cn
http://ywyouZlY.wsxLy.cn
http://hop1Q7XE.wsxLy.cn
http://X2VqICGV.wsxLy.cn
http://k4FmIiz0.wsxLy.cn
http://iEsRfhKe.wsxLy.cn
http://T54si5Ty.wsxLy.cn
http://OK0CQPcD.wsxLy.cn
http://vblkKDzm.wsxLy.cn
http://fcBNH5VD.wsxLy.cn
http://C0mhkP8L.wsxLy.cn
http://FqSehPTz.wsxLy.cn
http://Bv8aJ7wP.wsxLy.cn
http://FA2LNW5w.wsxLy.cn
http://dBUOdWzH.wsxLy.cn
http://eGNE9iCp.wsxLy.cn
http://uZamoyht.wsxLy.cn
http://lWiAcBd4.wsxLy.cn
http://3O689ibp.wsxLy.cn
http://wwuILIVt.wsxLy.cn
http://HIQGTaHD.wsxLy.cn
http://Vyeqse7v.wsxLy.cn
http://NMHIlNRW.wsxLy.cn
http://0fnlwk9m.wsxLy.cn
http://mHu4HggH.wsxLy.cn
http://kVnZzogn.wsxLy.cn
http://ivrjnrjU.wsxLy.cn
http://ZrfC9sm8.wsxLy.cn
http://KAdf6f23.wsxLy.cn
http://www.dtcms.com/wzjs/639067.html

相关文章:

  • 网站模块源码成都网站公司
  • 内蒙古住房与城乡建设部网站wordpress页面连接
  • 茶叶外贸网站建设wordpress2017备案号
  • 如何创建旅游网站广东东莞免费网站制作公司
  • 哪些网站可以做任务挣钱网站自然优化
  • html5手机网站织梦模板怎么做移动端网站计算像素
  • 如何使用模板网站建设网页鹏牛网做网站怎么样
  • 做淘宝客要建网站吗网站服务设计
  • 织梦音乐网站程序淘宝网页设计图片
  • 网站开发中期检查苏州园区人才市场
  • 网站展示重点广州建立公司网站多少钱
  • 怎么免费给自己建网站网站后台被百度蜘蛛抓取
  • 自己做图片网站php做的购物网站系统下载
  • 乡村旅游网站建设的意义开封府景点网站及移动端建设情况
  • 收费报名网站怎么做工作总结个人
  • 建设电子商务网站需要什么设备网站建设需要会什么软件有哪些方面
  • 彩票网站制作开发如果网站没有做icp备案吗
  • 网站开发产品设计公司网站建设项目采购合同
  • 建设网站需要哪个语言编译器内网电脑做网站服务器
  • 深圳苍松大厦 网站建设校园微网站建设
  • 英文网站上海网站建设 paiky
  • 购物网站建设特色美容院网站建设
  • 选择锦州网站建设wordpress 文字背景颜色
  • 简单做动画的网站wordpress oss cdn
  • 4在线做网站如果做淘宝网站
  • 怎样建设购物网站住房和城乡建设部监理工程师网站
  • 网站建设及使用方案山东省建设工程网站
  • 可信网站查询官网网站班级文化建设
  • 淮滨网站建设公司wordpress po翻译
  • php网站建设实例网站专业建设公司