ai-chat-bot-interface 1.6.10 → 1.6.11

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.10",
4
+ "version": "1.6.11",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
package/src/App.vue CHANGED
@@ -10,7 +10,7 @@ const handleLog = (log) => {
10
10
  <chat-ui
11
11
  bot-id="7574379096097439754"
12
12
  token="sat_cSmj7ZyuePbkEpOKR7F259YuIfp2fjX9rJ3Om2O0gB9JzrGjAk8pSL269rbu8kzr"
13
- uid="262598"
13
+ uid="0"
14
14
  :def-msg="{ placeholder: '发消息...' }"
15
15
  :show-header="false"
16
16
  :card-list="{ dishes: true, personalForm: true }"
@@ -68,6 +68,9 @@
68
68
  {{ materialText }}
69
69
  </div>
70
70
  <div class="title">制作工艺</div>
71
+ <div v-if="info.skuVideo">
72
+ <video :src="info.skuVideo" width="100%" controls="true" />
73
+ </div>
71
74
  <div
72
75
  v-for="(item, index) in info.makeCraftList"
73
76
  :key="index"
@@ -77,8 +80,16 @@
77
80
  <div class="num">第{{ index + 1 }}步</div>
78
81
  <div class="desc">{{ item.content }}</div>
79
82
  </div>
83
+ <div>
84
+ <img
85
+ v-for="(img, index) in getImageList(item.craftImg)"
86
+ :key="index"
87
+ :src="img"
88
+ width="100%"
89
+ alt="step image"
90
+ />
91
+ </div>
80
92
  </div>
81
-
82
93
  <div class="collapse_btn" @click.stop="isOpen = false">收起</div>
83
94
  </div>
84
95
  </div>
@@ -142,6 +153,17 @@ const previewImg = (url) => {
142
153
  const switchOpen = () => {
143
154
  isOpen.value = !isOpen.value;
144
155
  };
156
+
157
+ const getImageList = (str) => {
158
+ let list = [];
159
+ try {
160
+ list = JSON.parse(str);
161
+ } catch (e) {
162
+ console.warn('====== get image list error =======', e);
163
+ }
164
+
165
+ return list;
166
+ };
145
167
  </script>
146
168
 
147
169
  <style scoped lang="less">