2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
+308
View File
@@ -0,0 +1,308 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const composables_useWorkFlow = require("../../../composables/useWorkFlow.js");
const types_index = require("../../../types/index.js");
const stores_appStore = require("../../../stores/appStore.js");
const utils_common = require("../../../utils/common.js");
if (!Array) {
const _easycom_fui_icon2 = common_vendor.resolveComponent("fui-icon");
const _easycom_fui_nav_bar2 = common_vendor.resolveComponent("fui-nav-bar");
const _easycom_up_status_bar2 = common_vendor.resolveComponent("up-status-bar");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
(_easycom_fui_icon2 + _easycom_fui_nav_bar2 + _easycom_up_status_bar2 + _easycom_up_button2)();
}
const _easycom_fui_icon = () => "../../../components/firstui/fui-icon/fui-icon.js";
const _easycom_fui_nav_bar = () => "../../../components/firstui/fui-nav-bar/fui-nav-bar.js";
const _easycom_up_status_bar = () => "../../../node-modules/uview-plus/components/u-status-bar/u-status-bar.js";
const _easycom_up_button = () => "../../../node-modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
(_easycom_fui_icon + _easycom_fui_nav_bar + TaskProgress + _easycom_up_status_bar + Seed + AudioUpload + ImageUpload + Width + Height + Positive + ModeSelect + Picker + CustomNumberBox + ImageSelectPreview + MoreImageUpload + _easycom_up_button + TnIcon + DragButton2 + BaseLayout)();
}
const BaseLayout = () => "../../../layouts/BaseLayout.js";
const ImageUpload = () => "../../../components/dynamic/ImageUpload.js";
const MoreImageUpload = () => "../../../components/dynamic/MoreImageUpload.js";
const AudioUpload = () => "../../../components/dynamic/AudioUpload.js";
const Height = () => "../../../components/dynamic/Height.js";
const Positive = () => "../../../components/dynamic/Positive.js";
const Picker = () => "../../../components/dynamic/Picker.js";
const CustomNumberBox = () => "../../../components/dynamic/CustomNumberBox.js";
const Width = () => "../../../components/dynamic/Width.js";
const Seed = () => "../../../components/dynamic/Seed.js";
const ImageSelectPreview = () => "../../../components/dynamic/ImageSelectPreview.js";
const ModeSelect = () => "../../../components/dynamic/ModeSelect.js";
const TaskProgress = () => "../../../components/TaskProgress.js";
const TnIcon = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const DragButton2 = () => "../../../components/common/DragButton2.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "apps",
setup(__props) {
const {
workflow,
handleGetWorkFlwById,
workFlowParamLists,
bindParam,
params_component_list,
socketInit,
handleFindComponentName,
handleSubmitTaskTask
} = composables_useWorkFlow.useWorkFlow();
console.log("-------------bindParam----------------", bindParam.value);
const workflowId = common_vendor.ref("");
common_vendor.onLoad(async () => {
const currentPage = getCurrentPages().pop();
const query = currentPage == null ? void 0 : currentPage.options;
workflowId.value = query.id;
handleGetWorkFlwById(query.id).then(() => console.log(workflow.value));
socketInit({
params: {
type: types_index.IWebsocketSceneType.drawProcessPush
}
});
});
const showPopup = common_vendor.ref(false);
const FlotButton = common_vendor.ref("空闲");
const { localTasks } = common_vendor.storeToRefs(stores_appStore.useAppStore());
const currentProgress = common_vendor.computed(() => {
const excuTask = localTasks.value.find((item) => item.status === 4);
if (!excuTask) {
return FlotButton.value;
}
return excuTask.progress + "%";
});
const endPos = common_vendor.ref({ x: 0, y: 0 });
const anims = common_vendor.ref([]);
const startAnimation = async () => {
console.log("seedRef.value", seedRef.value);
if (seedRef.value && seedRef.value.length > 0) {
for (const item of seedRef.value) {
item.getSeed();
}
}
handleSubmitTaskTask();
console.log("handleSubmitTaskTask", handleSubmitTaskTask);
const key = utils_common.randomId(5);
anims.value.push({
key,
id: "addBtn",
left: 0,
top: 0,
y: 0,
x: 0
});
await common_vendor.nextTick$1();
const submitBtn = common_vendor.index.createSelectorQuery().select("#submit-btn");
common_vendor.index.createSelectorQuery().select("#cartBtn");
submitBtn.boundingClientRect().exec((rect) => {
anims.value.some((citem) => {
if (citem.key === key) {
citem.top = rect[0].top;
citem.left = rect[0].left + rect[0].width / 2;
return true;
}
return false;
});
common_vendor.nextTick$1(() => {
let end = { x: 0, y: 0 };
if (endPos.value.x > 300) {
end = { x: endPos.value.x - 50, y: endPos.value.y };
} else {
end = { x: endPos.value.x, y: endPos.value.y };
}
anims.value.some((citem) => {
if (citem.key === key) {
citem.y = end.y - rect[0].top;
citem.x = end.x - rect[0].left - rect[0].width / 2;
setTimeout(() => {
anims.value.splice(anims.value.findIndex((v) => v.key === key), 1);
}, 500);
return true;
}
return false;
});
});
});
};
const handToggelePregress = () => {
showPopup.value = !showPopup.value;
if (showPopup.value == true) {
FlotButton.value = "返回";
} else {
FlotButton.value = "空闲";
}
};
const seedRef = common_vendor.ref([]);
function leftClick() {
common_vendor.index.redirectTo({ url: "/pages/index/index" });
}
function checkFileType(input) {
const imageRegex = /\.(jpg|jpeg|png|gif|bmp)$/i;
const videoRegex = /\.(mp3|wav|ogg)$/i;
if (!input) {
console.log("==============", "是空值");
return 0;
} else if (imageRegex.test(input)) {
console.log("==============", "是图片");
return 1;
} else if (videoRegex.test(input)) {
console.log("==============", "是音频");
return 2;
}
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
name: "arrowleft"
}),
b: common_vendor.o(leftClick),
c: common_vendor.p({
title: common_vendor.unref(workflow).title
}),
d: showPopup.value
}, showPopup.value ? {
e: common_vendor.o(($event) => showPopup.value = $event),
f: common_vendor.p({
modelValue: showPopup.value
})
} : {}, {
g: common_vendor.f(common_vendor.unref(workFlowParamLists), (item, index, i0) => {
return common_vendor.e({
a: common_vendor.unref(handleFindComponentName)(item.name) === "Seed"
}, common_vendor.unref(handleFindComponentName)(item.name) === "Seed" ? {
b: common_vendor.sr(seedRef, "6cf62e12-5-" + i0 + ",6cf62e12-3", {
"k": "seedRef",
"f": 1
}),
c: "6cf62e12-5-" + i0 + ",6cf62e12-3",
d: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
e: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "ImageUpload" ? common_vendor.e({
g: checkFileType(item.param) == 2
}, checkFileType(item.param) == 2 ? {
h: "6cf62e12-6-" + i0 + ",6cf62e12-3",
i: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
j: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : {
k: "6cf62e12-7-" + i0 + ",6cf62e12-3",
l: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
m: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
}) : common_vendor.unref(handleFindComponentName)(item.name) === "Width" ? {
o: "6cf62e12-8-" + i0 + ",6cf62e12-3",
p: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
q: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "Height" ? {
s: "6cf62e12-9-" + i0 + ",6cf62e12-3",
t: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
v: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "Positive" ? {
x: "6cf62e12-10-" + i0 + ",6cf62e12-3",
y: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
z: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "ModeSelect" ? {
B: "6cf62e12-11-" + i0 + ",6cf62e12-3",
C: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
D: common_vendor.p({
title: item.title,
workflow_id: common_vendor.unref(workflow)._id,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "Picker" ? {
F: "6cf62e12-12-" + i0 + ",6cf62e12-3",
G: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
H: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "CustomNumberBox" ? {
J: "6cf62e12-13-" + i0 + ",6cf62e12-3",
K: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
L: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.unref(handleFindComponentName)(item.name) === "ImageSelectPreview" ? {
N: "6cf62e12-14-" + i0 + ",6cf62e12-3",
O: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
P: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : common_vendor.e({
Q: item.name == "custom_batch_image_path_origin"
}, item.name == "custom_batch_image_path_origin" ? {
R: "6cf62e12-15-" + i0 + ",6cf62e12-3",
S: common_vendor.o(($event) => common_vendor.unref(bindParam)[item.name] = $event),
T: common_vendor.p({
title: item.title,
options: item.attributes,
modelValue: common_vendor.unref(bindParam)[item.name]
})
} : {}), {
f: common_vendor.unref(handleFindComponentName)(item.name) === "ImageUpload",
n: common_vendor.unref(handleFindComponentName)(item.name) === "Width",
r: common_vendor.unref(handleFindComponentName)(item.name) === "Height",
w: common_vendor.unref(handleFindComponentName)(item.name) === "Positive",
A: common_vendor.unref(handleFindComponentName)(item.name) === "ModeSelect",
E: common_vendor.unref(handleFindComponentName)(item.name) === "Picker",
I: common_vendor.unref(handleFindComponentName)(item.name) === "CustomNumberBox",
M: common_vendor.unref(handleFindComponentName)(item.name) === "ImageSelectPreview"
});
}),
h: common_vendor.o(startAnimation),
i: common_vendor.p({
icon: "edit-pen",
type: "primary",
shape: "circle"
}),
j: common_vendor.f(anims.value, (item, k0, i0) => {
return {
a: "6cf62e12-17-" + i0 + ",6cf62e12-3",
b: item.key,
c: `${item.top}px`,
d: `${item.left}px`,
e: `translate(${item.x}px, ${item.y}px)`
};
}),
k: common_vendor.p({
name: "rocket",
size: "40rpx"
}),
l: common_vendor.t(currentProgress.value),
m: common_vendor.o(handToggelePregress),
n: common_vendor.o(($event) => endPos.value = $event),
o: common_vendor.p({
modelValue: endPos.value
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6cf62e12"]]);
wx.createPage(MiniProgramPage);
+24
View File
@@ -0,0 +1,24 @@
{
"navigationBarTitleText": "Fuzi-AI",
"usingComponents": {
"fui-icon": "../../../components/firstui/fui-icon/fui-icon",
"fui-nav-bar": "../../../components/firstui/fui-nav-bar/fui-nav-bar",
"up-status-bar": "../../../node-modules/uview-plus/components/u-status-bar/u-status-bar",
"up-button": "../../../node-modules/uview-plus/components/u-button/u-button",
"base-layout": "../../../layouts/BaseLayout",
"image-upload": "../../../components/dynamic/ImageUpload",
"more-image-upload": "../../../components/dynamic/MoreImageUpload",
"audio-upload": "../../../components/dynamic/AudioUpload",
"height": "../../../components/dynamic/Height",
"positive": "../../../components/dynamic/Positive",
"picker": "../../../components/dynamic/Picker",
"custom-number-box": "../../../components/dynamic/CustomNumberBox",
"width": "../../../components/dynamic/Width",
"seed": "../../../components/dynamic/Seed",
"image-select-preview": "../../../components/dynamic/ImageSelectPreview",
"mode-select": "../../../components/dynamic/ModeSelect",
"task-progress": "../../../components/TaskProgress",
"tn-icon": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon",
"drag-button2": "../../../components/common/DragButton2"
}
}
+1
View File
@@ -0,0 +1 @@
<fui-nav-bar wx:if="{{c}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-s="{{['d']}}" bindleftClick="{{b}}" u-i="6cf62e12-0" bind:__l="__l" u-p="{{c}}"><fui-icon wx:if="{{a}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="6cf62e12-1,6cf62e12-0" bind:__l="__l" u-p="{{a}}"></fui-icon></fui-nav-bar><task-progress wx:if="{{d}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="6cf62e12-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"/><view class="data-v-6cf62e12"><base-layout class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-s="{{['d']}}" u-i="6cf62e12-3" bind:__l="__l"><up-status-bar class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="6cf62e12-4,6cf62e12-3" bind:__l="__l"/><view class="page data-v-6cf62e12"><view class="container data-v-6cf62e12"><block wx:for="{{g}}" wx:for-item="item"><block wx:if="{{item.a}}"><seed wx:if="{{item.e}}" class="r-i-f data-v-6cf62e12" virtualHostClass="r-i-f data-v-6cf62e12" u-r="seedRef" u-i="{{item.c}}" bind:__l="__l" bindupdateModelValue="{{item.d}}" u-p="{{item.e}}"/></block><block wx:elif="{{item.f}}"><view wx:if="{{item.g}}" class="data-v-6cf62e12"><audio-upload wx:if="{{item.j}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.h}}" bind:__l="__l" bindupdateModelValue="{{item.i}}" u-p="{{item.j}}"/></view><view wx:else class="data-v-6cf62e12"><image-upload wx:if="{{item.m}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.k}}" bind:__l="__l" bindupdateModelValue="{{item.l}}" u-p="{{item.m}}"/></view></block><block wx:elif="{{item.n}}"><width wx:if="{{item.q}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.o}}" bind:__l="__l" bindupdateModelValue="{{item.p}}" u-p="{{item.q}}"/></block><block wx:elif="{{item.r}}"><height wx:if="{{item.v}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.s}}" bind:__l="__l" bindupdateModelValue="{{item.t}}" u-p="{{item.v}}"/></block><block wx:elif="{{item.w}}"><positive wx:if="{{item.z}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.x}}" bind:__l="__l" bindupdateModelValue="{{item.y}}" u-p="{{item.z}}"/></block><block wx:elif="{{item.A}}"><mode-select wx:if="{{item.D}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.B}}" bind:__l="__l" bindupdateModelValue="{{item.C}}" u-p="{{item.D}}"/></block><block wx:elif="{{item.E}}"><picker wx:if="{{item.H}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.F}}" bind:__l="__l" bindupdateModelValue="{{item.G}}" u-p="{{item.H}}"/></block><block wx:elif="{{item.I}}"><custom-number-box wx:if="{{item.L}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.J}}" bind:__l="__l" bindupdateModelValue="{{item.K}}" u-p="{{item.L}}"/></block><block wx:elif="{{item.M}}"><image-select-preview wx:if="{{item.P}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.N}}" bind:__l="__l" bindupdateModelValue="{{item.O}}" u-p="{{item.P}}"/></block><block wx:else><view wx:if="{{item.Q}}" class="data-v-6cf62e12"><more-image-upload wx:if="{{item.T}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.R}}" bind:__l="__l" bindupdateModelValue="{{item.S}}" u-p="{{item.T}}"/></view></block></block><view id="submit-btn" class="floating-button data-v-6cf62e12"><up-button wx:if="{{i}}" u-s="{{['d']}}" class="submit-button data-v-6cf62e12" virtualHostClass="submit-button data-v-6cf62e12" bindclick="{{h}}" u-i="6cf62e12-16,6cf62e12-3" bind:__l="__l" u-p="{{i}}">开始创作 </up-button></view><view wx:for="{{j}}" wx:for-item="item" wx:key="b" style="{{'position:fixed;transition:transform 0.5s linear' + ';' + ('top:' + item.c + ';' + ('left:' + item.d) + ';' + ('transform:' + item.e))}}" class="add-icon data-v-6cf62e12" id="addBtn"><tn-icon wx:if="{{k}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-i="{{item.a}}" bind:__l="__l" u-p="{{k}}"></tn-icon></view></view></view><drag-button2 wx:if="{{o}}" class="data-v-6cf62e12" virtualHostClass="data-v-6cf62e12" u-s="{{['d']}}" u-i="6cf62e12-18,6cf62e12-3" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"><view class="content-default data-v-6cf62e12" id="cartBtn" bindtap="{{m}}">{{l}}</view></drag-button2></base-layout></view>
+111
View File
@@ -0,0 +1,111 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.fui-scroll__wrap.data-v-6cf62e12 {
padding-top: 30rpx;
position: relative;
}
.fui-vip__icon.data-v-6cf62e12 {
width: 48rpx;
height: 48rpx;
margin-left: 16rpx;
}
/* 页面样式 */
.page.data-v-6cf62e12 {
position: relative;
min-height: 100vh;
/* 确保页面内容撑满屏幕 */
}
.container.data-v-6cf62e12 {
position: relative;
padding-top: 80rpx;
/* 顶部导航栏的高度 + 小间距 */
padding-bottom: 120px;
/* 底部导航栏的高度 + 小间距 */
}
/* 居中按钮样式 */
.floating-button.data-v-6cf62e12 {
width: 80%;
position: fixed;
bottom: 70px;
/* 底部导航栏的高度 + 小间距 */
left: 50%;
transform: translateX(-50%);
z-index: 10;
/* 确保按钮在底部导航栏上方 */
}
.submit-button.data-v-6cf62e12 {
background: linear-gradient(to right, #857ed1, #4338CA);
border-radius: 50px;
box-shadow: 0 3px 5px var(--primary-color-light);
}
.cart.data-v-6cf62e12 {
position: absolute;
top: 50px;
right: 30px;
background-color: #f0f0f0;
padding: 10px;
}
.add-icon.data-v-6cf62e12 {
position: absolute;
background-color: #4338CA;
color: white;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
border-radius: 50%;
animation: moveAnimation 1s ease-in-out forwards;
}
.content-default.data-v-6cf62e12 {
z-index: 996;
width: 100rpx;
height: 100rpx;
background: linear-gradient(360deg, #857ed1 0%, #4338CA 100%);
box-shadow: 0 4rpx 12rpx 0 #ADC3F8;
border-radius: 50rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
animation: verticalMove-6cf62e12 2s ease-in-out infinite;
}
/* 上下移动动画 */
@keyframes verticalMove-6cf62e12 {
0% {
transform: translateY(0);
}
50% {
transform: translateY(-20px);
/* 上移 */
}
100% {
transform: translateY(0);
/* 恢复到原位 */
}
}