ai-chat-bot-interface 1.6.8 → 1.6.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-chat-bot-interface",
3
3
  "private": false,
4
- "version": "1.6.8",
4
+ "version": "1.6.9",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
@@ -117,7 +117,9 @@ const subStr = computed(() => {
117
117
  return `${props.defMsg.energy}${props.info.energy}kcal,${props.defMsg.protein}${props.info.protein}g,${props.defMsg.fat}${props.info.fat}g,${props.defMsg.carbonwater}${props.info.carbonwater}g`;
118
118
  });
119
119
  const materialText = computed(() => {
120
- const list = props.info?.makeMaterialList?.map((item) => item.material);
120
+ const list = props.info?.makeMaterialList?.map(
121
+ (item) => item.material + item.usage + 'g',
122
+ );
121
123
  return (list || []).join('、');
122
124
  });
123
125
  const hasDetails = computed(() => {
@@ -26,7 +26,7 @@
26
26
  </template>
27
27
  <div v-if="isMini" class="btn_group">
28
28
  <div class="btn btn_2" @click.stop="handleBtn('ship_order')">
29
- <span class="name">立即下单</span>
29
+ <span class="name">去订餐</span>
30
30
  </div>
31
31
  </div>
32
32
  <div v-else class="btn_group">
@@ -24,7 +24,7 @@
24
24
  width: fit-content;
25
25
  white-space: nowrap;
26
26
  font-weight: 400;
27
- font-size: 12px;
27
+ font-size: 14px;
28
28
  color: #333;
29
29
  line-height: 16px;
30
30
  text-align: left;
@@ -33,7 +33,7 @@
33
33
  border: 1px solid #d0d0d0;
34
34
  }
35
35
  .icon {
36
- font-size: 16px;
36
+ font-size: 18px;
37
37
  color: @primary-color;
38
38
  }
39
39
  }
@@ -245,6 +245,16 @@ const selectTag = (item, type) => {
245
245
  dialogInfo.value[type].push(item);
246
246
  }
247
247
  };
248
+
249
+ const selectSport = (item) => {
250
+ dialogInfo.value.sport = item.name;
251
+ handleConfirm();
252
+ };
253
+
254
+ const selectSex = (item) => {
255
+ dialogInfo.value.sex = item;
256
+ handleConfirm();
257
+ };
248
258
  </script>
249
259
 
250
260
  <template>
@@ -269,7 +279,7 @@ const selectTag = (item, type) => {
269
279
  :class="{ disabled: !isValid }"
270
280
  @click.stop="handleSubmit"
271
281
  >
272
- 确定
282
+ 按身体数据领取7天食谱
273
283
  </div>
274
284
  </div>
275
285
 
@@ -283,13 +293,13 @@ const selectTag = (item, type) => {
283
293
  <div v-if="dialogInfo.key === 'sex'" class="sex_wrap">
284
294
  <div
285
295
  :class="{ sex: true, selected: dialogInfo.sex === '男' }"
286
- @click="dialogInfo.sex = '男'"
296
+ @click.stop="selectSex('男')"
287
297
  >
288
298
 
289
299
  </div>
290
300
  <div
291
301
  :class="{ sex: true, selected: dialogInfo.sex === '女' }"
292
- @click="dialogInfo.sex = '女'"
302
+ @click.stop="selectSex('女')"
293
303
  >
294
304
 
295
305
  </div>
@@ -302,6 +312,7 @@ const selectTag = (item, type) => {
302
312
  v-model="dialogInfo[dialogInfo.key]"
303
313
  class="input"
304
314
  type="text"
315
+ @keyup.enter="handleConfirm"
305
316
  placeholder="请输入"
306
317
  />
307
318
  <div class="unit">{{ dialogInfo.unit }}</div>
@@ -311,7 +322,7 @@ const selectTag = (item, type) => {
311
322
  v-for="item in sportList"
312
323
  :key="item.key"
313
324
  :class="{ row: true, selected: dialogInfo.sport === item.name }"
314
- @click.stop="dialogInfo.sport = item.name"
325
+ @click.stop="selectSport(item)"
315
326
  >
316
327
  <div class="name">{{ item.name }}</div>
317
328
  <div class="sub">{{ item.sub }}</div>
@@ -360,6 +371,7 @@ const selectTag = (item, type) => {
360
371
 
361
372
  &_row {
362
373
  display: flex;
374
+ gap: 6px;
363
375
  flex-direction: row;
364
376
  align-items: center;
365
377
  justify-content: space-between;
@@ -391,7 +403,7 @@ const selectTag = (item, type) => {
391
403
  display: inline-block;
392
404
  font-size: 14px;
393
405
  text-align: right;
394
- width: 160px;
406
+ width: 156px;
395
407
  text-overflow: ellipsis;
396
408
  white-space: nowrap;
397
409
  overflow: hidden;