TaleLin / lin-cms-flask

🎀A simple and practical CMS implememted by Flask
http://doc.cms.talelin.com/
Other
832 stars 216 forks source link

/cms/user/permissions 接口缺失 #110

Closed LuCyCue closed 3 years ago

LuCyCue commented 4 years ago

下载了lin-cms-vue 登录的时候,发现flask项目中没有/cms/user/permissions 接口

colorful3 commented 4 years ago

你好,目前flask版本对应前端的 0.2.x。 已在文档的版本日志中说明。

Bryanthelol commented 4 years ago

你好,为什么我下载前端的0.2.x版本后,login的时候,代码还是会请求permissions接口?

static async getPermissions() {
    const info = await get('cms/user/permissions')
    const storeUser = store.getters.user === null ? {} : store.getters.user
    return Object.assign({ ...storeUser }, info)
  }
Bryanthelol commented 4 years ago

看了下,lin-cms-vue应该是0.2.0-0.2.2可以,而不是0.2.x

skeletonli commented 4 years ago

requirements.txt文件中要求Flask==1.0.2, 但是前端登录会报 127.0.0.1 - - [30/Sep/2020 16:31:37] "OPTIONS /cms/user/permissions HTTP/1.1" 404 - permissions缺失,卸载Flask==1.0.2改 为 Flask==0.2.0,后端报错启动不了。,请问应该用哪个版本?

hezygo commented 3 years ago

请问这个问题怎么破呢?前端用的是0.2.x,后台flask 127.0.0.1 - - [01/Dec/2020 11:23:52] "POST /cms/user/login HTTP/1.1" 200 - [2020-12-01 11:23:52,903] DEBUG in app: [OPTIONS] -> [/cms/user/permissions] from:127.0.0.1 costs:2.020 ms data:{ param: {}, body: {} } 127.0.0.1 - - [01/Dec/2020 11:23:52] "OPTIONS /cms/user/permissions HTTP/1.1" 404 -


已经解决 下载 VUE 的时候记得切换分支为 0.2.x 就好了