安装
npm i @wm/vue3-h5-hooks
注意: 安装公司私有npm包需要先配置私有库的registry
- 设置仓库
npm set registry=https://nexus.sxftwork.com/repository/westmoney-npm-host/
2、配置nexus的_auth, 值为“用户名:密码”base64字符串
npm set _auth=(username:password in base64)
3、配置私有域的registry
npm set @wm:registry=https://nexus.sxftwork.com/repository/westmoney-npm-host/
4、将公共registry重新设置为npmjs源或者淘宝源
useDownloadApp
下载app(已安装app的用户,通过配置url参数可以跳转到对应的业务页面)
url: 为可选参数,可以不传,不传默认跳转到app的话题广场(https://www.westmoney.com/explore/topic)
Usage
<script>
import { useDownloadApp } from '@wm/vue3-h5-hooks'
const { handleJoin } = useDownloadApp()
</script>
<template>
<div
@click="handleJoin({url: 'https://game.westmoney10.com/guessgame/home'})"
>
下载App
</div>
</template>