ai-chat-bot-interface 1.7.8 → 1.7.10

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 (56) hide show
  1. package/dist/ai-chat-bot-interface.css +9 -0
  2. package/dist/ai-chat-bot-interface.es.js +13340 -0
  3. package/dist/ai-chat-bot-interface.umd.js +111 -0
  4. package/dist/src/index.d.ts +0 -0
  5. package/package.json +26 -5
  6. package/.prettierignore +0 -5
  7. package/.prettierrc.cjs +0 -37
  8. package/.vscode/extensions.json +0 -3
  9. package/index.html +0 -13
  10. package/index.js +0 -11
  11. package/src/App.vue +0 -39
  12. package/src/ChatUi.less +0 -301
  13. package/src/ChatUi.vue +0 -1087
  14. package/src/assets/styles/public.less +0 -152
  15. package/src/assets/vue.svg +0 -1
  16. package/src/components/DishesCard.vue +0 -369
  17. package/src/components/DishesList.vue +0 -218
  18. package/src/components/MarkdownPlan/MarkdownViewer.vue +0 -34
  19. package/src/components/OperateModule.less +0 -186
  20. package/src/components/OperateModule.vue +0 -392
  21. package/src/components/PlanCard.vue +0 -114
  22. package/src/components/StoreList/StoreCard.vue +0 -72
  23. package/src/components/StoreList/StoreList.vue +0 -27
  24. package/src/components/StoreList/mock.js +0 -411
  25. package/src/components/assistantReplay/assistantReplay.vue +0 -78
  26. package/src/components/icons/ArrowDown.vue +0 -26
  27. package/src/components/icons/ArrowRight.vue +0 -19
  28. package/src/components/icons/BackIcon.vue +0 -19
  29. package/src/components/icons/ClearIcon.vue +0 -18
  30. package/src/components/icons/CloseIcon.vue +0 -17
  31. package/src/components/icons/NewSessionIcon.vue +0 -20
  32. package/src/components/icons/OkIcon.vue +0 -26
  33. package/src/components/icons/SendIcon.vue +0 -22
  34. package/src/components/icons/ThinkingIcon.vue +0 -28
  35. package/src/components/icons/addIcon.vue +0 -18
  36. package/src/components/icons/cameraIcon.vue +0 -22
  37. package/src/components/icons/closeBorderIcon.vue +0 -35
  38. package/src/components/icons/fileIcon.vue +0 -18
  39. package/src/components/icons/loadingIcon.vue +0 -76
  40. package/src/components/icons/loadingIcon2.vue +0 -88
  41. package/src/components/icons/newChat.vue +0 -18
  42. package/src/components/icons/pictureIcon.vue +0 -22
  43. package/src/components/icons/processBar.vue +0 -115
  44. package/src/components/icons/progressRing.vue +0 -63
  45. package/src/components/icons/sendLoadingIcon.vue +0 -35
  46. package/src/components/icons/tagIcon.vue +0 -18
  47. package/src/components/imgeList.vue +0 -63
  48. package/src/components/personalForm/personalForm.vue +0 -634
  49. package/src/components/popup/popup.vue +0 -178
  50. package/src/main.js +0 -26
  51. package/src/style.css +0 -4
  52. package/src/utils/imagesViewer.js +0 -8
  53. package/src/utils/request.js +0 -52
  54. package/src/utils/tools.js +0 -20
  55. package/vite.config.js +0 -33
  56. /package/{public → dist}/vite.svg +0 -0
