修改bug
parent
6e244d2fb4
commit
556d6f9889
|
|
@ -35,7 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="detail">
|
<template v-if="detail">
|
||||||
<AiAssistantFolat :content="detail.content"></AiAssistantFolat>
|
<AiAssistantFolat :content="aiContent"></AiAssistantFolat>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -48,6 +48,7 @@ import { useRouter, useRoute } from 'vue-router';
|
||||||
import { DateFormat } from '@/utils/format.js';
|
import { DateFormat } from '@/utils/format.js';
|
||||||
import AiAssistantFolat from '@/views/chat/components/ai-assistant-float.vue';
|
import AiAssistantFolat from '@/views/chat/components/ai-assistant-float.vue';
|
||||||
import { useWebsite } from '@/stores/website';
|
import { useWebsite } from '@/stores/website';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const website = useWebsite();
|
const website = useWebsite();
|
||||||
|
|
||||||
|
|
@ -64,6 +65,10 @@ const detail = ref();
|
||||||
const recommend = ref([]);
|
const recommend = ref([]);
|
||||||
const placeholder = ref('数据加载中...');
|
const placeholder = ref('数据加载中...');
|
||||||
|
|
||||||
|
const aiContent = computed(() => {
|
||||||
|
return `标题${detail.value?.title}作者${detail.value?.author}责编${detail.value?.editor}发布时间${DateFormat(new Date(detail.value?.published_at * 1000), 'yyyy.MM.dd') }内容${detail.value?.content}`
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDetail();
|
getDetail();
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
:slidesPerView="'auto'"
|
:slidesPerView="'auto'"
|
||||||
:navigation="true"
|
:navigation="true"
|
||||||
:coverflowEffect="{
|
:coverflowEffect="{
|
||||||
rotate: -10,
|
rotate: -20,
|
||||||
stretch: 0,
|
stretch: 0,
|
||||||
depth: 0,
|
depth: 60,
|
||||||
slideShadows: true,
|
slideShadows: true,
|
||||||
}"
|
}"
|
||||||
:pagination="true"
|
:pagination="true"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="px-30px">
|
<div class="px-30px">
|
||||||
<div class="flex items-center justify-center mt-54px" v-if="sortList.length">
|
<div
|
||||||
|
class="flex items-center justify-center mt-54px"
|
||||||
|
v-if="sortList.length"
|
||||||
|
>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@click="handlePrev"
|
@click="handlePrev"
|
||||||
class="text-white text-53px transform -rotate-90 cursor-pointer"
|
class="text-white text-53px transform -rotate-90 cursor-pointer"
|
||||||
|
|
@ -128,141 +131,36 @@ const setOption = (options) => {
|
||||||
const initChart = () => {
|
const initChart = () => {
|
||||||
const data = toRaw(currentChart.value)
|
const data = toRaw(currentChart.value)
|
||||||
if (data) {
|
if (data) {
|
||||||
const { chart_options } = data
|
setChart(data)
|
||||||
if (chart_options.type == 'line') lineChart(data)
|
|
||||||
if (chart_options.type == 'bar') barChart(data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const lineChart = (data) => {
|
const setChart = (data) => {
|
||||||
const { chart_data, chart_options, title } = data
|
const { chart_data, title } = data
|
||||||
|
|
||||||
const xAxis = chart_data.xAxis.list
|
const xAxis = chart_data.xAxis.list
|
||||||
|
|
||||||
const series = chart_data.data.filter((item) => item.list.some((value) => value !== null)).map((e) => {
|
const series = chart_data.data
|
||||||
|
.filter((item) => item.list.some((value) => value !== null))
|
||||||
return {
|
.map((e) => {
|
||||||
name: e.name,
|
const { type } = e
|
||||||
type: chart_options.type,
|
if (type == 'line') return lineSeries(e)
|
||||||
color: chart_options.color,
|
if (type == 'bar') return barSeries(e)
|
||||||
smooth: true,
|
})
|
||||||
areaStyle: {
|
|
||||||
normal: {
|
|
||||||
color: new echarts.graphic.LinearGradient(
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
offset: 0,
|
|
||||||
color: hexToRgba(chart_options.color ?? '#ffffff','0.3'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
offset: 0.8,
|
|
||||||
color: hexToRgba(chart_options.color ?? '#ffffff','0'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
false
|
|
||||||
),
|
|
||||||
shadowColor: 'rgba(54, 98, 254, 0.1)',
|
|
||||||
shadowBlur: 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 5,
|
|
||||||
data: e.list,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
setOption({
|
setOption({
|
||||||
grid: {
|
legend: {
|
||||||
left: '2%',
|
top: '4%',
|
||||||
right: '3%',
|
right: '4%',
|
||||||
top: '22%',
|
|
||||||
bottom: '2%',
|
|
||||||
containLabel: true,
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
text: title,
|
|
||||||
left: '2%',
|
|
||||||
top: '3%',
|
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: false,
|
|
||||||
data: xAxis,
|
|
||||||
axisLabel: {
|
|
||||||
color: 'rgba(255, 255, 255, .4)',
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(65, 69, 72, 1)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
name: '单位',
|
|
||||||
position: 'left',
|
|
||||||
nameTextStyle: {
|
|
||||||
color: 'rgba(255, 255, 255, .4)',
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
color: 'rgba(255, 255, 255, .4)',
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(65, 69, 72, 1)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
lineStyle: {
|
|
||||||
type: 'dashed',
|
|
||||||
color: 'rgba(255, 255, 255, .4)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
series: series,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const barChart = (data) => {
|
|
||||||
const { chart_data, chart_options, title } = data
|
|
||||||
|
|
||||||
const xAxis = chart_data.xAxis.list
|
|
||||||
|
|
||||||
const series = chart_data.data.filter((item) => item.list.some((value) => value !== null)).map((e) => {
|
|
||||||
return {
|
|
||||||
name: e.name,
|
|
||||||
type: chart_options.type,
|
|
||||||
color: chart_options.color,
|
|
||||||
smooth: true,
|
|
||||||
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 5,
|
|
||||||
data: e.list,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
setOption({
|
|
||||||
grid: {
|
grid: {
|
||||||
left: '2%',
|
left: '4%',
|
||||||
right: '3%',
|
right: '3%',
|
||||||
top: '22%',
|
top: '20%',
|
||||||
bottom: '2%',
|
bottom: '5%',
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
@ -322,12 +220,60 @@ const barChart = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lineSeries(e) {
|
||||||
|
const { type, color, list, name } = e
|
||||||
|
return {
|
||||||
|
name: name,
|
||||||
|
type: type,
|
||||||
|
color: color,
|
||||||
|
smooth: true,
|
||||||
|
areaStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: hexToRgba(color ?? '#ffffff', '0.3'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 0.8,
|
||||||
|
color: hexToRgba(color ?? '#ffffff', '0'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
false
|
||||||
|
),
|
||||||
|
shadowColor: 'rgba(54, 98, 254, 0.1)',
|
||||||
|
shadowBlur: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 5,
|
||||||
|
data: list,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function hexToRgba(hexColor,opacity) {
|
function barSeries(e) {
|
||||||
const hex = hexColor.replace('#', '')
|
const { type, color, list, name } = e
|
||||||
const r = parseInt(hex.substring(0, 2), 16)
|
return {
|
||||||
const g = parseInt(hex.substring(2, 4), 16)
|
name: name,
|
||||||
const b = parseInt(hex.substring(4, 6), 16)
|
type: type,
|
||||||
return `rgba(${r}, ${g}, ${b}, ${opacity})`
|
color: color,
|
||||||
|
smooth: true,
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 5,
|
||||||
|
data: list,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hexToRgba(hexColor, opacity) {
|
||||||
|
const hex = hexColor.replace('#', '')
|
||||||
|
const r = parseInt(hex.substring(0, 2), 16)
|
||||||
|
const g = parseInt(hex.substring(2, 4), 16)
|
||||||
|
const b = parseInt(hex.substring(4, 6), 16)
|
||||||
|
return `rgba(${r}, ${g}, ${b}, ${opacity})`
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ const sendMessage = async () => {
|
||||||
{
|
{
|
||||||
// prompt: message,
|
// prompt: message,
|
||||||
prompt:`"""
|
prompt:`"""
|
||||||
${content?.substring(0, 3900)}
|
${props.content?.substring(0, 3900)}
|
||||||
"""
|
"""
|
||||||
Question: ${message}`
|
Question: ${message}`
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@
|
||||||
:as-raw-text="asRawText"
|
:as-raw-text="asRawText"
|
||||||
/>
|
/>
|
||||||
<FileComponent :file="file" v-else/>
|
<FileComponent :file="file" v-else/>
|
||||||
|
<div class="h-full" v-if="!inversion">
|
||||||
|
<SvgIcon @click="handleCopy" class="text-26px" name="ic_copy"></SvgIcon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,7 +38,9 @@
|
||||||
import TextComponent from './text.vue'
|
import TextComponent from './text.vue'
|
||||||
import AvatarComponent from './avatar.vue'
|
import AvatarComponent from './avatar.vue'
|
||||||
import FileComponent from './file.vue'
|
import FileComponent from './file.vue'
|
||||||
|
import { copyToClip } from '@/utils/copy'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { showToast } from 'vant'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -60,4 +65,14 @@ const props = defineProps({
|
||||||
})
|
})
|
||||||
|
|
||||||
const asRawText = ref(props.inversion)
|
const asRawText = ref(props.inversion)
|
||||||
|
|
||||||
|
const handleCopy = () => {
|
||||||
|
copyToClip(props.text)
|
||||||
|
.then((res) => {
|
||||||
|
showToast('复制成功~')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
showToast('复制失败~')
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@
|
||||||
<div class="w-479px h-full flex flex-col overflow-hidden">
|
<div class="w-479px h-full flex flex-col overflow-hidden">
|
||||||
<div class="h-100px"></div>
|
<div class="h-100px"></div>
|
||||||
<div
|
<div
|
||||||
class="bg-gradient-to-b to-[#101011] from-[#414548] flex-1 border-t-7px border-[#3662FE] flex flex-col items-center overflow-y-auto"
|
class="bg-gradient-to-b to-[#101011] from-[#414548] flex-1 flex flex-col items-center overflow-y-auto"
|
||||||
>
|
>
|
||||||
<SilderBtn @click="openTemplateModal">
|
<SilderBtn class="!bg-[#3662FE]" @click="openTemplateModal">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SvgIcon class="text-white text-35px" name="dp"></SvgIcon>
|
<SvgIcon class="text-white text-35px" name="dp"></SvgIcon>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,7 @@
|
||||||
name="stop"
|
name="stop"
|
||||||
class="text-white text-26px cursor-pointer mr-28px"
|
class="text-white text-26px cursor-pointer mr-28px"
|
||||||
></SvgIcon>
|
></SvgIcon>
|
||||||
<div class="flex-1 text-right text-22px">
|
<div class="flex-1 text-right text-22px">剩余字数:{{ surplus }}</div>
|
||||||
剩余字数:{{ surplus }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<van-field
|
<van-field
|
||||||
ref="inputRef"
|
ref="inputRef"
|
||||||
|
|
@ -113,8 +111,9 @@ const isLogin = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const surplus = computed(() => {
|
const surplus = computed(() => {
|
||||||
const { words_count=0 ,words_used = 0} = userInfo.userData?.equity ?? {}
|
const { words_count = 0, words_used = 0 } = userInfo.userData?.equity ?? {}
|
||||||
return words_count - words_used
|
const count = words_count - words_used
|
||||||
|
return count < 0 ? 0 : count
|
||||||
})
|
})
|
||||||
|
|
||||||
const authModal = useAuthModal()
|
const authModal = useAuthModal()
|
||||||
|
|
@ -141,9 +140,6 @@ const fileLoading = ref(false)
|
||||||
|
|
||||||
const currentChart = computed(() => chatStore.getCurrentChat)
|
const currentChart = computed(() => chatStore.getCurrentChat)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function handleFileChange(file) {
|
async function handleFileChange(file) {
|
||||||
if (!isLogin.value) {
|
if (!isLogin.value) {
|
||||||
authModal.setAuthModalType('login')
|
authModal.setAuthModalType('login')
|
||||||
|
|
@ -429,6 +425,7 @@ onMounted(async () => {
|
||||||
if (inputRef.value) {
|
if (inputRef.value) {
|
||||||
inputRef.value.focus()
|
inputRef.value.focus()
|
||||||
}
|
}
|
||||||
|
userInfo.getUserInfo()
|
||||||
await chatStore.getChat(uuid)
|
await chatStore.getChat(uuid)
|
||||||
scrollToBottom()
|
scrollToBottom()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex px-43px mt-92px">
|
<div class="flex px-43px mt-92px">
|
||||||
<div class="mr-54px">
|
<div class="mr-40px">
|
||||||
<div class="text-27px font-bold">虚拟人直播</div>
|
<div class="text-27px font-bold">虚拟人直播</div>
|
||||||
<div class="mt-31px text-22px text-[#C2C5CA] leading-29px">
|
<div class="mt-31px text-22px text-[#C2C5CA] leading-29px">
|
||||||
一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字
|
<p>成本节省:价格低品质好,一次定制终生使用,节省90%成本</p>
|
||||||
|
<p>无须布场:随时随地开播,24小时直播</p>
|
||||||
|
<p>设备简单:只需一部手机+一台电脑</p>
|
||||||
|
<p>操作简便:傻瓜式操作,小白也能轻松上手</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-43px">
|
<div class="mt-43px">
|
||||||
<van-button
|
<van-button
|
||||||
|
|
@ -63,7 +66,10 @@
|
||||||
<div class="ml-54px">
|
<div class="ml-54px">
|
||||||
<div class="text-27px font-bold">短视频创作</div>
|
<div class="text-27px font-bold">短视频创作</div>
|
||||||
<div class="mt-31px text-22px text-[#C2C5CA] leading-29px">
|
<div class="mt-31px text-22px text-[#C2C5CA] leading-29px">
|
||||||
一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字一些相关的描述文字
|
<p>简单易懂操作:一个视频=1段文案+1个数字人+一键合成</p>
|
||||||
|
<p>视频产出快速: 制作一个真人口播视频,最快仅需 1分钟</p>
|
||||||
|
<p>随时随地修改:数字人视频,随时修改文本,随时生成</p>
|
||||||
|
<p>虚拟人更加智能:一个数字人可更换不同语种、不同声线、不同情感音色</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-43px">
|
<div class="mt-43px">
|
||||||
<van-button
|
<van-button
|
||||||
|
|
@ -209,7 +215,7 @@
|
||||||
@click="onPlay(item)"
|
@click="onPlay(item)"
|
||||||
v-for="(item, i) in videos"
|
v-for="(item, i) in videos"
|
||||||
:key="i"
|
:key="i"
|
||||||
class="w-193px mx-11px flex-none"
|
class="w-193px h-360px mx-11px flex-none"
|
||||||
:src="item.img"
|
:src="item.img"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue