2025/2/24
BIN
20250224myself.png
Normal file
After Width: | Height: | Size: 123 KiB |
145
dist/dev/mp-weixin/components/firstui/fui-gallery/fui-gallery.js
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "fui-gallery",
|
||||
emits: ["change", "hide"],
|
||||
props: {
|
||||
urls: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
srcKey: {
|
||||
type: String,
|
||||
default: "src"
|
||||
},
|
||||
descrKey: {
|
||||
type: String,
|
||||
default: "descr"
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
current: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
//文字超出是否省略成一行
|
||||
ellipsis: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
zIndex: {
|
||||
type: [Number, String],
|
||||
default: 1001
|
||||
},
|
||||
//是否适配底部安全区
|
||||
safeArea: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
urls(newVal, oldVal) {
|
||||
this.initData(newVal);
|
||||
},
|
||||
current(newVal) {
|
||||
this.defActive = this.active;
|
||||
let val = Number(newVal);
|
||||
setTimeout(() => {
|
||||
this.defActive = val;
|
||||
this.active = val;
|
||||
}, 20);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let sys = common_vendor.index.getSystemInfoSync();
|
||||
this.height = sys.windowHeight;
|
||||
this.top = sys.statusBarHeight + 20;
|
||||
this.defActive = Number(this.current);
|
||||
this.active = this.defActive;
|
||||
this.initData(this.urls);
|
||||
},
|
||||
data() {
|
||||
let isNvue = false;
|
||||
return {
|
||||
isNvue,
|
||||
imgUrls: [],
|
||||
active: 0,
|
||||
defActive: 0,
|
||||
top: 20,
|
||||
descr: "",
|
||||
iphoneX: false,
|
||||
height: 800
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
initData(vals) {
|
||||
if (vals && vals.length > 0) {
|
||||
if (typeof vals[0] === "string") {
|
||||
vals = vals.map((item) => {
|
||||
return {
|
||||
[this.srcKey]: item
|
||||
};
|
||||
});
|
||||
}
|
||||
this.imgUrls = vals;
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.getDescr(this.active);
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
},
|
||||
change(e) {
|
||||
this.active = e.detail.current;
|
||||
this.getDescr(this.active);
|
||||
this.$emit("change", {
|
||||
index: this.active
|
||||
});
|
||||
},
|
||||
getDescr(index) {
|
||||
let item = this.imgUrls[index];
|
||||
if (item) {
|
||||
this.descr = item[this.descrKey] || "";
|
||||
}
|
||||
},
|
||||
hideGallery() {
|
||||
this.$emit("hide", {});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.show || !$data.isNvue
|
||||
}, $props.show || !$data.isNvue ? common_vendor.e({
|
||||
b: common_vendor.f($data.imgUrls, (item, index, i0) => {
|
||||
return {
|
||||
a: item[$props.srcKey],
|
||||
b: common_vendor.o((...args) => $options.hideGallery && $options.hideGallery(...args), index),
|
||||
c: index
|
||||
};
|
||||
}),
|
||||
c: $data.height + "px",
|
||||
d: $data.height + "px",
|
||||
e: $data.height + "px",
|
||||
f: $data.height + "px",
|
||||
g: common_vendor.o((...args) => $options.change && $options.change(...args)),
|
||||
h: $data.defActive,
|
||||
i: common_vendor.t($data.active + 1),
|
||||
j: common_vendor.t($data.imgUrls.length),
|
||||
k: $data.top + "px",
|
||||
l: $data.descr
|
||||
}, $data.descr ? {
|
||||
m: common_vendor.t($data.descr),
|
||||
n: $props.ellipsis ? 1 : "",
|
||||
o: $data.iphoneX && $props.safeArea ? 1 : ""
|
||||
} : {}, {
|
||||
p: $props.zIndex,
|
||||
q: common_vendor.n($props.show ? "fui-gallery__show" : "fui-gallery__hidden")
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c9e13cde"]]);
|
||||
wx.createComponent(Component);
|
4
dist/dev/mp-weixin/components/firstui/fui-gallery/fui-gallery.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
1
dist/dev/mp-weixin/components/firstui/fui-gallery/fui-gallery.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" style="{{'z-index:' + p + ';' + virtualHostStyle}}" class="{{['fui-gallery__wrap', 'data-v-c9e13cde', q, virtualHostClass]}}"><swiper class="fui-gallery__img-wrap data-v-c9e13cde" style="{{'height:' + f}}" indicator-dots="{{false}}" bindchange="{{g}}" current="{{h}}" autoplay="{{false}}" duration="{{500}}"><swiper-item wx:for="{{b}}" wx:for-item="item" wx:key="c" class="data-v-c9e13cde" style="{{'height:' + e}}"><view class="fui-gallery__swiper-item data-v-c9e13cde" style="{{'height:' + d}}"><image mode="aspectFit" class="fui-gallery__img data-v-c9e13cde" style="{{'height:' + c}}" src="{{item.a}}" catchtap="{{item.b}}"></image></view></swiper-item></swiper><view class="fui-gallery__index-wrap data-v-c9e13cde" style="{{'top:' + k}}"><text class="fui-gallery__index data-v-c9e13cde">{{i}}/{{j}}</text></view><view wx:if="{{l}}" class="{{['fui-gallery__descr-wrap', 'data-v-c9e13cde', o && 'fui-gallery__weex-safe']}}"><text class="{{['fui-gallery__descr', 'data-v-c9e13cde', n && 'fui-gallery__text-ellipsis']}}">{{m}}</text></view></view>
|
94
dist/dev/mp-weixin/components/firstui/fui-gallery/fui-gallery.wxss
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
.fui-gallery__wrap.data-v-c9e13cde {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #000;
|
||||
}
|
||||
.fui-gallery__img-wrap.data-v-c9e13cde {
|
||||
|
||||
width: 100%;
|
||||
|
||||
flex: 1;
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
}
|
||||
.fui-gallery__swiper-item.data-v-c9e13cde {
|
||||
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.fui-gallery__hidden.data-v-c9e13cde {
|
||||
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
.fui-gallery__show.data-v-c9e13cde {
|
||||
|
||||
display: flex;
|
||||
visibility: visible;
|
||||
|
||||
flex-direction: column;
|
||||
}
|
||||
.fui-gallery__index-wrap.data-v-c9e13cde {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.fui-gallery__index.data-v-c9e13cde {
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
font-size: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 100px;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
}
|
||||
.fui-gallery__descr-wrap.data-v-c9e13cde {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(17, 17, 17, .6);
|
||||
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
.fui-gallery__descr.data-v-c9e13cde {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
font-weight: normal;
|
||||
padding: 26rpx 32rpx;
|
||||
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
z-index: 10;
|
||||
}
|
||||
.fui-gallery__text-ellipsis.data-v-c9e13cde {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
.fui-gallery__img.data-v-c9e13cde {
|
||||
|
||||
width: 100%;
|
||||
}
|
@ -9,6 +9,7 @@ if (!Array) {
|
||||
const _easycom_fui_tabs2 = common_vendor.resolveComponent("fui-tabs");
|
||||
const _easycom_fui_sticky2 = common_vendor.resolveComponent("fui-sticky");
|
||||
const _easycom_fui_section2 = common_vendor.resolveComponent("fui-section");
|
||||
const _easycom_fui_gallery2 = common_vendor.resolveComponent("fui-gallery");
|
||||
const _easycom_fui_icon2 = common_vendor.resolveComponent("fui-icon");
|
||||
const _easycom_fui_load_ani2 = common_vendor.resolveComponent("fui-load-ani");
|
||||
const _easycom_fui_collapse_item2 = common_vendor.resolveComponent("fui-collapse-item");
|
||||
@ -16,12 +17,13 @@ if (!Array) {
|
||||
const _easycom_fui_timeaxis2 = common_vendor.resolveComponent("fui-timeaxis");
|
||||
const _easycom_fui_waterfall_item2 = common_vendor.resolveComponent("fui-waterfall-item");
|
||||
const _easycom_fui_waterfall2 = common_vendor.resolveComponent("fui-waterfall");
|
||||
(_easycom_fui_background_image2 + _easycom_fui_tabs2 + _easycom_fui_sticky2 + _easycom_fui_section2 + _easycom_fui_icon2 + _easycom_fui_load_ani2 + _easycom_fui_collapse_item2 + _easycom_fui_timeaxis_node2 + _easycom_fui_timeaxis2 + _easycom_fui_waterfall_item2 + _easycom_fui_waterfall2)();
|
||||
(_easycom_fui_background_image2 + _easycom_fui_tabs2 + _easycom_fui_sticky2 + _easycom_fui_section2 + _easycom_fui_gallery2 + _easycom_fui_icon2 + _easycom_fui_load_ani2 + _easycom_fui_collapse_item2 + _easycom_fui_timeaxis_node2 + _easycom_fui_timeaxis2 + _easycom_fui_waterfall_item2 + _easycom_fui_waterfall2)();
|
||||
}
|
||||
const _easycom_fui_background_image = () => "../../../components/firstui/fui-background-image/fui-background-image.js";
|
||||
const _easycom_fui_tabs = () => "../../../components/firstui/fui-tabs/fui-tabs.js";
|
||||
const _easycom_fui_sticky = () => "../../../components/firstui/fui-sticky/fui-sticky.js";
|
||||
const _easycom_fui_section = () => "../../../components/firstui/fui-section/fui-section.js";
|
||||
const _easycom_fui_gallery = () => "../../../components/firstui/fui-gallery/fui-gallery.js";
|
||||
const _easycom_fui_icon = () => "../../../components/firstui/fui-icon/fui-icon.js";
|
||||
const _easycom_fui_load_ani = () => "../../../components/firstui/fui-load-ani/fui-load-ani.js";
|
||||
const _easycom_fui_collapse_item = () => "../../../components/firstui/fui-collapse-item/fui-collapse-item.js";
|
||||
@ -30,7 +32,7 @@ const _easycom_fui_timeaxis = () => "../../../components/firstui/fui-timeaxis/fu
|
||||
const _easycom_fui_waterfall_item = () => "../../../components/firstui/fui-waterfall-item/fui-waterfall-item.js";
|
||||
const _easycom_fui_waterfall = () => "../../../components/firstui/fui-waterfall/fui-waterfall.js";
|
||||
if (!Math) {
|
||||
(_easycom_fui_background_image + _easycom_fui_tabs + _easycom_fui_sticky + _easycom_fui_section + _easycom_fui_icon + _easycom_fui_load_ani + _easycom_fui_collapse_item + _easycom_fui_timeaxis_node + _easycom_fui_timeaxis + _easycom_fui_waterfall_item + _easycom_fui_waterfall)();
|
||||
(_easycom_fui_background_image + _easycom_fui_tabs + _easycom_fui_sticky + _easycom_fui_section + _easycom_fui_gallery + _easycom_fui_icon + _easycom_fui_load_ani + _easycom_fui_collapse_item + _easycom_fui_timeaxis_node + _easycom_fui_timeaxis + _easycom_fui_waterfall_item + _easycom_fui_waterfall)();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "history_fui",
|
||||
@ -113,8 +115,15 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
currentTabIndex.value = e.index;
|
||||
}
|
||||
const show = common_vendor.ref(false);
|
||||
function showGallery() {
|
||||
common_vendor.ref();
|
||||
const GalleryPic = common_vendor.ref();
|
||||
function showGallery(data) {
|
||||
show.value = true;
|
||||
GalleryPic.value = data;
|
||||
console.log(GalleryPic.value);
|
||||
}
|
||||
function hideGallery() {
|
||||
show.value = false;
|
||||
}
|
||||
function linkType(url) {
|
||||
if (typeof url !== "string")
|
||||
@ -190,12 +199,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
}),
|
||||
f: currentTabIndex.value == 0
|
||||
}, currentTabIndex.value == 0 ? {
|
||||
g: common_vendor.f(historyData.value, (item, index, i0) => {
|
||||
g: common_vendor.o(hideGallery),
|
||||
h: common_vendor.p({
|
||||
urls: GalleryPic.value,
|
||||
show: show.value
|
||||
}),
|
||||
i: common_vendor.f(historyData.value, (item, index, i0) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
return common_vendor.e({
|
||||
a: item.status == 2
|
||||
}, item.status == 2 ? {
|
||||
b: "56f14cc7-6-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
b: "56f14cc7-7-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
c: common_vendor.p({
|
||||
name: "clear-fill",
|
||||
size: 28,
|
||||
@ -204,7 +218,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
} : {}, {
|
||||
d: item.status == 1
|
||||
}, item.status == 1 ? {
|
||||
e: "56f14cc7-7-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
e: "56f14cc7-8-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
f: common_vendor.p({
|
||||
name: "face",
|
||||
size: 28,
|
||||
@ -213,96 +227,98 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
} : {}, {
|
||||
g: item.status == 0
|
||||
}, item.status == 0 ? {
|
||||
h: "56f14cc7-8-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
h: "56f14cc7-9-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
i: common_vendor.p({
|
||||
type: "3"
|
||||
})
|
||||
} : {}, {
|
||||
j: linkType(item.output[0]) == 0
|
||||
}, linkType(item.output[0]) == 0 ? {
|
||||
k: "56f14cc7-9-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
k: "56f14cc7-10-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
l: common_vendor.p({
|
||||
title: "提示词",
|
||||
descr: (_a = item.params) == null ? void 0 : _a.positive,
|
||||
descrSize: "32",
|
||||
descrColor: "#000000"
|
||||
}),
|
||||
m: common_vendor.o(showGallery, index),
|
||||
n: _ctx.scaleToFill,
|
||||
o: item.output[0],
|
||||
p: common_vendor.o(($event) => removeHistoryRecord(item._id), index),
|
||||
q: "56f14cc7-10-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
r: common_vendor.p({
|
||||
m: common_vendor.f(item.output, (pic, picIndex, i1) => {
|
||||
return {
|
||||
a: pic
|
||||
};
|
||||
}),
|
||||
n: common_vendor.o(($event) => showGallery(historyData.value[index].output)),
|
||||
o: common_vendor.o(($event) => removeHistoryRecord(item.id), index),
|
||||
p: "56f14cc7-11-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
q: common_vendor.p({
|
||||
color: "#ff0000",
|
||||
name: "delete"
|
||||
})
|
||||
} : linkType(item.output[0]) == 1 ? {
|
||||
t: "56f14cc7-11-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
v: common_vendor.p({
|
||||
s: "56f14cc7-12-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
t: common_vendor.p({
|
||||
title: "提示词",
|
||||
descr: (_b = item.params) == null ? void 0 : _b.positive
|
||||
}),
|
||||
w: item.output[0],
|
||||
x: common_vendor.o(($event) => removeHistoryRecord(item._id), index),
|
||||
y: "56f14cc7-12-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
z: common_vendor.p({
|
||||
v: item.output[0],
|
||||
w: common_vendor.o(($event) => removeHistoryRecord(item._id), index),
|
||||
x: "56f14cc7-13-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
y: common_vendor.p({
|
||||
color: "#ff0000",
|
||||
name: "delete"
|
||||
}),
|
||||
A: common_vendor.o(($event) => dowonVideo(item.output[0]), index),
|
||||
B: "56f14cc7-13-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
C: common_vendor.p({
|
||||
z: common_vendor.o(($event) => dowonVideo(item.output[0]), index),
|
||||
A: "56f14cc7-14-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
B: common_vendor.p({
|
||||
color: "#e0e0e0",
|
||||
name: "pulldown"
|
||||
})
|
||||
} : {
|
||||
D: "56f14cc7-14-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
E: common_vendor.p({
|
||||
C: "56f14cc7-15-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
D: common_vendor.p({
|
||||
title: "提示词",
|
||||
descrSize: "32",
|
||||
descrColor: "#000000",
|
||||
descr: (_c = item.params) == null ? void 0 : _c.positive
|
||||
}),
|
||||
F: ((_d = item.params) == null ? void 0 : _d.image_path_mask) || ((_e = item.params) == null ? void 0 : _e.image_path_origin) || testData,
|
||||
G: common_vendor.o(($event) => removeHistoryRecord(item._id), index),
|
||||
H: "56f14cc7-15-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
I: common_vendor.p({
|
||||
E: ((_d = item.params) == null ? void 0 : _d.image_path_mask) || ((_e = item.params) == null ? void 0 : _e.image_path_origin) || testData,
|
||||
F: common_vendor.o(($event) => removeHistoryRecord(item.id), index),
|
||||
G: "56f14cc7-16-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
H: common_vendor.p({
|
||||
color: "#ff0000",
|
||||
name: "delete"
|
||||
}),
|
||||
J: common_vendor.o(($event) => handleClick(item.output[0]), index),
|
||||
K: common_vendor.t(item.output[0]),
|
||||
L: "56f14cc7-16-" + i0 + "," + ("56f14cc7-5-" + i0),
|
||||
M: common_vendor.p({
|
||||
I: common_vendor.o(($event) => handleClick(item.output[0]), index),
|
||||
J: common_vendor.t(item.output[0]),
|
||||
K: "56f14cc7-17-" + i0 + "," + ("56f14cc7-6-" + i0),
|
||||
L: common_vendor.p({
|
||||
background: "transparent "
|
||||
})
|
||||
}, {
|
||||
s: linkType(item.output[0]) == 1,
|
||||
N: index,
|
||||
O: "56f14cc7-5-" + i0 + ",56f14cc7-4"
|
||||
r: linkType(item.output[0]) == 1,
|
||||
M: index,
|
||||
N: "56f14cc7-6-" + i0 + ",56f14cc7-5"
|
||||
});
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
j: common_vendor.p({
|
||||
padding: ["32rpx", "16rpx"]
|
||||
})
|
||||
} : {}, {
|
||||
i: currentTabIndex.value == 1
|
||||
k: currentTabIndex.value == 1
|
||||
}, currentTabIndex.value == 1 ? {
|
||||
j: common_vendor.f(historyData.value, (item, index, i0) => {
|
||||
l: common_vendor.f(historyData.value, (item, index, i0) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: linkType(item.output[0]) == 0
|
||||
}, linkType(item.output[0]) == 0 ? {
|
||||
b: _ctx.scaleToFill,
|
||||
c: item.output[0]
|
||||
b: item.output[0]
|
||||
} : linkType(item.output[0]) == 1 ? {
|
||||
e: item.output[0]
|
||||
d: item.output[0]
|
||||
} : {
|
||||
f: ((_a = item.params) == null ? void 0 : _a.image_path_mask) || ((_b = item.params) == null ? void 0 : _b.image_path_origin) || testData
|
||||
e: ((_a = item.params) == null ? void 0 : _a.image_path_mask) || ((_b = item.params) == null ? void 0 : _b.image_path_origin) || testData
|
||||
}, {
|
||||
d: linkType(item.output[0]) == 1,
|
||||
g: index,
|
||||
h: "56f14cc7-18-" + i0 + ",56f14cc7-17"
|
||||
c: linkType(item.output[0]) == 1,
|
||||
f: index,
|
||||
g: "56f14cc7-19-" + i0 + ",56f14cc7-18"
|
||||
});
|
||||
})
|
||||
} : {});
|
||||
|
@ -5,6 +5,7 @@
|
||||
"fui-tabs": "../../../components/firstui/fui-tabs/fui-tabs",
|
||||
"fui-sticky": "../../../components/firstui/fui-sticky/fui-sticky",
|
||||
"fui-section": "../../../components/firstui/fui-section/fui-section",
|
||||
"fui-gallery": "../../../components/firstui/fui-gallery/fui-gallery",
|
||||
"fui-icon": "../../../components/firstui/fui-icon/fui-icon",
|
||||
"fui-load-ani": "../../../components/firstui/fui-load-ani/fui-load-ani",
|
||||
"fui-collapse-item": "../../../components/firstui/fui-collapse-item/fui-collapse-item",
|
||||
|
@ -33,7 +33,6 @@
|
||||
}
|
||||
.fui-logo.data-v-56f14cc7 {
|
||||
width: 300rpx;
|
||||
height: 400rpx;
|
||||
margin-right: 24rpx;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
132
dist/dev/mp-weixin/pages/index/index.js
vendored
@ -41,11 +41,10 @@ const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/
|
||||
const _easycom_up_cell = () => "../../node-modules/uview-plus/components/u-cell/u-cell.js";
|
||||
const _easycom_up_cell_group = () => "../../node-modules/uview-plus/components/u-cell-group/u-cell-group.js";
|
||||
if (!Math) {
|
||||
(_easycom_fui_tabs + _easycom_fui_nav_bar + fuiBackgroundImage + AppSwiper + _easycom_up_gap + AppTags + AppWaterFall + _easycom_up_status_bar + MyGraphicCard + BaseLayout + _easycom_fui_footer + _easycom_fui_avatar + _easycom_fui_load_ani + _easycom_fui_icon + _easycom_fui_picker + _easycom_fui_safe_area + _easycom_up_avatar + UserMemberInfo + GetUserInfoPopup + _easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group + TnIcon)();
|
||||
(_easycom_fui_tabs + _easycom_fui_nav_bar + fuiBackgroundImage + AppSwiper + _easycom_up_gap + AppTags + AppWaterFall + _easycom_up_status_bar + MyGraphicCard + BaseLayout + _easycom_fui_footer + _easycom_fui_avatar + _easycom_fui_load_ani + _easycom_fui_icon + _easycom_fui_picker + _easycom_fui_safe_area + _easycom_up_avatar + UserMemberInfo + GetUserInfoPopup + _easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group)();
|
||||
}
|
||||
const BaseLayout = () => "../../layouts/BaseLayout.js";
|
||||
const GetUserInfoPopup = () => "../../components/GetUserInfoPopup.js";
|
||||
const TnIcon = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
|
||||
const UserMemberInfo = () => "../../components/home/UserMemberInfo.js";
|
||||
const MyGraphicCard = () => "../../components/custom/MyGraphicCard/MyGraphicCard.js";
|
||||
const AppSwiper = () => "../../components/home/AppSwiper.js";
|
||||
@ -132,7 +131,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
const content = common_vendor.ref("");
|
||||
const msgList = common_vendor.ref([
|
||||
{
|
||||
"content": "你好我是Ai聊天助手,有什么问题问我吧!(温馨提示:长按消息可以复制文本哦)",
|
||||
"content": "你好我是Ai聊天助手,有什么问题问我吧!(温馨提示:点击消息可以复制哦)",
|
||||
"role": "system"
|
||||
}
|
||||
]);
|
||||
@ -249,6 +248,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
"role": "system"
|
||||
});
|
||||
msg.value = "";
|
||||
console.log(msgList.value);
|
||||
}
|
||||
common_vendor.onReady(() => {
|
||||
socketInit();
|
||||
@ -439,11 +439,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
current: pageindex.value,
|
||||
size: "28",
|
||||
fontWeight: "900",
|
||||
background: true
|
||||
background: "transparent"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
custom: true,
|
||||
background: true
|
||||
background: "transparent"
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
src: backGroundImage
|
||||
@ -451,16 +451,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
e: common_vendor.p({
|
||||
height: "10"
|
||||
}),
|
||||
f: common_vendor.o(img2pay),
|
||||
g: common_vendor.o(handleGotoHistory),
|
||||
h: common_vendor.p({
|
||||
f: common_vendor.p({
|
||||
height: "10"
|
||||
}),
|
||||
i: pageindex.value == 0,
|
||||
j: common_vendor.p({
|
||||
g: pageindex.value == 0,
|
||||
h: common_vendor.p({
|
||||
src: backGroundImage
|
||||
}),
|
||||
k: common_vendor.f(graphicDatas.value, (graphicData, k0, i0) => {
|
||||
i: common_vendor.f(graphicDatas.value, (graphicData, k0, i0) => {
|
||||
return {
|
||||
a: "83a5a03c-11-" + i0 + ",83a5a03c-9",
|
||||
b: common_vendor.p({
|
||||
@ -478,18 +476,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
})
|
||||
};
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
j: common_vendor.p({
|
||||
text: "Copyright © 2021 Fuzi-AI"
|
||||
}),
|
||||
m: pageindex.value == 1,
|
||||
n: common_vendor.p({
|
||||
k: pageindex.value == 1,
|
||||
l: common_vendor.p({
|
||||
src: backGroundImage
|
||||
}),
|
||||
o: common_vendor.f(msgList.value, (item, index, i0) => {
|
||||
m: common_vendor.f(msgList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "83a5a03c-14-" + i0,
|
||||
b: common_vendor.p({
|
||||
background: "#fff",
|
||||
background: "#f9f9f9",
|
||||
src: item.role == "system" ? "https://wangbo0808.oss-cn-shanghai.aliyuncs.com/assets/gpt4.png" : common_vendor.unref(user).avatar_url
|
||||
}),
|
||||
c: item.content.length > 1
|
||||
@ -512,95 +510,95 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
m: index
|
||||
});
|
||||
}),
|
||||
p: common_vendor.unref(items),
|
||||
q: common_vendor.t(chooseModel.value || modelList.value[0]),
|
||||
r: common_vendor.o(popupMth),
|
||||
s: common_vendor.p({
|
||||
n: common_vendor.unref(items),
|
||||
o: common_vendor.t(chooseModel.value || modelList.value[0]),
|
||||
p: common_vendor.o(popupMth),
|
||||
q: common_vendor.p({
|
||||
name: "message",
|
||||
color: "#3b3ee9"
|
||||
}),
|
||||
t: -1,
|
||||
v: common_vendor.o(msgSend),
|
||||
w: content.value,
|
||||
x: common_vendor.o(($event) => content.value = $event.detail.value),
|
||||
y: content.value.length == 0
|
||||
r: -1,
|
||||
s: common_vendor.o(msgSend),
|
||||
t: content.value,
|
||||
v: common_vendor.o(($event) => content.value = $event.detail.value),
|
||||
w: content.value.length == 0
|
||||
}, content.value.length == 0 ? {
|
||||
z: common_vendor.p({
|
||||
x: common_vendor.p({
|
||||
name: "clear",
|
||||
color: "#3b3ee9"
|
||||
})
|
||||
} : {
|
||||
A: common_vendor.o(msgSend)
|
||||
y: common_vendor.o(msgSend)
|
||||
}, {
|
||||
B: common_vendor.o(change),
|
||||
C: common_vendor.o(cancel),
|
||||
D: common_vendor.p({
|
||||
z: common_vendor.o(change),
|
||||
A: common_vendor.o(cancel),
|
||||
B: common_vendor.p({
|
||||
options: modelList.value,
|
||||
show: popup.value
|
||||
}),
|
||||
E: !_ctx.focus
|
||||
}, !_ctx.focus ? {
|
||||
F: common_vendor.p({
|
||||
C: common_vendor.p({
|
||||
background: "#f8f8f8"
|
||||
})
|
||||
} : {}, {
|
||||
G: pageindex.value == 2,
|
||||
H: common_vendor.p({
|
||||
}),
|
||||
D: pageindex.value == 2,
|
||||
E: common_vendor.p({
|
||||
src: backGroundImage
|
||||
}),
|
||||
I: common_vendor.p({
|
||||
F: common_vendor.p({
|
||||
src: common_vendor.unref(user).avatar_url,
|
||||
size: "80"
|
||||
}),
|
||||
J: !common_vendor.unref(composables_useCommon.isLogin)
|
||||
G: !common_vendor.unref(composables_useCommon.isLogin)
|
||||
}, !common_vendor.unref(composables_useCommon.isLogin) ? {} : {}, {
|
||||
K: common_vendor.unref(composables_useCommon.isLogin)
|
||||
H: common_vendor.unref(composables_useCommon.isLogin)
|
||||
}, common_vendor.unref(composables_useCommon.isLogin) ? {
|
||||
L: common_vendor.t(common_vendor.unref(user).nickname)
|
||||
I: common_vendor.t(common_vendor.unref(user).nickname)
|
||||
} : {}, {
|
||||
M: common_vendor.unref(composables_useCommon.isLogin)
|
||||
J: common_vendor.unref(composables_useCommon.isLogin)
|
||||
}, common_vendor.unref(composables_useCommon.isLogin) ? {
|
||||
N: common_vendor.t(common_vendor.unref(user).balance)
|
||||
K: common_vendor.t(common_vendor.unref(user).balance)
|
||||
} : {}, {
|
||||
O: common_vendor.p({
|
||||
L: common_vendor.p({
|
||||
name: "scan",
|
||||
color: "#969799",
|
||||
size: "28"
|
||||
}),
|
||||
P: common_vendor.o(toEmpty),
|
||||
Q: common_vendor.p({
|
||||
M: common_vendor.o(toEmpty),
|
||||
N: common_vendor.p({
|
||||
name: "arrow-right",
|
||||
color: "#969799",
|
||||
size: "28"
|
||||
}),
|
||||
R: common_vendor.o(toEmpty),
|
||||
S: common_vendor.o(handleLogin),
|
||||
T: common_vendor.o(($event) => showPay.value = true),
|
||||
U: common_vendor.p({
|
||||
icon: "rmb-circle",
|
||||
title: "算力充值",
|
||||
O: common_vendor.o(toEmpty),
|
||||
P: common_vendor.o(handleLogin),
|
||||
Q: common_vendor.o(img2pay),
|
||||
R: common_vendor.p({
|
||||
size: "30",
|
||||
name: "https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Gallery.png"
|
||||
}),
|
||||
S: common_vendor.o(handleGotoHistory),
|
||||
T: common_vendor.p({
|
||||
border: false
|
||||
}),
|
||||
U: common_vendor.p({
|
||||
size: "30",
|
||||
name: "https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Chat.png"
|
||||
}),
|
||||
V: common_vendor.p({
|
||||
border: false
|
||||
}),
|
||||
V: common_vendor.o(handleGotoHistory),
|
||||
W: common_vendor.p({
|
||||
border: false,
|
||||
icon: "photo",
|
||||
title: "绘图历史"
|
||||
size: "30",
|
||||
name: "https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Home.png"
|
||||
}),
|
||||
X: common_vendor.p({
|
||||
name: "logout"
|
||||
X: common_vendor.o(handleLoginOut),
|
||||
Y: common_vendor.p({
|
||||
border: false
|
||||
}),
|
||||
Y: common_vendor.o(handleLoginOut),
|
||||
Z: common_vendor.p({
|
||||
border: false,
|
||||
icon: "setting",
|
||||
title: "退出登录"
|
||||
color: "#fff",
|
||||
border: false
|
||||
}),
|
||||
aa: common_vendor.p({
|
||||
icon: "chat-fill",
|
||||
title: "微信客服"
|
||||
}),
|
||||
ab: pageindex.value == 3
|
||||
aa: pageindex.value == 3
|
||||
});
|
||||
};
|
||||
}
|
||||
|
1
dist/dev/mp-weixin/pages/index/index.json
vendored
@ -18,7 +18,6 @@
|
||||
"up-cell-group": "../../node-modules/uview-plus/components/u-cell-group/u-cell-group",
|
||||
"base-layout": "../../layouts/BaseLayout",
|
||||
"get-user-info-popup": "../../components/GetUserInfoPopup",
|
||||
"tn-icon": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon",
|
||||
"user-member-info": "../../components/home/UserMemberInfo",
|
||||
"my-graphic-card": "../../components/custom/MyGraphicCard/MyGraphicCard",
|
||||
"app-swiper": "../../components/home/AppSwiper",
|
||||
|
4
dist/dev/mp-weixin/pages/index/index.wxml
vendored
BIN
dist/dev/mp-weixin/static/Home2 (1).jpg
vendored
Before Width: | Height: | Size: 56 KiB |
BIN
dist/dev/mp-weixin/static/images/Home.jpg
vendored
Before Width: | Height: | Size: 82 KiB |
BIN
dist/dev/mp-weixin/static/images/Home2.jpg
vendored
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB |
BIN
dist/dev/mp-weixin/static/images/common/img_logo.png
vendored
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 12 KiB |
BIN
dist/dev/mp-weixin/static/images/common/logo.png
vendored
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 969 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
dist/dev/mp-weixin/static/logo.png
vendored
Before Width: | Height: | Size: 3.9 KiB |
BIN
dist/dev/mp-weixin/static/画板 2 (1) (1).png
vendored
Before Width: | Height: | Size: 138 KiB |
BIN
dist/dev/mp-weixin/static/画板 3 (1).png
vendored
Before Width: | Height: | Size: 142 KiB |
121
node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
// @ts-nocheck
|
||||
export {};
|
||||
|
||||
; declare global {
|
||||
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
||||
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
|
||||
const __VLS_unref: typeof import('vue').unref;
|
||||
const __VLS_placeholder: any;
|
||||
|
||||
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
|
||||
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
||||
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
||||
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
||||
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
||||
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
||||
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
||||
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
|
||||
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
||||
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
||||
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
||||
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
|
||||
Self extends object ? { [K in N0]: Self } :
|
||||
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
|
||||
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
||||
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
||||
{ [K in N0]: unknown };
|
||||
type __VLS_FunctionalComponentProps<T, K> =
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P :
|
||||
{};
|
||||
type __VLS_IsFunction<T, K> = K extends keyof T
|
||||
? __VLS_IsAny<T[K]> extends false
|
||||
? unknown extends T[K]
|
||||
? false
|
||||
: true
|
||||
: false
|
||||
: false;
|
||||
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
||||
__VLS_IsFunction<Props, onEvent> extends true
|
||||
? Props
|
||||
: __VLS_IsFunction<Events, Event> extends true
|
||||
? { [K in onEvent]?: Events[Event] }
|
||||
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Events[CamelizedEvent] }
|
||||
: Props
|
||||
) & Record<string, unknown>;
|
||||
// fix https://github.com/vuejs/language-tools/issues/926
|
||||
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
||||
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
|
||||
? U extends T
|
||||
? never
|
||||
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
|
||||
: never;
|
||||
type __VLS_OverloadUnion<T> = Exclude<
|
||||
__VLS_OverloadUnionInner<(() => never) & T>,
|
||||
T extends () => never ? never : () => never
|
||||
>;
|
||||
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
|
||||
? F extends (event: infer E, ...args: infer A) => any
|
||||
? { [K in E & string]: (...args: A) => void; }
|
||||
: never
|
||||
: never;
|
||||
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
|
||||
__VLS_UnionToIntersection<
|
||||
__VLS_ConstructorOverloads<T> & {
|
||||
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
|
||||
}
|
||||
>
|
||||
>;
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
||||
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>>;
|
||||
type __VLS_OmitStringIndex<T> = {
|
||||
[K in keyof T as string extends K ? never : K]: T[K];
|
||||
};
|
||||
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||
|
||||
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||
item: T extends number ? number
|
||||
: T extends string ? string
|
||||
: T extends any[] ? T[number]
|
||||
: T extends Iterable<infer T1> ? T1
|
||||
: any,
|
||||
index: number,
|
||||
][];
|
||||
function __VLS_getVForSourceType<T>(source: T): [
|
||||
item: T[keyof T],
|
||||
key: keyof T,
|
||||
index: number,
|
||||
][];
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
||||
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
||||
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||
: T extends (...args: any) => any
|
||||
? T
|
||||
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||
T extends new (...args: any) => any
|
||||
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, 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<string, unknown>;
|
||||
}
|
||||
}
|
||||
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||
: T extends (...args: any) => any ? T
|
||||
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||
function __VLS_asFunctionalSlot<S>(slot: S): (props: NonNullable<S> extends (props: infer P) => any ? P : {}) => void;
|
||||
function __VLS_tryAsConstant<const T>(t: T): T;
|
||||
}
|
121
node_modules/.vue-global-types/vue_99_0_0_0.d.ts
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
// @ts-nocheck
|
||||
export {};
|
||||
|
||||
; declare global {
|
||||
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
||||
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
|
||||
const __VLS_unref: typeof import('vue').unref;
|
||||
const __VLS_placeholder: any;
|
||||
|
||||
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
|
||||
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
||||
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
||||
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
||||
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
||||
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
||||
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
||||
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
|
||||
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
||||
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
||||
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
||||
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
|
||||
Self extends object ? { [K in N0]: Self } :
|
||||
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
|
||||
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
||||
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
||||
{ [K in N0]: unknown };
|
||||
type __VLS_FunctionalComponentProps<T, K> =
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P :
|
||||
{};
|
||||
type __VLS_IsFunction<T, K> = K extends keyof T
|
||||
? __VLS_IsAny<T[K]> extends false
|
||||
? unknown extends T[K]
|
||||
? false
|
||||
: true
|
||||
: false
|
||||
: false;
|
||||
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
||||
__VLS_IsFunction<Props, onEvent> extends true
|
||||
? Props
|
||||
: __VLS_IsFunction<Events, Event> extends true
|
||||
? { [K in onEvent]?: Events[Event] }
|
||||
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Events[CamelizedEvent] }
|
||||
: Props
|
||||
) & Record<string, unknown>;
|
||||
// fix https://github.com/vuejs/language-tools/issues/926
|
||||
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
||||
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
|
||||
? U extends T
|
||||
? never
|
||||
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
|
||||
: never;
|
||||
type __VLS_OverloadUnion<T> = Exclude<
|
||||
__VLS_OverloadUnionInner<(() => never) & T>,
|
||||
T extends () => never ? never : () => never
|
||||
>;
|
||||
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
|
||||
? F extends (event: infer E, ...args: infer A) => any
|
||||
? { [K in E & string]: (...args: A) => void; }
|
||||
: never
|
||||
: never;
|
||||
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
|
||||
__VLS_UnionToIntersection<
|
||||
__VLS_ConstructorOverloads<T> & {
|
||||
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
|
||||
}
|
||||
>
|
||||
>;
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
||||
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>>;
|
||||
type __VLS_OmitStringIndex<T> = {
|
||||
[K in keyof T as string extends K ? never : K]: T[K];
|
||||
};
|
||||
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||
|
||||
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||
item: T extends number ? number
|
||||
: T extends string ? string
|
||||
: T extends any[] ? T[number]
|
||||
: T extends Iterable<infer T1> ? T1
|
||||
: any,
|
||||
index: number,
|
||||
][];
|
||||
function __VLS_getVForSourceType<T>(source: T): [
|
||||
item: T[keyof T],
|
||||
key: keyof T,
|
||||
index: number,
|
||||
][];
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
||||
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
||||
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||
: T extends (...args: any) => any
|
||||
? T
|
||||
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||
T extends new (...args: any) => any
|
||||
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, 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<string, unknown>;
|
||||
}
|
||||
}
|
||||
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||
: T extends (...args: any) => any ? T
|
||||
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||
function __VLS_asFunctionalSlot<S>(slot: S): (props: NonNullable<S> extends (props: infer P) => any ? P : {}) => void;
|
||||
function __VLS_tryAsConstant<const T>(t: T): T;
|
||||
}
|
284
src/components/firstui/fui-gallery/fui-gallery.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<!--本文件由FirstUI授权予佛山市航电梦联网络科技有限公司(会员ID:11 27,营业执照号: 9 1 44060 5 MA 5 5 6H 1 K X H)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
|
||||
<view class="fui-gallery__wrap" :style="{zIndex:zIndex}" :class="[show?'fui-gallery__show':'fui-gallery__hidden']"
|
||||
v-if="show || !isNvue">
|
||||
<swiper class="fui-gallery__img-wrap" :style="{height:height+'px'}" :indicator-dots="false" @change="change"
|
||||
:current="defActive" :autoplay="false" :duration="500">
|
||||
<swiper-item :style="{height:height+'px'}" v-for="(item,index) in imgUrls" :key="index">
|
||||
<view class="fui-gallery__swiper-item" :style="{height:height+'px'}">
|
||||
<image mode="aspectFit" class="fui-gallery__img" :style="{height:height+'px'}" :src="item[srcKey]"
|
||||
@tap.stop="hideGallery"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="fui-gallery__index-wrap" :style="{top:top+'px'}">
|
||||
<text class="fui-gallery__index">{{active+1}}/{{imgUrls.length}}</text>
|
||||
</view>
|
||||
<view class="fui-gallery__descr-wrap" :class="{'fui-gallery__weex-safe':iphoneX && safeArea}" v-if="descr">
|
||||
<text class="fui-gallery__descr" :class="{'fui-gallery__text-ellipsis':ellipsis}">{{descr}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'fui-gallery',
|
||||
emits: ['change', 'hide'],
|
||||
props: {
|
||||
urls: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
srcKey: {
|
||||
type: String,
|
||||
default: 'src'
|
||||
},
|
||||
descrKey: {
|
||||
type: String,
|
||||
default: 'descr'
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
current: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
//文字超出是否省略成一行
|
||||
ellipsis: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
zIndex: {
|
||||
type: [Number, String],
|
||||
default: 1001
|
||||
},
|
||||
//是否适配底部安全区
|
||||
safeArea: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
urls(newVal, oldVal) {
|
||||
this.initData(newVal)
|
||||
},
|
||||
current(newVal) {
|
||||
this.defActive = this.active;
|
||||
let val = Number(newVal)
|
||||
setTimeout(() => {
|
||||
this.defActive = val;
|
||||
this.active = val;
|
||||
}, 20)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let sys = uni.getSystemInfoSync()
|
||||
this.height = sys.windowHeight
|
||||
this.top = sys.statusBarHeight + 20
|
||||
// #ifdef APP-NVUE || MP-TOUTIAO
|
||||
this.iphoneX = this.isPhoneX(sys)
|
||||
// #endif
|
||||
this.defActive = Number(this.current);
|
||||
this.active = this.defActive;
|
||||
this.initData(this.urls)
|
||||
},
|
||||
data() {
|
||||
let isNvue = false;
|
||||
// #ifdef APP-NVUE
|
||||
isNvue = true;
|
||||
// #endif
|
||||
return {
|
||||
isNvue: isNvue,
|
||||
imgUrls: [],
|
||||
active: 0,
|
||||
defActive: 0,
|
||||
top: 20,
|
||||
descr: '',
|
||||
iphoneX: false,
|
||||
height: 800
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
initData(vals) {
|
||||
if (vals && vals.length > 0) {
|
||||
if (typeof vals[0] === 'string') {
|
||||
vals = vals.map(item => {
|
||||
return {
|
||||
[this.srcKey]: item
|
||||
}
|
||||
})
|
||||
}
|
||||
this.imgUrls = vals;
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.getDescr(this.active)
|
||||
}, 10)
|
||||
})
|
||||
}
|
||||
},
|
||||
change(e) {
|
||||
this.active = e.detail.current
|
||||
this.getDescr(this.active)
|
||||
this.$emit('change', {
|
||||
index: this.active
|
||||
});
|
||||
},
|
||||
getDescr(index) {
|
||||
let item = this.imgUrls[index]
|
||||
if (item) {
|
||||
this.descr = item[this.descrKey] || ''
|
||||
}
|
||||
},
|
||||
// #ifdef APP-NVUE || MP-TOUTIAO
|
||||
isPhoneX(res) {
|
||||
if (!this.safeArea) return false;
|
||||
let iphonex = false;
|
||||
let models = ['iphonex', 'iphonexr', 'iphonexsmax', 'iphone11', 'iphone11pro', 'iphone11promax',
|
||||
'iphone12', 'iphone12mini', 'iphone12pro', 'iphone12promax', 'iphone13', 'iphone13mini',
|
||||
'iphone13pro', 'iphone13promax', 'iphone14', 'iphone14mini',
|
||||
'iphone14pro', 'iphone14promax', 'iphone15', 'iphone15mini',
|
||||
'iphone15pro', 'iphone15promax'
|
||||
]
|
||||
const model = res.model.replace(/\s/g, "").toLowerCase()
|
||||
const newModel = model.split('<')[0]
|
||||
if (models.includes(model) || models.includes(newModel) || (res.safeAreaInsets && res.safeAreaInsets
|
||||
.bottom > 0)) {
|
||||
iphonex = true;
|
||||
}
|
||||
return iphonex;
|
||||
},
|
||||
// #endif
|
||||
hideGallery() {
|
||||
this.$emit('hide', {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fui-gallery__wrap {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.fui-gallery__img-wrap {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
flex: 1;
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.fui-gallery__swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.fui-gallery__hidden {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-gallery__show {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
visibility: visible;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.fui-gallery__index-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.fui-gallery__index {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* #endif */
|
||||
font-size: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 100px;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
}
|
||||
|
||||
.fui-gallery__descr-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(17, 17, 17, .6);
|
||||
/* #ifndef APP-NVUE || MP-TOUTIAO */
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
/* #ifdef APP-NVUE || MP-TOUTIAO */
|
||||
.fui-gallery__weex-safe {
|
||||
padding-bottom: 34px;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.fui-gallery__descr {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
font-weight: normal;
|
||||
padding: 26rpx 32rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
z-index: 10;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-gallery__text-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
/* #ifndef APP-NVUE */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
lines: 1;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-gallery__img {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
width: 750rpx;
|
||||
/* #endif */
|
||||
}
|
||||
</style>
|
@ -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',
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<fui-background-image
|
||||
src="@/src/static/Home2 (1).jpgHome2(1).jpg">
|
||||
<fui-background-image src="@/src/static/Home2 (1).jpgHome2(1).jpg">
|
||||
</fui-background-image>
|
||||
<fui-sticky>
|
||||
<fui-tabs style="margin-top: 15%; background-color: transparent;" :tabs="tabs" @change="QieHuan"></fui-tabs>
|
||||
@ -232,12 +243,11 @@ async function dowonVideo(url: string) {
|
||||
</fui-section>
|
||||
|
||||
</view>
|
||||
|
||||
<view v-if="currentTabIndex == 0">
|
||||
|
||||
<fui-gallery :urls="GalleryPic" :show="show" @hide="hideGallery"></fui-gallery>
|
||||
<fui-timeaxis :padding="['32rpx','16rpx']">
|
||||
<fui-timeaxis-node v-for="(item,index ) in historyData" :key="index">
|
||||
|
||||
|
||||
<view class="fui-node__box" style="background: #FF2B2B;" v-if="item.status == 2">
|
||||
<fui-icon name="clear-fill" :size="28" color="#fff"></fui-icon>
|
||||
</view>
|
||||
@ -248,26 +258,22 @@ async function dowonVideo(url: string) {
|
||||
<fui-load-ani type="3"></fui-load-ani>
|
||||
</view>
|
||||
<template v-slot:right>
|
||||
|
||||
<!-- 判断是否为图片 -->
|
||||
<view class="fui-custom__wrap" v-if="linkType(item.output[0]) == 0">
|
||||
|
||||
<fui-section title="提示词" :descr="item.params?.positive" descrSize='32'
|
||||
descrColor='#000000'></fui-section>
|
||||
<view class="section__ctn" style="margin-top: 6%;">
|
||||
<image @click="showGallery"
|
||||
style="width: 300px; height: 390px; background-color:transparent;" :mode="scaleToFill"
|
||||
:src="item.output[0]" :show-menu-by-longpress='true'>
|
||||
</image>
|
||||
<!-- <fui-gallery :urls="item.output" :show="show" @hide="hideGallery"></fui-gallery> -->
|
||||
|
||||
<view class="section__ctn" style="margin-top: 6%;" >
|
||||
<view v-for="(pic,picIndex) in item.output">
|
||||
<image @click="showGallery(historyData[index].output)"
|
||||
style="width: 300px; background-color:transparent;" mode="widthFix" :src="pic"
|
||||
:show-menu-by-longpress='true'>
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<fui-icon
|
||||
style="margin-top:-11%; background-color:rgba(255, 255, 255, 0.5);; border-radius: 100px; position: absolute ; margin-left: 480rpx;"
|
||||
color="#ff0000" name="delete" @click="removeHistoryRecord(item._id)"></fui-icon>
|
||||
|
||||
|
||||
color="#ff0000" name="delete" @click="removeHistoryRecord(item.id)"></fui-icon>
|
||||
|
||||
</view>
|
||||
<!-- 如果是视频的话 -->
|
||||
@ -297,12 +303,15 @@ async function dowonVideo(url: string) {
|
||||
|
||||
<!-- <fui-lottie :options="option" action="play"></fui-lottie> -->
|
||||
<view class="fui-item__box">
|
||||
<image :src="item.params?.image_path_mask || item.params?.image_path_origin || testData " class="fui-logo" :show-menu-by-longpress='true'></image>
|
||||
|
||||
<image mode="widthFix"
|
||||
:src="item.params?.image_path_mask || item.params?.image_path_origin || testData "
|
||||
class="fui-logo" :show-menu-by-longpress='true'></image>
|
||||
|
||||
</view>
|
||||
<fui-icon
|
||||
style="margin-top:-12%; background-color:rgba(255, 255, 255, 0.5);; border-radius: 100px; position: absolute ; margin-left: 280rpx;"
|
||||
color="#ff0000" name="delete" @click="removeHistoryRecord(item._id)"></fui-icon>
|
||||
color="#ff0000" name="delete" @click="removeHistoryRecord(item.id)"></fui-icon>
|
||||
<view style="margin-top: -5%;">
|
||||
<fui-collapse-item background="transparent ">
|
||||
|
||||
@ -323,12 +332,8 @@ async function dowonVideo(url: string) {
|
||||
</fui-parse-group> -->
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
</fui-timeaxis-node>
|
||||
|
||||
</fui-timeaxis>
|
||||
</view>
|
||||
<view v-if="currentTabIndex == 1" class="tn-p">
|
||||
@ -340,8 +345,8 @@ async function dowonVideo(url: string) {
|
||||
|
||||
<view v-if="linkType(item.output[0]) == 0">
|
||||
<view>
|
||||
<image style=" width: 360rpx; height: 400rpx;background-color:transparent;"
|
||||
:mode="scaleToFill" :src="item.output[0]" :show-menu-by-longpress='true'></image>
|
||||
<image style="width: 200px; background-color:transparent;" mode="widthFix"
|
||||
:src="item.output[0]" :show-menu-by-longpress='true'></image>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -356,7 +361,9 @@ async function dowonVideo(url: string) {
|
||||
<view v-else>
|
||||
|
||||
<view class="fui-item__box">
|
||||
<image :src="item.params?.image_path_mask || item.params?.image_path_origin || testData " class="fui-logo"></image>
|
||||
<image
|
||||
:src="item.params?.image_path_mask || item.params?.image_path_origin || testData "
|
||||
class="fui-logo"></image>
|
||||
|
||||
</view>
|
||||
<!-- <fui-collapse-item background="transparent ">
|
||||
@ -403,7 +410,7 @@ async function dowonVideo(url: string) {
|
||||
|
||||
.fui-logo {
|
||||
width: 300rpx;
|
||||
height: 400rpx;
|
||||
// height: 400rpx;
|
||||
margin-right: 24rpx;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
|
||||
<view class="fuiNavBar">
|
||||
<fui-nav-bar custom background>
|
||||
<fui-nav-bar custom background='transparent'>
|
||||
<view class="fui-search__box ">
|
||||
<fui-tabs class="tabs_class" direction='column' color='#ACB0D0' :isSlider='false'
|
||||
selectedColor='#17135F' :tabs="tabbarData" scale='1.5' @change="changeHomePage" :center="false"
|
||||
:short="true" :scroll='false' itemPadding="25" :current="pageindex" size='28' fontWeight='900'
|
||||
background></fui-tabs>
|
||||
background='transparent'></fui-tabs>
|
||||
</view>
|
||||
</fui-nav-bar>
|
||||
|
||||
@ -24,12 +24,12 @@
|
||||
<!-- // 下面链接改成你的背景图片,求求大家用自己的,作者oss按量付费,开源不易!
|
||||
|
||||
// 背景图片和用到的素材我都给大家放在/src/static里了 -->
|
||||
<image @click="img2pay"
|
||||
<!-- <image @click="img2pay"
|
||||
style="width: 320rpx; height: 106rpx; background-color: transparent; display:inline-block; box-sizing:border-box; position:relative; left:40rpx;"
|
||||
mode="scaleToFill" src="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/画板 2 (1).png"></image>
|
||||
<image @click="handleGotoHistory"
|
||||
style="width: 320rpx; height: 106rpx; background-color: transparent; display:inline-block; box-sizing:border-box; position:relative; left:70rpx;"
|
||||
mode="scaleToFill" src="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/画板 3.png"></image>
|
||||
mode="scaleToFill" src="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/画板 3.png"></image> -->
|
||||
|
||||
<up-gap height="10"></up-gap>
|
||||
<AppTags />
|
||||
@ -76,10 +76,11 @@
|
||||
|
||||
<scroll-view scroll-y="true" class="scroll-Y" scroll-with-animation :scroll-into-view="items">
|
||||
<view class="fui-chat__box" ref="chatBox">
|
||||
<view v-for="(item,index) in msgList" :key="index" >
|
||||
<view :id="`items-${index}`" class="fui-chat__item" :class="[item.role=='user'?'fui-chat__right':'fui-chat__left']"
|
||||
<view v-for="(item,index) in msgList" :key="index">
|
||||
<view :id="`items-${index}`" class="fui-chat__item"
|
||||
:class="[item.role=='user'?'fui-chat__right':'fui-chat__left']"
|
||||
@tap="getCopyMsg(1,item.msg,$event)" @longpress="getCopyMsg(2,item.content,$event)">
|
||||
<fui-avatar background="#fff"
|
||||
<fui-avatar background="#f9f9f9"
|
||||
:src="item.role=='system'?'https://wangbo0808.oss-cn-shanghai.aliyuncs.com/assets/gpt4.png':user.avatar_url">
|
||||
</fui-avatar>
|
||||
<view class="fui-chat__content">
|
||||
@ -90,7 +91,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
@ -117,7 +118,7 @@
|
||||
|
||||
<view v-if="content.length == 0">
|
||||
<!-- 选择图片 -->
|
||||
<fui-icon name="clear" color="#3b3ee9" ></fui-icon>
|
||||
<fui-icon name="clear" color="#3b3ee9"></fui-icon>
|
||||
</view>
|
||||
<!-- <view v-if="msgStatu == true ">
|
||||
|
||||
@ -136,13 +137,11 @@
|
||||
上传图片
|
||||
</view>
|
||||
</fui-bottom-popup> -->
|
||||
<fui-safe-area background="#f8f8f8" v-if="!focus"></fui-safe-area>
|
||||
<fui-safe-area background="#f8f8f8"></fui-safe-area>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- #ifdef VUE2 -->
|
||||
<fui-safe-area background="transparent"></fui-safe-area>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
@ -180,6 +179,7 @@
|
||||
<GetUserInfoPopup />
|
||||
|
||||
</view>
|
||||
|
||||
<view class="u-m-l-10 u-p-10" @click='toEmpty'>
|
||||
<up-icon name="scan" color="#969799" size="28"></up-icon>
|
||||
</view>
|
||||
@ -188,25 +188,62 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-20">
|
||||
<!-- <view class="u-m-t-20">
|
||||
<up-cell-group class="trans_back">
|
||||
<up-cell icon="rmb-circle" title="算力充值" @click="showPay=true" :border='false'> </up-cell>
|
||||
</up-cell-group>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-20">
|
||||
<up-cell-group class="trans_back">
|
||||
</view> -->
|
||||
<image @click="img2pay"
|
||||
style="width: 675rpx; margin-bottom: -1%; height: 130rpx; background-color: transparent; display:inline-block; box-sizing:border-box; position:relative; margin-left:5%;"
|
||||
mode="scaleToFill" src="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/会员模块.png">
|
||||
</image>
|
||||
<view class="u-m-t-20" style="border-color: transparent; margin-left: 5%; margin-right: 5%;">
|
||||
<up-cell-group color='#fff' :border="false" class="trans_back">
|
||||
<!-- <up-cell icon="star" title="收藏(暂未开放)"></up-cell>-->
|
||||
<up-cell :border='false' icon="photo" title="绘图历史" @click="handleGotoHistory"></up-cell>
|
||||
<up-cell :border='false' icon="setting" title="退出登录" @click="handleLoginOut">
|
||||
<template #icon>
|
||||
<tn-icon name="logout" />
|
||||
</template>
|
||||
</up-cell>
|
||||
<button style="background-color: transparent; margin: 0; padding: 0; text-align: left;"
|
||||
open-type="contact">
|
||||
<up-cell icon="chat-fill" title="微信客服"></up-cell>
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<view
|
||||
style=" margin-top:5% ; color: #000000; height: 100%; background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1)); border-radius: 10px 10px 10px 10px; height: 120rpx; ">
|
||||
<up-cell :border='false' @click="handleGotoHistory">
|
||||
<template #icon>
|
||||
<up-icon size="30"
|
||||
name="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Gallery.png"></up-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<text class="u-cell-text" style='color: #000000;'>绘图历史</text>
|
||||
</template>
|
||||
</up-cell>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style=" margin-top:5% ;color: #000000; height: 100%; background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1)); border-radius: 10px 10px 10px 10px;">
|
||||
<button
|
||||
style="background-color: transparent; margin: 0; padding: 0; text-align: left; border-color: transparent;"
|
||||
open-type="contact">
|
||||
<up-cell :border="false">
|
||||
<template #icon>
|
||||
<up-icon size="30"
|
||||
name="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Chat.png"></up-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<text class="u-cell-text" style='color: #000000;'>联系客服</text>
|
||||
</template>
|
||||
</up-cell>
|
||||
</button>
|
||||
</view>
|
||||
<view
|
||||
style=" margin-top:5% ; color: #000000; height: 100%; background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1)); border-radius: 10px 10px 10px 10px; height: 120rpx; ">
|
||||
<up-cell :border='false' @click="handleLoginOut">
|
||||
<template #icon>
|
||||
<up-icon size="30"
|
||||
name="https://chinahu-ai-server.oss-cn-chengdu.aliyuncs.com/Iconly_Glass_Home.png"></up-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<text class="u-cell-text" style='color: #000000;'>退出登录</text>
|
||||
</template>
|
||||
</up-cell>
|
||||
</view>
|
||||
<!-- <up-cell icon="coupon" title="卡券(暂未开放)"></up-cell>-->
|
||||
<!-- <up-cell icon="heart" title="关注(暂未开放)"></up-cell>-->
|
||||
</up-cell-group>
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|