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

大佬想问您一下关于protobufjs的问题 #17

Open
yangzhenxi opened this issue Sep 2, 2020 · 2 comments
Open

大佬想问您一下关于protobufjs的问题 #17

yangzhenxi opened this issue Sep 2, 2020 · 2 comments

Comments

@yangzhenxi
Copy link

request.js下'framework.PBMessageRequest'这个是什么怎么得到的呀
// 请求体message
const PBMessageRequest = protoRoot.lookup('framework.PBMessageRequest')
// 响应体的message
const PBMessageResponse = protoRoot.lookup('framework.PBMessageResponse')

@fengxianqi
Copy link
Owner

fengxianqi commented Sep 15, 2020 via email

@wangwendong-code
Copy link

re

抱歉现在才看到邮件。 framework.PBMessageRequest是:命名空间+定义的类名。 具体定义的文件在: https://github.com/fengxianqi/front_end-demos/blob/master/src/vue-protobuf/src/proto/MessageType.proto 命名空间就是:package framework;。 打包出来的js是可以通过framework.PBMessageRequest取到的哈。 yangzhenxi [email protected] 于2020年9月2日周三 上午11:21写道:

request.js下'framework.PBMessageRequest'这个是什么怎么得到的呀 // 请求体message const PBMessageRequest = protoRoot.lookup('framework.PBMessageRequest') // 响应体的message const PBMessageResponse = protoRoot.lookup('framework.PBMessageResponse') — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#17>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX5AHLXUGRRLMQIV74DCHDSDW24FANCNFSM4QSQKXGQ .

那这样的话request.js不就仅仅针对MessageType.proto才能有效吗,针对其他的proto怎么处理?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants