askbot-dragon 1.6.50-beta → 1.6.51-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
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<!-- <text-message :text="text" @submitClick="submitClick"></text-message> -->
|
|
38
38
|
<answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge>
|
|
39
|
-
<welcomeSuggest></welcomeSuggest>
|
|
39
|
+
<welcomeSuggest :msg="welcomeSuggest"></welcomeSuggest>
|
|
40
40
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
41
41
|
<div slot="voiceTip">
|
|
42
42
|
松开发送
|
|
@@ -156,6 +156,37 @@ export default {
|
|
|
156
156
|
data() {
|
|
157
157
|
return {
|
|
158
158
|
black: '',
|
|
159
|
+
welcomeSuggest:{
|
|
160
|
+
content:{
|
|
161
|
+
"problemRecommendationValue": [
|
|
162
|
+
"工作不了了呢为什么1",
|
|
163
|
+
"工作不了了呢为什么2",
|
|
164
|
+
"工作不了了呢为什么3",
|
|
165
|
+
"工作不了了呢为什么4",
|
|
166
|
+
"工作不了了呢为什么5",
|
|
167
|
+
"工作不了了呢为什么6",
|
|
168
|
+
"工作不了了呢为什么7",
|
|
169
|
+
"工作不了了呢为什么8",
|
|
170
|
+
"工作不了了呢为什么9",
|
|
171
|
+
"工作不了了呢为什么10",
|
|
172
|
+
"工作不了了呢为什么11",
|
|
173
|
+
"工作不了了呢为什么12",
|
|
174
|
+
"工作不了了呢为什么13"
|
|
175
|
+
],
|
|
176
|
+
"actionType": "SEND_CONTENT",
|
|
177
|
+
"pageCount": 3,
|
|
178
|
+
"enableProblemRecommendation": true,
|
|
179
|
+
"problemRecommendationDesc": "您还可以这样问我",
|
|
180
|
+
"icon": "https://static.guoranbot.com/cdn-office-website/askbot_doc/mmt-cell-img-m1.png",
|
|
181
|
+
"description": "打印机不工作了,如何维修",
|
|
182
|
+
"page": true,
|
|
183
|
+
"scopes": [],
|
|
184
|
+
"title": "解决日常办公问题,寻求帮助",
|
|
185
|
+
"value": [
|
|
186
|
+
"打印机不工作了,如何维修"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
159
190
|
answerVoiceObj: {
|
|
160
191
|
"actionCategory": "START_NODE",
|
|
161
192
|
"apiKey": "81d9d6c3f13d4e1aa239cacee3192475",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="welcome_suggest">
|
|
3
3
|
<div class="title">
|
|
4
4
|
<div class="title_desc">{{ msg.content.problemRecommendationDesc }}</div>
|
|
5
|
-
<div class="title_change_batch" v-if="
|
|
5
|
+
<div class="title_change_batch" v-if="msg.content.problemRecommendationValue.length > msg.content.pageCount" @click="changeBatch">
|
|
6
6
|
<i class="iconfont guoran-tongyichicun-huanyipi"></i>
|
|
7
7
|
<span>换一批</span>
|
|
8
8
|
</div>
|
|
@@ -23,9 +23,8 @@ export default {
|
|
|
23
23
|
props: ["msg"],
|
|
24
24
|
data () {
|
|
25
25
|
return {
|
|
26
|
-
pageCount:
|
|
27
|
-
suggestList: []
|
|
28
|
-
msgSuggestList:[]
|
|
26
|
+
pageCount: 1,
|
|
27
|
+
suggestList: []
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
mounted () {
|
|
@@ -33,12 +32,13 @@ export default {
|
|
|
33
32
|
},
|
|
34
33
|
methods: {
|
|
35
34
|
changeBatch () {
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
console.log(this.pageCount, 'pageCount');
|
|
36
|
+
let msgSuggestList = JSON.parse(JSON.stringify(this.msg.content.problemRecommendationValue))
|
|
37
|
+
this.suggestList = msgSuggestList.splice((this.pageCount - 1) * this.msg.content.pageCount, this.msg.content.pageCount)
|
|
38
38
|
if (this.pageCount == Math.ceil(this.msg.content.problemRecommendationValue.length / this.msg.content.pageCount)) {
|
|
39
|
-
this.pageCount =
|
|
39
|
+
this.pageCount = 1
|
|
40
40
|
} else {
|
|
41
|
-
this.pageCount
|
|
41
|
+
this.pageCount = this.pageCount + 1
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
handleWelcome (item) {
|