askbot-dragon 0.7.56 → 0.7.57

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.
Files changed (62) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +5 -5
  3. package/dragon.iml +7 -7
  4. package/package.json +54 -54
  5. package/public/index.html +30 -30
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/script.js +36 -36
  13. package/src/assets/less/common.css +6773 -6773
  14. package/src/assets/less/converSationContainer/common.less +191 -191
  15. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  16. package/src/assets/less/iconfont.css +37 -37
  17. package/src/assets/less/ticketMessage.less +211 -211
  18. package/src/components/ActionAlertIframe.vue +112 -112
  19. package/src/components/AskIFrame.vue +15 -15
  20. package/src/components/ConversationContainer.vue +1185 -1185
  21. package/src/components/FileType.vue +86 -86
  22. package/src/components/Message.vue +27 -27
  23. package/src/components/actionSatisfaction.vue +107 -107
  24. package/src/components/actionSendToBot.vue +62 -62
  25. package/src/components/answerDissatisfaction.vue +62 -62
  26. package/src/components/answerRadio.vue +76 -76
  27. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  28. package/src/components/ask-components/Msgloading.vue +37 -37
  29. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  30. package/src/components/askVideo.vue +138 -138
  31. package/src/components/assetDetails.vue +370 -370
  32. package/src/components/assetMessage.vue +228 -228
  33. package/src/components/associationIntention.vue +121 -121
  34. package/src/components/botActionSatisfactor.vue +68 -68
  35. package/src/components/chatContent.vue +513 -513
  36. package/src/components/feedBack.vue +136 -136
  37. package/src/components/file/AliyunOssComponents.vue +108 -108
  38. package/src/components/formTemplate.vue +1958 -1949
  39. package/src/components/loadingProcess.vue +164 -164
  40. package/src/components/message/ActionAlertIframe.vue +112 -112
  41. package/src/components/message/ShopMessage.vue +164 -164
  42. package/src/components/message/TextMessage.vue +924 -924
  43. package/src/components/message/TicketMessage.vue +177 -177
  44. package/src/components/message/swiper/index.js +4 -4
  45. package/src/components/message/swiper/ticketSwiper.vue +502 -502
  46. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  47. package/src/components/msgLoading.vue +231 -231
  48. package/src/components/recommend.vue +89 -89
  49. package/src/components/selector/hOption.vue +20 -20
  50. package/src/components/selector/hSelector.vue +199 -199
  51. package/src/components/selector/hWrapper.vue +216 -216
  52. package/src/components/source/BotMessage.vue +24 -24
  53. package/src/components/source/CustomMessage.vue +24 -24
  54. package/src/components/test.vue +260 -260
  55. package/src/components/utils/AliyunIssUtil.js +72 -72
  56. package/src/components/utils/ckeditor.js +124 -124
  57. package/src/components/utils/format_date.js +18 -18
  58. package/src/components/utils/index.js +6 -6
  59. package/src/components/utils/math_utils.js +15 -15
  60. package/src/components/voiceComponent.vue +119 -119
  61. package/src/main.js +44 -44
  62. package/vue.config.js +34 -34
