askbot-dragon 0.7.1 → 0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "0.7.1",
3
+ "version": "0.7.5",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
package/src/App.vue CHANGED
@@ -1,18 +1,14 @@
1
1
  <template>
2
2
  <div id="app">
3
3
  <ConversationContainer msg="Welcome to Your Vue.js App"/>
4
- <load-more-mess></load-more-mess>
5
4
  </div>
6
5
  </template>
7
6
 
8
7
  <script>
9
8
  import ConversationContainer from './components/ConversationContainer.vue'
10
-
11
- import LoadMoreMess from "./components/loadMoreMess";
12
9
  export default {
13
10
  name: 'App',
14
11
  components: {
15
- LoadMoreMess,
16
12
  ConversationContainer
17
13
  }
18
14
  }
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: 'iconfont'; /* Project id 2913049 */
3
- src: url('//at.alicdn.com/t/font_2913049_baxww6uvzup.woff2?t=1642737399832') format('woff2'),
4
- url('//at.alicdn.com/t/font_2913049_baxww6uvzup.woff?t=1642737399832') format('woff'),
5
- url('//at.alicdn.com/t/font_2913049_baxww6uvzup.ttf?t=1642737399832') format('truetype');
3
+ src: url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff2?t=1644465476099') format('woff2'),
4
+ url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff?t=1644465476099') format('woff'),
5
+ url('//at.alicdn.com/t/font_2913049_fhimnf31slu.ttf?t=1644465476099') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
@@ -12,6 +12,6 @@
12
12
  -webkit-font-smoothing: antialiased;
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
- .arsenalchess-pawn-solid:before {
16
- content: "\e718";
15
+ .guoran-arsenalchess-pawn-solid1:before {
16
+ content: "\e77f";
17
17
  }
@@ -19,6 +19,8 @@
19
19
  </div>
20
20
  </voice-component>-->
21
21
  <!-- 点选 -->
22
+ <div v-html="htmlContainer">
23
+ </div>
22
24
  <answer-radio :msg="answerRadios"></answer-radio>
23
25
  <action-send-to-bot :msg="answerRadios"></action-send-to-bot>
24
26
  <ticket-message :content="contents"></ticket-message>
@@ -33,6 +35,7 @@
33
35
  <answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
34
36
  <feed-back :feedBack="feedBack"></feed-back>
35
37
  <voice-compontent></voice-compontent>
38
+
36
39
  <!-- <FileType :urls="urls" :color="black"></FileType>-->
37
40
  <!-- <FileType :urls="urls" :color="black"></FileType>
38
41
  <chat-content :messageList="messageList"></chat-content>-->
@@ -1157,7 +1160,8 @@ export default {
1157
1160
  }
1158
1161
  },
1159
1162
  type:'answer_radio'
1160
- }
1163
+ },
1164
+ htmlContainer:'<input placeholder="请输入"></input>'
1161
1165
  };
1162
1166
  },
