| | |
| | | import { CSSProperties, useTemplateRef } from 'vue'; |
| | | import { OssAssets } from '@/constants'; |
| | | import { createQrCodeImg } from '@/components/Qrcode/utils/qrcode'; |
| | | import { downloadBase64File, Message } from '@/utils'; |
| | | import { isInAlipay } from '@/utils/env'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | ); |
| | | |
| | | function downloadQrcode() { |
| | | Taro.saveImageToPhotosAlbum({ |
| | | filePath: link.value, |
| | | }); |
| | | // Taro.saveImageToPhotosAlbum({ |
| | | // filePath: link.value, |
| | | // }); |
| | | if (isInAlipay) { |
| | | Message.warning('可在浏览器打开此网页下载文件。'); |
| | | } else { |
| | | // TODO 还需要做小程序下载的兼容 |
| | | downloadBase64File(link.value, '推广二维码'); |
| | | } |
| | | } |
| | | </script> |
| | | |