@@ -1,218 +0,0 @@
1
- <template>
2
- <div class="dl_wrap">
3
- <div class="dl_list" :class="{ show_full: showFull }">
4
- <template v-for="(cate, cIdx) in skuList" :key="cate.category">
5
- <div v-if="showDate(cIdx)">
6
- <div v-if="cIdx > 0" class="sep_line"></div>
7
- <div class="date">
8
- {{ cate.strDate.slice(4, 6) }}月{{ cate.strDate.slice(6) }}日
9
- </div>
10
- </div>
11
- <div v-if="cate.list && cate.list.length" style="padding: 15px 0">
12
- <p class="title">
13
- {{ cate.categoryType }} {{ categoryEnergy(cate) }}kcal
14
- </p>
15
- <div>
16
- <template v-for="dList in cate.list" :key="dList.id">
17
- <dishes-card
18
- v-for="(info, idx) in dList.getCategoryList"
19
- :key="idx"
20
- :info="info"
21
- :def-msg="defMsg"
22
- :open="handleIsOpen(info, cate.category)"
23
- />
24
- </template>
25
- </div>
26
- </div>
27
- </template>
28
- </div>
29
- <div
30
- class="dl_full"
31
- :class="{ show_full: showFull }"
32
- @click="showFull = !showFull"
33
- >
34
- {{ showFull ? '收起菜谱' : '点击查看完整食谱' }}
35
- </div>
36
- <div
37
- v-if="isMini"
38
- style="font-size: 10px; line-height: 16px; color: #f16868"
39
- >
40
- 温馨提示:维小饭AI健康食谱为日常膳食调理方案,不能替代药物治疗或专业医疗建议。如有疾病,请及时就医并遵医嘱。<br />
41
- <strong>半价惊喜,下单即得!</strong>
42
- </div>
43
- <div v-if="isMini" class="btn_group">
44
- <div class="btn btn_1" @click.stop="handleBtn('personalForm')">
45
- <span class="name">私人定制个性食谱</span>
46
- </div>
47
- <div class="btn btn_2" @click.stop="handleBtn('ship_order')">
48
- <span class="name">去订餐</span>
49
- </div>
50
- </div>
51
- <div v-else class="btn_group">
52
- <div
53
- v-if="channel !== 'hft'"
54
- class="btn btn_1"
55
- @click.stop="handleBtn('ship_order')"
56
- >
57
- <span class="name">配送下單</span>
58
- <span class="sub">(直送到府)</span>
59
- </div>
60
- <div class="btn btn_2" @click.stop="handleBtn('pick_order')">
61
- <span class="name">自提下單</span>
62
- <span class="sub">(免運費)</span>
63
- </div>
64
- </div>
65
- </div>
66
- </template>
67
-
68
- <script setup>
69
- import DishesCard from './DishesCard.vue';
70
- import { ref } from 'vue';
71
-
72
- const props = defineProps({
73
- skuList: {
74
- type: Array,
75
- required: true,
76
- default: () => [],
77
- },
78
- isMini: {
79
- type: Boolean,
80
- default: false,
81
- },
82
- channel: {
83
- type: String,
84
- default: 'web',
85
- },
86
- defMsg: {
87
- type: Object,
88
- default: () => ({}),
89
- },
90
- });
91
- const Emits = defineEmits(['select']);
92
- const openSts = ref(false);
93
- const showFull = ref(false);
94
- const handleIsOpen = (info, category) => {
95
- return false;
96
- // if (openSts.value) {
97
- // return false;
98
- // } else if (category !== '01' && info.hasOwnProperty('cid') && info.cid) {
99
- // console.log('=== 6666 ===', info);
100
- // openSts.value = true;
101
- // return true;
102
- // } else {
103
- // return false;
104
- // }
105
- };
106
- const categoryEnergy = (cate) => {
107
- let energy = 0;
108
- (cate?.list || []).forEach((list) => {
109
- (list?.getCategoryList || []).forEach((item) => {
110
- energy += item.energy || 0;
111
- });
112
- });
113
- return energy;
114
- };
115
- const showDate = (idx) => {
116
- return (
117
- props.skuList
118
- .slice(0, idx)
119
- .findIndex((item) => item.strDate === props.skuList[idx].strDate) === -1
120
- );
121
- };
122
-
123
- const handleBtn = (type) => {
124
- Emits('select', { type });
125
- };
126
- </script>
127
-
128
- <style scoped lang="less">
129
- @import '../assets/styles/public';
130
-
131
- .dl {
132
- &_wrap {
133
- max-width: 320px;
134
-
135
- .sep_line {
136
- border-top: 1px solid #d9d9d9;
137
- margin: 20px auto;
138
- }
139
- .title {
140
- font-size: 16px;
141
- font-weight: bold;
142
- margin: 0;
143
- }
144
- .date {
145
- .title();
146
- margin: 15px auto 0;
147
- }
148
- .btn {
149
- .flexccc();
150
- cursor: pointer;
151
- width: 100%;
152
- height: 40px;
153
- border-radius: 19px;
154
- text-align: center;
155
- color: @primary-color;
156
- border: 1px solid @primary-color;
157
- background-color: #fff;
158
- .name {
159
- font-weight: 600;
160
- font-size: 14px;
161
- line-height: 18px;
162
- }
163
- .sub {
164
- font-weight: 400;
165
- font-size: 8px;
166
- line-height: 10px;
167
- }
168
- &_2 {
169
- color: #fff;
170
- background-color: @primary-color;
171
- }
172
- &_group {
173
- .flexrbc();
174
- gap: 10px;
175
- margin-top: 20px;
176
- }
177
- }
178
- }
179
- &_list {
180
- height: 384px;
181
- overflow: hidden;
182
-
183
- &.show_full {
184
- height: auto;
185
- overflow: initial;
186
- }
187
- }
188
- &_full {
189
- .flexrcc();
190
- cursor: pointer;
191
- width: 325px;
192
- height: 38px;
193
- line-height: 38px;
194
- margin: 10px 0;
195
- background: #fff;
196
- border-radius: 10px;
197
- text-align: center;
198
- font-weight: 400;
199
- font-size: 13px;
200
- color: #333;
201
-
202
- &::after {
203
- content: '';
204
- display: inline-block;
205
- width: 14px;
206
- height: 14px;
207
- background: url('https://prodstatic.weis1606.cn/api/smartFood/icon/arrow_left.svg')
208
- center / contain no-repeat;
209
- }
210
-
211
- &.show_full {
212
- &::after {
213
- transform: rotate(-90deg);
214
- }
215
- }
216
- }
217
- }
218
- </style>
@@ -1,34 +0,0 @@
1
- <script setup>
2
- import { computed, onMounted, ref } from 'vue';
3
- import MarkdownIt from 'markdown-it';
4
-
5
- const md = new MarkdownIt();
6
- const props = defineProps({
7
- content: {
8
- type: String,
9
- default: `| 早餐 | | 午餐 |
10
- |------------|----------|----|
11
- | 热量:450kcal |&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; | 热量:450kcal |
12
- | 碳水:62.3g | | 碳水:62.3g |
13
- | 蛋白质:15.5g | | 蛋白质:15.5g |
14
- | 脂肪:12.5g | | 脂肪:12.5g |
15
-
16
- | 晚餐 | | 加餐 |
17
- |------------|---|------------|
18
- | | | |
19
- | 热量:450kcal | | 热量:450kcal |
20
- | 碳水:62.3g | | 碳水:62.3g |
21
- | 蛋白质:15.5g | | 蛋白质:15.5g |
22
- | 脂肪:12.5g | | 脂肪:12.5g |`,
23
- },
24
- });
25
- const parsedHtml = computed(() => {
26
- return md.render(props.content);
27
- });
28
- </script>
29
-
30
- <template>
31
- <div v-html="parsedHtml"></div>
32
- </template>
33
-
34
- <style scoped></style>
@@ -1,186 +0,0 @@
1
- @import '../assets/styles/public';
2
- .om {
3
- &_wrap {
4
- box-sizing: border-box;
5
- width: 100%;
6
- padding: 10px 10px 5px;
7
- background-color: #fff;
8
- }
9
- &_quick {
10
- display: grid;
11
- grid-auto-flow: column;
12
- gap: 10px;
13
- overflow-x: auto;
14
- justify-content: start;
15
- scroll-behavior: smooth;
16
- scrollbar-width: none; /* 隐藏滚动条(Firefox) */
17
- &::-webkit-scrollbar {
18
- display: none;
19
- }
20
-
21
- .tag {
22
- .flexrsc();
23
- cursor: pointer;
24
- width: fit-content;
25
- white-space: nowrap;
26
- font-weight: 400;
27
- font-size: 14px;
28
- color: #333;
29
- line-height: 16px;
30
- text-align: left;
31
- padding: 6px 10px;
32
- border-radius: 10px;
33
- border: 1px solid #d0d0d0;
34
- }
35
- .icon {
36
- font-size: 18px;
37
- color: @primary-color;
38
- }
39
- }
40
- &_operate {
41
- display: grid;
42
- grid-template-columns: 1fr auto;
43
- background: #fff;
44
- align-items: center;
45
- &_box {
46
- .flexrsc();
47
- gap: 10px;
48
- .new_chat {
49
- .flexrcc();
50
- cursor: pointer;
51
- width: 46px;
52
- height: 46px;
53
- font-size: 30px;
54
- border-radius: 23px;
55
- background: #ffffff;
56
- box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
57
- }
58
- }
59
- &_wrap {
60
- margin: 10px 0 5px;
61
- width: 100%;
62
- min-height: 48px;
63
- padding: 10px;
64
- border-radius: 24px;
65
- box-sizing: border-box;
66
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
67
- .file_card {
68
- width: 64px;
69
- height: 64px;
70
- border-radius: 15px;
71
- background-color: #f7f7f7;
72
- position: relative;
73
- .img {
74
- width: 100%;
75
- height: 100%;
76
- object-fit: contain;
77
- }
78
- .close {
79
- cursor: pointer;
80
- font-size: 16px;
81
- color: #fff;
82
- position: absolute;
83
- top: 0;
84
- right: 0;
85
- z-index: 5;
86
- }
87
- .process {
88
- .flexrcc();
89
- width: 100%;
90
- height: 100%;
91
- background-color: rgba(0, 0, 0, 0.6);
92
- position: absolute;
93
- top: 0;
94
- left: 0;
95
- z-index: 8;
96
- }
97
- }
98
- .file_add {
99
- .flexrcc();
100
- .file_card();
101
- cursor: pointer;
102
- font-size: 24px;
103
- }
104
- .file_list {
105
- .flexrsc();
106
- gap: 10px;
107
- padding-bottom: 10px;
108
- position: relative;
109
- &_box {
110
- transition: all 200ms ease-in-out;
111
- overflow: hidden;
112
- height: 74px;
113
- opacity: 1;
114
- &.hidden {
115
- height: 0;
116
- opacity: 0;
117
- }
118
- }
119
- }
120
- .file_close {
121
- .flexrcc();
122
- cursor: pointer;
123
- color: #fff;
124
- width: 20px;
125
- height: 20px;
126
- border-radius: 50%;
127
- background-color: rgba(0, 0, 0, 0.5);
128
- position: absolute;
129
- right: 0;
130
- top: 0;
131
- z-index: 10;
132
- }
133
- }
134
- .input {
135
- font-size: 16px;
136
- line-height: 24px;
137
- overflow-y: auto;
138
- resize: none;
139
- padding: 0 0 0 10px;
140
- border-radius: 24px;
141
- border: none;
142
- &:focus-visible {
143
- outline: none;
144
- }
145
- }
146
- .btn {
147
- .flexrcc();
148
- height: 100%;
149
- color: @primary-color;
150
- font-size: 32px;
151
- padding: 0 10px;
152
- &_group {
153
- }
154
- }
155
- }
156
- &_extra {
157
- .flexrss();
158
- gap: 10px;
159
- padding: 10px 0 20px;
160
- .card {
161
- text-align: center;
162
- }
163
- .text {
164
- color: #666;
165
- font-size: 14px;
166
- line-height: 24px;
167
- margin-top: 6px;
168
- }
169
- .icon {
170
- .flexrcc();
171
- width: 72px;
172
- height: 72px;
173
- color: #000;
174
- font-size: 24px;
175
- background-color: #f7f7f7;
176
- border-radius: 15px;
177
- }
178
- }
179
- &_ai_tips {
180
- height: 24px;
181
- line-height: 10px;
182
- text-align: center;
183
- font-size: 10px;
184
- color: #bbb;
185
- }
186
- }