Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 616 Bytes

File metadata and controls

37 lines (32 loc) · 616 Bytes

建库脚本

use rbac
db.createUser({
  user: "rbac",
  pwd: "rbac123",
  roles: [ { role: "readWrite", db: "rbac" } ]
})
db.auth('rbac','rbac123')

调整步骤

    1. .env.development
VUE_APP_BASE_API = 'http://localhost:8080'
    1. src/api/user.js
url: '/user/login'

改为

url: '/auth'
    1. src/utils/request.js
config.headers['X-Token'] = getToken()

改为

config.headers['Authorization'] = 'Bearer ' + getToken()