Переглянути джерело

修登录后设置成员角色逻辑

tanghongbin 5 роки тому
батько
коміт
c03628e20a
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      web/login.html

+ 1 - 0
web/login.html

@@ -196,6 +196,7 @@
                 if (data['code'] == 0) {
                     setCookie('access_token', data['res']['access_token'], data['res']['access_expire'])
                     setCookie('refresh_token', data['res']['refresh_token'], data['res']['refresh_expire'])
+                    setCookie('role', data['res']['role_type'], data['res']['access_expire'])
                     console.log(data)
                     //window.location.href = "http://localhost:63339/web/index.html";
                     if (username == 'saler') {