Tencent / tmagic-editor

Other
4.13k stars 692 forks source link

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

Open qqqqddasdd opened 5 months ago

qqqqddasdd commented 5 months ago

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

jia000 commented 5 months ago

id就是一个随机数

import { guid } from '@tmagic/uitls'

const id = guid()

提供的时间接口是什么?

qqqqddasdd commented 5 months ago

不会吧,这个随机数的生成计算方式是啥

---原始邮件--- 发件人: @.> 发送时间: 2024年1月11日(周四) 中午11:41 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Tencent/tmagic-editor] 你好,想问一下id是怎么生成的,和提供的时间接口是v2哪个吗 (Issue #566)

id就是一个随机数 提供的时间接口是什么?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jia000 commented 5 months ago

https://github.com/Tencent/tmagic-editor/blob/22e8ae47f1c06d970891adb607b2119bd7ff2198/packages/utils/src/index.ts#L161

qqqqddasdd commented 5 months ago

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

jia000 commented 5 months ago

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

jia000 commented 5 months ago

https://github.com/Tencent/tmagic-editor/blob/22e8ae47f1c06d970891adb607b2119bd7ff2198/playground/src/configs/dsl.ts#L21

qqqqddasdd commented 5 months ago

问一下腾讯视频有没有可以用的时间接口,13位时间戳的

---原始邮件--- 发件人: @.> 发送时间: 2024年1月11日(周四) 晚上7:36 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Tencent/tmagic-editor] 你好,想问一下id是怎么生成的,和提供的时间接口是v2哪个吗 (Issue #566)

https://github.com/Tencent/tmagic-editor/blob/22e8ae47f1c06d970891adb607b2119bd7ff2198/playground/src/configs/dsl.ts#L21

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jia000 commented 5 months ago

是指后台的请求接口?

qqqqddasdd commented 5 months ago

---原始邮件--- 发件人: @.> 发送时间: 2024年1月15日(周一) 下午2:10 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Tencent/tmagic-editor] 你好,想问一下id是怎么生成的,和提供的时间接口是v2哪个吗 (Issue #566)

是指后台的请求接口?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jia000 commented 5 months ago

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

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

qqqqddasdd commented 5 months ago

消耗积分后,在接口查看积分被消耗的时间,这个时间带毫秒,这个时间是代表消耗前还是消耗后的时间

---原始邮件--- 发件人: @.> 发送时间: 2024年1月15日(周一) 下午4:45 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Tencent/tmagic-editor] 你好,想问一下id是怎么生成的,和提供的时间接口是v2哪个吗 (Issue #566)

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

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>