Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,想问一下id是怎么生成的,和提供的时间接口是v2哪个吗 #566

Open
qqqqddasdd opened this issue Jan 10, 2024 · 11 comments
Labels
question Further information is requested

Comments

@qqqqddasdd
Copy link

我看见id: "75f0extui9d7yksklx27hff8xg" 这个看着像md5的一堆,是怎么生成的,有具体的方法吗,还有和提供的时间接口是v2哪个吗

@jia000
Copy link
Collaborator

jia000 commented Jan 11, 2024

id就是一个随机数

import { guid } from '@tmagic/uitls'

const id = guid()

提供的时间接口是什么?

@qqqqddasdd
Copy link
Author

qqqqddasdd commented Jan 11, 2024 via email

@jia000
Copy link
Collaborator

jia000 commented Jan 11, 2024

export const guid = (digit = 8): string =>

@qqqqddasdd
Copy link
Author

怎么样查询出,目前已经存在的id: “75f0extui9d7yksklx27hff8xg”这样的串

@jia000
Copy link
Collaborator

jia000 commented Jan 11, 2024

75f0extui9d7yksklx27hff8xg这个是我在playground里写死的吧

@jia000
Copy link
Collaborator

jia000 commented Jan 11, 2024

id: '75f0extui9d7yksklx27hff8xg',

@qqqqddasdd
Copy link
Author

qqqqddasdd commented Jan 13, 2024 via email

@jia000
Copy link
Collaborator

jia000 commented Jan 15, 2024

是指后台的请求接口?

@qqqqddasdd
Copy link
Author

qqqqddasdd commented Jan 15, 2024 via email

@jia000
Copy link
Collaborator

jia000 commented Jan 15, 2024

一般不会有单独返回时间的接口,有需要都是会在其他接口中提供时间,不会单独为了时间去发起一个请求。

建议不要随便去用其他方的接口,这样并不可靠,接口发生变更并不会通知你

@qqqqddasdd
Copy link
Author

qqqqddasdd commented Jan 16, 2024 via email

@jia000 jia000 added the question Further information is requested label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants