|
@@ -56,6 +56,10 @@ Page({
|
|
|
'1':'正面',
|
|
|
'2':'背面',
|
|
|
},
|
|
|
+ boxImg:{
|
|
|
+ '5': '/customized/images/customized/box_white_big_1_out.png',
|
|
|
+ '6': '/customized/images/customized/box_white_big_2_out.png',
|
|
|
+ },
|
|
|
buildSrcArray: [],
|
|
|
customGoodsImg:"",
|
|
|
|
|
@@ -94,8 +98,7 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -280,12 +283,16 @@ Page({
|
|
|
imgSrcArray.forEach((res) => {
|
|
|
ctx.drawImage(res, dataPositionObj.left * rpx, dataPositionObj.top * rpx, dataPositionObj.width * rpx, dataPositionObj.height * rpx);
|
|
|
})
|
|
|
+ console.log('开始执行叠加')
|
|
|
+ ctx.drawImage(that.data.boxImg[i], 0, 0, 750 * rpx, 800 * rpx)
|
|
|
+
|
|
|
ctx.draw(true, function () {
|
|
|
wx.canvasToTempFilePath({
|
|
|
canvasId: 'comb-canvas' + i,
|
|
|
success: function (res) {
|
|
|
that.uploadFile(res.tempFilePath,that,function(data){
|
|
|
console.log(res, "合成成功");
|
|
|
+
|
|
|
let buildSrcArray = that.data.buildSrcArray;
|
|
|
|
|
|
buildSrcArray.push({
|
|
@@ -385,6 +392,6 @@ Page({
|
|
|
cb(false)
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
|
|
|
})
|