uniclound创建新项目全流程

1、创建 xxxx-node(项目服务端+H5端),此过程中需要创建云空间。

  导入 uni-cloud-router

2、创建xxxx-min(小程序端)

3、创建xxxx-admin (后台管理端),此时可覆盖-node项目中的内容。若先创建-node项目则有可能覆盖admin云函数内容,导致不能运行。

  先别创建管理员账号,等修改好 -node项目中的 uni-id/config.json中的密码token之后。

4、更新xxxx-node中的 公共依赖与函数

5、修改xxxx-node  common/uni-config-center/uni-id/config.json

"passwordSecret": "passwordSecret-demo",
  "tokenSecret": "tokenSecret-demo",
"mp-weixin": {
        "tokenExpiresIn": 259200,
        "tokenExpiresThreshold": 86400,
    "oauth": {
      "weixin": {
        "appid": "微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取",
        "appsecret": "微信小程序后台获取的appsecret"
      }
    }
  },

  common 文件夹上右键,安装 uni-cloud-router

      xxxx-node common/uni-config-center 右键 上传

6、在xxxx-admin中更新 公共模块,覆盖  common/uni-config-center/uni-id/config.json

7、登录xxxx-admin 创建超级管理员账号、并隐藏创建超级管理员入口

 

posted @ 2023-05-09 10:11  MvloveYouForever  阅读(61)  评论(0)    收藏  举报