1163
1167
  methods: {
@@ -35,6 +35,7 @@ export default {
35
35
 
36
36
  <style scoped lang="less">
37
37
  .answer-dissatisfaction{
38
+ min-width: 100px;
38
39
  .satisfaction-reply-text{
39
40
  word-wrap: break-word;
40
41
  word-break: break-all;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="answer-radio">
3
- <p class="radio-description" v-html="msg.content.description"></p>
3
+ <p class="radio-description" v-html="msg.content.description" v-if="msg.content.description"></p>
4
4
  <div class="options-list">
5
5
  <div
6
6
  v-for="(option, index) in msg.content.options"
@@ -51,7 +51,7 @@
51
51
  const regex = new RegExp("<img", "gi");
52
52
  return html.replace(
53
53
  regex,
54
- "<img style='max-width: 100%;' onclick='imageOnClick(this)'"
54
+ "<img style='max-width: 230px;' onclick='imageOnClick(this)'"
55
55
  );
56
56
  },
57
57
  },
@@ -1631,7 +1631,7 @@ export default {
1631
1631
  }
1632
1632
  }
1633
1633
  .pcFormClass{
1634
- /* width: 300px;*/
1634
+ width: 400px;
1635
1635
  margin: 0 auto;
1636
1636
  .field-item{
1637
1637
  padding: 8px 0;
@@ -1710,9 +1710,8 @@ export default {
1710
1710
  }
1711
1711
  .remPhoneClassForm{
1712
1712
  .mobileFormClass{
1713
- /* width: 80vw;*/
1713
+ width: calc(100vw - 120px);
1714
1714
  .form-field-item{
1715
- /* border-bottom: 1px solid #ebebeb;*/
1716
1715
  .form-field-item-value{
1717
1716
  /deep/.van-cell{
1718
1717
  flex-direction: column;
@@ -1808,24 +1807,24 @@ export default {
1808
1807
  }
1809
1808
  /deep/.van-radio-group--horizontal{
1810
1809
  .van-radio{
1811
- min-width: 130px;
1810
+ min-width: 100px;
1812
1811
  max-width: 260px;
1813
1812
  flex: none;
1814
1813
  }
1815
1814
  .van-radio--horizontal{
1816
1815
  padding: 0.3rem 0;
1817
- margin-right: 0;
1816
+ margin-right: 6px;
1818
1817
  }
1819
1818
  }
1820
1819
  /deep/.van-checkbox-group--horizontal{
1821
1820
  .van-checkbox{
1822
- min-width: 130px;
1821
+ min-width: 100px;
1823
1822
  max-width: 260px;
1824
1823
  flex: none;
1825
1824
  }
1826
1825
  .van-checkbox--horizontal{
1827
1826
  padding: 0.3rem 0;
1828
- margin-right: 0;
1827
+ margin-right: 6px;
1829
1828
  }
1830
1829
  }
1831
1830
  /deep/.van-button--info{
@@ -24,16 +24,16 @@
24
24
  <div v-html="itemss" class="singleItem" v-for="(itemss,inde) in items.list" :key="inde"></div>
25
25
  </div>
26
26
  <div class="doubleClass" v-else-if="items.type==='DOUBLE'">
27
- <div class="doubleItem" v-for="(itemss,__index) in items.list" :key="__index" v-html="itemss">
27
+ <div class="doubleItem" v-for="(itemss,index) in items.list" :key="'__'+index" v-html="itemss">
28
28
  </div>
29
29
  </div>
30
30
  <div class="tripleClass" v-else-if="items.type==='TRIPLE'">
31
- <div v-html="itemss" class="tripleItem" v-for="(itemss,___index) in items.list" :key="___index"></div>
31
+ <div v-html="itemss" class="tripleItem" v-for="(itemss,index) in items.list" :key="'___'+index"></div>
32
32
  </div>
33
33
  </div>
34
34
  </div>
35
35
  <div class="button-list">
36
- <div v-for="(items,____index) in item.content.buttonList" :key="____index" class="button-item">
36
+ <div v-for="(items,index) in item.content.buttonList" :key="'____'+index" class="button-item">
37
37
  <div @click="btnClick(items)" class="buttonClassItem">
38
38
  <span class="btn-name">{{items.name}}</span>
39
39
  </div>
@@ -123,6 +123,7 @@
123
123
  },
124
124
  btnClick(items){
125
125
  items.apiKey=this.content.apiKey
126
+ console.debug('card_template')
126
127
  this.$emit('btnClick',items,this.content.apiKey)
127
128
  },
128
129
 
@@ -3,7 +3,7 @@
3
3
  <div id="voice-component-container">
4
4
  <div id="voice-component-c">
5
5
  <div class="voice-btn">
6
- <i class="iconfont arsenalchess-pawn-solid"></i>
6
+ <i class="iconfont guoran-arsenalchess-pawn-solid1"></i>
7
7
  </div>
8
8
  </div>
9
9
  <div class="close-voice" @click="closeVoice">
@@ -45,7 +45,7 @@ export default {
45
45
  #voice-component-container{
46
46
  position: relative;
47
47
  #voice-component-c{
48
- height: 120px;
48
+ height: 90px;
49
49
  width: 130%;
50
50
  position: relative;
51
51
  left: -15%;
@@ -62,7 +62,7 @@ export default {
62
62
  justify-content: center;
63
63
  i{
64
64
  color: #366aff;
65
- font-size: 30px;
65
+ font-size: 38px;
66
66
  }
67
67
  }
68
68
  }
@@ -1,199 +0,0 @@
1
- <template>
2
- <div class="container" ref="container">
3
- <div class="item">{{loadText+"第"+pageNum+"页"}}</div>
4
- <div v-for="(item, index) in list" :key="index" class="item">{{item}}</div>
5
- </div>
6
- <!-- <div
7
- class="container"
8
- @touchstart="touchStart($event)"
9
- @touchmove="touchMove($event)"
10
- @touchend="touchEnd($event)"
11
- :style="{transform: 'translate3d(0,' + top + 'px, 0)'}"
12
- >
13
- <p class="drop" v-if="dropDownState == 2">松开立即刷新</p>
14
- <p class="drop" v-if="dropDownState == 3">正在刷新数据...</p>
15
- <div class="histroy" id="list">
16
- <li v-for="(item,index) in list" :key="index">第{{ item }}条数据</li>
17
- </div>
18
- </div>-->
19
- </template>
20
-
21
- <script>
22
- export default {
23
- name: "loadMoreMess",
24
- data() {
25
- return {
26
- scrollHeight: 0,
27
- list: [],
28
- loadText: "加载中...",
29
- pageSize: 20,
30
- pageNum: 1,
31
- index: 0,
32
- defaultOffset: 50,
33
- top: 0,
34
- scrollIsToTop: 0,
35
- startY: 0,
36
- isDropDown: false,
37
- isRefreshing: false,
38
- dropDownState: 1
39
- }
40
- },
41
- mounted() {
42
- this.initData();
43
- const container = this.$refs.container;
44
- //这里的定时是为了列表首次渲染后获取scrollHeight并滑动到底部。
45
- setTimeout(() => {
46
- this.scrollHeight = container.scrollHeight;
47
- container.scrollTo(0, this.scrollHeight);
48
- }, 10);
49
- container.addEventListener('scroll', (e) => {
50
- //这里的2秒钟定时是为了避免滑动频繁,节流
51
- setTimeout(() => {
52
- if (this.list.length >= 90) {
53
- this.loadText = "加载完成";
54
- return;
55
- }
56
- //滑到顶部时触发下次数据加载
57
- if (e.target.scrollTop == 0) {
58
- //将scrollTop置为10以便下次滑到顶部
59
- e.target.scrollTop = 10;
60
- //加载数据
61
- this.initData();
62
- //这里的定时是为了在列表渲染之后才使用scrollTo。
63
- setTimeout(() => {
64
- e.target.scrollTo(0, this.scrollHeight - 30);//-30是为了露出最新加载的一行数据
65
- }, 100);
66
- }
67
- }, 2000);
68
- });
69
- },
70
- methods: {
71
- //初始数据
72
- initData() {
73
- for (var i = 20; i > 0; i--) {
74
- this.list.unshift(i)
75
- }
76
- this.pageNum++;
77
- },
78
- // 加载历史记录
79
- getHistory() {
80
-
81
- setTimeout(() => {
82
- let result = new Array();
83
- for (var i = 0; i < 10; i++) {
84
- let value = this.index < 1 ? i : this.index + "" + i;
85
- result.unshift(value);
86
- }
87
- this.list = result.concat(this.list);
88
- this.isRefreshing = false;
89
- this.isDropDown = false;
90
- this.dropDownState = 1;
91
- this.top = 0;
92
- this.$nextTick(() => {
93
- var container = this.$el.querySelector("#list");
94
- container.scrollTop = container.scrollHeight - this.scrollHeight;
95
- });
96
- }, 1200);
97
- },
98
-
99
- // 开始
100
- touchStart(e) {
101
- this.startY = e.targetTouches[0].pageY;
102
- var container = this.$el.querySelector("#list");
103
- this.scrollHeight = container.scrollHeight;
104
- },
105
- // 滑动
106
- touchMove(e) {
107
- this.scrollIsToTop =
108
- document.documentElement.scrollTop ||
109
- window.pageYOffset ||
110
- document.body.scrollTop;
111
- var container = this.$el.querySelector("#list");
112
- if (e.targetTouches[0].pageY > this.startY && container.scrollTop === 0) {
113
- this.isDropDown = true;
114
- if (this.scrollIsToTop === 0 && !this.isRefreshing) {
115
- let diff =
116
- e.targetTouches[0].pageY - this.startY - this.scrollIsToTop;
117
- this.top =
118
- Math.pow(diff, 0.8) +
119
- (this.dropDownState === 3 ? this.defaultOffset : 0);
120
- if (this.top >= this.defaultOffset) {
121
- this.dropDownState = 2;
122
- e.preventDefault();
123
- } else {
124
- this.dropDownState = 1;
125
- e.preventDefault();
126
- }
127
- }
128
- } else {
129
- this.isDropDown = false;
130
- this.dropDownState = 1;
131
- }
132
- },
133
-
134
- // 触摸结束
135
- touchEnd() {
136
- if (this.isDropDown && !this.isRefreshing) {
137
- if (this.top >= this.defaultOffset) {
138
- this.refresh();
139
- this.isRefreshing = true;
140
- } else {
141
- this.isRefreshing = false;
142
- this.isDropDown = false;
143
- this.dropDownState = 1;
144
- this.top = 0;
145
- }
146
- }
147
- },
148
-
149
- // 刷新
150
- refresh() {
151
- this.dropDownState = 3;
152
- this.top = this.defaultOffset;
153
- this.index++;
154
- this.getHistory();
155
- }
156
- }
157
- }
158
- </script>
159
-
160
- <style scoped lang="less">
161
- .container {
162
- width: 300px;
163
- height: 300px;
164
- overflow: auto;
165
- border: 1px solid;
166
- margin: 100px auto;
167
- }
168
-
169
- .item {
170
- height: 29px;
171
- line-height: 30px;
172
- text-align: center;
173
- border-bottom: 1px solid #aaa;
174
- }
175
- .drop {
176
- height: 5rem;
177
- display: flex;
178
- align-items: center;
179
- justify-content: center;
180
- }
181
- /*.container {
182
- height: 100%;
183
- overflow: hidden;
184
- }
185
-
186
- .histroy {
187
- padding: 0 1rem;
188
- height: 100%;
189
- overflow-y: auto;
190
- }
191
- .histroy li {
192
- font-size: 1.4rem;
193
- height: 10vh;
194
- display: flex;
195
- align-items: center;
196
- justify-content: center;
197
- border-bottom: 1px dashed #dddddd;
198
- }*/
199
- </style>