| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view >
- <view style="margin-top: 50rpx;" class="center flex-direction">
- <image
- style="width: 600rpx;height: 600rpx;"
- :src="src"
- mode="widthFix"></image>
- <view class="center margin-top-50">
- <text class="text-base">*请保存二维码,然后到微信中扫码关注该公众号</text>
- </view>
- </view>
- <view class="" style="position: fixed;bottom: 150rpx;width: 100%;">
- <view class="center">
- <view @click="saveImg" class="cu-btn flex radius text-lg"
- style="padding: 46rpx 0;background-color: #EF9944;color: #FFFFFF;width: 90%;">
- <u-icon name="download"></u-icon>
- <text class="margin-left-20">保存到相册</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: '',
- data() {
- return {
- src:''
- };
- },
- onLoad(options) {
- let src=options.src || 'http://img.yeepay.com/jccpb-wechat-certificate/certificate/qrcode/2021/11/12/16367106615474e8f948b0cec4593842bfc5ce14511e2.png'
- if (this.$isNotEmpty(src) && src.indexOf('https')<0) {
- this.src=src.replace('http','https')
- }
-
- },
- methods:{
- async saveImg(){
- let res=await this.$mpi.downloadFile(this.src)
- this.$mpi.saveImg(res)
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- </style>
|