1
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { defineStore, acceptHMRUpdate } from "pinia";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
|
||||
const defaultPublishPlatforms = () => [
|
||||
{ label: "*音", checked: false, account: null },
|
||||
@@ -93,7 +95,7 @@ export const useWorkflowStore = defineStore("workflow", {
|
||||
closeIpBrainDialog() {
|
||||
this.ipBrainModalVisible = false;
|
||||
},
|
||||
|
||||
|
||||
async startIpBrainCollect() {
|
||||
const url = this.ipBrainProfileUrl?.trim();
|
||||
if (!url) {
|
||||
@@ -153,7 +155,31 @@ export const useWorkflowStore = defineStore("workflow", {
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export async function processDouyinShare(shareText){
|
||||
const result = await invoke("run_quickjs_script", {
|
||||
scriptName:"douyin_pipeline.js",
|
||||
params: {
|
||||
shareText: "复制此链接,打开Dou音搜索,直接观看视频!https://v.douyin.com/xxxxx/",
|
||||
modelConfig: {
|
||||
providerId: "openai",
|
||||
modelId: "gpt-4o-mini",
|
||||
apiUrl: "https://api.openai.com", // 或 dashscope/openrouter 等任意兼容端点
|
||||
apiKey: "sk-...",
|
||||
asrMode: "online",
|
||||
aliyunApiKey: "sk-dashscope-...",
|
||||
ossConfig: {
|
||||
accessKeyId: "...",
|
||||
accessKeySecret: "...",
|
||||
bucket: "my-bucket",
|
||||
region: "oss-cn-hangzhou",
|
||||
},
|
||||
},
|
||||
rewriteConfig: { style: "幽默口播", tone: "活泼" },
|
||||
customPrompt: null,
|
||||
},
|
||||
});
|
||||
return result;
|
||||
}
|
||||
export async function executeVideoRewrite(store) {
|
||||
const text = store.videoShareText?.trim();
|
||||
if (!text) {
|
||||
|
||||
Reference in New Issue
Block a user