|
@@ -143,6 +143,9 @@ Page({
|
|
|
},
|
|
|
getCombImg(that,i) {
|
|
|
let imgTouch = null, dataPositionObj=null;
|
|
|
+ that.setData({ // imgSrcArray 初始化
|
|
|
+ imgSrcArray:[],
|
|
|
+ })
|
|
|
console.log(wx.getStorageSync('madeCupImgData' + i),"wx.getStorageSync('madeCupImgData' + i)")
|
|
|
if(wx.getStorageSync('madeCupImgData' + i)){
|
|
|
imgTouch = wx.getStorageSync('madeCupImgData'+i);
|
|
@@ -256,7 +259,7 @@ Page({
|
|
|
imgSrcArray.forEach((res) => {
|
|
|
ctx.drawImage(res, dataPositionObj.left * rpx, dataPositionObj.top * rpx, dataPositionObj.width * rpx, dataPositionObj.height * rpx);
|
|
|
})
|
|
|
- wx.hideLoading()
|
|
|
+
|
|
|
ctx.draw(true, function () {
|
|
|
wx.canvasToTempFilePath({
|
|
|
canvasId: 'comb-canvas' + i,
|
|
@@ -272,6 +275,8 @@ Page({
|
|
|
if (i < 4) {
|
|
|
i = i + 1
|
|
|
that.getCombImg(that, i);
|
|
|
+ } else {
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
},
|
|
|
fail: function (err) {
|
|
@@ -282,6 +287,8 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
})
|
|
|
+ } else {
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
|
|
|
}
|