Skip to content

优化:分享项目对话框(检查项目是否推荐过) #70

@521xueweihan

Description

@521xueweihan

背景

防止用户在提交项目时,写了半天项目描述,提交时才发现项目已存在。

需求

image

在分享项目的对话框中,增加一个「检查项目是否存在的按钮」,交互上做成“按钮”或者“离开地址输入框后,自动检查”,具体交互方式由开发者自行决定。

最后,展示请求接口检查结果的给用户,展示样式带 icon 和颜色(醒目)。

(可选)加一个 描述本地缓存吧,防止用户误触没有提交,导致未提交的内容消失不见。

接口

地址:https://local.api.hellogithub.com/docs#/repository/check_repo_v1_repository_check__get

方法:GET

参数:
- url(必填):项目地址

响应:
- 400:项目地址错误
- 200:
{ "success": true, "data": { "is_exist": true }, "message": "项目已存在,无法再次提交。" }
{ "success": true, "data": { "is_exist": false } }

Metadata

Metadata

Labels

feat新功能

Type

No type

Projects

Status

第二期(2023)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions