1、阿里云开通oss存储服务,创建 Bucket

  • 名称随意填
  • 读写权限 选公共读

image.png

2、 设置静态页面

基础设置 -> 静态页面
这一步的目的是为了,打包的资源上传完后 我们可以直接通过域名+路由访问, 不需要加index.html
以shopping.onino.vip 为例
配置前: https://shopping.onino.vip/index.html/+路由
配置后: https://shopping.onino.vip/+ 路由
image.png

3、oss 部署前端资源需要绑定域名

image.png
复制上图所示域名
通过域名解析 指向 oss
image.png

4、oss 绑定域名

image.png

5、设置自有域名

文件管理 -> 选中刚刚上传的index.html 点击详情
选择刚刚添加的自有域名
安装证书的话 可以开启 https
image.png

撒花 完结