<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] # key:template 具體分類 主要是課件中交互題型相關的,因為是固定的不同題型,所以發送的是模板性質的,在下面每個類型里主要介紹發出的消息模板格式是如何的? ## connection 連線 ## wheel 轉盤 只發送一個模板消息 ``` template:{ type:'3', //Number 3 轉盤的數字 wheel:{ payload:JSON.stringfy( { type:'', //play | angle:'' //Number }) } } ``` ## 拖動圖片 開始拖動圖片 ``` template:{ free:{ type:"lockedDrag", payload:JSON.stringfy({"id":"image0"}) }, type:4 } ``` 拖動圖片 ``` template:{ type:'4', //String drag free:{ type:'drag',// String free payload:JSON.stringfy({ x:'', //play | y:'', //play | id:'', //play | userId:'' //Number, }) } } ``` 結束拖動圖片 ``` template:{ free:{ type:"unLockedDrag", payload:JSON.stringfy({"id":"image0"}) }, type:4 } ``` ## ab -choice 選擇器,ad-choice選擇器 答對題目 ``` template:{ choice:{ payload:JSON.stringfy({ "key":"a", userId:'', isRight:true // boolean }) }, type:1 } ``` 答錯題目 ``` template:{ choice:{ payload:JSON.stringfy({ "key":"b", userId:'', isRight:false }) }, type:1 } ``` ## connect 連線題 原理:每次連線正確的信息都會匯總到sync里的m對象信息里,連接正確,那么對應的一題比如a:true設置為true. 點擊選項,發送兩個模板消息 ``` template:{ connection:{ type:'answer', payload:'a' }, type:0, // userId:''// } ``` ``` template:{ connection:{ type:'sync', payload:JSON.stringfy({ "c":{to:'a'}, m:{} }) }, type:0, // userId:''// } ``` 再點擊匹配項目,如果匹配正確,發送3個模板消息 ``` template:{ connection:{ type:'sync', payload:JSON.stringfy({ "c":{to:'a',from:'a'}, m:{a:true} }) }, type:0, // userId:''// } ``` ``` template:{ connection:{ type:'choice', payload:'a' }, type:0, // userId:''// } ``` ``` template:{ connection:{ type:'sync', payload:JSON.stringfy({ "c":{}, m:{a:true} }) }, type:0, // userId:''// } ``` answer部分選擇之后,answer消息發布,同步增加c:to的內容;(共2個模板消息)。 **選錯**choice之后,choice消息發布,另外choice消息仍然一致,將c的內容清空,選擇的anwser清空。(共2個模板消息) 連線重置,發送兩個模板消息,行為本身,sync清空 ``` template:{ connection:{ type:'reset', payload:null }, type:0, // userId:''// } ``` ``` template:{ connection:{ type:'sync', payload:JSON.stringfy({ "c":{}, m:{} }) }, type:0, // userId:''// } ``` ## 篩子 dice 備注:篩子傳送的數組比實際數字-1 開始篩子 ``` template:{ dice:{ payload:JSON.stringfy({ type:'play' //string :play }) }, type:2, // } ``` 結束篩子 ``` template:{ dice:{ payload:JSON.stringfy({ type:'sync', //string :play number:1 }) }, type:2, // } ``` ## card卡片 正常下一張 ``` template:{ card:{ type:'swap', payload:JSON.stringfy({id:0}) }, type:5, // userId:'' } ``` 反面 ``` template:{ card:{ type:'swapAll' }, type:5, // userId:'' } ``` 重置 ``` template:{ card:{ type:'reset' }, type:5, // userId:'' } ``` ## 判斷題 ``` template:{ choice:{ payload:JSON.stringfy({ "key":"b", userId:'', isRight:false }) }, type:1 } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看