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 @@