@@ -1,122 +1,122 @@
1
- <template>
2
- <div class="association-intention">
3
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>
5
- </div>
6
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
7
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
8
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
9
- </div>
10
- <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
11
- <p v-html="$options.filters.imageStyle(msg.content.html)"></p>
12
- </div>
13
- <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
14
- <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text"></p>
15
- <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
16
- </div>
17
- <div v-else-if="msgType === 'answer_image'" >
18
- <div
19
- class="association-img"
20
- v-if="msg.content.url"
21
- >
22
- <!-- LPY 原生宽度适配有bug,弃用 -->
23
- <img
24
- :src="msg.content.url"
25
- style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
26
- @click="onImageClick(msg.content.url)"
27
- class="img-class"
28
- />
29
- </div>
30
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
31
- </div>
32
- <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
33
- <div class="association-img" v-if="msg.content.url">
34
- <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
35
- :progress="msg.content.progress"></ask-video>
36
- </div>
37
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
38
- </div>
39
- </div>
40
- </template>
41
-
42
- <script>
43
- import askVideo from "./askVideo";
44
- import Recommend from "./recommend";
45
- export default {
46
- name: "associationIntention",
47
- components: {Recommend, askVideo},
48
- props: ["msg",'msgType','isOpen'],
49
- filters: {
50
- imageStyle: function (html) {
51
- //富文本内图片自适应高度宽度
52
- const regex = new RegExp("<img", "gi");
53
- return html.replace(
54
- regex,
55
- "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
56
- );
57
- },
58
- },
59
- mounted() {
60
- },
61
- methods:{
62
- // 将匹配结果替换表情图片
63
- emotion (res) {
64
- let word = res.replace(/\/#|\/;/gi,'')
65
- const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', '不', '可以', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
66
- let index = list.indexOf(word)
67
- return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${index+1}.png" align="middle">`
68
- },
69
- onRadioClickReco(id, name, apikey) {
70
- this.$emit("onRadioClick", id, name, apikey);
71
- },
72
- onImageClick(url){
73
- this.$emit('onImageClick',url)
74
- },
75
- },
76
- watch:{
77
- isOpen:{
78
- handler(value){
79
- if (value){
80
- let reg = this.msg.content.html
81
- if (reg){
82
- reg = reg.replace('<a',"<span class='isReplace'")
83
- reg = reg.replace('</a>','</span>')
84
- console.debug('reg',reg)
85
- this.msg.content.html = reg
86
- }
87
-
88
- }
89
- else {
90
- let reg = this.msg.content.html
91
- console.debug('reg',reg)
92
- if (reg){
93
- reg = reg.replace("<span class='isReplace'","<a download")
94
- let reg2 = reg
95
- reg2 = reg2.replace('</span>','</a>')
96
- this.msg.content.html = reg2
97
- console.debug('reg',reg2)
98
- }
99
- }
100
- }
101
- }
102
- }
103
- }
104
- </script>
105
-
106
-
107
- <style scoped lang="less">
108
- @import "../assets/less/converSationContainer/common";
109
- .association-intention{
110
- .association-img{
111
- /*display: flex;
112
- align-items: center;
113
- justify-content: center;*/
114
-
115
- }
116
- .answer-rich-text{
117
- /*padding-bottom: 10px;
118
- border-bottom: 1px solid #EEEEEE;*/
119
- }
120
- }
121
-
1
+ <template>
2
+ <div class="association-intention">
3
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>
5
+ </div>
6
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
7
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
8
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
9
+ </div>
10
+ <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
11
+ <p v-html="$options.filters.imageStyle(msg.content.html)"></p>
12
+ </div>
13
+ <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
14
+ <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text"></p>
15
+ <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
16
+ </div>
17
+ <div v-else-if="msgType === 'answer_image'" >
18
+ <div
19
+ class="association-img"
20
+ v-if="msg.content.url"
21
+ >
22
+ <!-- LPY 原生宽度适配有bug,弃用 -->
23
+ <img
24
+ :src="msg.content.url"
25
+ style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
26
+ @click="onImageClick(msg.content.url)"
27
+ class="img-class"
28
+ />
29
+ </div>
30
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
31
+ </div>
32
+ <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
33
+ <div class="association-img" v-if="msg.content.url">
34
+ <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
35
+ :progress="msg.content.progress"></ask-video>
36
+ </div>
37
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
38
+ </div>
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ import askVideo from "./askVideo";
44
+ import Recommend from "./recommend";
45
+ export default {
46
+ name: "associationIntention",
47
+ components: {Recommend, askVideo},
48
+ props: ["msg",'msgType','isOpen'],
49
+ filters: {
50
+ imageStyle: function (html) {
51
+ //富文本内图片自适应高度宽度
52
+ const regex = new RegExp("<img", "gi");
53
+ return html.replace(
54
+ regex,
55
+ "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
56
+ );
57
+ },
58
+ },
59
+ mounted() {
60
+ },
61
+ methods:{
62
+ // 将匹配结果替换表情图片
63
+ emotion (res) {
64
+ let word = res.replace(/\/#|\/;/gi,'')
65
+ const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', '不', '可以', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
66
+ let index = list.indexOf(word)
67
+ return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${index+1}.png" align="middle">`
68
+ },
69
+ onRadioClickReco(id, name, apikey) {
70
+ this.$emit("onRadioClick", id, name, apikey);
71
+ },
72
+ onImageClick(url){
73
+ this.$emit('onImageClick',url)
74
+ },
75
+ },
76
+ watch:{
77
+ isOpen:{
78
+ handler(value){
79
+ if (value){
80
+ let reg = this.msg.content.html
81
+ if (reg){
82
+ reg = reg.replace('<a',"<span class='isReplace'")
83
+ reg = reg.replace('</a>','</span>')
84
+ console.debug('reg',reg)
85
+ this.msg.content.html = reg
86
+ }
87
+
88
+ }
89
+ else {
90
+ let reg = this.msg.content.html
91
+ console.debug('reg',reg)
92
+ if (reg){
93
+ reg = reg.replace("<span class='isReplace'","<a download")
94
+ let reg2 = reg
95
+ reg2 = reg2.replace('</span>','</a>')
96
+ this.msg.content.html = reg2
97
+ console.debug('reg',reg2)
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ </script>
105
+
106
+
107
+ <style scoped lang="less">
108
+ @import "../assets/less/converSationContainer/common";
109
+ .association-intention{
110
+ .association-img{
111
+ /*display: flex;
112
+ align-items: center;
113
+ justify-content: center;*/
114
+
115
+ }
116
+ .answer-rich-text{
117
+ /*padding-bottom: 10px;
118
+ border-bottom: 1px solid #EEEEEE;*/
119
+ }
120
+ }
121
+
122
122
  </style>
@@ -1,69 +1,69 @@
1
- <template>
2
- <div class="bot-action-satisfator">
3
- <div class="replay">
4
- <p class="reply-text" v-html="msg.content.reply_text"></p>
5
- <div v-if="
6
- msg.content.reply_options != null &&
7
- msg.content.reply_options.length > 0
8
- ">
9
- <p
10
-
11
- v-for="(option, index) in msg.content.reply_options"
12
- class="statisfaction-item"
13
- :key="index"
14
- @click="
15
- onSatisfactionClick(
16
- 'user_action_to_unsatisfactory',
17
- option.name,
18
- option.answer, null,msg.apiKey
19
- )
20
- "
21
- >
22
- {{ option.name }}<i class="arsenal_icon arsenalangle-right-solid"></i>
23
- </p>
24
- </div>
25
-
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- name: "botActionSatisfactor",
33
- props:['msg'],
34
- methods:{
35
- onSatisfactionClick(type, choose, answer, answerRadio,answerApiKey) {
36
- this.$emit("onSatisfactionClick", type, choose, answer, answerRadio,answerApiKey);
37
- },
38
- }
39
- }
40
- </script>
41
-
42
- <style scoped lang="less">
43
- @import "../assets/less/converSationContainer/common";
44
- .bot-action-satisfator{
45
- .reply-text{
46
- word-wrap: break-word;
47
- word-break: break-all;
48
- overflow: hidden;
49
- padding: 8px 0 10px 0;
50
- height: auto;
51
- border-bottom: 1px solid #EEEEEE;
52
- }
53
- .statisfaction-item{
54
- padding: 8px 0;
55
- height: 25px;
56
- line-height: 25px;
57
- background-color: #ffffff;
58
- color: #366aff;
59
- cursor:pointer;
60
- display: flex;
61
- align-items: center;
62
- justify-content: space-between;
63
- }
64
- .end{
65
- border-bottom-left-radius: 25px !important;
66
- border-bottom-right-radius: 25px !important;
67
- }
68
- }
1
+ <template>
2
+ <div class="bot-action-satisfator">
3
+ <div class="replay">
4
+ <p class="reply-text" v-html="msg.content.reply_text"></p>
5
+ <div v-if="
6
+ msg.content.reply_options != null &&
7
+ msg.content.reply_options.length > 0
8
+ ">
9
+ <p
10
+
11
+ v-for="(option, index) in msg.content.reply_options"
12
+ class="statisfaction-item"
13
+ :key="index"
14
+ @click="
15
+ onSatisfactionClick(
16
+ 'user_action_to_unsatisfactory',
17
+ option.name,
18
+ option.answer, null,msg.apiKey
19
+ )
20
+ "
21
+ >
22
+ {{ option.name }}<i class="arsenal_icon arsenalangle-right-solid"></i>
23
+ </p>
24
+ </div>
25
+
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ export default {
32
+ name: "botActionSatisfactor",
33
+ props:['msg'],
34
+ methods:{
35
+ onSatisfactionClick(type, choose, answer, answerRadio,answerApiKey) {
36
+ this.$emit("onSatisfactionClick", type, choose, answer, answerRadio,answerApiKey);
37
+ },
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <style scoped lang="less">
43
+ @import "../assets/less/converSationContainer/common";
44
+ .bot-action-satisfator{
45
+ .reply-text{
46
+ word-wrap: break-word;
47
+ word-break: break-all;
48
+ overflow: hidden;
49
+ padding: 8px 0 10px 0;
50
+ height: auto;
51
+ border-bottom: 1px solid #EEEEEE;
52
+ }
53
+ .statisfaction-item{
54
+ padding: 8px 0;
55
+ height: 25px;
56
+ line-height: 25px;
57
+ background-color: #ffffff;
58
+ color: #366aff;
59
+ cursor:pointer;
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: space-between;
63
+ }
64
+ .end{
65
+ border-bottom-left-radius: 25px !important;
66
+ border-bottom-right-radius: 25px !important;
67
+ }
68
+ }
69
69
  </style>