优化
This commit is contained in:
1
unpackage/dist/build/mp-weixin/pages/index/chat/messageComponent/fullscreen/imagePreview.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/index/chat/messageComponent/fullscreen/imagePreview.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../../common/vendor.js"),o={data:()=>({url:""}),onLoad(e){this.url=e.url},methods:{goBack(){e.wx$1.navigateBack({delta:1})},saveImage(){e.index.showLoading({title:"正在下载图片...",mask:!0}),e.index.downloadFile({url:this.url,success:o=>{200===o.statusCode?e.index.saveImageToPhotosAlbum({filePath:o.tempFilePath,success:()=>{e.index.hideLoading(),e.index.showToast({title:"保存成功",icon:"none",duration:2e3})},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"保存失败: "+o.errMsg,icon:"none",duration:2e3})}}):(e.index.hideLoading(),e.index.showToast({title:"下载失败",icon:"none",duration:2e3}))},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"下载失败: "+o.errMsg,icon:"none",duration:2e3})}})}}};const i=e._export_sfc(o,[["render",function(o,i,a,n,t,d){return{a:t.url,b:e.o(((...e)=>d.saveImage&&d.saveImage(...e))),c:e.o((()=>{})),d:e.o(((...e)=>d.goBack&&d.goBack(...e)))}}],["__scopeId","data-v-d01cc90d"]]);wx.createPage(i);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "图片预览",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="image-preview data-v-d01cc90d" bindtap="{{d}}"><view class="data-v-d01cc90d"></view><image class="image data-v-d01cc90d" src="{{a}}" mode="aspectFill"></image><view class="Localbtn data-v-d01cc90d" catchtap="{{c}}"><image class="Local data-v-d01cc90d" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Local.png" mode="aspectFit" bindtap="{{b}}"></image></view></view>
|
||||
@@ -0,0 +1 @@
|
||||
.image-preview.data-v-d01cc90d{width:100vw;height:100vh;background-color:#000;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.image.data-v-d01cc90d{width:100vw;object-fit:contain}.Localbtn.data-v-d01cc90d{width:100vw;height:50rpx;margin-bottom:50rpx;display:flex;flex-direction:row-reverse}.Local.data-v-d01cc90d{width:50rpx;height:50rpx;margin-right:50rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/index/chat/messageComponent/fullscreen/videoPreview.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/index/chat/messageComponent/fullscreen/videoPreview.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../../common/vendor.js"),o={data:()=>({url:""}),onLoad(e){this.url=e.url},methods:{goBack(){e.wx$1.navigateBack({delta:1})},saveImage(){e.index.showLoading({title:"正在下载视频...",mask:!0}),e.index.downloadFile({url:this.url,success:o=>{200===o.statusCode?e.index.saveVideoToPhotosAlbum({filePath:o.tempFilePath,success:()=>{e.index.hideLoading(),e.index.showToast({title:"保存成功",icon:"none",duration:2e3})},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"保存失败: "+o.errMsg,icon:"none",duration:2e3})}}):(e.index.hideLoading(),e.index.showToast({title:"下载失败",icon:"none",duration:2e3}))},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"下载失败: "+o.errMsg,icon:"none",duration:2e3})}})}}};const i=e._export_sfc(o,[["render",function(o,i,n,a,t,d){return{a:e.o((e=>d.goBack())),b:t.url,c:e.o(((...e)=>d.saveImage&&d.saveImage(...e))),d:e.o((()=>{}))}}],["__scopeId","data-v-d6416587"]]);wx.createPage(i);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "视频预览",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="image-preview data-v-d6416587"><view class="top data-v-d6416587"><image class="Fork data-v-d6416587" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/crossCross.png" mode="scaleToFill" bindtap="{{a}}"/></view><video class="image data-v-d6416587" src="{{b}}" mode="aspectFill"></video><view class="Localbtn data-v-d6416587" catchtap="{{d}}"><image class="Local data-v-d6416587" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Local.png" mode="aspectFit" bindtap="{{c}}"></image></view></view>
|
||||
@@ -0,0 +1 @@
|
||||
.image-preview.data-v-d6416587{width:100vw;height:100vh;background-color:#000;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.image.data-v-d6416587{width:100vw;object-fit:contain}.Localbtn.data-v-d6416587{width:100vw;height:50rpx;margin-bottom:50rpx;display:flex;flex-direction:row-reverse}.Local.data-v-d6416587{width:50rpx;height:50rpx;margin-right:50rpx}.Fork.data-v-d6416587{width:60rpx;height:60rpx;margin-left:50rpx}.top.data-v-d6416587{margin-top:110rpx;width:100vw}
|
||||
Reference in New Issue
Block a user