|
|
@@ -243,8 +243,12 @@ export default {
|
|
|
this.$refs.selOrder.init();
|
|
|
});
|
|
|
},
|
|
|
- async down(){
|
|
|
- // 获取图片对象和画布对象
|
|
|
+ async down(info){
|
|
|
+
|
|
|
+ await this.$service.order.down({ id:info.id }).then(data => {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
const imgUrl = 'https://api.shop.hzghd.com/image.png'
|
|
|
const response = await fetch(imgUrl)
|
|
|
const blob = await response.blob()
|
|
|
@@ -259,8 +263,25 @@ export default {
|
|
|
// 释放 Blob URL
|
|
|
window.URL.revokeObjectURL(url)
|
|
|
},
|
|
|
- allDown(){
|
|
|
+ async allDown(){
|
|
|
+
|
|
|
+ await this.$service.order.allDown({ id:info.id }).then(data => {
|
|
|
|
|
|
+ })
|
|
|
+
|
|
|
+ const imgUrl = 'https://api.shop.hzghd.com/image.png'
|
|
|
+ const response = await fetch(imgUrl)
|
|
|
+ const blob = await response.blob()
|
|
|
+ // 创建下载链接
|
|
|
+ const url = window.URL.createObjectURL(blob)
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.href = url
|
|
|
+ link.download = 'image.png'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+ // 释放 Blob URL
|
|
|
+ window.URL.revokeObjectURL(url)
|
|
|
},
|
|
|
detailShowFn(item) {
|
|
|
this.optionData = item;
|