Browse Source

商品详情海报生成

threedate
Enzo 4 years ago
parent
commit
cb9fe5739f
  1. 30
      pages/goodsDetail/index.vue

30
pages/goodsDetail/index.vue

@ -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() {

Loading…
Cancel
Save