function launch(url) {
  return new Promise((resolve, reject) => {
    // 调用原生插件的 launch 方法
    uni.requireNativePlugin('urlLauncher').launch({ url }, (res) => {
      if (res.success) {
        resolve()
      }
      else {
        reject(res.message)
      }
    })
  })
}

export default {
  launch,
}
