ai-chat-bot-interface 1.1.2 → 1.1.4
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/App.vue +5 -1
- package/src/ChatUi.less +2 -1
- package/src/ChatUi.vue +9 -8
- package/src/components/DishesCard.vue +1 -1
- package/src/components/DishesList.vue +44 -14
- package/src/components/OperateModule.vue +1 -4
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -4,7 +4,11 @@ import ChatUi from './ChatUi.vue';
|
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
6
|
<div style="width: 100vw; height: 100vh">
|
|
7
|
-
<chat-ui
|
|
7
|
+
<chat-ui
|
|
8
|
+
bot-id="7471093458661720104"
|
|
9
|
+
token="pat_2yVcSFJUZB6c9Kdcv9iktIVFeGRuzyK3bAJY6GcqKrdGxTdjKMd1iDB09ipJ6YX8"
|
|
10
|
+
uid="262598"
|
|
11
|
+
/>
|
|
8
12
|
</div>
|
|
9
13
|
</template>
|
|
10
14
|
<style></style>
|
package/src/ChatUi.less
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
.title {
|
|
73
73
|
.flexrsc();
|
|
74
|
-
|
|
74
|
+
gap: 10px;
|
|
75
75
|
.logo {
|
|
76
76
|
width: 32px;
|
|
77
77
|
height: 32px;
|
|
@@ -148,6 +148,7 @@
|
|
|
148
148
|
.box {
|
|
149
149
|
color: #000;
|
|
150
150
|
font-size: 14px;
|
|
151
|
+
line-height: 24px;
|
|
151
152
|
font-weight: 400;
|
|
152
153
|
text-align: left;
|
|
153
154
|
background-color: @sys-bg;
|
package/src/ChatUi.vue
CHANGED
|
@@ -6,12 +6,6 @@
|
|
|
6
6
|
<div class="back" @click.stop="handleBack">
|
|
7
7
|
<back-icon />
|
|
8
8
|
</div>
|
|
9
|
-
<img
|
|
10
|
-
class="logo"
|
|
11
|
-
:src="logo"
|
|
12
|
-
alt="logo"
|
|
13
|
-
style="width: 24px; height: 24px"
|
|
14
|
-
/>
|
|
15
9
|
<div class="name_box">
|
|
16
10
|
<div class="name">{{ name }}</div>
|
|
17
11
|
<div class="name_sub">nutribite.com</div>
|
|
@@ -104,6 +98,7 @@
|
|
|
104
98
|
</div>
|
|
105
99
|
<operate-module
|
|
106
100
|
v-model="inputText"
|
|
101
|
+
:tag-list="tagList"
|
|
107
102
|
@send="chatConv"
|
|
108
103
|
@tag="handleTagSel"
|
|
109
104
|
/>
|
|
@@ -146,8 +141,7 @@ const props = defineProps({
|
|
|
146
141
|
},
|
|
147
142
|
avatar: {
|
|
148
143
|
type: String,
|
|
149
|
-
default:
|
|
150
|
-
'https://prodstatic.weis1606.cn/api/smartFood/Nutribite/icons/home/icon_3.png',
|
|
144
|
+
default: 'https://prodstatic.weis1606.cn/api/smartFood/icon/def_gray.svg',
|
|
151
145
|
},
|
|
152
146
|
name: {
|
|
153
147
|
type: String,
|
|
@@ -166,6 +160,13 @@ const props = defineProps({
|
|
|
166
160
|
type: String,
|
|
167
161
|
required: true,
|
|
168
162
|
},
|
|
163
|
+
tagList: {
|
|
164
|
+
type: Array,
|
|
165
|
+
default: () => [
|
|
166
|
+
{ name: '人工客服', value: 'kefu', type: 'chat', msg: '人工客服' },
|
|
167
|
+
{ name: '查看菜单', value: 'menu', type: 'call', msg: '查看菜单' },
|
|
168
|
+
],
|
|
169
|
+
},
|
|
169
170
|
});
|
|
170
171
|
|
|
171
172
|
const Emits = defineEmits(['call']);
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
const subStr = computed(() => {
|
|
25
|
-
return
|
|
25
|
+
return `熱量${props.info.energy}kcal,蛋白質${props.info.protein}g,脂肪${props.info.fat}g,碳水${props.info.carbonwater}g`;
|
|
26
26
|
});
|
|
27
27
|
</script>
|
|
28
28
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="dl_wrap">
|
|
3
|
-
<template v-for="cate in skuList" :key="cate.category">
|
|
4
|
-
<div v-if="
|
|
3
|
+
<template v-for="(cate, cIdx) in skuList" :key="cate.category">
|
|
4
|
+
<div v-if="showDate(cIdx)">
|
|
5
|
+
<div v-if="cIdx > 0" class="sep_line"></div>
|
|
6
|
+
<div class="date">
|
|
7
|
+
{{ cate.strDate.slice(4, 6) }}月{{ cate.strDate.slice(6) }}日
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-if="cate.list && cate.list.length" style="padding: 15px 0">
|
|
5
11
|
<p class="title">{{ cate.categoryType }}</p>
|
|
6
12
|
<div>
|
|
7
13
|
<template v-for="dList in cate.list" :key="dList.id">
|
|
@@ -16,10 +22,12 @@
|
|
|
16
22
|
</template>
|
|
17
23
|
<div class="btn_group">
|
|
18
24
|
<div class="btn btn_1" @click.stop="handleBtn('ship_order')">
|
|
19
|
-
|
|
25
|
+
<span class="name">配送下單</span>
|
|
26
|
+
<span class="sub">(直送到府)</span>
|
|
20
27
|
</div>
|
|
21
28
|
<div class="btn btn_2" @click.stop="handleBtn('pick_order')">
|
|
22
|
-
|
|
29
|
+
<span class="name">自提下單</span>
|
|
30
|
+
<span class="sub">(免運費)</span>
|
|
23
31
|
</div>
|
|
24
32
|
</div>
|
|
25
33
|
</div>
|
|
@@ -37,6 +45,14 @@ const props = defineProps({
|
|
|
37
45
|
});
|
|
38
46
|
const Emits = defineEmits(['select']);
|
|
39
47
|
|
|
48
|
+
const showDate = (idx) => {
|
|
49
|
+
return (
|
|
50
|
+
props.skuList
|
|
51
|
+
.slice(0, idx)
|
|
52
|
+
.findIndex((item) => item.strDate === props.skuList[idx].strDate) === -1
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
40
56
|
const handleBtn = (type) => {
|
|
41
57
|
Emits('select', { type });
|
|
42
58
|
};
|
|
@@ -49,29 +65,43 @@ const handleBtn = (type) => {
|
|
|
49
65
|
&_wrap {
|
|
50
66
|
max-width: 320px;
|
|
51
67
|
|
|
68
|
+
.sep_line {
|
|
69
|
+
border-top: 1px solid #d9d9d9;
|
|
70
|
+
margin: 20px auto;
|
|
71
|
+
}
|
|
52
72
|
.title {
|
|
53
73
|
font-size: 16px;
|
|
54
74
|
font-weight: bold;
|
|
55
75
|
margin: 0;
|
|
56
76
|
}
|
|
57
|
-
|
|
77
|
+
.date {
|
|
78
|
+
.title();
|
|
79
|
+
margin: 15px auto 0;
|
|
80
|
+
}
|
|
58
81
|
.btn {
|
|
82
|
+
.flexccc();
|
|
59
83
|
cursor: pointer;
|
|
60
84
|
width: 100%;
|
|
61
|
-
height:
|
|
62
|
-
line-height: 38px;
|
|
63
|
-
background-color: #e6f5eb;
|
|
85
|
+
height: 40px;
|
|
64
86
|
border-radius: 19px;
|
|
65
87
|
text-align: center;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
color: #
|
|
69
|
-
|
|
88
|
+
color: @primary-color;
|
|
89
|
+
border: 1px solid @primary-color;
|
|
90
|
+
background-color: #fff;
|
|
91
|
+
.name {
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 18px;
|
|
95
|
+
}
|
|
96
|
+
.sub {
|
|
97
|
+
font-weight: 400;
|
|
98
|
+
font-size: 8px;
|
|
99
|
+
line-height: 10px;
|
|
100
|
+
}
|
|
70
101
|
&_2 {
|
|
71
102
|
color: #fff;
|
|
72
|
-
background-color:
|
|
103
|
+
background-color: @primary-color;
|
|
73
104
|
}
|
|
74
|
-
|
|
75
105
|
&_group {
|
|
76
106
|
display: grid;
|
|
77
107
|
grid-template-columns: 1fr 1fr;
|
|
@@ -43,10 +43,7 @@ const props = defineProps({
|
|
|
43
43
|
},
|
|
44
44
|
tagList: {
|
|
45
45
|
type: Array,
|
|
46
|
-
|
|
47
|
-
{ name: '人工客服', value: 'kefu', type: 'chat', msg: '人工客服' },
|
|
48
|
-
{ name: '查看菜单', value: 'menu', type: 'call', msg: '查看菜单' },
|
|
49
|
-
],
|
|
46
|
+
required: true,
|
|
50
47
|
},
|
|
51
48
|
});
|
|
52
49
|
const Emits = defineEmits(['update:modelValue', 'send', 'tag']);
|