ai-chat-bot-interface 1.7.7 → 1.7.9
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/dist/assets/index-DQulfwi9.css +9 -0
- package/dist/assets/index-Dkddqe_3.js +123 -0
- package/{index.html → dist/index.html} +2 -1
- package/dist/src/index.d.ts +0 -0
- package/package.json +26 -5
- package/.prettierignore +0 -5
- package/.prettierrc.cjs +0 -37
- package/.vscode/extensions.json +0 -3
- package/index.js +0 -11
- package/src/App.vue +0 -39
- package/src/ChatUi.less +0 -301
- package/src/ChatUi.vue +0 -1087
- package/src/assets/styles/public.less +0 -152
- package/src/assets/vue.svg +0 -1
- package/src/components/DishesCard.vue +0 -369
- package/src/components/DishesList.vue +0 -207
- package/src/components/MarkdownPlan/MarkdownViewer.vue +0 -34
- package/src/components/OperateModule.less +0 -186
- package/src/components/OperateModule.vue +0 -392
- package/src/components/PlanCard.vue +0 -114
- package/src/components/StoreList/StoreCard.vue +0 -72
- package/src/components/StoreList/StoreList.vue +0 -27
- package/src/components/StoreList/mock.js +0 -411
- package/src/components/assistantReplay/assistantReplay.vue +0 -78
- package/src/components/icons/ArrowDown.vue +0 -26
- package/src/components/icons/ArrowRight.vue +0 -19
- package/src/components/icons/BackIcon.vue +0 -19
- package/src/components/icons/ClearIcon.vue +0 -18
- package/src/components/icons/CloseIcon.vue +0 -17
- package/src/components/icons/NewSessionIcon.vue +0 -20
- package/src/components/icons/OkIcon.vue +0 -26
- package/src/components/icons/SendIcon.vue +0 -22
- package/src/components/icons/ThinkingIcon.vue +0 -28
- package/src/components/icons/addIcon.vue +0 -18
- package/src/components/icons/cameraIcon.vue +0 -22
- package/src/components/icons/closeBorderIcon.vue +0 -35
- package/src/components/icons/fileIcon.vue +0 -18
- package/src/components/icons/loadingIcon.vue +0 -76
- package/src/components/icons/loadingIcon2.vue +0 -88
- package/src/components/icons/newChat.vue +0 -18
- package/src/components/icons/pictureIcon.vue +0 -22
- package/src/components/icons/processBar.vue +0 -115
- package/src/components/icons/progressRing.vue +0 -63
- package/src/components/icons/sendLoadingIcon.vue +0 -35
- package/src/components/icons/tagIcon.vue +0 -18
- package/src/components/imgeList.vue +0 -63
- package/src/components/personalForm/personalForm.vue +0 -634
- package/src/components/popup/popup.vue +0 -178
- package/src/main.js +0 -26
- package/src/style.css +0 -4
- package/src/utils/imagesViewer.js +0 -8
- package/src/utils/request.js +0 -52
- package/src/utils/tools.js +0 -20
- package/vite.config.js +0 -33
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,207 +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 v-show="!showFull" class="dl_full" @click="showFull = true">
|
|
30
|
-
点击查看完整食谱
|
|
31
|
-
</div>
|
|
32
|
-
<div
|
|
33
|
-
v-if="isMini"
|
|
34
|
-
style="font-size: 10px; line-height: 16px; color: #f16868"
|
|
35
|
-
>
|
|
36
|
-
温馨提示:维小饭AI健康食谱为日常膳食调理方案,不能替代药物治疗或专业医疗建议。如有疾病,请及时就医并遵医嘱。<br />
|
|
37
|
-
<strong>半价惊喜,下单即得!</strong>
|
|
38
|
-
</div>
|
|
39
|
-
<div v-if="isMini" class="btn_group">
|
|
40
|
-
<div class="btn btn_1" @click.stop="handleBtn('personalForm')">
|
|
41
|
-
<span class="name">私人定制个性食谱</span>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="btn btn_2" @click.stop="handleBtn('ship_order')">
|
|
44
|
-
<span class="name">去订餐</span>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div v-else class="btn_group">
|
|
48
|
-
<div
|
|
49
|
-
v-if="channel !== 'hft'"
|
|
50
|
-
class="btn btn_1"
|
|
51
|
-
@click.stop="handleBtn('ship_order')"
|
|
52
|
-
>
|
|
53
|
-
<span class="name">配送下單</span>
|
|
54
|
-
<span class="sub">(直送到府)</span>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="btn btn_2" @click.stop="handleBtn('pick_order')">
|
|
57
|
-
<span class="name">自提下單</span>
|
|
58
|
-
<span class="sub">(免運費)</span>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<script setup>
|
|
65
|
-
import DishesCard from './DishesCard.vue';
|
|
66
|
-
import { ref } from 'vue';
|
|
67
|
-
|
|
68
|
-
const props = defineProps({
|
|
69
|
-
skuList: {
|
|
70
|
-
type: Array,
|
|
71
|
-
required: true,
|
|
72
|
-
default: () => [],
|
|
73
|
-
},
|
|
74
|
-
isMini: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: false,
|
|
77
|
-
},
|
|
78
|
-
channel: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: 'web',
|
|
81
|
-
},
|
|
82
|
-
defMsg: {
|
|
83
|
-
type: Object,
|
|
84
|
-
default: () => ({}),
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
const Emits = defineEmits(['select']);
|
|
88
|
-
const openSts = ref(false);
|
|
89
|
-
const showFull = ref(false);
|
|
90
|
-
const handleIsOpen = (info, category) => {
|
|
91
|
-
return false;
|
|
92
|
-
// if (openSts.value) {
|
|
93
|
-
// return false;
|
|
94
|
-
// } else if (category !== '01' && info.hasOwnProperty('cid') && info.cid) {
|
|
95
|
-
// console.log('=== 6666 ===', info);
|
|
96
|
-
// openSts.value = true;
|
|
97
|
-
// return true;
|
|
98
|
-
// } else {
|
|
99
|
-
// return false;
|
|
100
|
-
// }
|
|
101
|
-
};
|
|
102
|
-
const categoryEnergy = (cate) => {
|
|
103
|
-
let energy = 0;
|
|
104
|
-
(cate?.list || []).forEach((list) => {
|
|
105
|
-
(list?.getCategoryList || []).forEach((item) => {
|
|
106
|
-
energy += item.energy || 0;
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
return energy;
|
|
110
|
-
};
|
|
111
|
-
const showDate = (idx) => {
|
|
112
|
-
return (
|
|
113
|
-
props.skuList
|
|
114
|
-
.slice(0, idx)
|
|
115
|
-
.findIndex((item) => item.strDate === props.skuList[idx].strDate) === -1
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
const handleBtn = (type) => {
|
|
120
|
-
Emits('select', { type });
|
|
121
|
-
};
|
|
122
|
-
</script>
|
|
123
|
-
|
|
124
|
-
<style scoped lang="less">
|
|
125
|
-
@import '../assets/styles/public';
|
|
126
|
-
|
|
127
|
-
.dl {
|
|
128
|
-
&_wrap {
|
|
129
|
-
max-width: 320px;
|
|
130
|
-
|
|
131
|
-
.sep_line {
|
|
132
|
-
border-top: 1px solid #d9d9d9;
|
|
133
|
-
margin: 20px auto;
|
|
134
|
-
}
|
|
135
|
-
.title {
|
|
136
|
-
font-size: 16px;
|
|
137
|
-
font-weight: bold;
|
|
138
|
-
margin: 0;
|
|
139
|
-
}
|
|
140
|
-
.date {
|
|
141
|
-
.title();
|
|
142
|
-
margin: 15px auto 0;
|
|
143
|
-
}
|
|
144
|
-
.btn {
|
|
145
|
-
.flexccc();
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
width: 100%;
|
|
148
|
-
height: 40px;
|
|
149
|
-
border-radius: 19px;
|
|
150
|
-
text-align: center;
|
|
151
|
-
color: @primary-color;
|
|
152
|
-
border: 1px solid @primary-color;
|
|
153
|
-
background-color: #fff;
|
|
154
|
-
.name {
|
|
155
|
-
font-weight: 600;
|
|
156
|
-
font-size: 14px;
|
|
157
|
-
line-height: 18px;
|
|
158
|
-
}
|
|
159
|
-
.sub {
|
|
160
|
-
font-weight: 400;
|
|
161
|
-
font-size: 8px;
|
|
162
|
-
line-height: 10px;
|
|
163
|
-
}
|
|
164
|
-
&_2 {
|
|
165
|
-
color: #fff;
|
|
166
|
-
background-color: @primary-color;
|
|
167
|
-
}
|
|
168
|
-
&_group {
|
|
169
|
-
.flexrbc();
|
|
170
|
-
gap: 10px;
|
|
171
|
-
margin-top: 20px;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
&_list {
|
|
176
|
-
height: 384px;
|
|
177
|
-
overflow: hidden;
|
|
178
|
-
|
|
179
|
-
&.show_full {
|
|
180
|
-
height: auto;
|
|
181
|
-
overflow: initial;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
&_full {
|
|
185
|
-
.flexrcc();
|
|
186
|
-
cursor: pointer;
|
|
187
|
-
width: 325px;
|
|
188
|
-
height: 38px;
|
|
189
|
-
line-height: 38px;
|
|
190
|
-
margin: 10px 0;
|
|
191
|
-
background: #fff;
|
|
192
|
-
border-radius: 10px;
|
|
193
|
-
text-align: center;
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
font-size: 13px;
|
|
196
|
-
color: #333;
|
|
197
|
-
&::after {
|
|
198
|
-
content: '';
|
|
199
|
-
display: inline-block;
|
|
200
|
-
width: 14px;
|
|
201
|
-
height: 14px;
|
|
202
|
-
background: url('https://prodstatic.weis1606.cn/api/smartFood/icon/arrow_left.svg')
|
|
203
|
-
center / contain no-repeat;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
</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 | | 热量: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
|
-
}
|