简体   繁体   English

使用自适应卡节点打开新的自适应卡

[英]Open new adaptive card with an adaptive card nodeJs

I'm trying to make use of the adaptive cards in bot framework. 我正在尝试在bot框架中使用自适应卡。 I was wondering if i could call a new adaptive card in the conversation using a button in another adaptive card? 我想知道是否可以使用另一个自适应卡中的按钮在对话中调用新的自适应卡? So not an inline adaptive card, but a NEW adaptive card in the conversation. 因此,不是对话式自适应卡,而是会话中的新自适应卡。

How is this possible, maybe some example code? 这怎么可能,也许是一些示例代码? I can't seem to find a solution? 我似乎找不到解决方法?

Many thanks! 非常感谢!

There is an Adaptive Card node sample here, that might be helpful: https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js 这里有一个Adaptive Card节点示例,可能会有所帮助: https : //github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js

The Hotel Search card uses an action of type Action.Submit and demonstrates one method of how to respond with an adaptive card when a button is clicked: 酒店搜索卡使用Action.Submit类型的操作,并演示了一种单击按钮时如何使用自适应卡进行响应的方法:

'actions': [
    {
        'type': 'Action.Submit',
        'title': 'Search',
        'speak': '<s>Search</s>',
        'data': {
            'type': 'hotelSearch'
        }
    }
]

With code to respond here: https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js#L177 在此处提供响应的代码: https : //github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js#L177

And the response: https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/hotels-search.js 响应: https : //github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/hotels-search.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM