From 1c52847a0252b71bd847e7ebd7218996643b3a9f Mon Sep 17 00:00:00 2001
From: xiao12feng8 <16507319+xiao12feng8@user.noreply.gitee.com>
Date: Sun, 1 Feb 2026 10:56:03 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=9A=E5=A2=9E=E5=8A=A0ta?=
=?UTF-8?q?b=E6=A0=8F=E5=88=87=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
xuniYou/pages/chat/index.vue | 485 +----------------------------------
1 file changed, 2 insertions(+), 483 deletions(-)
diff --git a/xuniYou/pages/chat/index.vue b/xuniYou/pages/chat/index.vue
index e5bdadd..853a6d9 100644
--- a/xuniYou/pages/chat/index.vue
+++ b/xuniYou/pages/chat/index.vue
@@ -25,26 +25,6 @@
-
-
-
-
-
-
- {{ tab.name }}
-
-
-
-
-
-
-
-
@@ -184,103 +164,8 @@
-->
-
-
-
-
- 唱歌功能
- 让她为你唱一首歌
-
-
-
- {{item.title}}
-
-
-
-
-
-
-
-
-
-
- 跳舞功能
- 让她为你跳一支舞
-
-
- 生成舞蹈
-
-
-
-
-
-
-
- 换服装
- 为她挑选不同的服装
-
-
-
- 服装 {{i}}
-
-
-
-
-
-
-
-
- 送礼物
- 送她一份心意
-
-
-
- 礼物 {{i}}
- {{i * 10}} 金币
-
-
-
-
-
-
-
-
- 商城
- 购买更多功能和道具
-
-
-
- 套餐 {{i}}
- 包含多种功能和道具
-
-
- ¥{{i * 30}}
- 购买
-
-
-
-
-
-
-
-
-
- 短剧
- 观看精彩短剧内容
-
-
-
-
- 短剧标题 {{i}}
- 精彩剧情简介...
- 播放
-
-
-
-
-
-
-
+
+
@@ -384,19 +269,6 @@
},
data() {
return {
- // Tab 相关
- currentTab: 0,
- tabScrollLeft: 0,
- tabList: [
- { name: '聊天', icon: '' },
- { name: '唱歌', icon: '' },
- { name: '跳舞', icon: '' },
- { name: '换服装', icon: '' },
- { name: '刷礼物', icon: '' },
- { name: '商城', icon: '' },
- { name: '短剧', icon: '' }
- ],
- dancePrompt: '', // 跳舞描述
// 可以在这里添加聊天数据
// messages: [],
loverBasicList: uni.getStorageSync('loverBasicList'),
@@ -477,54 +349,6 @@
this.stopCurrentAudio();
},
methods: {
- // Tab 切换方法
- switchTab(index) {
- this.currentTab = index;
- // 计算滚动位置,使当前 tab 居中
- const tabWidth = 120; // 每个 tab 的宽度(rpx)
- const screenWidth = 750; // 屏幕宽度(rpx)
- this.tabScrollLeft = Math.max(0, (index * tabWidth) - (screenWidth / 2) + (tabWidth / 2));
- },
- // 直接选择歌曲并生成
- selectSongDirect(song) {
- this.songId = song.id;
- uni.showLoading({
- title: '生成中...'
- });
- SingGenerate({
- song_id: song.id
- }).then(res => {
- if (res.code == 1) {
- this.getSingGenerateTask(res.data.task_id);
- } else {
- uni.hideLoading();
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- });
- },
- // 请求跳舞
- requestDance() {
- if (!this.dancePrompt || !this.dancePrompt.trim()) {
- uni.showToast({
- title: '请输入舞蹈描述',
- icon: 'none'
- });
- return;
- }
- this.messageprompt = this.dancePrompt;
- this.savechatSing();
- },
- // 送礼物
- sendGift(giftId) {
- uni.showToast({
- title: `送出礼物 ${giftId}`,
- icon: 'success'
- });
- // 这里可以调用送礼物的 API
- },
initAudio() {
// 销毁旧的音频上下文(如果存在)
if (this.audioContext) {
@@ -1926,311 +1750,6 @@