askbot-dragon 1.5.47-beta → 1.5.49-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5041,7 +5041,8 @@ export default {
|
|
|
5041
5041
|
]
|
|
5042
5042
|
}
|
|
5043
5043
|
},
|
|
5044
|
-
answerRadios:
|
|
5044
|
+
answerRadios:{"actionCategory":"START_NODE","apiKey":"922efa8842d94d9bb9580c4fef9375ee","content":{"options":[{"valueText":"今天天气如何","apiKey":"922efa8842d94d9bb9580c4fef9375ee","scope":"INTENT","name":"111","value":"158871"},{"valueText":"询问是否需要日结","apiKey":"4a898f3ac02544efb74869fa74c77974","scope":"INTENT","name":"222","chooseIntentVisible":false,"value":"145846"}],"description":"点选介绍"},"id":"653a1fda31b47170bcc606ec","type":"answer_radio","sessionId":1698309058454,"keyId":"e24fc9c6-94c4-4883-a655-80d3bc06c309_________"},
|
|
5045
|
+
// answerRadios: { "content": { "options": [{ "scope": "KNOWLEDGE", "name": "本文提供了什么内容?", "value": "64915d6e098ec248701da267" }, { "scope": "KNOWLEDGE", "name": "什么是街舞穿搭指南?", "value": "64915d6e098ec248701da267" }, { "scope": "KNOWLEDGE", "name": "为什么街舞爱好者需要关注本文?", "value": "64915d6e098ec248701da267" }], "description": "了解更多", "isKnowledgeSummary": true }, "id": "knowledgeRecdNodeId", "type": "answer_radio", "sessionId": 1687251699065, "keyId": "139480f2-5af1-44fd-a7bd-a73dd7b566b7_________", "isKnowledgeSummary": true },
|
|
5045
5046
|
htmlContainer: '<input placeholder="请输入"></input>',
|
|
5046
5047
|
isOpen: true
|
|
5047
5048
|
}
|
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
class="options-item"
|
|
10
10
|
:class="index!==msg.content.options.length -1?'recommend-item':'last-item'"
|
|
11
11
|
:key="msg.nodeId + '_' + index"
|
|
12
|
-
@click="
|
|
13
|
-
$emit(
|
|
14
|
-
'onRadioClick',msg.id +'_' + index + '_' + option.value + '_' + option.name,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:''
|
|
15
|
-
)">
|
|
12
|
+
@click="radioClick(msg,option,index)">
|
|
16
13
|
|
|
17
14
|
<!-- <el-tooltip class="item" effect="dark" :content="option.name" placement="bottom-start" v-if="!isMobile">
|
|
18
15
|
<span > {{ option.name }}</span>
|
|
@@ -26,30 +23,35 @@
|
|
|
26
23
|
|
|
27
24
|
<script>
|
|
28
25
|
export default {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
name: "answerRadio",
|
|
27
|
+
data(){
|
|
28
|
+
return{
|
|
29
|
+
isMobile:false,
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
props:['msg'],
|
|
33
|
+
mounted(){
|
|
34
|
+
console.log(this.msg,'msg');
|
|
35
|
+
this.judgeIsMobile();
|
|
36
|
+
},
|
|
37
|
+
methods:{
|
|
38
|
+
judgeIsMobile() {
|
|
39
|
+
let flag = navigator.userAgent.match(
|
|
40
|
+
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
41
|
+
);
|
|
42
|
+
if (flag) {
|
|
43
|
+
this.isMobile = true;
|
|
44
|
+
} else {
|
|
45
|
+
this.isMobile = false;
|
|
46
|
+
}
|
|
47
|
+
console.log(this.isMobile,'this.isMobile');
|
|
48
|
+
},
|
|
49
|
+
radioClick(msg,option,index){
|
|
50
|
+
console.log(msg,option,index);
|
|
51
|
+
console.log(msg.id +'_' + index + '_' + option.value + '_' + option.name,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:'',option.apiKey);
|
|
52
|
+
this.$emit('onRadioClick',msg.id +'_' + index + '_' + option.value + '_' + option.name,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:'',option.apiKey)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
53
55
|
|
|
54
56
|
}
|
|
55
57
|
</script>
|