@aochuang/client-sdk 1.0.379 → 1.0.381
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="sdk-chat-control-location" :class="['sdk-chat-control-location--' + type]">
|
|
3
|
-
<template v-if="type === 'default'">
|
|
3
|
+
<template v-if="type === 'default' || type === 'thumb'">
|
|
4
4
|
<div class="sdk-chat-control-location__main">
|
|
5
5
|
<div class="sdk-chat-control-location__head">
|
|
6
6
|
<h4 class="sdk-chat-control-location__title">{{address}}</h4>
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
type: String,
|
|
47
47
|
default: 'default',
|
|
48
48
|
validator (value) {
|
|
49
|
-
return ['quote', 'default'].includes(value)
|
|
49
|
+
return ['quote', 'default', 'thumb'].includes(value)
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
/**
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
}
|
|
90
90
|
</script>
|
|
91
91
|
<style lang="less">
|
|
92
|
-
.sdk-chat-control-location--default
|
|
92
|
+
.sdk-chat-control-location--default,
|
|
93
|
+
.sdk-chat-control-location--thumb {
|
|
93
94
|
.sdk-chat-control-location__body{
|
|
94
95
|
line-height: 0;
|
|
95
96
|
}
|
|
@@ -149,6 +150,13 @@ export default {
|
|
|
149
150
|
z-index: 3;
|
|
150
151
|
}
|
|
151
152
|
}
|
|
153
|
+
.sdk-chat-control-location--thumb {
|
|
154
|
+
display: inline-block;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
background-color: #fff;
|
|
157
|
+
border: 1px solid #eee;
|
|
158
|
+
border-radius: 4px;
|
|
159
|
+
}
|
|
152
160
|
.sdk-chat-control-location__body{
|
|
153
161
|
overflow: hidden;
|
|
154
162
|
}
|
package/package.json
CHANGED
|
@@ -373,11 +373,13 @@ export default class Socket {
|
|
|
373
373
|
if (this.messageCallbackMap[messageData.seq]) {
|
|
374
374
|
if (messageData.code === -1) {
|
|
375
375
|
this.messageCallbackMap[messageData.seq].reject({
|
|
376
|
-
errMsg: messageData.extra
|
|
376
|
+
errMsg: messageData.extra,
|
|
377
|
+
response: messageData
|
|
377
378
|
})
|
|
378
379
|
} else {
|
|
379
380
|
this.messageCallbackMap[messageData.seq].resolve({
|
|
380
|
-
data: messageData.extra
|
|
381
|
+
data: messageData.extra,
|
|
382
|
+
response: messageData
|
|
381
383
|
})
|
|
382
384
|
}
|
|
383
385
|
}
|
|
@@ -552,10 +554,18 @@ export default class Socket {
|
|
|
552
554
|
messageId,
|
|
553
555
|
message: nextMessage,
|
|
554
556
|
resolve: (data) => {
|
|
555
|
-
|
|
557
|
+
const resolveData = {
|
|
558
|
+
data: data.data,
|
|
559
|
+
response: data.response
|
|
560
|
+
}
|
|
561
|
+
messagePromise.resolve(resolveData)
|
|
556
562
|
messageObject.destroy()
|
|
557
563
|
callback && callback({
|
|
558
|
-
data
|
|
564
|
+
data: resolveData
|
|
565
|
+
})
|
|
566
|
+
this.event.emit('onSendMessageSuccess', {
|
|
567
|
+
data: data.response,
|
|
568
|
+
message: nextMessage
|
|
559
569
|
})
|
|
560
570
|
},
|
|
561
571
|
reject: (err) => {
|