|
|
@ -334,6 +334,7 @@ |
|
|
that.canvasHidden = true |
|
|
that.canvasHidden = true |
|
|
that.maskHidden = true |
|
|
that.maskHidden = true |
|
|
} |
|
|
} |
|
|
|
|
|
wx.hideToast() |
|
|
console.log('海报生成成功') |
|
|
console.log('海报生成成功') |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
console.log('图片链接', that.imagePath) |
|
|
console.log('图片链接', that.imagePath) |
|
|
@ -369,35 +370,16 @@ |
|
|
}, |
|
|
}, |
|
|
formSubmit() { |
|
|
formSubmit() { |
|
|
var that = this; |
|
|
var that = this; |
|
|
uni.showLoading({title: '正在生成中'}); |
|
|
|
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '生成海报中...', |
|
|
|
|
|
icon: 'loading', |
|
|
|
|
|
duration: 100000 |
|
|
|
|
|
}); |
|
|
Promise.all([that.getWxCode(), that.getBackground()]).then(res => { |
|
|
Promise.all([that.getWxCode(), that.getBackground()]).then(res => { |
|
|
that.createNewImg(); |
|
|
that.createNewImg(); |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
this.$msg('生成失败,请稍后重试!'); |
|
|
this.$msg('生成失败,请稍后重试!'); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if(that.isShowButtonCount >= 2) { |
|
|
|
|
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
// this.$msg('请稍后重试!') |
|
|
|
|
|
// } |
|
|
|
|
|
// that.$u.throttle(() => { |
|
|
|
|
|
// wx.showToast({ |
|
|
|
|
|
// title: '生成海报中...', |
|
|
|
|
|
// icon: 'loading', |
|
|
|
|
|
// duration: 1000 |
|
|
|
|
|
// }); |
|
|
|
|
|
// console.log(that.onceCode) |
|
|
|
|
|
// console.log(that.backgroundImg) |
|
|
|
|
|
// if(that.onceCode && that.backgroundImg) { |
|
|
|
|
|
|
|
|
|
|
|
// }else if(!that.onceCode){ |
|
|
|
|
|
// this.$msg('小程序码生成失败!') |
|
|
|
|
|
// }else if(!that.backgroundImg){ |
|
|
|
|
|
// this.$msg('海报背景图生成失败!') |
|
|
|
|
|
// } |
|
|
|
|
|
// }, 500); |
|
|
|
|
|
}, |
|
|
}, |
|
|
//海报结束 |
|
|
//海报结束 |
|
|
getGoodsDetail() { |
|
|
getGoodsDetail() { |
|
|
|