123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view>
- <!-- 顶部 -->
- <cu-custom bgColor="bg-blue" :isBack="true">
- <block slot="backText">{{title}}</block>
- <block slot="content"></block>
- <block slot="right">
- <view class=" flex justify-center">
- <button class="margin-top-ssm cu-btn round bg-blue text-blue">装饰</button>
- </view>
- </block>
- </cu-custom>
- <view class="padding content">
- <image mode="widthFix" :src="fileSrc"></image>
- </view>
- <view class=" topc text-xssl padding" @click="download()">
- <image src="/static/task/download.png" class="menuImageTask"></image>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- fileSrc:"",
- title:""
- }
- },
- onLoad(e) {
- this.fileSrc=e.file;
- this.title =e.title;
- },
- methods: {
- download(){
- uni.showLoading({
- title: '下载中'
- });
- uni.saveImageToPhotosAlbum({
- filePath: this.fileSrc,
- success: function() {
- uni.hideLoading();
- uni.showToast({
- title: '已保存到相册',
- icon: 'none',
- duration: 2200
- });
- }
- });
- }
- }
- }
- </script>
- <style>
- .topc {
- position: fixed;
- right: 0;
- top: 85%;
- height: 50px;
- line-height: 50px;
- }
- .text-xssl {
- font-size: 40px;
- }
- </style>
|