From cb7235bb83f6ab7d37a1af8a2d5d87c2349474e1 Mon Sep 17 00:00:00 2001 From: GeekMaster Date: Thu, 7 Aug 2025 16:26:12 +0800 Subject: [PATCH] =?UTF-8?q?Suno=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/store/jimeng.js | 1 - web/src/store/suno.js | 12 +- web/src/views/Jimeng.vue | 3 +- web/src/views/Suno.vue | 7 +- web/src/views/mobile/Discover.vue | 6 +- web/src/views/mobile/Index.vue | 6 +- web/src/views/mobile/pages/SunoCreate.vue | 180 +++++++++++++++++----- 7 files changed, 162 insertions(+), 53 deletions(-) diff --git a/web/src/store/jimeng.js b/web/src/store/jimeng.js index 3d32ab81..9c75ac29 100644 --- a/web/src/store/jimeng.js +++ b/web/src/store/jimeng.js @@ -623,7 +623,6 @@ export const useJimengStore = defineStore('jimeng', () => { replaceImg, } }) - export const imageSizeOptions = [ { label: '1:1 (1328x1328)', value: '1328x1328' }, { label: '3:2 (1584x1056)', value: '1584x1056' }, diff --git a/web/src/store/suno.js b/web/src/store/suno.js index fe8673f6..94382369 100644 --- a/web/src/store/suno.js +++ b/web/src/store/suno.js @@ -5,7 +5,8 @@ import Compressor from 'compressorjs' import { ElMessage, ElMessageBox } from 'element-plus' import { compact } from 'lodash' import { defineStore } from 'pinia' -import { computed, ref } from 'vue' +import { computed, onMounted, ref } from 'vue' +import { getSystemInfo } from './cache' export const useSunoStore = defineStore('suno', () => { // 响应式数据 @@ -60,6 +61,7 @@ export const useSunoStore = defineStore('suno', () => { const editData = ref({ title: '', cover: '', id: 0 }) const promptPlaceholder = ref('请在这里输入你自己写的歌词...') const isGenerating = ref(false) + const sunoPower = ref(0) // 分页相关 const page = ref(1) @@ -72,6 +74,12 @@ export const useSunoStore = defineStore('suno', () => { // 计算属性 const hasRefSong = computed(() => refSong.value !== null) + onMounted(() => { + getSystemInfo().then((res) => { + sunoPower.value = res.data.suno_power + }) + }) + // 方法 const fetchData = async (_page) => { if (_page) { @@ -393,7 +401,7 @@ export const useSunoStore = defineStore('suno', () => { pageSize, total, hasRefSong, - + sunoPower, // 方法 fetchData, create, diff --git a/web/src/views/Jimeng.vue b/web/src/views/Jimeng.vue index 6fba227f..f0e1e3fd 100644 --- a/web/src/views/Jimeng.vue +++ b/web/src/views/Jimeng.vue @@ -312,9 +312,10 @@ type="primary" @click="store.submitTask" :loading="store.submitting" + class="w-full" size="large" > - 立即生成 ({{ store.currentPowerCost }}) + 立即生成 ({{ store.currentPowerCost }} ) diff --git a/web/src/views/Suno.vue b/web/src/views/Suno.vue index 706e7740..30aab8be 100644 --- a/web/src/views/Suno.vue +++ b/web/src/views/Suno.vue @@ -204,7 +204,11 @@ @@ -516,7 +520,6 @@ import MusicPlayer from '@/components/MusicPlayer.vue' import { checkSession } from '@/store/cache' import { useSunoStore } from '@/store/suno' import { InfoFilled } from '@element-plus/icons-vue' -import { ElMessage } from 'element-plus' import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue' // 使用 Pinia store diff --git a/web/src/views/mobile/Discover.vue b/web/src/views/mobile/Discover.vue index cea4de95..500f89f7 100644 --- a/web/src/views/mobile/Discover.vue +++ b/web/src/views/mobile/Discover.vue @@ -93,7 +93,7 @@ const aiTools = ref([ tag: 'AI音乐', status: 'active', statusText: '可用', - url: '/mobile/suno-create', + url: '/mobile/suno', }, { key: 'video', @@ -104,7 +104,7 @@ const aiTools = ref([ tag: 'AI视频', status: 'beta', statusText: '测试版', - url: '/mobile/video-create', + url: '/mobile/video', }, { key: 'jimeng', @@ -115,7 +115,7 @@ const aiTools = ref([ tag: 'AI绘画', status: 'active', statusText: '可用', - url: '/mobile/jimeng-create', + url: '/mobile/jimeng', }, { key: 'imgWall', diff --git a/web/src/views/mobile/Index.vue b/web/src/views/mobile/Index.vue index 56c70ae5..d5e2e8d1 100644 --- a/web/src/views/mobile/Index.vue +++ b/web/src/views/mobile/Index.vue @@ -151,21 +151,21 @@ const features = ref([ name: '音乐创作', icon: 'icon-mp3', color: '#EF4444', - url: '/mobile/suno-create', + url: '/mobile/suno', }, { key: 'video', name: '视频生成', icon: 'icon-video', color: '#10B981', - url: '/mobile/video-create', + url: '/mobile/video', }, { key: 'jimeng', name: '即梦AI', icon: 'icon-jimeng', color: '#F97316', - url: '/mobile/jimeng-create', + url: '/mobile/jimeng', }, { key: 'agent', name: '智能体', icon: 'icon-app', color: '#3B82F6', url: '/mobile/apps' }, { diff --git a/web/src/views/mobile/pages/SunoCreate.vue b/web/src/views/mobile/pages/SunoCreate.vue index 9c5bb8e0..fd0b38ab 100644 --- a/web/src/views/mobile/pages/SunoCreate.vue +++ b/web/src/views/mobile/pages/SunoCreate.vue @@ -141,7 +141,10 @@
-

续写歌曲

+

+ + 续写歌曲 +

+
+ 歌曲时长: + {{ refSong.duration }}秒 +
-
-
- - - -
- -
- -
- - 上传音乐文件 - 支持 .wav, .mp3 格式 -
-
-
-
- - {{ uploadFiles[0].name }} +

+ 建议从 {{ Math.floor(refSong.duration * 0.8) }}-{{ refSong.duration }} 秒开始续写 +

@@ -198,12 +183,40 @@ + + +
+ + + + +
+
+

• 上传你自己的音乐文件,然后进行二次创作

+

• 请上传6-60秒的原始音频

+

• 检测到人声的音频将仅设为私人音频

+
+
+
@@ -354,6 +367,14 @@ {{ item.downloading ? '下载中...' : '下载' }} +