Commit d7752716 by 杨铁龙
parents f713f093 bf753854
...@@ -2,49 +2,51 @@ ...@@ -2,49 +2,51 @@
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
t="1595840909244"
class="icon" class="icon"
viewBox="0 0 1024 1024" viewBox="0 0 1024 1024"
version="1.1" version="1.1"
p-id="11656"
:width="size" :width="size"
:height="size" :height="size"
> >
<path <path
d="M56.888889 512a105.016889 102.4 90 1 0 204.8 0 105.016889 102.4 90 1 0-204.8 0Z" d="M56.888889 512a105.016889 102.4 90 1 0 204.8 0 105.016889 102.4 90 1 0-204.8 0Z"
fill="#8D959D" :fill="fill"
p-id="11657"
v-if="!status || status >= 1" v-if="!status || status >= 1"
/> />
<path <path
d="M425.415111 782.449778a68.266667 68.266667 0 0 1-97.792-95.288889A249.912889 249.912889 0 0 0 398.222222 512c0-66.787556-25.713778-129.137778-70.542222-175.160889a68.266667 68.266667 0 0 1 97.735111-95.288889A386.389333 386.389333 0 0 1 534.755556 512c0 102.627556-39.822222 199.111111-109.340445 270.449778z" d="M425.415111 782.449778a68.266667 68.266667 0 0 1-97.792-95.288889A249.912889 249.912889 0 0 0 398.222222 512c0-66.787556-25.713778-129.137778-70.542222-175.160889a68.266667 68.266667 0 0 1 97.735111-95.288889A386.389333 386.389333 0 0 1 534.755556 512c0 102.627556-39.822222 199.111111-109.340445 270.449778z"
fill="#8D959D" :fill="fill"
p-id="11658"
v-if="!status || status >= 2" v-if="!status || status >= 2"
/> />
<path <path
d="M618.496 980.48a68.266667 68.266667 0 0 1-97.792-95.288889A532.707556 532.707556 0 0 0 671.288889 512a532.707556 532.707556 0 0 0-150.584889-373.191111A68.266667 68.266667 0 0 1 618.496 43.52 669.184 669.184 0 0 1 807.822222 512c0 177.891556-68.835556 344.917333-189.326222 468.48z" d="M618.496 980.48a68.266667 68.266667 0 0 1-97.792-95.288889A532.707556 532.707556 0 0 0 671.288889 512a532.707556 532.707556 0 0 0-150.584889-373.191111A68.266667 68.266667 0 0 1 618.496 43.52 669.184 669.184 0 0 1 807.822222 512c0 177.891556-68.835556 344.917333-189.326222 468.48z"
fill="#8D959D" :fill="fill"
p-id="11659"
v-if="!status || status >= 3" v-if="!status || status >= 3"
/> />
</svg> </svg>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Prop, Vue, Watch } from "vue-property-decorator"; import { Component, Prop, Vue, Watch } from "vue-property-decorator";
@Component({ components: {} }) @Component({ components: {} })
export default class VoiceIcon extends Vue { export default class VoiceIcon extends Vue {
@Prop({ default: 25 }) @Prop({ default: 25 })
private size!: number; private size!: number;
@Prop() @Prop()
private loading!: boolean; private loading!: boolean;
@Prop()
private readonly white!: boolean;
private status = 0; private status = 0;
private interval = 0; private interval = 0;
private get fill() {
return this.white ? "#fff" : "#8D959D";
}
@Watch("loading") @Watch("loading")
private onLoadingChanged() { private onLoadingChanged() {
if (this.loading) { if (this.loading) {
...@@ -65,5 +67,5 @@ export default class VoiceIcon extends Vue { ...@@ -65,5 +67,5 @@ export default class VoiceIcon extends Vue {
beforeDestroy() { beforeDestroy() {
clearInterval(this.interval); clearInterval(this.interval);
} }
} }
</script> </script>
...@@ -84,11 +84,16 @@ async function preCacheImgs(msgs?: any[]) { ...@@ -84,11 +84,16 @@ async function preCacheImgs(msgs?: any[]) {
} }
function buildChatItem(chat: RawChatItem) { function buildChatItem(chat: RawChatItem) {
if (!chat.model_name && chat.business_data) { if ((!chat.model_name || !chat.obj_id) && chat.business_data) {
const b = JSON.parse(chat.business_data) as BaseChatItemBusinessData; const b = JSON.parse(chat.business_data) as BaseChatItemBusinessData;
chat.model_name = b.model_name; chat.model_name = b.model_name;
b.obj_id && (chat.obj_id = b.obj_id); b.obj_id && (chat.obj_id = b.obj_id);
} }
if (!chat.detail_name && chat.business_data) {
const b = JSON.parse(chat.business_data) as BaseChatItemBusinessData;
b.detail_name && (chat.detail_name = b.detail_name);
}
return { ...chat, chat_id: chat.id } as ChatType; return { ...chat, chat_id: chat.id } as ChatType;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment