主机配置机器人框架[supportsInteractivity]

时间:2018-10-06 22:57:30

标签: json node.js config botframework host

我正在研究Webchat bot框架,尤其是在自适应卡的hostconfig部分。 我想使用容器选择动作,但没有预期的显示。 我创建了一个带有容器的基本卡,该容器显示在我的聊天机器人上,但是当我将鼠标光标放在容器上时,该卡不会产生交互效果,而属性supportInteractivity为true。

有人有什么想法吗?

谢谢你

这是我的主机配置:

public function store(Request $request, $id)
{
    $product = Product::find($id);
    $order = new Order();
    $order->user_id = Auth::user()->id;
    $order->product_id = $id;
    $order->qty = $request->get('qty');
    $product->inv = $product->inv - $order->qty;
    $order->save();
    $product->save();

    return redirect('/');
}

有我的卡:

{
  "supportsInteractivity": true,
  "spacing": {
    "small": 4,
    "default": 8,
    "medium": 16,
    "large": 24,
    "extraLarge": 32,
    "padding": 8
  },
  "separator": {
    "lineThickness": 1,
    "lineColor": "#cccccc"
  },
  "fontFamily": "\"Segoe UI\", sans-serif",
  "fontSizes": {
    "small": 12,
    "default": 13,
    "medium": 15,
    "large": 17,
    "extraLarge": 19
  },
  "fontWeights": {
    "lighter": 200,
    "default": 400,
    "bolder": 700
  },
  "containerStyles": {
    "default": {
      "backgroundColor": "#00000000",
      "foregroundColors": {
        "default": {
          "default": "#000000",
          "subtle": "#808c95"
        },
        "accent": {
          "default": "#2e89fc",
          "subtle": "#802E8901"
        },
        "attention": {
          "default": "#ffd800",
          "subtle": "#CCFFD800"
        },
        "good": {
          "default": "#00ff00",
          "subtle": "#CC00FF00"
        },
        "warning": {
          "default": "#ff0000",
          "subtle": "#CCFF0000"
        }
      }
    },
    "emphasis": {
      "backgroundColor": "#08000000",
      "foregroundColors": {
        "default": {
          "default": "#333333",
          "subtle": "#EE333333"
        },
        "accent": {
          "default": "#2e89fc",
          "subtle": "#882E89FC"
        },
        "attention": {
          "default": "#cc3300",
          "subtle": "#DDCC3300"
        },
        "good": {
          "default": "#54a254",
          "subtle": "#DD54A254"
        },
        "warning": {
          "default": "#e69500",
          "subtle": "#DDE69500"
        }
      }
    }
  },
  "imageSizes": {
    "small": 40,
    "medium": 80,
    "large": 160
  },
  "actions": {
    "maxActions": 100,
    "spacing": "default",
    "buttonSpacing": 8,
    "showCard": {
      "actionMode": "inline",
      "inlineTopMargin": 8
    },
    "actionsOrientation": "vertical",
    "actionAlignment": "stretch"
  },
  "adaptiveCard": {
    "allowCustomStyle": false
  },
  "imageSet": {
    "imageSize": "medium",
    "maxImageHeight": 100
  },
  "factSet": {
    "title": {
      "color": "default",
      "size": "default",
      "isSubtle": false,
      "weight": "bolder",
      "wrap": true,
      "maxWidth": 150
    },
    "value": {
      "color": "default",
      "size": "default",
      "isSubtle": false,
      "weight": "default",
      "wrap": true
    },
    "spacing": 8
  }
}

0 个答案:

没有答案