ai-chat-bot-interface 1.7.3 → 1.7.5
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 +1 -1
- package/src/ChatUi.vue +7 -3
- package/src/components/DishesCard.vue +53 -32
package/package.json
CHANGED
package/src/ChatUi.vue
CHANGED
|
@@ -394,6 +394,7 @@ const handleFirstMsg = async () => {
|
|
|
394
394
|
height: '160',
|
|
395
395
|
},
|
|
396
396
|
},
|
|
397
|
+
age: 25,
|
|
397
398
|
msg: `本食谱为均衡营养版${props.firstMsg}的食疗调养方案示例,依据以下女性常规身体数据制定:
|
|
398
399
|
性别:女;
|
|
399
400
|
年龄:25岁;
|
|
@@ -414,6 +415,7 @@ const handleFirstMsg = async () => {
|
|
|
414
415
|
height: '170',
|
|
415
416
|
},
|
|
416
417
|
},
|
|
418
|
+
age: 25,
|
|
417
419
|
msg: `本食谱为均衡营养版${props.firstMsg}的食疗调养方案示例,依据以下男性常规身体数据制定:
|
|
418
420
|
性别:男;
|
|
419
421
|
年龄:25岁;
|
|
@@ -434,6 +436,7 @@ const handleFirstMsg = async () => {
|
|
|
434
436
|
height: '160',
|
|
435
437
|
},
|
|
436
438
|
},
|
|
439
|
+
age: 35,
|
|
437
440
|
msg: `本食谱为控卡版${props.firstMsg}的食疗调养方案示例,依据以下女性常规身体数据制定:
|
|
438
441
|
性别:女;
|
|
439
442
|
年龄:35岁;
|
|
@@ -454,6 +457,7 @@ const handleFirstMsg = async () => {
|
|
|
454
457
|
height: '170',
|
|
455
458
|
},
|
|
456
459
|
},
|
|
460
|
+
age: 35,
|
|
457
461
|
msg: `本食谱为控卡版${props.firstMsg}的食疗调养方案示例,依据以下男性常规身体数据制定:
|
|
458
462
|
性别:男;
|
|
459
463
|
年龄:35岁;
|
|
@@ -509,9 +513,9 @@ const handleFirstMsg = async () => {
|
|
|
509
513
|
脂肪:${item.fatTotal}g\n\n`),
|
|
510
514
|
);
|
|
511
515
|
|
|
512
|
-
const resMsg = `您的身高:${
|
|
513
|
-
curInfo.
|
|
514
|
-
}
|
|
516
|
+
const resMsg = `您的身高:${curInfo.params.profileInfo.height}cm 年龄:${
|
|
517
|
+
curInfo.age
|
|
518
|
+
} 岁 体重:${curInfo.params.profileInfo.weight}kg 性别:${
|
|
515
519
|
curInfo.params.profileInfo.sex === '2' ? '女' : '男'
|
|
516
520
|
} 日常运动水平:久坐
|
|
517
521
|
|
|
@@ -22,12 +22,51 @@
|
|
|
22
22
|
<div v-show="!isOpen" class="switch_open" @click.stop="switchOpen">
|
|
23
23
|
<span>查看菜谱详情</span><arrow-right class="icon" />
|
|
24
24
|
</div>
|
|
25
|
-
<div class="title"
|
|
26
|
-
<div
|
|
27
|
-
<
|
|
25
|
+
<!-- <div class="title">营养数据</div>
|
|
26
|
+
<div class="data_row">
|
|
27
|
+
<div class="data_item">
|
|
28
|
+
<div class="label">热量</div>
|
|
29
|
+
<div class="content">5555kcal</div>
|
|
30
|
+
</div>
|
|
28
31
|
</div>
|
|
29
|
-
<
|
|
30
|
-
|
|
32
|
+
<div class="line"></div>
|
|
33
|
+
<div class="data_row">
|
|
34
|
+
<div class="data_item">
|
|
35
|
+
<div class="label">蛋白质</div>
|
|
36
|
+
<div class="content">55g</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="data_item">
|
|
39
|
+
<div class="label">膳食纤维</div>
|
|
40
|
+
<div class="content">55g</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="data_row">
|
|
44
|
+
<div class="data_item">
|
|
45
|
+
<div class="label">碳水</div>
|
|
46
|
+
<div class="content">55g</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="data_item">
|
|
49
|
+
<div class="label">盐量</div>
|
|
50
|
+
<div class="content">55g</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="data_row">
|
|
54
|
+
<div class="data_item">
|
|
55
|
+
<div class="label">脂肪</div>
|
|
56
|
+
<div class="content">55g</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="data_item">
|
|
59
|
+
<div class="label">食物多样性</div>
|
|
60
|
+
<div class="content">55g</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="title">过敏原</div>
|
|
65
|
+
<div class="tag_box">
|
|
66
|
+
<div class="tag">花生</div>
|
|
67
|
+
<div class="tag">玉米淀粉</div>
|
|
68
|
+
</div>-->
|
|
69
|
+
<div class="tips">
|
|
31
70
|
<span class="star">*</span
|
|
32
71
|
>一份的量偏小不便制作,因而基于3份的量来介绍,食用时取一份即可
|
|
33
72
|
</div>
|
|
@@ -57,7 +96,7 @@
|
|
|
57
96
|
alt="step image"
|
|
58
97
|
/>
|
|
59
98
|
</div>
|
|
60
|
-
</div
|
|
99
|
+
</div>
|
|
61
100
|
<div class="collapse_btn" @click.stop="isOpen = false">收起</div>
|
|
62
101
|
</div>
|
|
63
102
|
</div>
|
|
@@ -104,33 +143,15 @@ const getContentHeight = () => {
|
|
|
104
143
|
return new Promise(async (resolve) => {
|
|
105
144
|
await nextTick();
|
|
106
145
|
const imgList = [];
|
|
107
|
-
if (
|
|
108
|
-
makeCraft.value.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
// const imgs = getImageList(item.craftImg);
|
|
113
|
-
// imgList.push(...imgs);
|
|
114
|
-
// });
|
|
115
|
-
imgList.push(makeCraft.value.craftUrl);
|
|
146
|
+
if (makeCraft.value.hasOwnProperty('makeCraftList')) {
|
|
147
|
+
makeCraft.value?.makeCraftList.forEach((item) => {
|
|
148
|
+
const imgs = getImageList(item.craftImg);
|
|
149
|
+
imgList.push(...imgs);
|
|
150
|
+
});
|
|
116
151
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
await nextTick();
|
|
121
|
-
contentHeight.value = hasDetails.value
|
|
122
|
-
? contentRef.value.scrollHeight
|
|
123
|
-
: 0;
|
|
124
|
-
console.log('==333==', contentHeight.value);
|
|
125
|
-
if (isOpen.value) {
|
|
126
|
-
contentHeight.value += 26;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
isOpen.value = true;
|
|
130
|
-
} else {
|
|
131
|
-
isOpen.value = false;
|
|
132
|
-
}
|
|
133
|
-
|
|
152
|
+
await preloadImages(imgList);
|
|
153
|
+
contentHeight.value = hasDetails.value ? contentRef.value.scrollHeight : 0;
|
|
154
|
+
isOpen.value = true;
|
|
134
155
|
resolve();
|
|
135
156
|
});
|
|
136
157
|
};
|