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
+47
View File
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const stores_appStore = require("./stores/appStore.js");
if (!Math) {
"./pages/index/index.js";
"./pages/creative/creative.js";
"./pages/home/home.js";
"./pages/setting/setting.js";
"./pages/history/history.js";
"./pages/draw/apps/apps.js";
"./pages/Empty/Empty.js";
"./pages/history/history_fui/history_fui.js";
"./pages/draw/draw_info/draw_info.js";
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "App",
setup(__props) {
common_vendor.onLoad(() => {
console.log("App onLoad");
});
common_vendor.onShow(() => {
console.log("App onShow");
});
common_vendor.onHide(() => {
console.log("App onHide");
});
stores_appStore.useAppStore().init();
const socketState = common_vendor.reactive({ socket: null, isInitialized: false });
common_vendor.provide("socketState", socketState);
const { uniPlatform } = common_vendor.index.getSystemInfoSync();
console.log("平台信息", uniPlatform);
return () => {
};
}
});
function createApp() {
const app = common_vendor.createSSRApp(_sfc_main);
const pinia = common_vendor.createPinia();
app.use(pinia);
app.use(common_vendor.uviewPlus);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;
+19
View File
@@ -0,0 +1,19 @@
{
"pages": [
"pages/index/index",
"pages/creative/creative",
"pages/home/home",
"pages/setting/setting",
"pages/history/history",
"pages/draw/apps/apps",
"pages/Empty/Empty",
"pages/history/history_fui/history_fui",
"pages/draw/draw_info/draw_info"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "Fuzi-AI",
"navigationStyle": "custom"
},
"usingComponents": {}
}
+4874
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
"use strict";
const _imports_0 = "/static/images/index/light/icon_member_3x.png";
exports._imports_0 = _imports_0;
+21439
View File
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"fui-tabs": "./firstui/fui-tabs/fui-tabs",
"fui-nav-bar": "./firstui/fui-nav-bar/fui-nav-bar"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="{{['data-v-6b729772', virtualHostClass]}}" style="{{'margin-top:10%;margin-bottom:10%' + ';' + virtualHostStyle}}"><fui-nav-bar wx:if="{{c}}" class="data-v-6b729772" virtualHostClass="data-v-6b729772" u-s="{{['d']}}" u-i="6b729772-0" bind:__l="__l" u-p="{{c}}"><view class="fui-search__box data-v-6b729772"><fui-tabs wx:if="{{b}}" class="tabs_class data-v-6b729772" virtualHostClass="tabs_class data-v-6b729772" bindchange="{{a}}" u-i="6b729772-1,6b729772-0" bind:__l="__l" u-p="{{b}}"></fui-tabs></view></fui-nav-bar></view>
+51
View File
@@ -0,0 +1,51 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const utils_request = require("../utils/request.js");
const composables_useCommon = require("../composables/useCommon.js");
if (!Math) {
(TnIcon + TnButton + TnUpdateUserInfoPopup)();
}
const TnUpdateUserInfoPopup = () => "../node-modules/tnuiv3p-tn-update-user-info-popup/index.js";
const TnButton = () => "../node-modules/@tuniao/tnui-vue3-uniapp/components/button/src/button.js";
const TnIcon = () => "../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "GetUserInfoPopup",
setup(__props) {
const showPopup = common_vendor.ref(false);
const nickname = common_vendor.ref("");
const avatar = common_vendor.ref("");
const avatarChooseHandle = async (url) => {
const result = await utils_request.uploadFile(url);
if (result) {
avatar.value = result;
}
};
const handleUpdateUser = async () => {
const user = await composables_useCommon.updateUserInfo({ nickname: nickname.value, avatar_url: avatar.value });
composables_useCommon.saveLoginInfo(user);
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
name: "edit"
}),
b: common_vendor.o(() => showPopup.value = true),
c: common_vendor.p({
size: "sm",
plain: true
}),
d: common_vendor.o(avatarChooseHandle),
e: common_vendor.o(handleUpdateUser),
f: common_vendor.o(($event) => showPopup.value = $event),
g: common_vendor.o(($event) => nickname.value = $event),
h: common_vendor.o(($event) => avatar.value = $event),
i: common_vendor.p({
show: showPopup.value,
nickname: nickname.value,
avatar: avatar.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+8
View File
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"tn-update-user-info-popup": "../node-modules/tnuiv3p-tn-update-user-info-popup/index",
"tn-button": "../node-modules/@tuniao/tnui-vue3-uniapp/components/button/src/button",
"tn-icon": "../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon"
}
}
+1
View File
@@ -0,0 +1 @@
<tn-button wx:if="{{c}}" u-s="{{['d']}}" bindclick="{{b}}" u-i="4c9796ca-0" bind:__l="__l" u-p="{{c}}"><tn-icon wx:if="{{a}}" u-i="4c9796ca-1,4c9796ca-0" bind:__l="__l" u-p="{{a}}"/> 修改头像和昵称 </tn-button><tn-update-user-info-popup wx:if="{{i}}" bindchooseAvatar="{{d}}" bindconfirm="{{e}}" u-i="4c9796ca-2" bind:__l="__l" bindupdateShow="{{f}}" bindupdateNickname="{{g}}" bindupdateAvatar="{{h}}" u-p="{{i}}"/>
+333
View File
@@ -0,0 +1,333 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const stores_appStore = require("../stores/appStore.js");
if (!Array) {
const _easycom_fui_background_image2 = common_vendor.resolveComponent("fui-background-image");
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
const _easycom_fui_parse2 = common_vendor.resolveComponent("fui-parse");
const _easycom_fui_parse_group2 = common_vendor.resolveComponent("fui-parse-group");
const _easycom_fui_fab2 = common_vendor.resolveComponent("fui-fab");
(_easycom_fui_background_image2 + _easycom_up_swiper2 + _easycom_fui_parse2 + _easycom_fui_parse_group2 + _easycom_fui_fab2)();
}
const _easycom_fui_background_image = () => "./firstui/fui-background-image/fui-background-image.js";
const _easycom_up_swiper = () => "../node-modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_fui_parse = () => "./firstui/fui-parse/fui-parse.js";
const _easycom_fui_parse_group = () => "./firstui/fui-parse-group/fui-parse-group.js";
const _easycom_fui_fab = () => "./firstui/fui-fab/fui-fab.js";
if (!Math) {
(_easycom_fui_background_image + _easycom_up_swiper + TnIcon + _easycom_fui_parse + _easycom_fui_parse_group + _easycom_fui_fab + MyPopup)();
}
const MyPopup = () => "./common/MyPopup.js";
const TnIcon = () => "../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const loadingBackground = "https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/aidraw/image/temps/onloading_bg.jpg";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "TaskProgress",
props: {
"modelValue": {
default: false
},
"modelModifiers": {}
},
emits: ["update:modelValue"],
setup(__props) {
const currentSwiperIndex = common_vendor.ref(0);
common_vendor.watch(currentSwiperIndex, () => {
console.log("currentSwiperIndex", currentSwiperIndex.value);
});
const { localTasks } = common_vendor.storeToRefs(stores_appStore.useAppStore());
const AllList = common_vendor.computed(() => {
common_vendor.index.setStorageSync("name", localTasks.value);
const returnvalue = common_vendor.index.getStorageSync("name");
return returnvalue;
});
const swiperData = common_vendor.computed(() => {
if (localTasks.value.length === 0) {
return [loadingBackground];
}
return localTasks.value.map((item) => {
return item.status === 1 ? item.output[0] : loadingBackground;
});
});
const currentProgress = common_vendor.computed(() => {
if (localTasks.value.length === 0) {
return "暂无任务";
}
const currentTask = localTasks.value[currentSwiperIndex.value];
if (currentTask && currentTask.status === 4) {
return currentTask.progress + "%";
} else if (currentTask && currentTask.status === 0 && currentTask.queue) {
return `对列:${currentTask.queue},预计:${currentTask.time_remained}s`;
}
return "";
});
const currentImageCount = common_vendor.computed(() => {
const currentTask = localTasks.value[currentSwiperIndex.value];
if (currentTask && currentTask.status === 1) {
return currentTask.output.length;
} else {
return 0;
}
});
const showProgress = common_vendor.computed(() => {
var _a;
return ((_a = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _a.status) !== 1;
});
const progressAnimation = common_vendor.ref({});
const createAnimation = () => {
const animation = common_vendor.index.createAnimation({
duration: 500,
// 动画时长
timingFunction: "ease"
// 动画缓动函数
});
animation.opacity(0).step();
progressAnimation.value = animation.export();
return animation;
};
function handleChange(index) {
currentSwiperIndex.value = index.current;
}
const showPopup = common_vendor.useModel(__props, "modelValue");
const handleTouchStart = () => {
const animation = createAnimation();
animation.opacity(0).step();
progressAnimation.value = animation.export();
};
const handleTouchEnd = () => {
const animation = createAnimation();
animation.opacity(1).step();
setTimeout(() => progressAnimation.value = animation.export(), 200);
};
const handleFindExecutingTaskIndex = () => {
return localTasks.value.findIndex((item) => item.status === 4);
};
common_vendor.onShow(() => {
const excIndex = handleFindExecutingTaskIndex();
console.log("task onshow", excIndex);
if (excIndex !== -1) {
currentSwiperIndex.value = handleFindExecutingTaskIndex();
}
});
function checkContent(str) {
const linkRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;
if (linkRegex.test(str)) {
return 1;
} else {
return 2;
}
}
function judgeContent(input) {
const imageRegex = /\.(jpg|jpeg|png|gif|bmp)$/i;
const videoRegex = /\.(mp4|avi|mov|mkv|flv|wmv)$/i;
if (!input) {
console.log("==============", "是空值");
return 0;
}
if (checkContent(input) == 1) {
if (imageRegex.test(input)) {
console.log("==============", "是图片");
return 1;
} else if (videoRegex.test(input)) {
console.log("==============", "是视频");
return 2;
}
}
if (checkContent(input) == 2) {
return 3;
}
}
const StringImag = common_vendor.ref();
const StringCont = common_vendor.ref("");
const showOrSleep = common_vendor.ref(0);
const allValueList = common_vendor.ref([{
class: "pic",
params: "",
// 替换为实际参数
output: "",
// 替换为实际输出
textImg: " "
// 替换为实际图片路径
}]);
common_vendor.computed(() => {
var _a, _b, _c, _d, _e, _f, _g, _h;
console.log("----------------------------{{generateParams}}----------------", localTasks.value[currentSwiperIndex.value]);
const output = (_a = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _a.output[currentSwiperIndex.value];
const contentType = judgeContent(output);
allValueList.value = [];
if (contentType === 0) {
showOrSleep.value = 0;
} else if (contentType === 1) {
showOrSleep.value = 0;
allValueList.value.push({
class: "pic",
params: ((_b = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _b.params) || "",
// 替换为实际参数
output,
// 替换为实际输出
textImg: " "
// 替换为实际图片路径
});
console.log("----------------------------{{generateParams}}------allValueList----------", allValueList.value);
StringImag.value = output;
StringCont.value = "";
console.log("----------output---showOrSleep.value = 0;---------", output);
} else if (contentType === 2) {
allValueList.value.push({
class: "video",
params: ((_c = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _c.params) || "",
// 替换为实际参数
output,
// 替换为实际输出
textImg: " "
// 替换为实际图片路径
});
showOrSleep.value = 1;
StringCont.value = "";
StringImag.value = "output";
console.log("----------output---showOrSleep.value = 1;---------", output);
} else if (contentType === 3) {
allValueList.value.push({
class: "text",
params: ((_d = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _d.params) || "",
// 替换为实际参数
output,
// 替换为实际输出
textImg: (_f = (_e = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _e.params) == null ? void 0 : _f.image_path_mask
// 替换为实际图片路径
});
showOrSleep.value = 2;
StringCont.value = output;
console.log("----------output---showOrSleep.value = 2;---------", output, allValueList);
StringImag.value = (_h = (_g = localTasks.value[currentSwiperIndex.value]) == null ? void 0 : _g.params) == null ? void 0 : _h.image_path_mask;
}
});
const handlePreview = () => {
const currentTask = localTasks.value[currentSwiperIndex.value];
if (currentTask && currentTask.status === 1) {
console.log("preview");
common_vendor.index.previewImage({ urls: currentTask.output });
}
};
const fabs = [
{
name: "edit",
text: "复制文本"
}
// {
// name: 'share',
// text: '分享海报'
// },
];
common_vendor.ref(false);
function handleClick(e, StringTxt) {
if (e.index == 0) {
console.log("---------------(e)------------", e);
common_vendor.index.setClipboardData({
data: StringTxt,
// 需要设置到剪切板的内容
showToast: true,
// 是否显示提示,默认为true
success: function() {
console.log("复制成功");
},
fail: function(err) {
console.error("复制失败", err);
}
});
} else if (e.index == 1) {
common_vendor.index.value.toast("还在开发中.....");
}
}
const current = common_vendor.ref(0);
function change(e) {
current.value = e.detail.current;
}
console.log("--------****************------------", AllList, localTasks);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
src: "https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/aidraw/image/temps/67873d6c232a3c5d52240dd6/%C3%A7%C2%A4%C2%BE%C3%A4%C2%BA%C2%A4APP.jpg"
}),
b: common_vendor.f(AllList.value, (item, index, i0) => {
var _a;
return common_vendor.e({
a: judgeContent(item.output[0]) == 1
}, judgeContent(item.output[0]) == 1 ? {
b: common_vendor.o(handlePreview, index),
c: common_vendor.o(handleChange, index),
d: "defa837f-2-" + i0 + ",defa837f-0",
e: common_vendor.p({
current: currentSwiperIndex.value,
list: swiperData.value,
previousMargin: "20",
nextMargin: "20",
imgMode: "aspectFill",
height: "500",
indicator: true,
indicatorMode: "line",
circular: true,
autoplay: false,
radius: "20",
keyName: "url",
indicatorStyle: "bottom"
}),
f: "defa837f-3-" + i0 + ",defa837f-0",
g: common_vendor.p({
name: "starry",
size: "50"
}),
h: common_vendor.t(item.params.positive)
} : {}, {
i: judgeContent(item.output[0]) == 2
}, judgeContent(item.output[0]) == 2 ? {
j: item.output[0]
} : {}, {
k: judgeContent(item.output[0]) == 3
}, judgeContent(item.output[0]) == 3 ? {
l: ((_a = item == null ? void 0 : item.params) == null ? void 0 : _a.image_path_origin) || loadingBackground,
m: "defa837f-5-" + i0 + "," + ("defa837f-4-" + i0),
n: common_vendor.p({
nodes: item.output[0],
language: "html"
}),
o: "defa837f-4-" + i0 + ",defa837f-0",
p: common_vendor.p({
thBgcolor: false
}),
q: common_vendor.o(($event) => handleClick($event, item.output[0]), index),
r: "defa837f-6-" + i0 + ",defa837f-0",
s: common_vendor.p({
position: "left",
fabs
})
} : {}, {
t: index
});
}),
c: common_vendor.o(change),
d: showProgress.value
}, showProgress.value ? {
e: common_vendor.p({
name: "starry",
size: "100",
color: "tn-white"
}),
f: common_vendor.t(currentProgress.value),
g: progressAnimation.value
} : {}, {
h: common_vendor.p({
name: "image"
}),
i: common_vendor.t(currentImageCount.value),
j: common_vendor.o(handleTouchEnd),
k: common_vendor.o(handleTouchStart),
l: common_vendor.o(($event) => showPopup.value = $event),
m: common_vendor.p({
modelValue: showPopup.value
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-defa837f"]]);
wx.createComponent(Component);
+12
View File
@@ -0,0 +1,12 @@
{
"component": true,
"usingComponents": {
"fui-background-image": "./firstui/fui-background-image/fui-background-image",
"up-swiper": "../node-modules/uview-plus/components/u-swiper/u-swiper",
"fui-parse": "./firstui/fui-parse/fui-parse",
"fui-parse-group": "./firstui/fui-parse-group/fui-parse-group",
"fui-fab": "./firstui/fui-fab/fui-fab",
"my-popup": "./common/MyPopup",
"tn-icon": "../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon"
}
}
+1
View File
@@ -0,0 +1 @@
<my-popup wx:if="{{m}}" u-s="{{['d']}}" u-i="defa837f-0" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}" class="{{['data-v-defa837f', virtualHostClass]}}" virtualHostClass="{{['data-v-defa837f', virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><view class="data-v-defa837f"><fui-background-image wx:if="{{a}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" style="z-index:1" virtualHostStyle="z-index:1" u-i="defa837f-1,defa837f-0" bind:__l="__l" u-p="{{a}}"></fui-background-image><view class="data-v-defa837f" style="padding:200rpx 40rpx 0 40rpx;position:relative" bindtouchend="{{j}}" bindtouchstart="{{k}}"><view class="data-v-defa837f"><view class="data-v-defa837f"><view class="data-v-defa837f"><swiper class="fui-banner__wrap data-v-defa837f" bindchange="{{c}}" circular indicator-dots="{{false}}" autoplay="{{true}}" interval="{{10000}}" duration="{{150}}"><swiper-item wx:for="{{b}}" wx:for-item="item" wx:key="t" class="data-v-defa837f"><view class="data-v-defa837f"><view wx:if="{{item.a}}" class="data-v-defa837f"><up-swiper wx:if="{{item.e}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" bindclick="{{item.b}}" bindchange="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"></up-swiper><view class="data-v-defa837f" style="margin-top:6rpx"><view class="data-v-defa837f"><tn-icon wx:if="{{item.g}}" class="params-icon data-v-defa837f" virtualHostClass="params-icon data-v-defa837f" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"/><label class="tn-text data-v-defa837f">提示词</label></view><label style="padding:10rpx" class="tn-text tn-text-ellipsis-3 data-v-defa837f">{{item.h}}</label><view class="data-v-defa837f"></view></view></view><view wx:if="{{item.i}}" class="data-v-defa837f"><view class="data-v-defa837f"><view class="fui-list__item CardStyle data-v-defa837f"><video class="data-v-defa837f" style="width:80%;height:480px;margin-top:0%;background-color:transparent" id="myVideo" src="{{item.j}}" controls></video></view></view></view><view wx:if="{{item.k}}" class="data-v-defa837f"><view class="data-v-defa837f" style="margin-left:10%;margin-right:10%;margin-top:0%"><scroll-view scroll-y="true" class="scroll-Y data-v-defa837f"><view class="data-v-defa837f" style="text-align:center"><image class="data-v-defa837f" style="width:200px;height:300px;background-color:#eeeeee" mode="scaleToFill" src="{{item.l}}"></image></view><fui-parse-group wx:if="{{item.p}}" u-s="{{['d']}}" class="custom-view data-v-defa837f" virtualHostClass="custom-view data-v-defa837f" u-i="{{item.o}}" bind:__l="__l" u-p="{{item.p}}"><fui-parse wx:if="{{item.n}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" u-i="{{item.m}}" bind:__l="__l" u-p="{{item.n}}"></fui-parse></fui-parse-group></scroll-view><fui-fab wx:if="{{item.s}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" bindclick="{{item.q}}" u-i="{{item.r}}" bind:__l="__l" u-p="{{item.s}}"></fui-fab></view></view></view></swiper-item></swiper></view><view class="data-v-defa837f"><view wx:if="{{d}}" class="progress-container data-v-defa837f" animation="{{g}}"><view class="tn-text-center data-v-defa837f"><tn-icon wx:if="{{e}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" u-i="defa837f-7,defa837f-0" bind:__l="__l" u-p="{{e}}"/></view><view class="tn-text tn-text-center tn-text-bold tn-white_text data-v-defa837f">{{f}}</view><view class="tn-text-sm tn-text-center tn-white_text data-v-defa837f"> 关闭页面不影响生成结果 </view><view class="tn-text-sm tn-text-center tn-white_text data-v-defa837f"> 视频生成时间较长,稍后可到 </view><view class="tn-text-sm tn-text-center tn-white_text data-v-defa837f"> “绘图历史”中查询 </view></view></view><view class="image-count data-v-defa837f"><tn-icon wx:if="{{h}}" class="data-v-defa837f" virtualHostClass="data-v-defa837f" style="color:gainsboro" virtualHostStyle="color:gainsboro" u-i="defa837f-8,defa837f-0" bind:__l="__l" u-p="{{h}}"></tn-icon><label style="color:gainsboro;margin-left:3rpx" class="tn-text-sm data-v-defa837f">{{i}}</label></view></view></view></view><view class="data-v-defa837f"></view><view class="bottom-container data-v-defa837f"><view class="data-v-defa837f" style="display:flex"></view></view></view><view class="data-v-defa837f"></view></my-popup>
+120
View File
@@ -0,0 +1,120 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.fui-banner__item.data-v-defa837f {
width: 100%;
height: 1400rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-size: 34rpx;
font-weight: 600;
}
.fui-banner__wrap.data-v-defa837f {
z-index: 110;
height: 1500rpx;
}
.CardStyle.data-v-defa837f {
margin-top: 20%;
text-align: center;
}
.fui-section__title.data-v-defa837f {
margin-left: 32rpx;
}
.custom-view.data-v-defa837f {
padding: 10px;
/* 内边距 */
color: #333;
/* 文本颜色 */
font-size: 16px;
/* 字体大小 */
}
.scroll-Y.data-v-defa837f {
height: 1200rpx;
}
.fui-scroll__view.data-v-defa837f {
width: 100%;
height: 600rpx;
}
.progress-container.data-v-defa837f {
z-index: 110;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
}
.bottom-container.data-v-defa837f {
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
bottom: 40rpx;
width: 100%;
padding-bottom: 5%;
padding-left: 5%;
padding-right: 5%;
}
.bottom-icon.data-v-defa837f {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 90rpx;
height: 90rpx;
color: #857ed1;
margin-right: 20rpx;
background-color: #f3f4f6;
border-radius: 50%;
font-size: 70rpx;
box-shadow: 0 5px 15px rgba(46, 54, 80, 0.3);
overflow: hidden;
/* 确保水波纹不超出圆形按钮 */
}
.bottom-icon.data-v-defa837f::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
background: rgba(0, 0, 0, 0.2);
transform: scale(0);
opacity: 0;
pointer-events: none;
transition: transform 0.6s, opacity 0.6s;
}
.bottom-icon.data-v-defa837f:active::before {
transform: scale(4);
opacity: 1;
}
.params-icon.data-v-defa837f {
color: gray;
margin-right: 20rpx;
}
.image-count.data-v-defa837f {
position: absolute;
right: 120rpx;
bottom: 120rpx;
}
+88
View File
@@ -0,0 +1,88 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "DragButton2",
props: /* @__PURE__ */ common_vendor.mergeModels({
disabled: { type: Boolean, default: false },
canDocking: { type: Boolean, default: true },
bottomPx: { default: 30 },
rightPx: { default: 0 }
}, {
"modelValue": {
default: {
x: 1e4,
y: 1e4
}
},
"modelModifiers": {}
}),
emits: /* @__PURE__ */ common_vendor.mergeModels(["clickBtn"], ["update:modelValue"]),
setup(__props, { emit: __emit }) {
const props = __props;
const windowWidth = common_vendor.ref(0);
const windowHeight = common_vendor.ref(0);
const btnWidth = common_vendor.ref(0);
common_vendor.ref(0);
const btnPositon = common_vendor.useModel(__props, "modelValue");
const old = common_vendor.reactive({
x: 0,
y: 0
});
const getSysInfo = () => {
let sysInfo = common_vendor.index.getSystemInfoSync();
windowWidth.value = sysInfo.windowWidth;
windowHeight.value = sysInfo.windowHeight;
btnPositon.value.x = sysInfo.windowWidth - props.rightPx;
btnPositon.value.y = sysInfo.windowHeight - props.bottomPx - 300;
};
common_vendor.onLoad(() => {
common_vendor.nextTick$1(() => {
getSysInfo();
});
});
const onChange = (e) => {
old.x = e.detail.x;
old.y = e.detail.y;
};
const isRemove = common_vendor.ref(true);
const touchstart = (e) => {
isRemove.value = true;
};
const touchend = (e) => {
if (props.canDocking && old.x !== void 0) {
btnPositon.value.x = old.x;
btnPositon.value.y = old.y;
let bWidth = (windowWidth.value - btnWidth.value) / 2;
console.log("bwidth", bWidth);
if (btnPositon.value.x <= 0 || btnPositon.value.x >= 0 && btnPositon.value.x <= bWidth) {
common_vendor.nextTick$1((res) => {
btnPositon.value.x = 0;
});
} else {
common_vendor.nextTick$1((res) => {
btnPositon.value.x = windowWidth.value - btnWidth.value;
});
}
isRemove.value = false;
}
};
const emit = __emit;
const clickBtn = () => {
emit("clickBtn", null);
};
return (_ctx, _cache) => {
return {
a: common_vendor.n(!isRemove.value ? "animation-info" : ""),
b: common_vendor.o(clickBtn),
c: common_vendor.o(touchstart),
d: common_vendor.o(touchend),
e: common_vendor.o(onChange),
f: btnPositon.value.x,
g: btnPositon.value.y,
h: _ctx.disabled
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-04def0fd"]]);
wx.createComponent(Component);
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view class="{{['data-v-04def0fd', virtualHostClass]}}" style="{{virtualHostStyle}}"><movable-area class="movable-area data-v-04def0fd" scale-area="{{false}}"><movable-view id="movable-view" class="{{['movable-view', 'data-v-04def0fd', a]}}" style="pointer-events:auto" bindtap="{{b}}" bindtouchstart="{{c}}" bindtouchend="{{d}}" bindchange="{{e}}" direction="all" inertia="true" x="{{f}}" y="{{g}}" disabled="{{h}}" out-of-bounds="{{true}}" damping="{{200}}" friction="{{100}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><view class="content-default data-v-04def0fd"><slot name="text-content"></slot></view></block></movable-view></movable-area></view>
+61
View File
@@ -0,0 +1,61 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.movable-view.data-v-04def0fd {
width: 100rpx;
height: 100rpx;
background: transparent;
font-size: 26rpx;
touch-action: none;
display: flex;
align-items: center;
justify-content: center;
}
.content-default.data-v-04def0fd {
width: 100rpx;
height: 100rpx;
background: linear-gradient(360deg, #865e4d 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 2s ease-in-out infinite;
}
.animation-info.data-v-04def0fd {
transition: left 0.25s ease;
}
.movable-area.data-v-04def0fd {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999999 !important;
pointer-events: none;
}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_back_top2 = common_vendor.resolveComponent("up-back-top");
_easycom_up_back_top2();
}
const _easycom_up_back_top = () => "../../node-modules/uview-plus/components/u-back-top/u-back-top.js";
if (!Math) {
_easycom_up_back_top();
}
const _sfc_defineComponent = common_vendor.defineComponent({
__name: "MyBackToTop",
setup(__props) {
const scrollTop = common_vendor.ref(0);
common_vendor.onPageScroll((e) => {
scrollTop.value = e.scrollTop;
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
["scroll-top"]: scrollTop.value
})
};
};
}
});
_sfc_defineComponent.__runtimeHooks = 1;
wx.createComponent(_sfc_defineComponent);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-back-top": "../../node-modules/uview-plus/components/u-back-top/u-back-top"
}
}
+1
View File
@@ -0,0 +1 @@
<up-back-top wx:if="{{a}}" u-i="7f4da841-0" bind:__l="__l" u-p="{{a}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"></up-back-top>
+8
View File
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"up-button": "../../node-modules/uview-plus/components/u-button/u-button",
"up-card": "../../node-modules/uview-plus/components/u-card/u-card",
"custom-slider": "../dynamic/CustomSlider"
}
}
+1
View File
@@ -0,0 +1 @@
<up-card wx:if="{{b}}" u-s="{{['body','foot']}}" u-i="1aae44f2-0" bind:__l="__l" u-p="{{b}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><custom-slider u-i="1aae44f2-1,1aae44f2-0" bind:__l="__l" slot="body"/><up-button u-s="{{['d']}}" u-i="1aae44f2-2,1aae44f2-0" bind:__l="__l" u-p="{{a}}" slot="foot">操作</up-button></up-card>
+24
View File
@@ -0,0 +1,24 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_navbar_mini2 = common_vendor.resolveComponent("up-navbar-mini");
_easycom_up_navbar_mini2();
}
const _easycom_up_navbar_mini = () => "../../node-modules/uview-plus/components/u-navbar-mini/u-navbar-mini.js";
if (!Math) {
_easycom_up_navbar_mini();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "MyNavbar",
setup(__props) {
return (_ctx, _cache) => {
return {
a: common_vendor.p({
autoBack: true,
homeUrl: "/pages/index/index"
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-navbar-mini": "../../node-modules/uview-plus/components/u-navbar-mini/u-navbar-mini"
}
}
+1
View File
@@ -0,0 +1 @@
<up-navbar-mini wx:if="{{a}}" u-i="33bfbb72-0" bind:__l="__l" u-p="{{a}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"></up-navbar-mini>
+30
View File
@@ -0,0 +1,30 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
TnPopup();
}
const TnPopup = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/popup/src/popup.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "MyPopup",
props: {
"modelValue": { default: false },
"modelModifiers": {}
},
emits: ["update:modelValue"],
setup(__props) {
const showPopup = common_vendor.useModel(__props, "modelValue");
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => showPopup.value = $event),
b: common_vendor.p({
top: "100rpx",
["close-btn"]: true,
width: "100%",
height: "100%",
modelValue: showPopup.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"tn-popup": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/popup/src/popup"
}
}
+1
View File
@@ -0,0 +1 @@
<tn-popup wx:if="{{b}}" u-s="{{['d']}}" u-i="279bb73a-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{'z-index:100' + ';' + virtualHostStyle}}" virtualHostStyle="{{'z-index:100' + ';' + virtualHostStyle}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><view class="tn-p-lg"> 弹框内容 </view></block></tn-popup>
View File
+23
View File
@@ -0,0 +1,23 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
TnTitle();
}
const TnTitle = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/title/src/title.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "MyTitle",
props: {
title: { default: "默认标题" }
},
setup(__props) {
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title,
mode: "vLine"
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"tn-title": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/title/src/title"
}
}
+1
View File
@@ -0,0 +1 @@
<tn-title wx:if="{{a}}" u-i="65ee9a34-0" bind:__l="__l" u-p="{{a}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"/>
View File
+23
View File
@@ -0,0 +1,23 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {};
if (!Array) {
const _easycom_up_gap2 = common_vendor.resolveComponent("up-gap");
_easycom_up_gap2();
}
const _easycom_up_gap = () => "../../node-modules/uview-plus/components/u-gap/u-gap.js";
if (!Math) {
_easycom_up_gap();
}
function _sfc_render(_ctx, _cache) {
return {
a: common_vendor.p({
height: "10"
}),
b: common_vendor.p({
height: "10"
})
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ebc1f76e"]]);
wx.createComponent(Component);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-gap": "../../node-modules/uview-plus/components/u-gap/u-gap"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="{{['param-card', 'data-v-ebc1f76e', virtualHostClass]}}" style="{{virtualHostStyle}}"><up-gap wx:if="{{a}}" class="data-v-ebc1f76e" virtualHostClass="data-v-ebc1f76e" u-i="ebc1f76e-0" bind:__l="__l" u-p="{{a}}"></up-gap><slot name="title"></slot><up-gap wx:if="{{b}}" class="data-v-ebc1f76e" virtualHostClass="data-v-ebc1f76e" u-i="ebc1f76e-1" bind:__l="__l" u-p="{{b}}"></up-gap><slot name="body"></slot></view>
+32
View File
@@ -0,0 +1,32 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.param-card.data-v-ebc1f76e {
border: 2rpx solid #F6F7FA;
border-radius: 5rpx;
background-color: #FFFFFF;
padding: 8rpx;
margin: 0 8rpx 8rpx 8rpx;
}
+37
View File
@@ -0,0 +1,37 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const stores_appStore = require("../../stores/appStore.js");
if (!Math) {
(TnCircleProgress + TnPopup)();
}
const TnPopup = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/popup/src/popup.js";
const TnCircleProgress = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/circle-progress/src/circle-progress.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "TaskExcuting",
setup(__props) {
const { showExecuting } = common_vendor.storeToRefs(stores_appStore.useAppStore());
common_vendor.watch(showExecuting, () => {
console.log("showExcuting", showExecuting);
});
const progressPercent = common_vendor.ref(30);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(showExecuting)
}, common_vendor.unref(showExecuting) ? {
b: common_vendor.t(progressPercent.value),
c: common_vendor.p({
percent: progressPercent.value
}),
d: common_vendor.o(($event) => common_vendor.isRef(showExecuting) ? showExecuting.value = $event : null),
e: common_vendor.p({
width: "80%",
height: "450",
["close-btn"]: true,
["overlay-closeable"]: false,
modelValue: common_vendor.unref(showExecuting)
})
} : {});
};
}
});
wx.createComponent(_sfc_main);
@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"tn-popup": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/popup/src/popup",
"tn-circle-progress": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/circle-progress/src/circle-progress"
}
}
@@ -0,0 +1 @@
<tn-popup wx:if="{{a}}" u-s="{{['d']}}" u-i="331d61e4-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><view class="tn-p-lg tn"> 正在绘图中 </view><view class="tn-flex-center"><tn-circle-progress wx:if="{{c}}" u-s="{{['d']}}" u-i="331d61e4-1,331d61e4-0" bind:__l="__l" u-p="{{c}}"><text>{{b}}%</text></tn-circle-progress></view></tn-popup>
@@ -0,0 +1,260 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const components_custom_MyGraphicCard_types = require("./types.js");
const components_custom_MyGraphicCard_composables_graphicCardCustom = require("./composables/graphic-card-custom.js");
const components_custom_MyGraphicCard_composables_useGraphicCard = require("./composables/use-graphic-card.js");
if (!Math) {
(TnAvatar + TnIcon + TnLazyLoad + TnPhotoAlbum + TnAvatarGroup)();
}
const TnIcon = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const TnPhotoAlbum = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/photo-album/src/photo-album.js";
const TnAvatar = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar.js";
const TnAvatarGroup = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar-group.js";
const TnLazyLoad = () => "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/lazy-load/src/lazy-load.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "MyGraphicCard",
props: components_custom_MyGraphicCard_types.graphicCardProps,
emits: components_custom_MyGraphicCard_types.graphicCardEmits,
setup(__props, { emit: __emit }) {
const props = __props;
const emits = __emit;
const {
viewUserAvatars,
viewUserCount,
imageCount,
previewImageHandle,
cardClickEvent,
handleAvatarClick,
handleMoreClick,
handleCommentClick,
handleHotClick,
handleLikeClick
} = components_custom_MyGraphicCard_composables_useGraphicCard.useGraphicCard(props, emits);
const {
ns,
tagClass,
tagStyle,
hotClass,
hotStyle,
commentClass,
commentStyle,
likeClass,
likeStyle
} = components_custom_MyGraphicCard_composables_graphicCardCustom.useGraphicCardCustomStyle(props);
function linkType(url) {
if (typeof url !== "string")
return 2;
const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|webp)$/i;
const videoExtensions = /\.(mp4|avi|mov|mkv|flv|wmv)$/i;
if (imageExtensions.test(url))
return 0;
if (videoExtensions.test(url))
return 1;
return 2;
}
return (_ctx, _cache) => {
var _a;
return common_vendor.e({
a: _ctx.avatar
}, _ctx.avatar ? {
b: common_vendor.p({
url: _ctx.avatar
})
} : {
c: common_vendor.t((_a = _ctx.username) == null ? void 0 : _a.slice(0, 1)),
d: common_vendor.p({
size: 80
})
}, {
e: common_vendor.n(common_vendor.unref(ns).e("brief-info__avatar")),
f: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(handleAvatarClick) && common_vendor.unref(handleAvatarClick)(...args)
),
g: common_vendor.t(_ctx.title),
h: _ctx.description
}, _ctx.description ? {
i: common_vendor.t(_ctx.description)
} : {}, {
j: common_vendor.n(common_vendor.unref(ns).e("brief-info__data")),
k: common_vendor.n(common_vendor.unref(ns).e("brief-info__content")),
l: _ctx.showMore
}, _ctx.showMore ? {
m: common_vendor.p({
name: "more-vertical"
}),
n: common_vendor.n(common_vendor.unref(ns).em("brief-info__operation", "more")),
o: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(handleMoreClick) && common_vendor.unref(handleMoreClick)(...args)
),
p: common_vendor.n(common_vendor.unref(ns).e("brief-info__operation"))
} : {}, {
q: common_vendor.n(common_vendor.unref(ns).e("brief-info")),
r: common_vendor.f(_ctx.tags, (tagItem, tagIndex, i0) => {
return {
a: "1bacfa93-3-" + i0,
b: common_vendor.t(tagItem),
c: tagIndex
};
}),
s: common_vendor.p({
name: "topics-fill"
}),
t: common_vendor.n(common_vendor.unref(tagClass)),
v: common_vendor.s(common_vendor.unref(tagStyle)),
w: common_vendor.n(common_vendor.unref(ns).e("content__tags")),
x: common_vendor.t(_ctx.content),
y: common_vendor.n(common_vendor.unref(ns).e("content__data")),
z: common_vendor.n(common_vendor.unref(ns).e("content")),
A: linkType(_ctx.images.slice(-1)[0]) == 0
}, linkType(_ctx.images.slice(-1)[0]) == 0 ? common_vendor.e({
B: !!common_vendor.unref(imageCount)
}, !!common_vendor.unref(imageCount) ? common_vendor.e({
C: common_vendor.unref(imageCount) === 1
}, common_vendor.unref(imageCount) === 1 ? {
D: common_vendor.p({
mode: "aspectFit",
src: _ctx.images[0]
}),
E: common_vendor.n(common_vendor.unref(ns).em("images", "item")),
F: common_vendor.n(common_vendor.unref(ns).is("one")),
G: common_vendor.o(($event) => common_vendor.unref(previewImageHandle)(0))
} : {}, {
H: common_vendor.unref(imageCount) === 2
}, common_vendor.unref(imageCount) === 2 ? {
I: common_vendor.p({
data: _ctx.images,
column: 2
}),
J: common_vendor.n(common_vendor.unref(ns).em("images", "item")),
K: common_vendor.n(common_vendor.unref(ns).is("two"))
} : {}, {
L: common_vendor.unref(imageCount) === 3
}, common_vendor.unref(imageCount) === 3 ? {
M: common_vendor.p({
mode: "aspectFit",
src: _ctx.images[0]
}),
N: common_vendor.o(($event) => common_vendor.unref(previewImageHandle)(0)),
O: common_vendor.p({
src: _ctx.images[1]
}),
P: common_vendor.o(($event) => common_vendor.unref(previewImageHandle)(1)),
Q: common_vendor.p({
src: _ctx.images[2]
}),
R: common_vendor.o(($event) => common_vendor.unref(previewImageHandle)(2)),
S: common_vendor.n(common_vendor.unref(ns).em("images", "item")),
T: common_vendor.n(common_vendor.unref(ns).is("three"))
} : {}, {
U: common_vendor.unref(imageCount) === 4
}, common_vendor.unref(imageCount) === 4 ? {
V: common_vendor.p({
data: _ctx.images,
column: 2
}),
W: common_vendor.n(common_vendor.unref(ns).em("images", "item")),
X: common_vendor.n(common_vendor.unref(ns).is("four"))
} : {}, {
Y: common_vendor.unref(imageCount) >= 5
}, common_vendor.unref(imageCount) >= 5 ? {
Z: common_vendor.p({
data: _ctx.images
})
} : {}, {
aa: common_vendor.n(common_vendor.unref(ns).e("images"))
}) : {}) : {}, {
ab: common_vendor.n(common_vendor.unref(ns).e("container")),
ac: linkType(_ctx.images.slice(-1)[0]) == 1
}, linkType(_ctx.images.slice(-1)[0]) == 1 ? common_vendor.e({
ad: !!common_vendor.unref(imageCount)
}, !!common_vendor.unref(imageCount) ? common_vendor.e({
ae: common_vendor.unref(imageCount) === 1
}, common_vendor.unref(imageCount) === 1 ? {
af: common_vendor.f(_ctx.images, (item, index, i0) => {
return {
a: _ctx.images[index],
b: index
};
}),
ag: common_vendor.n(common_vendor.unref(ns).em("images", "item")),
ah: common_vendor.n(common_vendor.unref(ns).is("one"))
} : {
ai: _ctx.images.slice(-1)[0]
}, {
aj: common_vendor.n(common_vendor.unref(ns).e("images"))
}) : {}) : {}, {
ak: _ctx.showHot
}, _ctx.showHot ? {
al: common_vendor.p({
name: _ctx.activeHot ? _ctx.activeHotIcon : _ctx.hotIcon
}),
am: common_vendor.t(_ctx.hotCount),
an: common_vendor.n(common_vendor.unref(hotClass)),
ao: common_vendor.s(common_vendor.unref(hotStyle)),
ap: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(handleHotClick) && common_vendor.unref(handleHotClick)(...args)
)
} : {}, {
aq: _ctx.showComment
}, _ctx.showComment ? {
ar: common_vendor.p({
name: _ctx.activeComment ? _ctx.activeCommentIcon : _ctx.commentIcon
}),
as: common_vendor.t(_ctx.commentCount),
at: common_vendor.n(common_vendor.unref(commentClass)),
av: common_vendor.s(common_vendor.unref(commentStyle)),
aw: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(handleCommentClick) && common_vendor.unref(handleCommentClick)(...args)
)
} : {}, {
ax: _ctx.showLike
}, _ctx.showLike ? {
ay: common_vendor.p({
name: _ctx.activeLike ? _ctx.activeLikeIcon : _ctx.likeIcon
}),
az: common_vendor.t(_ctx.likeCount),
aA: common_vendor.n(common_vendor.unref(likeClass)),
aB: common_vendor.s(common_vendor.unref(likeStyle)),
aC: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(handleLikeClick) && common_vendor.unref(handleLikeClick)(...args)
)
} : {}, {
aD: common_vendor.n(common_vendor.unref(ns).e("bottom-info__left")),
aE: _ctx.showViewUser && common_vendor.unref(viewUserAvatars).length || _ctx.$slots.bottomRight
}, _ctx.showViewUser && common_vendor.unref(viewUserAvatars).length || _ctx.$slots.bottomRight ? {
aF: common_vendor.f(common_vendor.unref(viewUserAvatars), (viewUserAvatar, viewUserIndex, i0) => {
return {
a: viewUserIndex,
b: "1bacfa93-15-" + i0 + ",1bacfa93-14",
c: common_vendor.p({
url: viewUserAvatar
})
};
}),
aG: common_vendor.p({
border: true,
size: "sm"
}),
aH: common_vendor.n(common_vendor.unref(ns).e("view-user-list")),
aI: common_vendor.t(_ctx.viewCount !== void 0 ? _ctx.viewCount : common_vendor.unref(viewUserCount)),
aJ: common_vendor.n(common_vendor.unref(ns).e("view-user-count")),
aK: common_vendor.n(common_vendor.unref(ns).e("bottom-info__right"))
} : {}, {
aL: common_vendor.n(common_vendor.unref(ns).e("bottom-info")),
aM: common_vendor.n(common_vendor.unref(ns).is("no-content", !!_ctx.$slots.bottomRight)),
aN: common_vendor.n(common_vendor.unref(ns).b()),
aO: common_vendor.o(
//@ts-ignore
(...args) => common_vendor.unref(cardClickEvent) && common_vendor.unref(cardClickEvent)(...args)
)
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1bacfa93"]]);
wx.createComponent(Component);
@@ -0,0 +1,10 @@
{
"component": true,
"usingComponents": {
"tn-icon": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon",
"tn-photo-album": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/photo-album/src/photo-album",
"tn-avatar": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar",
"tn-avatar-group": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar-group",
"tn-lazy-load": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/lazy-load/src/lazy-load"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,216 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.tn-graphic-card.data-v-1bacfa93 {
position: relative;
width: 100%;
padding: 30rpx;
background-color: transparent;
/* 简要信息 start */
/* 简要信息 end */
/* 内容 start */
/* 图片列表 start */
/* 图片列表 end */
/* 内容 end */
/* 底部信息 start */
/* 底部信息 end */
}
.tn-graphic-card__brief-info.data-v-1bacfa93 {
display: flex;
align-items: center;
/* 简要内容 start */
/* 简要内容 end */
/* 操作按钮 start */
/* 操作按钮 end */
}
.tn-graphic-card__brief-info__content.data-v-1bacfa93 {
flex-grow: 1;
display: flex;
}
.tn-graphic-card__brief-info__avatar.data-v-1bacfa93 {
flex-shrink: 0;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
background-color: var(--tn-color-gray--disabled);
}
.tn-graphic-card__brief-info__avatar .image.data-v-1bacfa93 {
width: 100%;
height: 100%;
border-radius: inherit;
}
.tn-graphic-card__brief-info__data.data-v-1bacfa93 {
flex-grow: 1;
margin-left: 24rpx;
color: var(--tn-text-color-primary);
line-height: 1;
padding-top: 6rpx;
}
.tn-graphic-card__brief-info__data .title.data-v-1bacfa93 {
font-size: 30rpx;
}
.tn-graphic-card__brief-info__data .desc.data-v-1bacfa93 {
margin-top: 16rpx;
font-size: 24rpx;
color: var(--tn-color-gray);
}
.tn-graphic-card__brief-info__operation.data-v-1bacfa93 {
flex-grow: 0;
}
.tn-graphic-card__brief-info__operation--more.data-v-1bacfa93 {
font-size: 40rpx;
font-weight: bold;
color: var(--tn-color-gray-disabled);
padding-left: 20rpx;
}
.tn-graphic-card__container.data-v-1bacfa93 {
margin-top: 20rpx;
}
.tn-graphic-card__content.data-v-1bacfa93 {
/* 内容标签 start */
/* 内容标签 end */
/* 内容数据 start */
/* 内容数据 end */
}
.tn-graphic-card__content__tags.data-v-1bacfa93 {
display: flex;
float: left;
align-items: center;
margin-top: 4rpx;
}
.tn-graphic-card__content__tags .tag-item.data-v-1bacfa93 {
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
padding: 8rpx 16rpx;
border-radius: 6rpx;
margin-right: 16rpx;
font-size: 24rpx;
line-height: 1;
}
.tn-graphic-card__content__data.data-v-1bacfa93 {
font-size: 28rpx;
line-height: 1.8em;
color: var(--tn-text-color-primary);
text-align: justify;
}
.tn-graphic-card__images.data-v-1bacfa93 {
width: 100%;
margin-top: 20rpx;
}
.tn-graphic-card__images--item.data-v-1bacfa93 {
/* 一张图片 start */
/* 一张图片 end */
/* 两张图片 start */
/* 两张图片 end */
/* 三张图片 start */
/* 三张图片 end */
/* 四张图片 start */
/* 四张图片 end */
}
.tn-graphic-card__images--item.is-one.data-v-1bacfa93 {
width: 70%;
height: 300rpx;
border-radius: 15rpx;
}
.tn-graphic-card__images--item.is-two.data-v-1bacfa93 {
width: 80%;
}
.tn-graphic-card__images--item.is-three.data-v-1bacfa93 {
position: relative;
width: 100%;
height: 332rpx;
display: flex;
align-items: center;
/* 左边单图 start */
/* 左边单图 end */
/* 右边双图 start */
/* 右边双图 end */
}
.tn-graphic-card__images--item.is-three .image-wrapper-left.data-v-1bacfa93 {
position: relative;
width: 50%;
height: 100%;
}
.tn-graphic-card__images--item.is-three .image-wrapper-left .image-container.data-v-1bacfa93 {
width: 100%;
height: 100%;
border-radius: 15rpx;
}
.tn-graphic-card__images--item.is-three .image-wrapper-right.data-v-1bacfa93 {
position: relative;
flex: 1;
height: 100%;
margin-left: 28rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.tn-graphic-card__images--item.is-three .image-wrapper-right .image-container.data-v-1bacfa93 {
flex: 1;
width: 100%;
border-radius: 15rpx;
}
.tn-graphic-card__images--item.is-three .image-wrapper-right .image-container + .image-container.data-v-1bacfa93 {
margin-top: 28rpx;
}
.tn-graphic-card__images--item.is-four.data-v-1bacfa93 {
width: 80%;
}
.tn-graphic-card__bottom-info.data-v-1bacfa93 {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 16rpx;
/* 左边查看数据 start */
/* 左边查看数据 end */
/* 右边查看用户头像数据 start */
/* 右边查看用户头像数据 end */
}
.tn-graphic-card__bottom-info__left.data-v-1bacfa93 {
display: flex;
align-items: center;
}
.tn-graphic-card__bottom-info__left .count-item-data.data-v-1bacfa93 {
display: flex;
align-items: center;
margin-right: 20rpx;
}
.tn-graphic-card__bottom-info__left .count-item-data .count.data-v-1bacfa93 {
margin-left: 6rpx;
}
.tn-graphic-card__bottom-info__right.data-v-1bacfa93 {
display: flex;
align-items: center;
}
.tn-graphic-card__bottom-info.is-no-content.data-v-1bacfa93 {
margin-top: 24rpx;
}
.tn-graphic-card__view-user-count.data-v-1bacfa93 {
margin-left: 8rpx;
font-size: 26rpx;
color: var(--tn-color-gray);
}
@@ -0,0 +1,141 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const useGraphicCardCustomStyle = (props) => {
const ns = common_vendor.useNamespace("graphic-card");
const [tagBgColorClass, tagBgColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "tagBgColor"),
"bg"
);
const [tagTextColorClass, tagTextColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "tagTextColor"),
"text"
);
const [hotColorClass, hotColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "hotColor"),
"text"
);
const [activeHotColorClass, activeHotColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "activeHotColor"),
"text"
);
const [commentColorClass, commentColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "commentColor"),
"text"
);
const [activeCommentColorClass, activeCommentColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "activeCommentColor"),
"text"
);
const [likeColorClass, likeColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "likeColor"),
"text"
);
const [activeLikeColorClass, activeLikeColorStyle] = common_vendor.useComponentColor(
common_vendor.toRef(props, "activeLikeColor"),
"text"
);
const tagClass = common_vendor.computed(() => {
const cls = [];
if (tagBgColorClass.value)
cls.push(tagBgColorClass.value);
if (tagTextColorClass.value)
cls.push(tagTextColorClass.value);
return cls.join(" ");
});
const tagStyle = common_vendor.computed(() => {
const style = {};
if (!tagBgColorClass.value) {
style.backgroundColor = tagBgColorStyle.value || "var(--tn-color-gray-disabled)";
}
if (tagTextColorStyle.value) {
style.color = tagTextColorStyle.value;
} else if (!tagTextColorClass.value && !tagBgColorClass.value) {
style.color = "var(--tn-text-color-primary)";
}
return style;
});
const hotClass = common_vendor.computed(() => {
const cls = [ns.e("hot")];
if (props.activeHot) {
if (activeHotColorClass.value)
cls.push(activeHotColorClass.value);
} else {
if (hotColorClass.value)
cls.push(hotColorClass.value);
}
return cls.join(" ");
});
const hotStyle = common_vendor.computed(() => {
const style = {};
if (props.activeHot) {
if (!activeHotColorClass.value) {
style.color = activeHotColorStyle.value || "var(--tn-color-primary)";
}
} else {
if (!hotColorClass.value) {
style.color = hotColorStyle.value || "var(--tn-color-gray)";
}
}
return style;
});
const commentClass = common_vendor.computed(() => {
const cls = [ns.e("comment")];
if (props.activeComment) {
if (activeCommentColorClass.value)
cls.push(activeCommentColorClass.value);
} else {
if (commentColorClass.value)
cls.push(commentColorClass.value);
}
return cls.join(" ");
});
const commentStyle = common_vendor.computed(() => {
const style = {};
if (props.activeComment) {
if (!activeCommentColorClass.value) {
style.color = activeCommentColorStyle.value || "var(--tn-color-primary)";
}
} else {
if (!commentColorClass.value) {
style.color = commentColorStyle.value || "var(--tn-color-gray)";
}
}
return style;
});
const likeClass = common_vendor.computed(() => {
const cls = [ns.e("like")];
if (props.activeLike) {
if (activeLikeColorClass.value)
cls.push(activeLikeColorClass.value);
} else {
if (likeColorClass.value)
cls.push(likeColorClass.value);
}
return cls.join(" ");
});
const likeStyle = common_vendor.computed(() => {
const style = {};
if (props.activeLike) {
if (!activeLikeColorClass.value) {
style.color = activeLikeColorStyle.value || "var(--tn-color-red)";
}
} else {
if (!likeColorClass.value) {
style.color = likeColorStyle.value || "var(--tn-color-gray)";
}
}
return style;
});
return {
ns,
tagClass,
tagStyle,
hotClass,
hotStyle,
commentClass,
commentStyle,
likeClass,
likeStyle
};
};
exports.useGraphicCardCustomStyle = useGraphicCardCustomStyle;
@@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");
@@ -0,0 +1,56 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const useGraphicCard = (props, emits) => {
const viewUserAvatars = common_vendor.ref([]);
const viewUserCount = common_vendor.ref(0);
if (props.showViewUser) {
viewUserAvatars.value = props.viewUserAvatars.slice(
0,
props.maxViewUserAvatarCount
);
viewUserCount.value = props.viewUserAvatars.length;
}
const imageCount = common_vendor.computed(
() => {
var _a;
return common_vendor.isEmptyVariableInDefault((_a = props == null ? void 0 : props.images) == null ? void 0 : _a.length, 0);
}
);
const previewImageHandle = (index) => {
common_vendor.index.previewImage({
urls: props.images,
current: index
});
};
const cardClickEvent = () => {
emits("click");
};
const handleAvatarClick = () => {
emits("avatar-view-click");
};
const handleMoreClick = () => {
emits("more-click");
};
const handleHotClick = () => {
emits("hot-click");
};
const handleCommentClick = () => {
emits("comment-click");
};
const handleLikeClick = () => {
emits("like-click");
};
return {
viewUserAvatars,
viewUserCount,
imageCount,
previewImageHandle,
cardClickEvent,
handleAvatarClick,
handleMoreClick,
handleHotClick,
handleCommentClick,
handleLikeClick
};
};
exports.useGraphicCard = useGraphicCard;
@@ -0,0 +1,241 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const graphicCardProps = common_vendor.buildProps({
/**
* @description 头像地址
*/
avatar: {
type: String,
required: true
},
/**
* @description 用户名
*/
username: {
type: String,
required: false
},
/**
* @description 标题
*/
title: {
type: String,
required: true
},
/**
* @description 描述
*/
description: {
type: String,
required: true
},
/**
* @description 标签
*/
tags: {
type: common_vendor.definePropType(Array),
default: () => []
},
/**
* @description 标签背景颜色,以tn开头使用图鸟内置的颜色
*/
tagBgColor: String,
/**
* @description 标签文字颜色,以tn开头使用图鸟内置的颜色
*/
tagTextColor: String,
/**
* @description 内容
*/
content: String,
/**
* @description 图片列表
*/
images: {
type: common_vendor.definePropType(Array),
default: () => []
},
/**
* @description 是否显示更多(是否显示顶部右边操作区域)
*/
showMore: {
type: Boolean,
default: true
},
/**
* @description 显示热度数量
*/
showHot: {
type: Boolean,
default: true
},
/**
* @description 是否激活热度
*/
activeHot: Boolean,
/**
* @description 热度数量数据
*/
hotCount: {
type: Number,
default: 0
},
/**
* @description 热度数量图标
*/
hotIcon: {
type: String,
default: "rocket"
},
/**
* @description 激活时热度数量图标
*/
activeHotIcon: {
type: String,
default: "rocket-fill"
},
/**
* @description 热度数量图标颜色
*/
hotColor: String,
/**
* @description 激活时热度数量图标颜色
*/
activeHotColor: String,
/**
* @description 显示评论数量
*/
showComment: {
type: Boolean,
default: true
},
/**
* @description 是否激活评论
*/
activeComment: Boolean,
/**
* @description 评论数量数据
*/
commentCount: {
type: Number,
default: 0
},
/**
* @description 评论数量图标
*/
commentIcon: {
type: String,
default: "message"
},
/**
* @description 激活时评论数量图标
*/
activeCommentIcon: {
type: String,
default: "message-fill"
},
/**
* @description 评论数量图标颜色
*/
commentColor: String,
/**
* @description 激活时评论数量图标颜色
*/
activeCommentColor: String,
/**
* @description 显示点赞数量
*/
showLike: {
type: Boolean,
default: true
},
/**
* @description 是否激活点赞
*/
activeLike: Boolean,
/**
* @description 点赞数量数据
*/
likeCount: {
type: Number,
default: 0
},
/**
* @description 点赞数量图标
*/
likeIcon: {
type: String,
default: "like-lack"
},
/**
* @description 激活时点赞数量图标
*/
activeLikeIcon: {
type: String,
default: "like-fill"
},
/**
* @description 点赞数量图标颜色
*/
likeColor: String,
/**
* @description 激活时点赞数量图标颜色
*/
activeLikeColor: String,
/**
* @description 显示查看用户信息
*/
showViewUser: {
type: Boolean,
default: true
},
/**
* @description 实际查看数量数据
*/
viewCount: {
type: Number,
default: 0
},
/**
* @description 查看用户头像列表
*/
viewUserAvatars: {
type: common_vendor.definePropType(Array),
default: () => []
},
/**
* @description 最大显示用户头像数量
*/
maxViewUserAvatarCount: {
type: Number,
default: 4
}
});
const graphicCardEmits = {
/**
* @description 点击图文卡片
*/
click: () => true,
/**
* @description 点击用户头像和浏览数量
*/
"avatar-view-click": () => true,
/**
* @description 更多按钮点击
*/
"more-click": () => true,
/**
* @description 点击热度数量
*/
"hot-click": () => true,
/**
* @description 点击评论数量
*/
"comment-click": () => true,
/**
* @description 点击点赞数量
*/
"like-click": () => true
};
exports.graphicCardEmits = graphicCardEmits;
exports.graphicCardProps = graphicCardProps;
+174
View File
@@ -0,0 +1,174 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_request = require("../../utils/request.js");
if (!Array) {
const _easycom_fui_icon2 = common_vendor.resolveComponent("fui-icon");
const _easycom_fui_col2 = common_vendor.resolveComponent("fui-col");
const _easycom_fui_progress2 = common_vendor.resolveComponent("fui-progress");
const _easycom_fui_row2 = common_vendor.resolveComponent("fui-row");
(_easycom_fui_icon2 + _easycom_fui_col2 + _easycom_fui_progress2 + _easycom_fui_row2)();
}
const _easycom_fui_icon = () => "../firstui/fui-icon/fui-icon.js";
const _easycom_fui_col = () => "../firstui/fui-col/fui-col.js";
const _easycom_fui_progress = () => "../firstui/fui-progress/fui-progress.js";
const _easycom_fui_row = () => "../firstui/fui-row/fui-row.js";
if (!Math) {
(MyTitle + _easycom_fui_icon + _easycom_fui_col + _easycom_fui_progress + _easycom_fui_row + ParamCard)();
}
const MyTitle = () => "../common/MyTitle.js";
const ParamCard = () => "../common/ParamCard.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "AudioUpload",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "上传" },
options: {}
}, {
"modelValue": {
default: ""
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const modelValue = common_vendor.useModel(__props, "modelValue");
const audioList = common_vendor.ref([]);
const audioSrc = common_vendor.ref("");
const audioName = common_vendor.ref("默认音频");
let innerAudioContext = null;
const currentTime = common_vendor.ref(0);
const duration = common_vendor.ref(0);
const progress = common_vendor.ref(0);
common_vendor.onReady(() => {
audioList.value = modelValue.value ? [modelValue.value] : [];
});
common_vendor.watch(audioList, () => {
console.log("audioList", audioList.value[0]);
modelValue.value = audioList.value[0];
if (audioList.value[0]) {
audioSrc.value = audioList.value[0];
audioName.value = audioList.value[0].split("/").pop() || "默认音频";
initInnerAudioContext();
}
});
const uploadFilePromise = async (file) => {
const url = file.path;
return new Promise(async (resolve, reject) => {
const uploadResult = await utils_request.uploadFile(url);
console.log("uploadResult", uploadResult);
if (uploadResult) {
resolve(uploadResult);
}
});
};
const initInnerAudioContext = () => {
if (innerAudioContext) {
innerAudioContext.destroy();
}
innerAudioContext = common_vendor.index.createInnerAudioContext();
innerAudioContext.autoplay = false;
innerAudioContext.src = audioSrc.value;
innerAudioContext.onPlay(() => {
console.log("开始播放");
});
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
innerAudioContext.onTimeUpdate(() => {
currentTime.value = (innerAudioContext == null ? void 0 : innerAudioContext.currentTime) || 0;
duration.value = (innerAudioContext == null ? void 0 : innerAudioContext.duration) || 0;
progress.value = duration.value > 0 ? currentTime.value / duration.value * 100 : 0;
});
};
const chooseAudioFile = () => {
common_vendor.wx$1.chooseMessageFile({
count: 1,
type: "file",
extension: ["mp3", "wav"],
// 指定音频文件类型
success(res) {
const audioFile = res.tempFiles[0];
uploadAudioFile(audioFile);
},
fail(err) {
console.error("选择文件失败", err);
}
});
};
const uploadAudioFile = async (file) => {
try {
const uploadResult = await uploadFilePromise(file);
if (uploadResult) {
audioSrc.value = uploadResult;
audioName.value = file.name;
audioList.value = [uploadResult];
console.log("上传成功", uploadResult);
}
} catch (error) {
console.error("上传失败", error);
}
};
const buttonShow = common_vendor.ref(false);
const playAudio = () => {
if (innerAudioContext) {
innerAudioContext.stop();
innerAudioContext.play();
}
buttonShow.value = true;
};
const pauseAudio = () => {
if (innerAudioContext) {
innerAudioContext.pause();
console.log("暂停播放");
buttonShow.value = false;
}
};
common_vendor.onUnmounted(() => {
if (innerAudioContext) {
innerAudioContext.destroy();
}
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.o(playAudio),
c: !buttonShow.value,
d: common_vendor.p({
name: "suspend"
}),
e: common_vendor.o(pauseAudio),
f: buttonShow.value,
g: common_vendor.p({
name: "play"
}),
h: common_vendor.p({
span: 3
}),
i: common_vendor.t(audioName.value || _ctx.),
j: common_vendor.p({
percent: progress.value.toFixed(0) || 0
}),
k: common_vendor.p({
span: 21
}),
l: common_vendor.p({
["margin-bottom"]: "24rpx"
}),
m: common_vendor.o(chooseAudioFile),
n: common_vendor.p({
name: "pullup"
}),
o: common_vendor.p({
span: 24
}),
p: common_vendor.p({
["margin-bottom"]: "24rpx"
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b4cf6b1f"]]);
wx.createComponent(Component);
+11
View File
@@ -0,0 +1,11 @@
{
"component": true,
"usingComponents": {
"fui-icon": "../firstui/fui-icon/fui-icon",
"fui-col": "../firstui/fui-col/fui-col",
"fui-progress": "../firstui/fui-progress/fui-progress",
"fui-row": "../firstui/fui-row/fui-row",
"my-title": "../common/MyTitle",
"param-card": "../common/ParamCard"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="b4cf6b1f-0" bind:__l="__l" class="{{['data-v-b4cf6b1f', virtualHostClass]}}" virtualHostClass="{{['data-v-b4cf6b1f', virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-i="b4cf6b1f-1,b4cf6b1f-0" bind:__l="__l" u-p="{{a}}" slot="title"/><view class="audioCard data-v-b4cf6b1f" slot="body"><fui-row wx:if="{{l}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-s="{{['d']}}" style="width:100%;margin-top:15%;text-align:center" virtualHostStyle="width:100%;margin-top:15%;text-align:center" u-i="b4cf6b1f-2,b4cf6b1f-0" bind:__l="__l" u-p="{{l}}"><fui-col wx:if="{{h}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-s="{{['d']}}" u-i="b4cf6b1f-3,b4cf6b1f-2" bind:__l="__l" u-p="{{h}}"><view class="data-v-b4cf6b1f" style="margin-top:75%"><fui-icon wx:if="{{d}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" bindclick="{{b}}" data-c-h="{{!c}}" u-i="b4cf6b1f-4,b4cf6b1f-3" bind:__l="__l" u-p="{{d}}"></fui-icon><fui-icon wx:if="{{g}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" bindclick="{{e}}" data-c-h="{{!f}}" u-i="b4cf6b1f-5,b4cf6b1f-3" bind:__l="__l" u-p="{{g}}"></fui-icon></view></fui-col><fui-col wx:if="{{k}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-s="{{['d']}}" u-i="b4cf6b1f-6,b4cf6b1f-2" bind:__l="__l" u-p="{{k}}"><view class="data-v-b4cf6b1f" style="margin-top:5%;margin-bottom:5%;text-align:left;overflow:hidden;width:200px;white-space:nowrap;text-overflow:ellipsis">歌名:{{i}}</view><fui-progress wx:if="{{j}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" style="margin-bottom:24%" virtualHostStyle="margin-bottom:24%" u-i="b4cf6b1f-7,b4cf6b1f-6" bind:__l="__l" u-p="{{j}}"></fui-progress></fui-col></fui-row><view class="data-v-b4cf6b1f" style="margin-bottom:10%"></view><fui-row wx:if="{{p}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-s="{{['d']}}" style="width:100%;text-align:right" virtualHostStyle="width:100%;text-align:right" u-i="b4cf6b1f-8,b4cf6b1f-0" bind:__l="__l" u-p="{{p}}"><fui-col wx:if="{{o}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" u-s="{{['d']}}" u-i="b4cf6b1f-9,b4cf6b1f-8" bind:__l="__l" u-p="{{o}}"><view class="data-v-b4cf6b1f" style="margin-top:-10%"><fui-icon wx:if="{{n}}" class="data-v-b4cf6b1f" virtualHostClass="data-v-b4cf6b1f" bindclick="{{m}}" u-i="b4cf6b1f-10,b4cf6b1f-9" bind:__l="__l" u-p="{{n}}"></fui-icon></view></fui-col></fui-row></view></param-card>
+34
View File
@@ -0,0 +1,34 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.upload-new-btn.data-v-b4cf6b1f {
width: 100%;
height: 300rpx;
background-color: #f4f5f6;
border-radius: 10rpx;
}
.audioCard.data-v-b4cf6b1f {
text-align: left;
}
@@ -0,0 +1,37 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _component_View = common_vendor.resolveComponent("View");
_component_View();
}
if (!Math) {
(MyTitle + TnNumberBox + ParamCard)();
}
const TnNumberBox = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/number-box/src/number-box.js";
const ParamCard = () => "../common/ParamCard.js";
const MyTitle = () => "../common/MyTitle.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "CustomNumberBox",
props: {
"modelValue": {
default: 1
},
"modelModifiers": {}
},
emits: ["update:modelValue"],
setup(__props) {
const numberValue = common_vendor.useModel(__props, "modelValue");
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "图像批次"
}),
b: common_vendor.o(($event) => numberValue.value = $event),
c: common_vendor.p({
modelValue: numberValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"tn-number-box": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/number-box/src/number-box",
"param-card": "../common/ParamCard",
"my-title": "../common/MyTitle"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title']}}" u-i="7de6989a-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><view u-s="{{['d']}}" style="display:flex;justify-content:space-between" virtualHostStyle="display:flex;justify-content:space-between" u-i="7de6989a-1,7de6989a-0" bind:__l="__l" slot="title"><my-title wx:if="{{a}}" u-i="7de6989a-2,7de6989a-1" bind:__l="__l" u-p="{{a}}"></my-title><tn-number-box wx:if="{{c}}" u-i="7de6989a-3,7de6989a-1" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"/></view></param-card>
+50
View File
@@ -0,0 +1,50 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_slider2 = common_vendor.resolveComponent("up-slider");
_easycom_up_slider2();
}
const _easycom_up_slider = () => "../../node-modules/uview-plus/components/u-slider/u-slider.js";
if (!Math) {
(MyTitle + _easycom_up_slider + ParamCard)();
}
const MyTitle = () => "../common/MyTitle.js";
const ParamCard = () => "../common/ParamCard.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "CustomSlider",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "选择大小" },
options: { default: {
min: 512,
max: 1024,
step: 8
} }
}, {
"modelValue": {
default: 512
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const sliderValue = common_vendor.useModel(__props, "modelValue");
const props = __props;
console.log(props.options, typeof props.options);
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.o(($event) => sliderValue.value = $event),
c: common_vendor.p({
showValue: true,
step: _ctx.options.step,
min: _ctx.options.min,
max: _ctx.options.max,
modelValue: sliderValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"up-slider": "../../node-modules/uview-plus/components/u-slider/u-slider",
"my-title": "../common/MyTitle",
"param-card": "../common/ParamCard"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="a1c3bd80-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title u-i="a1c3bd80-1,a1c3bd80-0" bind:__l="__l" u-p="{{a}}" slot="title"></my-title><up-slider u-i="a1c3bd80-2,a1c3bd80-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}" slot="body"></up-slider></param-card>
+29
View File
@@ -0,0 +1,29 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
CustomSlider();
}
const CustomSlider = () => "./CustomSlider.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Height",
props: {
"modelValue": {
default: 512
},
"modelModifiers": {}
},
emits: ["update:modelValue"],
setup(__props) {
const modelValue = common_vendor.useModel(__props, "modelValue");
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => modelValue.value = $event),
b: common_vendor.p({
title: "高度",
modelValue: modelValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"custom-slider": "./CustomSlider"
}
}
+1
View File
@@ -0,0 +1 @@
<custom-slider wx:if="{{b}}" u-i="754fc8b5-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"/>
View File
@@ -0,0 +1,77 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
(MyTitle + TnIcon + ParamCard)();
}
const ParamCard = () => "../common/ParamCard.js";
const MyTitle = () => "../common/MyTitle.js";
const TnIcon = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "ImageSelectPreview",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "选择风格" },
options: {}
}, {
"modelValue": { default: null },
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const props = __props;
common_vendor.onLoad(() => {
});
const selectedValue = common_vendor.useModel(__props, "modelValue");
const selectedIndex = common_vendor.ref(0);
common_vendor.watch(selectedIndex, () => {
selectedValue.value = images.value[selectedIndex.value].value;
});
const images = common_vendor.computed(() => {
if (!props.options)
return [];
if (typeof props.options === "string" && Array.isArray(JSON.parse(props.options))) {
return JSON.parse(props.options);
}
if (Array.isArray(props.options)) {
return props.options;
}
const options = props.options;
if (options.imageSelectItems) {
return options.imageSelectItems;
} else {
return [];
}
});
common_vendor.computed(() => {
return images.value[selectedIndex.value];
});
const selectImage = (index) => {
selectedIndex.value = index;
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.f(images.value, (image, index, i0) => {
return common_vendor.e({
a: selectedIndex.value === index ? 1 : "",
b: image.src,
c: common_vendor.t(image.title),
d: index === selectedIndex.value
}, index === selectedIndex.value ? {
e: "a0679471-2-" + i0 + ",a0679471-0",
f: common_vendor.p({
name: "check"
})
} : {}, {
g: index,
h: selectedIndex.value === index ? 1 : "",
i: common_vendor.o(($event) => selectImage(index), index)
});
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a0679471"]]);
wx.createComponent(Component);
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"param-card": "../common/ParamCard",
"my-title": "../common/MyTitle",
"tn-icon": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="a0679471-0" bind:__l="__l" class="{{['data-v-a0679471', virtualHostClass]}}" virtualHostClass="{{['data-v-a0679471', virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title class="data-v-a0679471" virtualHostClass="data-v-a0679471" u-i="a0679471-1,a0679471-0" bind:__l="__l" u-p="{{a}}" slot="title"></my-title><scroll-view scroll-y="true" class="image-preview-container data-v-a0679471" slot="body"><view class="image-grid data-v-a0679471"><view wx:for="{{b}}" wx:for-item="image" wx:key="g" class="{{['image-item', 'data-v-a0679471', image.h && 'selected']}}" bindtap="{{image.i}}"><image class="{{['data-v-a0679471', image.a && 'selected']}}" src="{{image.b}}" mode="aspectFill"/><view class="tn-text-xs tn-text-center tn-text-ellipsis-1 data-v-a0679471">{{image.c}}</view><view class="selected-icon data-v-a0679471"><tn-icon wx:if="{{image.d}}" class="data-v-a0679471" virtualHostClass="data-v-a0679471" u-i="{{image.e}}" bind:__l="__l" u-p="{{image.f}}"/></view></view></view></scroll-view></param-card>
@@ -0,0 +1,77 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.image-preview-container.data-v-a0679471 {
min-height: 260rpx;
max-height: 400rpx;
padding: 10rpx;
}
.image-grid.data-v-a0679471 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
}
.image-item.data-v-a0679471 {
position: relative;
overflow: hidden;
cursor: pointer;
border-radius: 10px;
}
.image-item image.selected.data-v-a0679471 {
box-shadow: 4px 4px 10rpx rgba(2, 22, 37, 0.5);
transform: scale(1.05);
}
.image-item.selected.data-v-a0679471::after {
content: "";
position: absolute;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.2);
}
.image-item image.data-v-a0679471 {
width: 100%;
height: 160rpx;
transition: transform 0.3s;
margin: auto;
}
.selected-preview.data-v-a0679471 {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.selected-image.data-v-a0679471 {
max-width: 100%;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.selected-icon.data-v-a0679471 {
position: absolute;
top: 0;
right: 0;
padding: 0 0 5rpx 5rpx;
background-color: #4338CA;
color: white;
}
+65
View File
@@ -0,0 +1,65 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_request = require("../../utils/request.js");
if (!Math) {
(MyTitle + TnImageUpload + ParamCard)();
}
const TnImageUpload = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/image-upload/src/image-upload.js";
const MyTitle = () => "../common/MyTitle.js";
const ParamCard = () => "../common/ParamCard.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "ImageUpload",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "上传" },
options: {}
}, {
"modelValue": {
default: ""
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const modelValue = common_vendor.useModel(__props, "modelValue");
const imageList = common_vendor.ref([]);
common_vendor.onReady(() => {
imageList.value = modelValue.value ? [modelValue.value] : [];
});
common_vendor.watch(imageList, () => {
console.log("imageList", imageList);
for (const item of imageList.value) {
modelValue.value = item;
}
modelValue.value = imageList.value[0];
});
const uploadFilePromise = async (file) => {
const url = file.path;
return new Promise(async (resolve, reject) => {
const uploadResult = await utils_request.uploadFile(url);
console.log("uploadResult", uploadResult);
if (uploadResult) {
resolve(uploadResult);
}
});
};
const imageUploadRef = common_vendor.ref();
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.sr(imageUploadRef, "6b5cdc15-2,6b5cdc15-0", {
"k": "imageUploadRef"
}),
c: common_vendor.o(($event) => imageList.value = $event),
d: common_vendor.p({
limit: 1,
["custom-upload-handler"]: uploadFilePromise,
modelValue: imageList.value
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6b5cdc15"]]);
wx.createComponent(Component);
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"tn-image-upload": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/image-upload/src/image-upload",
"my-title": "../common/MyTitle",
"param-card": "../common/ParamCard"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="6b5cdc15-0" bind:__l="__l" class="{{['data-v-6b5cdc15', virtualHostClass]}}" virtualHostClass="{{['data-v-6b5cdc15', virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title class="data-v-6b5cdc15" virtualHostClass="data-v-6b5cdc15" u-i="6b5cdc15-1,6b5cdc15-0" bind:__l="__l" u-p="{{a}}" slot="title"/><view slot="body"><tn-image-upload wx:if="{{d}}" class="r data-v-6b5cdc15" virtualHostClass="r data-v-6b5cdc15" u-r="imageUploadRef" u-i="6b5cdc15-2,6b5cdc15-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></tn-image-upload></view></param-card>
+31
View File
@@ -0,0 +1,31 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.upload-new-btn.data-v-6b5cdc15 {
width: 100%;
height: 300rpx;
background-color: #f4f5f6;
border-radius: 10rpx;
}
+45
View File
@@ -0,0 +1,45 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const composables_useWorkFlow = require("../../composables/useWorkFlow.js");
if (!Math) {
Picker();
}
const Picker = () => "./Picker.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "ModeSelect",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "选择大模型" },
workflow_id: { default: "" },
options: { default: {} }
}, {
"modelValue": {},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const props = __props;
const selectValue = common_vendor.useModel(__props, "modelValue");
const modelList = common_vendor.ref([]);
const handleInitData = async () => {
if (!props.workflow_id) {
return;
}
const result = await composables_useWorkFlow.getModelListByWorkflowId(props.workflow_id);
if (result) {
modelList.value = result;
}
};
handleInitData();
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => selectValue.value = $event),
b: common_vendor.p({
title: _ctx.title,
options: modelList.value,
modelValue: selectValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"picker": "./Picker"
}
}
+1
View File
@@ -0,0 +1 @@
<picker wx:if="{{b}}" u-i="79bcf50d-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"/>
@@ -0,0 +1,62 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_request = require("../../utils/request.js");
if (!Math) {
(MyTitle + TnImageUpload + ParamCard)();
}
const TnImageUpload = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/image-upload/src/image-upload.js";
const MyTitle = () => "../common/MyTitle.js";
const ParamCard = () => "../common/ParamCard.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "MoreImageUpload",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "上传" },
options: {}
}, {
"modelValue": {
default: () => []
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const modelValue = common_vendor.useModel(__props, "modelValue");
const imageList = common_vendor.ref([]);
common_vendor.onReady(() => {
imageList.value = modelValue.value || [];
});
common_vendor.watch(imageList, () => {
console.log("imageList", imageList);
modelValue.value = imageList.value;
});
const uploadFilePromise = async (file) => {
const url = file.path;
return new Promise(async (resolve, reject) => {
const uploadResult = await utils_request.uploadFile(url);
console.log("uploadResult", uploadResult);
if (uploadResult) {
resolve(uploadResult);
}
});
};
const imageUploadRef = common_vendor.ref();
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.sr(imageUploadRef, "96383370-2,96383370-0", {
"k": "imageUploadRef"
}),
c: common_vendor.o(($event) => imageList.value = $event),
d: common_vendor.p({
limit: 5,
["custom-upload-handler"]: uploadFilePromise,
modelValue: imageList.value
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-96383370"]]);
wx.createComponent(Component);
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"tn-image-upload": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/image-upload/src/image-upload",
"my-title": "../common/MyTitle",
"param-card": "../common/ParamCard"
}
}
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="96383370-0" bind:__l="__l" class="{{['data-v-96383370', virtualHostClass]}}" virtualHostClass="{{['data-v-96383370', virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title class="data-v-96383370" virtualHostClass="data-v-96383370" u-i="96383370-1,96383370-0" bind:__l="__l" u-p="{{a}}" slot="title"/><view slot="body"><tn-image-upload wx:if="{{d}}" class="r data-v-96383370" virtualHostClass="r data-v-96383370" u-r="imageUploadRef" u-i="96383370-2,96383370-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></tn-image-upload></view></param-card>
@@ -0,0 +1,31 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.upload-new-btn.data-v-96383370 {
width: 100%;
height: 300rpx;
background-color: #f4f5f6;
border-radius: 10rpx;
}
+83
View File
@@ -0,0 +1,83 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
(MyTitle + TnInput + TnPicker + ParamCard)();
}
const ParamCard = () => "../common/ParamCard.js";
const MyTitle = () => "../common/MyTitle.js";
const TnInput = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input.js";
const TnPicker = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/picker/src/picker.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Picker",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "请选择" },
options: { default: {
selectItems: []
} }
}, {
"modelValue": {},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const show = common_vendor.ref(false);
const props = __props;
const pickerData = common_vendor.computed(() => {
if (!props.options) {
return [];
}
if (Array.isArray(props.options)) {
if (props.options[0] && props.options[0].title) {
return props.options.map((item) => ({ label: item.title, value: item.value }));
}
if (props.options[0] && typeof props.options[0] !== "object") {
return props.options.map((item) => ({ label: item, value: item }));
}
return props.options;
}
if (props.options.selectItems) {
return props.options.selectItems;
}
return [];
});
const selected = common_vendor.useModel(__props, "modelValue");
const handleConfirm = (item) => {
console.log("confirm", item);
if (!item)
return;
selected.value = item;
show.value = false;
};
const handleCancel = (value) => {
show.value = false;
};
const inputValue = common_vendor.computed(() => {
var _a;
return ((_a = pickerData.value.find((item) => item.value === selected.value)) == null ? void 0 : _a.label) || "";
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.o(($event) => show.value = true),
c: common_vendor.o(($event) => inputValue.value = $event),
d: common_vendor.p({
type: "select",
placeholder: "请选择",
modelValue: inputValue.value
}),
e: common_vendor.o(handleCancel),
f: common_vendor.o(handleConfirm),
g: common_vendor.o(($event) => selected.value = $event),
h: common_vendor.o(($event) => show.value = $event),
i: common_vendor.p({
data: pickerData.value,
modelValue: selected.value,
open: show.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+9
View File
@@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"param-card": "../common/ParamCard",
"my-title": "../common/MyTitle",
"tn-input": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input",
"tn-picker": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/picker/src/picker"
}
}
+1
View File
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="707796c8-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title u-i="707796c8-1,707796c8-0" bind:__l="__l" u-p="{{a}}" slot="title"></my-title><view slot="body"><view style="display:flex;justify-content:start;align-items:start"><tn-input wx:if="{{d}}" style="width:100%" virtualHostStyle="width:100%" bindclick="{{b}}" u-i="707796c8-2,707796c8-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"/></view><tn-picker wx:if="{{i}}" bindcancel="{{e}}" bindconfirm="{{f}}" u-i="707796c8-3,707796c8-0" bind:__l="__l" bindupdateModelValue="{{g}}" bindupdateOpen="{{h}}" u-p="{{i}}"/></view></param-card>
View File
+37
View File
@@ -0,0 +1,37 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
(MyTitle + TnInput + ParamCard)();
}
const ParamCard = () => "../common/ParamCard.js";
const MyTitle = () => "../common/MyTitle.js";
const TnInput = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Positive",
props: {
"modelValue": {
default: ""
},
"modelModifiers": {}
},
emits: ["update:modelValue"],
setup(__props) {
const inputValue = common_vendor.useModel(__props, "modelValue");
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "提示词"
}),
b: common_vendor.o(($event) => inputValue.value = $event),
c: common_vendor.p({
height: "150",
type: "textarea",
clearable: true,
placeholder: "请输入内容",
modelValue: inputValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+8
View File
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"param-card": "../common/ParamCard",
"my-title": "../common/MyTitle",
"tn-input": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input"
}
}
+1
View File
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="34dad307-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title u-i="34dad307-1,34dad307-0" bind:__l="__l" u-p="{{a}}" slot="title"/><tn-input u-i="34dad307-2,34dad307-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}" slot="body"/></param-card>
+62
View File
@@ -0,0 +1,62 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_common = require("../../utils/common.js");
if (!Math) {
(MyTitle + TnIcon + TnInput + ParamCard)();
}
const TnInput = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input.js";
const ParamCard = () => "../common/ParamCard.js";
const MyTitle = () => "../common/MyTitle.js";
const TnIcon = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Seed",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "随机种子" },
options: { default: {} }
}, {
"modelValue": {
default: 0
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props, { expose: __expose }) {
const inputValue = common_vendor.useModel(__props, "modelValue");
const getSeed = () => {
inputValue.value = utils_common.generateRandomNumber(15);
};
common_vendor.onLoad(() => {
console.log("Seed page onLoad");
if (!inputValue.value || inputValue.value === 0) {
getSeed();
}
});
common_vendor.onReady(() => {
console.log("Seed page onReady");
if (!inputValue.value || inputValue.value === 0) {
getSeed();
}
});
__expose({
getSeed
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: _ctx.title
}),
b: common_vendor.o(getSeed),
c: common_vendor.p({
name: "cube"
}),
d: common_vendor.o(($event) => inputValue.value = $event),
e: common_vendor.p({
type: "number",
placeholder: "请输入用户名",
modelValue: inputValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+9
View File
@@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"tn-input": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/input/src/input",
"param-card": "../common/ParamCard",
"my-title": "../common/MyTitle",
"tn-icon": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon"
}
}
+1
View File
@@ -0,0 +1 @@
<param-card u-s="{{['title','body']}}" u-i="1166f67f-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><my-title u-i="1166f67f-1,1166f67f-0" bind:__l="__l" u-p="{{a}}" slot="title"></my-title><tn-input u-s="{{['suffix']}}" u-i="1166f67f-2,1166f67f-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}" slot="body"><tn-icon bindclick="{{b}}" u-i="1166f67f-3,1166f67f-2" bind:__l="__l" u-p="{{c}}" slot="suffix"/></tn-input></param-card>
View File
+39
View File
@@ -0,0 +1,39 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
CustomSlider();
}
const CustomSlider = () => "./CustomSlider.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Width",
props: /* @__PURE__ */ common_vendor.mergeModels({
title: { default: "宽度" },
options: { default: {
min: 512,
max: 1024,
step: 8
} }
}, {
"modelValue": {
default: 512
},
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props) {
const props = __props;
const modelValue = common_vendor.useModel(__props, "modelValue");
console.log(111111, props.options);
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => modelValue.value = $event),
b: common_vendor.p({
title: _ctx.title,
options: _ctx.options,
modelValue: modelValue.value
})
};
};
}
});
wx.createComponent(_sfc_main);
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"custom-slider": "./CustomSlider"
}
}
+1
View File
@@ -0,0 +1 @@
<custom-slider wx:if="{{b}}" u-i="14f393b0-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"/>

Some files were not shown because too many files have changed in this diff Show More