|
@@ -11,7 +11,8 @@
|
|
</div>
|
|
</div>
|
|
<div class="info flex-1 ml-2 flex flex-col justify-around">
|
|
<div class="info flex-1 ml-2 flex flex-col justify-around">
|
|
<div class="text-sm font-semibold">{{ item.characterName }}</div>
|
|
<div class="text-sm font-semibold">{{ item.characterName }}</div>
|
|
- <div class="text-sm text-gray-400">{{ item.prologue }}</div>
|
|
|
|
|
|
+ <div class="text-sm text-gray-400">{{ item.prologue }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center text-lg" style="height: 48px;">
|
|
<div class="flex items-center text-lg" style="height: 48px;">
|
|
<i v-if="!item.open" class="el-icon-arrow-down" style="font-size: 16px;"></i>
|
|
<i v-if="!item.open" class="el-icon-arrow-down" style="font-size: 16px;"></i>
|
|
@@ -98,11 +99,16 @@
|
|
<i class="el-icon-document"></i>
|
|
<i class="el-icon-document"></i>
|
|
简介
|
|
简介
|
|
</div>
|
|
</div>
|
|
- <div class="mt-3 text-sm max-h-48">
|
|
|
|
- {{ info.prologue }}
|
|
|
|
|
|
+ <div class="flex">
|
|
|
|
+ <div ref="prologue" class="mt-3 text-sm max-h-48 prologue" :class="showPrologue && 'prologueOpen'">
|
|
|
|
+ <div v-show="showPrologueButton" class="textButton" @click="showPrologue = !showPrologue">{{
|
|
|
|
+ showPrologue ? '收起' :
|
|
|
|
+ '展开' }}</div>
|
|
|
|
+ {{ info.prologue }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex justify-between items-center mt-5 text-base pb-3 border-b border-gray-200">
|
|
|
|
|
|
+ <div class="flex justify-between items-center mt-5 text-base pb-3 border-b border-gray-200">
|
|
<div>
|
|
<div>
|
|
<i class="el-icon-user"></i>
|
|
<i class="el-icon-user"></i>
|
|
创作人
|
|
创作人
|
|
@@ -415,6 +421,10 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 展开收起简介按钮是否显示
|
|
|
|
+ showPrologueButton: false,
|
|
|
|
+ // 展开收起简介
|
|
|
|
+ showPrologue: false,
|
|
// 对话请求超时参数
|
|
// 对话请求超时参数
|
|
timeOut: null,
|
|
timeOut: null,
|
|
// 聊天等待
|
|
// 聊天等待
|
|
@@ -485,7 +495,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
notChatSend() {
|
|
notChatSend() {
|
|
- console.log(this.audioPlayIndex, 'this.audioPlayIndex>>>>>>>>>>>');
|
|
|
|
return this.chatLoading != false || this.audioPlayIndex != null
|
|
return this.chatLoading != false || this.audioPlayIndex != null
|
|
},
|
|
},
|
|
showNodata() {
|
|
showNodata() {
|
|
@@ -495,7 +504,6 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.init()
|
|
this.init()
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- console.log(this.$refs.audio.paused, '>>>>>>>>>>>>>');
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -919,12 +927,17 @@ export default {
|
|
let res = await detailApi(id)
|
|
let res = await detailApi(id)
|
|
console.log(res, '角色详情');
|
|
console.log(res, '角色详情');
|
|
this.info = res.data
|
|
this.info = res.data
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.showPrologueButton = this.$refs.prologue.scrollHeight > this.$refs.prologue.offsetHeight
|
|
|
|
+ })
|
|
// 模型选中角色默认模型
|
|
// 模型选中角色默认模型
|
|
this.configForm.radio2 = this.info.modelId
|
|
this.configForm.radio2 = this.info.modelId
|
|
// 如果用户有设置过模型使用用户设置模型
|
|
// 如果用户有设置过模型使用用户设置模型
|
|
- let userConfig = JSON.parse(Cookies.get(`userConfig_${this.$store.state.user.userId}_${this.info.id}`))
|
|
|
|
- if (userConfig.radio2) {
|
|
|
|
- this.configForm.radio2 = userConfig.radio2
|
|
|
|
|
|
+ if (Cookies.get(`userConfig_${this.$store.state.user.userId}_${this.info.id}`)) {
|
|
|
|
+ let userConfig = JSON.parse(Cookies.get(`userConfig_${this.$store.state.user.userId}_${this.info.id}`))
|
|
|
|
+ if (userConfig.radio2) {
|
|
|
|
+ this.configForm.radio2 = userConfig.radio2
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// let HistoryMessage = JSON.parse(localStorage.getItem(`[userId:${123},aiId:${this.info.id}]`));
|
|
// let HistoryMessage = JSON.parse(localStorage.getItem(`[userId:${123},aiId:${this.info.id}]`));
|
|
// if (HistoryMessage) {
|
|
// if (HistoryMessage) {
|
|
@@ -951,6 +964,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log('fffffffffffffffffffffff');
|
|
this.returnMessage.push({
|
|
this.returnMessage.push({
|
|
role: 'assistant',
|
|
role: 'assistant',
|
|
content: this.info.firstContent
|
|
content: this.info.firstContent
|
|
@@ -1744,6 +1758,42 @@ export default {
|
|
.planeColor {
|
|
.planeColor {
|
|
color: var(--bg-color1);
|
|
color: var(--bg-color1);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.prologue {
|
|
|
|
+ position: relative;
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ padding-bottom: 4px;
|
|
|
|
+
|
|
|
|
+ .textButton {
|
|
|
|
+ // display: inline-block;
|
|
|
|
+ float: right;
|
|
|
|
+ clear: both;
|
|
|
|
+ color: #fff;
|
|
|
|
+ padding: 0 5px;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ background: var(--bg-color1);
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.prologueOpen {
|
|
|
|
+ -webkit-line-clamp: 20;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.prologueOpen::before {}
|
|
|
|
+
|
|
|
|
+.prologue::before {
|
|
|
|
+ content: '';
|
|
|
|
+ float: right;
|
|
|
|
+ // width: 10px;
|
|
|
|
+ height: calc(100% - 20px);
|
|
|
|
+ /*先随便设置一个高度*/
|
|
|
|
+ background: red
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
<style scoped>
|
|
<style scoped>
|
|
.loadingMessage>>>.el-loading-parent--relative {
|
|
.loadingMessage>>>.el-loading-parent--relative {
|