This commit is contained in:
pengxiaolong
2025-07-25 16:39:52 +08:00
parent 7116e57fc3
commit 8580cd18fa
128 changed files with 2991 additions and 411 deletions

View File

@@ -0,0 +1,80 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
data() {
return {
url: ""
};
},
onLoad(options) {
this.url = options.url;
},
methods: {
//返回上一页
goBack() {
common_vendor.wx$1.navigateBack({
delta: 1
});
},
//保存图片
saveImage() {
common_vendor.index.showLoading({
title: "正在下载图片...",
mask: true
});
common_vendor.index.downloadFile({
url: this.url,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
common_vendor.index.saveImageToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success: () => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "保存成功",
icon: "none",
duration: 2e3
});
},
fail: (saveErr) => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "保存失败: " + saveErr.errMsg,
icon: "none",
duration: 2e3
});
}
});
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "下载失败",
icon: "none",
duration: 2e3
});
}
},
fail: (downloadErr) => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "下载失败: " + downloadErr.errMsg,
icon: "none",
duration: 2e3
});
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.url,
b: common_vendor.o((...args) => $options.saveImage && $options.saveImage(...args)),
c: common_vendor.o(() => {
}),
d: common_vendor.o((...args) => $options.goBack && $options.goBack(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-61106fa9"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/pages/index/chat/messageComponent/fullscreen/imagePreview.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "图片预览",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="image-preview data-v-61106fa9" bindtap="{{d}}"><view class="data-v-61106fa9"></view><image class="image data-v-61106fa9" src="{{a}}" mode="aspectFill"></image><view class="Localbtn data-v-61106fa9" catchtap="{{c}}"><image class="Local data-v-61106fa9" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Local.png" mode="aspectFit" bindtap="{{b}}"></image></view></view>

View File

@@ -0,0 +1,26 @@
.image-preview.data-v-61106fa9 {
width: 100vw;
height: 100vh;
background-color: black;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.image.data-v-61106fa9 {
width: 100vw;
object-fit: contain;
}
.Localbtn.data-v-61106fa9 {
width: 100vw;
height: 50rpx;
margin-bottom: 50rpx;
display: flex;
flex-direction: row-reverse;
}
.Local.data-v-61106fa9 {
width: 50rpx;
height: 50rpx;
margin-right: 50rpx;
}

View File

@@ -0,0 +1,80 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
data() {
return {
url: ""
};
},
onLoad(options) {
this.url = options.url;
},
methods: {
//返回上一页
goBack() {
common_vendor.wx$1.navigateBack({
delta: 1
});
},
//保存图片
saveImage() {
common_vendor.index.showLoading({
title: "正在下载视频...",
mask: true
});
common_vendor.index.downloadFile({
url: this.url,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
common_vendor.index.saveVideoToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success: () => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "保存成功",
icon: "none",
duration: 2e3
});
},
fail: (saveErr) => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "保存失败: " + saveErr.errMsg,
icon: "none",
duration: 2e3
});
}
});
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "下载失败",
icon: "none",
duration: 2e3
});
}
},
fail: (downloadErr) => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "下载失败: " + downloadErr.errMsg,
icon: "none",
duration: 2e3
});
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.goBack()),
b: $data.url,
c: common_vendor.o((...args) => $options.saveImage && $options.saveImage(...args)),
d: common_vendor.o(() => {
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3d18a684"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/pages/index/chat/messageComponent/fullscreen/videoPreview.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "视频预览",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="image-preview data-v-3d18a684"><view class="top data-v-3d18a684"><image class="Fork data-v-3d18a684" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/crossCross.png" mode="scaleToFill" bindtap="{{a}}"/></view><video class="image data-v-3d18a684" src="{{b}}" mode="aspectFill"></video><view class="Localbtn data-v-3d18a684" catchtap="{{d}}"><image class="Local data-v-3d18a684" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Local.png" mode="aspectFit" bindtap="{{c}}"></image></view></view>

View File

@@ -0,0 +1,35 @@
.image-preview.data-v-3d18a684 {
width: 100vw;
height: 100vh;
background-color: black;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.image.data-v-3d18a684 {
width: 100vw;
object-fit: contain;
}
.Localbtn.data-v-3d18a684 {
width: 100vw;
height: 50rpx;
margin-bottom: 50rpx;
display: flex;
flex-direction: row-reverse;
}
.Local.data-v-3d18a684 {
width: 50rpx;
height: 50rpx;
margin-right: 50rpx;
}
.Fork.data-v-3d18a684{
width: 60rpx;
height: 60rpx;
margin-left: 50rpx;
}
.top.data-v-3d18a684{
margin-top: 110rpx;
width: 100vw;
}