? K extends { __ctx?: { props?: infer P } } ? NonNullable : never
+ : T extends (props: infer P, ...args: any) => any ? P :
+ {};
+ type __VLS_IsFunction = K extends keyof T
+ ? __VLS_IsAny extends false
+ ? unknown extends T[K]
+ ? false
+ : true
+ : false
+ : false;
+ type __VLS_NormalizeComponentEvent = (
+ __VLS_IsFunction extends true
+ ? Props
+ : __VLS_IsFunction extends true
+ ? { [K in onEvent]?: Events[Event] }
+ : __VLS_IsFunction extends true
+ ? { [K in onEvent]?: Events[CamelizedEvent] }
+ : Props
+ ) & Record;
+ // fix https://github.com/vuejs/language-tools/issues/926
+ type __VLS_UnionToIntersection = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
+ type __VLS_OverloadUnionInner = U & T extends (...args: infer A) => infer R
+ ? U extends T
+ ? never
+ : __VLS_OverloadUnionInner & U & ((...args: A) => R)> | ((...args: A) => R)
+ : never;
+ type __VLS_OverloadUnion = Exclude<
+ __VLS_OverloadUnionInner<(() => never) & T>,
+ T extends () => never ? never : () => never
+ >;
+ type __VLS_ConstructorOverloads = __VLS_OverloadUnion extends infer F
+ ? F extends (event: infer E, ...args: infer A) => any
+ ? { [K in E & string]: (...args: A) => void; }
+ : never
+ : never;
+ type __VLS_NormalizeEmits = __VLS_PrettifyGlobal<
+ __VLS_UnionToIntersection<
+ __VLS_ConstructorOverloads & {
+ [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
+ }
+ >
+ >;
+ type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {};
+ type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny<
+ '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
+ , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
+ >>;
+ type __VLS_OmitStringIndex = {
+ [K in keyof T as string extends K ? never : K]: T[K];
+ };
+ type __VLS_UseTemplateRef = Readonly>;
+
+ function __VLS_getVForSourceType>(source: T): [
+ item: T extends number ? number
+ : T extends string ? string
+ : T extends any[] ? T[number]
+ : T extends Iterable ? T1
+ : any,
+ index: number,
+ ][];
+ function __VLS_getVForSourceType(source: T): [
+ item: T[keyof T],
+ key: keyof T,
+ index: number,
+ ][];
+ // @ts-ignore
+ function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>;
+ // @ts-ignore
+ function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0];
+ function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective
+ ? NonNullable
+ : T extends (...args: any) => any
+ ? T
+ : (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
+ function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] };
+ function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K):
+ T extends new (...args: any) => any
+ ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & {
+ __ctx?: {
+ attrs?: any;
+ slots?: K extends { $slots: infer Slots } ? Slots : any;
+ emit?: K extends { $emit: infer Emit } ? Emit : any;
+ expose?(exposed: K): void;
+ props?: (K extends { $props: infer Props } ? Props : any) & Record;
+ }
+ }
+ : T extends () => any ? (props: {}, ctx?: any) => ReturnType
+ : T extends (...args: any) => any ? T
+ : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } };
+ function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : [];
+ function __VLS_asFunctionalElement(tag: T, endTag?: T): (attrs: T & Record) => void;
+ function __VLS_asFunctionalSlot(slot: S): (props: NonNullable extends (props: infer P) => any ? P : {}) => void;
+ function __VLS_tryAsConstant(t: T): T;
+}
diff --git a/pic.png b/pic.png
new file mode 100644
index 00000000..ec2d60c3
Binary files /dev/null and b/pic.png differ
diff --git a/src/components/firstui/fui-gallery/fui-gallery.vue b/src/components/firstui/fui-gallery/fui-gallery.vue
new file mode 100644
index 00000000..5f36c410
--- /dev/null
+++ b/src/components/firstui/fui-gallery/fui-gallery.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{active+1}}/{{imgUrls.length}}
+
+
+ {{descr}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/history/history_fui/history_fui.vue b/src/pages/history/history_fui/history_fui.vue
index cf32ae46..7be1b62e 100644
--- a/src/pages/history/history_fui/history_fui.vue
+++ b/src/pages/history/history_fui/history_fui.vue
@@ -16,10 +16,10 @@
import {
isLogin
-
+
} from "@/composables/useCommon.ts";
-
-
+
+
interface TimeLineData {
@@ -34,7 +34,7 @@
}
onLoad(() => {
- if(!isLogin.value){
+ if (!isLogin.value) {
uni.showToast({
icon: 'error',
title: '您还没有登录',
@@ -44,7 +44,7 @@
uni.navigateBack()
}, 2000)
}
-
+
})
}
getHistoryData()
@@ -139,12 +139,24 @@
}
const show = ref(false);
- function showGallery() {
+ const picArry = ref()
+ const GalleryPic = ref()
+
+ function showGallery(data) {
show.value = true;
+ GalleryPic.value = data;
+ console.log(GalleryPic.value)
}
+
+
function hideGallery() {
show.value = false;
+
}
+
+
+
+
function linkType(url) {
// 如果输入不是字符串,返回 2(未知类型)
if (typeof url !== 'string') return 2;
@@ -176,49 +188,48 @@
}
// 定义 dowonVideo 函数,并指定 url 参数的类型为 string
-async function dowonVideo(url: string) {
- // 替换为你的视频地址
- const videoUrl = url;
+ async function dowonVideo(url : string) {
+ // 替换为你的视频地址
+ const videoUrl = url;
- try {
- // 下载视频到临时路径,使用 await 等待 Promise 解析
- const downloadResult = await uni.downloadFile({
- url: videoUrl,
- });
+ try {
+ // 下载视频到临时路径,使用 await 等待 Promise 解析
+ const downloadResult = await uni.downloadFile({
+ url: videoUrl,
+ });
- // 检查下载是否成功
- if (downloadResult.statusCode === 200) {
- const { tempFilePath } = downloadResult;
+ // 检查下载是否成功
+ if (downloadResult.statusCode === 200) {
+ const { tempFilePath } = downloadResult;
- // 保存到相册
- await uni.saveVideoToPhotosAlbum({
- filePath: tempFilePath,
- });
+ // 保存到相册
+ await uni.saveVideoToPhotosAlbum({
+ filePath: tempFilePath,
+ });
- uni.showToast({
- title: '下载成功',
- icon: 'success',
- });
- } else {
- console.error('下载失败,状态码:', downloadResult.statusCode);
- uni.showToast({
- title: '下载失败',
- icon: 'none',
- });
- }
- } catch (error) {
- console.error('下载失败:', error);
- uni.showToast({
- title: '下载失败',
- icon: 'none',
- });
- }
-}
+ uni.showToast({
+ title: '下载成功',
+ icon: 'success',
+ });
+ } else {
+ console.error('下载失败,状态码:', downloadResult.statusCode);
+ uni.showToast({
+ title: '下载失败',
+ icon: 'none',
+ });
+ }
+ } catch (error) {
+ console.error('下载失败:', error);
+ uni.showToast({
+ title: '下载失败',
+ icon: 'none',
+ });
+ }
+ }
-
+
@@ -232,12 +243,11 @@ async function dowonVideo(url: string) {
-
-
+
-
+
@@ -248,26 +258,22 @@ async function dowonVideo(url: string) {
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+ color="#ff0000" name="delete" @click="removeHistoryRecord(item.id)">
@@ -297,12 +303,15 @@ async function dowonVideo(url: string) {
-
+
+
+ color="#ff0000" name="delete" @click="removeHistoryRecord(item.id)">
@@ -323,12 +332,8 @@ async function dowonVideo(url: string) {
-->
-
-
-
-
@@ -340,8 +345,8 @@ async function dowonVideo(url: string) {
-
+
@@ -356,7 +361,9 @@ async function dowonVideo(url: string) {
-
+
-
+ mode="scaleToFill" src="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/画板 3.png"> -->
@@ -76,10 +76,11 @@
-
-
+
-
@@ -90,7 +91,7 @@
-
+
@@ -117,7 +118,7 @@
-
+
-
+
-
-
-
+
@@ -180,6 +179,7 @@
+
@@ -188,25 +188,62 @@
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 绘图历史
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 退出登录
+
+
+
@@ -241,7 +278,7 @@
import { onLoad, onReady } from "@dcloudio/uni-app";
import useWorkFlow from "@/composables/useWorkFlow.ts";
import UserMemberInfo from "@/components/home/UserMemberInfo.vue";
- import { ref, onMounted, onUnmounted, computed,watch,nextTick } from 'vue'
+ import { ref, onMounted, onUnmounted, computed, watch, nextTick } from 'vue'
import TnWaterFall from '@tuniao/tnui-vue3-uniapp/components/water-fall/src/water-fall.vue'
import { request } from "@/utils/request.ts";
import type { IDrawHistoryItem } from "@/types";
@@ -263,18 +300,18 @@
import { on } from "@/utils/emitter.ts";
import PaymentPopup from "@/components/home/PaymentPopup.vue";
import fuiBackgroundImage from "@/components/firstui/fui-background-image/fui-background-image.vue";
- import { getModelList, getUserKey, getUserToken, getUserInfo,ChatAPiUrl } from "@/composables/aiChat.ts";
+ import { getModelList, getUserKey, getUserToken, getUserInfo, ChatAPiUrl } from "@/composables/aiChat.ts";
import { TextEncoder, TextDecoder } from 'text-decoding'
global.TextEncoder = TextEncoder
global.TextDecoder = TextDecoder
-
+
// ---------------------------AIChat Page------------------------------
let items = ref('')
-
-
+
+
function copyText(text) {
uni.setClipboardData({
@@ -299,50 +336,50 @@
}
async function chatAiGetToken() {
- const requestTask = ref()
- const userInfo = ref()
- // 获取 用户信息
-
- await getUserToken().then(res => {
- // console.log('获取到的getUserToken信息:', res.data);
- requestTask.value = res.data
- }).catch(err => {
- console.error('获取getUserToken失败:', err);
- });
- console.log('getUserToken执行完毕');
- // console.log('获取到的requestTask信息:', requestTask.value);
- await getUserInfo(requestTask.value).then(res => {
- // console.log('获取到的getUserInfo信息:', res.data);
- userInfo.value = res.data
- }).catch(err => {
- console.error('获取getUserInfo失败:', err);
- });
- console.log('getUserInfo执行完毕');
- await getModelList(requestTask.value.token).then(res => {
- // console.log('获取到的getUserInfo信息:', res.data);
- modelList.value = res.data
- chooseModel.value = res.data[0]
- }).catch(err => {
- console.error('获取getModelList失败:', err);
- });
- console.log('getModelList执行完毕');
- await getUserKey(userInfo.value, requestTask.value.refresh_token).then(res => {
- console.log('获取到的getUserKey信息:', res.data);
- userkey.value = res.data.key
- }).catch(err => {
- console.error('获取getUserKey失败:', err);
- });
- console.log('getUserKey执行完毕');
- }
+ const requestTask = ref()
+ const userInfo = ref()
+ // 获取 用户信息
+
+ await getUserToken().then(res => {
+ // console.log('获取到的getUserToken信息:', res.data);
+ requestTask.value = res.data
+ }).catch(err => {
+ console.error('获取getUserToken失败:', err);
+ });
+ console.log('getUserToken执行完毕');
+ // console.log('获取到的requestTask信息:', requestTask.value);
+ await getUserInfo(requestTask.value).then(res => {
+ // console.log('获取到的getUserInfo信息:', res.data);
+ userInfo.value = res.data
+ }).catch(err => {
+ console.error('获取getUserInfo失败:', err);
+ });
+ console.log('getUserInfo执行完毕');
+ await getModelList(requestTask.value.token).then(res => {
+ // console.log('获取到的getUserInfo信息:', res.data);
+ modelList.value = res.data
+ chooseModel.value = res.data[0]
+ }).catch(err => {
+ console.error('获取getModelList失败:', err);
+ });
+ console.log('getModelList执行完毕');
+ await getUserKey(userInfo.value, requestTask.value.refresh_token).then(res => {
+ console.log('获取到的getUserKey信息:', res.data);
+ userkey.value = res.data.key
+ }).catch(err => {
+ console.error('获取getUserKey失败:', err);
+ });
+ console.log('getUserKey执行完毕');
+ }
function chooseImage() {
- uni.showToast({
- icon: "error",
- title: '您没有输入',
- duration: 2000
- });
- }
+ uni.showToast({
+ icon: "error",
+ title: '您没有输入',
+ duration: 2000
+ });
+ }
// 初始化 modelList 为一个空数组
const popup = ref(false)
@@ -395,7 +432,7 @@
const userkey = ref('')
const StreamRequest = (content) => {
-
+
return new Promise((resolve, reject) => {
const requestTask = uni.request({
@@ -404,7 +441,7 @@
data: {
"messages": content,
- "model": chooseModel.value ,
+ "model": chooseModel.value,
"stream": true,
"features": {
"thinking_enabled": false
@@ -477,7 +514,7 @@
msgList.value[index].content = msg.value
items.value = "items-" + (msgList.value.length - 1)
msgStatu.value = false
-
+
}
const msgStatu = ref(true)
function msgSend() {
@@ -489,7 +526,7 @@
});
return 0
}
-
+
// console.log(chooseModel.value)
if (chooseModel.value == undefined) {
uni.showToast({
@@ -521,7 +558,7 @@
"role": "system"
})
msg.value = ''
-
+ console.log(msgList.value)
}